ef8225444452a1486bd721f3285301fe84643b00 |
21-Jul-2014 |
Stephen Hines <srhines@google.com> |
Update Clang for rebase to r212749. This also fixes a small issue with arm_neon.h not being generated always. Includes a cherry-pick of: r213450 - fixes mac-specific header issue r213126 - removes a default -Bsymbolic on Android Change-Id: I2a790a0f5d3b2aab11de596fc3a74e7cbc99081d
nalysisBasedWarnings.cpp
eclSpec.cpp
elayedDiagnostic.cpp
cope.cpp
copeInfo.cpp
ema.cpp
emaAccess.cpp
emaCXXScopeSpec.cpp
emaCast.cpp
emaChecking.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExceptionSpec.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprMember.cpp
emaExprObjC.cpp
emaInit.cpp
emaLambda.cpp
emaLookup.cpp
emaObjCProperty.cpp
emaOpenMP.cpp
emaOverload.cpp
emaPseudoObject.cpp
emaStmt.cpp
emaStmtAsm.cpp
emaStmtAttr.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaTemplateVariadic.cpp
emaType.cpp
reeTransform.h
|
6bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89 |
29-May-2014 |
Stephen Hines <srhines@google.com> |
Update Clang for 3.5 rebase (r209713). Change-Id: I8c9133b0f8f776dc915f270b60f94962e771bc83
nalysisBasedWarnings.cpp
odeCompleteConsumer.cpp
eclSpec.cpp
elayedDiagnostic.cpp
dentifierResolver.cpp
umpDiagnostics.cpp
ultiplexExternalSemaSource.cpp
cope.cpp
copeInfo.cpp
ema.cpp
emaAccess.cpp
emaAttr.cpp
emaCXXScopeSpec.cpp
emaCast.cpp
emaChecking.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExceptionSpec.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprMember.cpp
emaExprObjC.cpp
emaInit.cpp
emaLambda.cpp
emaLookup.cpp
emaObjCProperty.cpp
emaOpenMP.cpp
emaOverload.cpp
emaPseudoObject.cpp
emaStmt.cpp
emaStmtAsm.cpp
emaStmtAttr.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaTemplateVariadic.cpp
emaType.cpp
reeTransform.h
ypeLocBuilder.cpp
ypeLocBuilder.h
|
651f13cea278ec967336033dd032faef0e9fc2ec |
24-Apr-2014 |
Stephen Hines <srhines@google.com> |
Updated to Clang 3.5a. Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
nalysisBasedWarnings.cpp
ndroid.mk
ttributeList.cpp
MakeLists.txt
eclSpec.cpp
elayedDiagnostic.cpp
dentifierResolver.cpp
umpDiagnostics.cpp
cope.cpp
copeInfo.cpp
ema.cpp
emaAccess.cpp
emaAttr.cpp
emaCXXScopeSpec.cpp
emaCast.cpp
emaChecking.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExceptionSpec.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprMember.cpp
emaExprObjC.cpp
emaInit.cpp
emaLambda.cpp
emaLookup.cpp
emaObjCProperty.cpp
emaOpenMP.cpp
emaOverload.cpp
emaPseudoObject.cpp
emaStmt.cpp
emaStmtAttr.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaTemplateVariadic.cpp
emaType.cpp
argetAttributesSema.cpp
argetAttributesSema.h
reeTransform.h
|
229d345dd5a73ef6ba75d1d730ecf96e8dc9ecec |
08-Feb-2014 |
Stephen Hines <srhines@google.com> |
Update clang for merge to LLVM 3.4. Update TableGen rules: - AttrExprArgs + AttrIdentifierArg + AttrParsedAttrImpl + AttrTypeArg Update config.h files. Adjust Android.mk for added/removed files: + TransProtectedScope.cpp - DumpXML.cpp + Consumed.cpp + CodeGenABITypes.cpp + SanitizerArgs.cpp + AllocationDiagnostics.cpp - CommonBugCategories.cpp + IdenticalExprChecker.cpp + CommonBugCategories.cpp - SymbolManager.cpp - TextPathDiagnostics.cpp + SymbolManager.cpp Change-Id: I73bea10e7e73e611f678bc5bf9935e26da63be17
ndroid.mk
|
1fab7c3e3bd97a909a80b1bfea1909c6e7347fc0 |
12-Feb-2014 |
Stephen Hines <srhines@google.com> |
Merge remote-tracking branch 'upstream/release_34' into merge-20140211 Conflicts: lib/Basic/Targets.cpp lib/Sema/SemaDeclAttr.cpp Change-Id: I17ca7161f32007272ee82036d237d051847dd02e
|
9a5d6bb0c26215adddc5ce00f21d863160cbd0b7 |
17-Dec-2013 |
Bill Wendling <isanbard@gmail.com> |
Merging r197409: ------------------------------------------------------------------------ r197409 | rikka | 2013-12-16 11:19:18 -0800 (Mon, 16 Dec 2013) | 4 lines Make Sema::BuildCXXNestedNameSpecifier correctly clear the previous CXXScopeSpec when necessary while performing typo correction. This fixes the crash reported in PR18213 (the problem existed since r185487, and r193020 made it easier to hit). ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@197463 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
|
b3617be53923ac3e5885ff5001aa748bd0223102 |
14-Dec-2013 |
Bill Wendling <isanbard@gmail.com> |
Merging r197298: ------------------------------------------------------------------------ r197298 | rsmith | 2013-12-13 17:04:22 -0800 (Fri, 13 Dec 2013) | 3 lines PR18232: implement instantiation for class-scope explicit specializations of class templates (a Microsoft extension). ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@197320 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
461b1b961cd83c1322c3bf402b3601954bc7757b |
14-Dec-2013 |
Bill Wendling <isanbard@gmail.com> |
Merging r197305: ------------------------------------------------------------------------ r197305 | rsmith | 2013-12-13 19:18:05 -0800 (Fri, 13 Dec 2013) | 7 lines PR18246: When performing template argument deduction to decide which template is specialized by an explicit specialization, start from the first declaration in case we've got a member of a class template (redeclarations might not number the template parameters the same way). Our recover here is still far from ideal. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@197319 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
2b3c4937d643743717b13bd8a374a72bc0eb7542 |
10-Dec-2013 |
Bill Wendling <isanbard@gmail.com> |
Merging r196852: ------------------------------------------------------------------------ r196852 | majnemer | 2013-12-09 16:40:58 -0800 (Mon, 09 Dec 2013) | 10 lines Sema: Enforce C++11 pointer-to-member template arguments should rules The standard is pretty clear on what it allows inside of template arguments for non-type template parameters of pointer-to-member. They must be of the form &qualified-id and cannot come from sources like constexpr VarDecls or things of that nature. This fixes PR18192. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@196885 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
c12b43ab249ade0bab324560bc2f70cefc6f3ec1 |
08-Dec-2013 |
Bill Wendling <isanbard@gmail.com> |
Merging r196488: ------------------------------------------------------------------------ r196488 | rsmith | 2013-12-05 00:30:59 -0800 (Thu, 05 Dec 2013) | 4 lines PR17983: Fix crasher bug in C++1y mode when performing a non-global array delete on a class which has no array cookie and has no class-specific operator new. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@196670 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExprCXX.cpp
|
21ba1e6ad00a27388d73d1e225ef2f7ae07763ab |
06-Dec-2013 |
Bill Wendling <isanbard@gmail.com> |
Merging r196459: ------------------------------------------------------------------------ r196459 | rtrieu | 2013-12-04 18:52:09 -0800 (Wed, 04 Dec 2013) | 2 lines Remove unused variable. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@196570 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
2434dcfb022778b06cfd257d830d0249680b87cf |
05-Dec-2013 |
Bill Wendling <isanbard@gmail.com> |
Merging r196454: ------------------------------------------------------------------------ r196454 | faisalv | 2013-12-04 17:40:41 -0800 (Wed, 04 Dec 2013) | 43 lines Fix init-captures for generic lambdas. For an init capture, process the initialization expression right away. For lambda init-captures such as the following: const int x = 10; auto L = [i = x+1](int a) { return [j = x+2, &k = x](char b) { }; }; keep in mind that each lambda init-capture has to have: - its initialization expression executed in the context of the enclosing/parent decl-context. - but the variable itself has to be 'injected' into the decl-context of its lambda's call-operator (which has not yet been created). Each init-expression is a full-expression that has to get Sema-analyzed (for capturing etc.) before its lambda's call-operator's decl-context, scope & scopeinfo are pushed on their respective stacks. Thus if any variable is odr-used in the init-capture it will correctly get captured in the enclosing lambda, if one exists. The init-variables above are created later once the lambdascope and call-operators decl-context is pushed onto its respective stack. Since the lambda init-capture's initializer expression occurs in the context of the enclosing function or lambda, therefore we can not wait till a lambda scope has been pushed on before deciding whether the variable needs to be captured. We also need to process all lvalue-to-rvalue conversions and discarded-value conversions, so that we can avoid capturing certain constant variables. For e.g., void test() { const int x = 10; auto L = [&z = x](char a) { <-- don't capture by the current lambda return [y = x](int i) { <-- don't capture by enclosing lambda return y; } }; If x was not const, the second use would require 'L' to capture, and that would be an error. Make sure TranformLambdaExpr is also aware of this. Patch approved by Richard (Thanks!!) http://llvm-reviews.chandlerc.com/D2092 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@196470 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaLambda.cpp
emaTemplateInstantiate.cpp
reeTransform.h
|
b7accd0f5690bdeb4bfa23380f33b0c38bfb4e52 |
05-Dec-2013 |
Bill Wendling <isanbard@gmail.com> |
Merging r196423: ------------------------------------------------------------------------ r196423 | faisalv | 2013-12-04 14:43:08 -0800 (Wed, 04 Dec 2013) | 17 lines Fix for PR18052 - Lambdas within NSDMI's and default arguments in Nested classes. Clang currently croaks on the following: struct X1 { struct X2 { int L = ([] (int i) { return i; })(2); }; }; asserting that the containing lexical context of the lambda is not Sema's cur context, when pushing the lambda's decl context on. This occurs because (prior to this patch) getContainingDC always returns the non-nested class for functions at class scope (even for inline member functions of nested classes (to account for delayed parsing of their bodies)). The patch addresses this by having getContainingDC always return the lexical DC for a lambda's call operator. Link to the bug: http://llvm.org/bugs/show_bug.cgi?id=18052 Link to Richard Smith's feedback on phabricator: http://llvm-reviews.chandlerc.com/D2331 Thanks! ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@196469 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
37c07bfb94e08f95da299596820da4ac98184288 |
02-Dec-2013 |
Bill Wendling <isanbard@gmail.com> |
Merging r196050: ------------------------------------------------------------------------ r196050 | rafael | 2013-12-01 08:54:29 -0800 (Sun, 01 Dec 2013) | 5 lines Handle CC and NoReturn when instantiating members of class templates. Before we were considering them only when instantiating templates. This fixes pr18033. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@196057 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateDeduction.cpp
|
65173e04eacb68ff89a58fbff14979eb318896c9 |
28-Nov-2013 |
Bill Wendling <isanbard@gmail.com> |
Merging r195887: ------------------------------------------------------------------------ r195887 | majnemer | 2013-11-27 14:57:44 -0800 (Wed, 27 Nov 2013) | 9 lines Sema: Instantiation of variable definitions weren't local enough We wouldn't properly save and restore the pending local instantiations we had built up prior to instantiation of a variable definition. This would lead to us instantiating too much causing crashes and other general badness. This fixes PR14374. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@195901 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
57907e56191adea0fa870c052054eb0fe0c4681f |
28-Nov-2013 |
Bill Wendling <isanbard@gmail.com> |
Merging r195827: ------------------------------------------------------------------------ r195827 | majnemer | 2013-11-27 00:20:38 -0800 (Wed, 27 Nov 2013) | 9 lines Sema: Instantiate local class and their members appropriately We would fail to instantiate them when the surrounding function was instantiated. Instantiate the class and add it's members to the list of pending instantiations, they should be resolved when we are finished with the function's body. This fixes PR9685. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@195900 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
45c2eed19c012d8b5e686aedb28cdbb36347fee5 |
27-Nov-2013 |
Bill Wendling <isanbard@gmail.com> |
Merging r195303: ------------------------------------------------------------------------ r195303 | rsmith | 2013-11-20 17:53:02 -0800 (Wed, 20 Nov 2013) | 4 lines PR10837: Warn if a null pointer constant is formed by a zero integer constant expression that is not a zero literal, in C. This is a different, and more targeted, approach than that in r194540. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@195815 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
13303b992574409370abff941d90ee4bfa5b97e5 |
26-Nov-2013 |
Bill Wendling <isanbard@gmail.com> |
Merging r195687: ------------------------------------------------------------------------ r195687 | rsmith | 2013-11-25 13:30:29 -0800 (Mon, 25 Nov 2013) | 3 lines PR18044: Reject declarations of enumtype::X early to avoid an assertion in downstream code. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@195720 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
7bd67854cfa59699e0efe72244af1578f2a1c09e |
26-Nov-2013 |
Bill Wendling <isanbard@gmail.com> |
Merging r195620: ------------------------------------------------------------------------ r195620 | rsmith | 2013-11-24 23:07:05 -0800 (Sun, 24 Nov 2013) | 3 lines Take cv-qualifiers on fields of class type into account when determining whether a defaulted special member function should be deleted. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@195719 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
2ca3db4876207a0f2d9ed683b0d3b6f3193f39bc |
22-Nov-2013 |
Bill Wendling <isanbard@gmail.com> |
Merging r195384: ------------------------------------------------------------------------ r195384 | rsmith | 2013-11-21 15:30:57 -0800 (Thu, 21 Nov 2013) | 2 lines PR18013: Don't assert diagnosing a bad std::initializer_list construction. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@195394 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
579d45ff5f92c4f5e31213e31490acdc5bcc5567 |
20-Nov-2013 |
Bill Wendling <isanbard@gmail.com> |
Merging r195154: ------------------------------------------------------------------------ r195154 | rafael | 2013-11-19 13:07:04 -0800 (Tue, 19 Nov 2013) | 15 lines Further fixes when thiscall is the default for methods. The previous patches tried to deduce the correct function type. I now realize this is not possible in general. Consider class foo { template <typename T> static void bar(T v); }; extern template void foo::bar(const void *); We will only know that bar is static after a lookup, so we have to handle this in the template instantiation code. This patch reverts my previous two changes (but not the tests) and instead handles the issue in DeduceTemplateArguments. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@195226 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateDeduction.cpp
emaType.cpp
|
d75c6a7233e63ca924f5882a668cd41f2dc3ce27 |
20-Nov-2013 |
Bill Wendling <isanbard@gmail.com> |
Merging r195146: ------------------------------------------------------------------------ r195146 | fjahanian | 2013-11-19 11:26:30 -0800 (Tue, 19 Nov 2013) | 4 lines ObjectiveC ARC. Removes a bogus warning when a weak property is redeclared as 'weak' in class extension. // rdar://15465916 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@195224 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
f0cc19f43d5e05dbd22d00faca8c093b7005be3f |
19-Nov-2013 |
Bill Wendling <isanbard@gmail.com> |
Merging r195163: ------------------------------------------------------------------------ r195163 | rsmith | 2013-11-19 14:47:36 -0800 (Tue, 19 Nov 2013) | 5 lines PR9547: If we're parsing a simple-declaration that contains a tag definition, and we see an ill-formed declarator that would probably be well-formed if the tag definition were just missing a semicolon, use that as the diagnostic instead of producing some other mysterious error. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@195165 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
emaType.cpp
|
ec1cef6a43d3787d7a55ca3793f424a21751af4b |
19-Nov-2013 |
Bill Wendling <isanbard@gmail.com> |
Merging r195135: ------------------------------------------------------------------------ r195135 | fjahanian | 2013-11-19 09:42:25 -0800 (Tue, 19 Nov 2013) | 3 lines bjectiveC. Use a uniform diagnostic for 'objc_bridge' attribute. // rdar://15454846. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@195141 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
f41e20ae7a36806d148f0e50fa8e9339b5d759a4 |
19-Nov-2013 |
Bill Wendling <isanbard@gmail.com> |
Merging r195126: ------------------------------------------------------------------------ r195126 | joerg | 2013-11-19 05:38:38 -0800 (Tue, 19 Nov 2013) | 2 lines Revert r194540, it breaks various C++ programs. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@195139 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ce41d4e4cc9bc0dd7227938fa78f2744775322eb |
19-Nov-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
ObjectiveC objc_bridge. Minor refactoring. // rdar://15454846 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195070 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
3daade9020b55e5369256b6536e6c2f6f7a15060 |
19-Nov-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
ObjectiveC 'objc_bridging'. Assorment of improvements per Doug/Jordan comments. // rdar://15454846. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195066 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
emaExprObjC.cpp
|
0f3bb9eb07a0cfd49929ca0d70bbe13b0aa74aff |
19-Nov-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
ObjectiveC ARC. Adopt objc_bridge attribute on struct/union/class instead of typedef of such types. // rdar://15454846 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195061 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
emaExprObjC.cpp
|
f4966557bedd375dbf0909c8d94e092ddf0dc8de |
18-Nov-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
The attached patch is a follow up from my previous one. The existing logic was not handling typedefs as free functions. This was not causing problems with the existing tests, but does with the microsoft abi where they have to get a different calling convention. I will try to refactor this into a method on Declarator in a second. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195050 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
cdf7cfc16b340a39e52be769d533049a88dca770 |
18-Nov-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Use the default method CC in GetFullTypeForDeclarator. Before this patch explicit template instatiations of member function templates were failing with the microsoft abi and 32 bits. This was happening because the expected and computed function types had different calling conventions. This patch fixes it by considering the default calling convention in GetFullTypeForDeclarator. This fixes pr17973. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195032 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
00be52d19eba3aaa3a154d8cdf4d47240e0dc7d0 |
17-Nov-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
ObjectiveC ARC. More validation of toll-free bridging of CF objects with objc_bridge'ing annotaiton. // rdar://15454846 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194938 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
749152bf05e859596895034acddc4188ed23eeb3 |
16-Nov-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
ObjectiveC ARC. Validate toll free bridge casting of ObjectiveC objects to CF types when CF type has the objc_bridge attribute. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194930 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
cf19e5bad3efe2c7efa886e984988ea21825c45d |
16-Nov-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
If a replaceable global operator new/delete is marked inline, don't warn if it's also __attribute__((used)), since that undoes the problematic part of 'inline'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194916 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
9571ab16538ea5fb8b405b74a1683b5c5880637c |
16-Nov-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
ObjetiveC ARC. Start diagnosing invalid toll free bridging. // rdar://15454846. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194915 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
5f900e8f3f6f1aff13f4bfe6991864ccd0659537 |
16-Nov-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Downgrade the Error on an 'inline' operator new or delete to an ExtWarn. Some projects are relying on such (questionable) practices, so we should give them a way to opt out of this diagnostic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194905 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
4b777c05fc287830af01e7c2dfebe7a86f13b260 |
16-Nov-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
ObjectiveC ARC. Only briding of pointer to struct CF object is allowed. Improve on wording on illegal objc_bridge argumment. // rdar://15454846 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194881 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaExprObjC.cpp
|
e78728a6a6b624ad39a1accf297c773a1e427ba4 |
15-Nov-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
ObjectiveC ARC. Lookup type associated with objc_bridage at the point of CF object type-cast and issue diagnostic if it is not a valid ObjectiveC class. // rdar//15454846. This is wip. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194861 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
4417498c9f31829c1c2e0b0a99db13420e988746 |
15-Nov-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
ObjectiveC. Fixes a bogus warning of unused backing ivar when property belongs to a super class and currnt class happens to have a method with same name as property. // rdar//15473432 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194830 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
26297f57634994b4ae47a0774c372d6944265bb2 |
15-Nov-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
When we hit a #include directive that maps to a module import, emit a token representing the module import rather than making the module immediately visible. This serves two goals: * It avoids making declarations in the module visible prematurely, if we walk past the #include during a tentative parse, for instance, and * It gives a diagnostic (although, admittedly, not a very nice one) if a header with a corresponding module is included anywhere other than at the top level. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194782 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f93ec7608aa79f9aac09304bfd3bc1918caf128f |
15-Nov-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR17533 and duplicates: don't compute the return type of an overloaded operator until after we've referenced the operator; otherwise, we might pick up a not-yet-deduced type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194775 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaOverload.cpp
|
f72bc468e54819393c1805f19cbf353061b4c0ec |
15-Nov-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Don't reject dependent range-based for loops in constexpr functions. The loop variable isn't really uninitialized, it's just not initialized yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194767 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
758c4d86bb9b2298374fce5b3ca4a35f953f2d2e |
14-Nov-2013 |
Joey Gouly <joey.gouly@arm.com> |
[OpenCL] Make sure we put string literals in the constant address space. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194717 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
4ae7d04eaf4a734896673a1cff56b703c7db318e |
14-Nov-2013 |
Ted Kremenek <kremenek@apple.com> |
Revert r194663 and r194647. Per feedback from Jordan Rose I realized this wasn't the right way to go. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194664 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
e452d6127ebd8899bb93fae8b6b55f339d261a0a |
14-Nov-2013 |
Ted Kremenek <kremenek@apple.com> |
Refine -Wunused-variable to only suppress warning for __bridge_transfer, not all bridge casts. Also refine test case to capture the intention of this suppression. Essentially some developers use __bridge_transfer as if it were a safe CFRelease. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194663 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
624bb5e59dbcc24efeee7dff12c9b48d2b5077e9 |
14-Nov-2013 |
Kevin Qin <Kevin.Qin@arm.com> |
[AArch64 neon] support poly64 and relevant intrinsic functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194660 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaType.cpp
|
142ab06ffb2ec286917554aa5d945323a1ebf359 |
14-Nov-2013 |
Serge Pavlov <sepavloff@gmail.com> |
Added warning on structures/unions that are empty or contain only bit fields of zero size. Warnings are generated in C++ mode and if only such type is defined inside extern "C" block. The patch fixed PR5065. Differential Revision: http://llvm-reviews.chandlerc.com/D2151 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194653 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
1f64cfc5b3d164c3cdf397d82035a6a92e543443 |
14-Nov-2013 |
Ted Kremenek <kremenek@apple.com> |
Suppress -Wunused-variable when initializer uses bridge casts for memory management. Fixes <rdar://problem/15432770>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194647 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
7f82297e3f0d2bd9c8aab4fe4eded17572b0fce0 |
14-Nov-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
ObjectiveC ARC. objc_bridge attribute should be applied to toll-free bridging cf types only. // rdar//15454846 wip. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194640 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
933a8948fc5701ac4b02ffacc9f695aeb7eedba9 |
14-Nov-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
ObjectiveC ARC. Introduce a new attribute, 'objc_bridge' that teaches the compiler about a subset of toll-free bridging semantics. This is wip. // rdar://15454846 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194633 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
d1fa81ccbce1ba2d8f467e7c2800250b81ea2e35 |
13-Nov-2013 |
Serge Pavlov <sepavloff@gmail.com> |
Warn on duplicate function specifier This patch fixes PR8264. Duplicate qualifiers already are diagnozed, now the same diagnostics is issued for duplicate function specifiers. Differential Revision: http://llvm-reviews.chandlerc.com/D2025 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194559 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
|
f2febe6b5e9213fb4d97e1d4f9b47166be89afad |
13-Nov-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR10837: Warn if a null pointer constant is formed by a zero integer constant expression that is not a zero literal, in C. Patch by Ivan A. Kosarev! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194540 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
186b26d01f2876e8b4b1f0f233e13fc4c613cddc |
12-Nov-2013 |
Weiming Zhao <weimingz@codeaurora.org> |
add intrinsics: __builtin_arm_{dmb,dsb} for ARM git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194513 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
9015bfcaf2f369d0f232f27b2655eb9f5464a280 |
12-Nov-2013 |
Faisal Vali <faisalv@yahoo.com> |
COSMETIC: Fix 80 column overflow in some comments introduced in r194188 no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194449 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
394558e6a1329b791de69d0fc7c618eac0dbc982 |
12-Nov-2013 |
Faisal Vali <faisalv@yahoo.com> |
A quick fix to PR17877 that was introduced by r194188 (generic-lambda-capturing) that broke libc++. See http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-November/033369.html for discussion on cfe-dev. This fix explicitly checks whether we are within the declcontext of a lambda's call operator - which is what I had intended to be true (and assumed would be true if getCurLambda returns a valid pointer) before checking whether a lambda can capture the potential-captures of the innermost lambda. A deeper fix (that addresses why getCurLambda() returns a valid pointer when perhaps it shouldn't?) - as proposed by Richard Smith in http://llvm.org/bugs/show_bug.cgi?id=17877 - has been suggested as a FIXME. Patch was LGTM'd by Richard (just barely :) http://llvm-reviews.chandlerc.com/D2144 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194448 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
3347b497157d36cf280d1d9f52956faa6e702f34 |
12-Nov-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Rather than duplicating extension diagnostics to allow them to cause a substitution failure, allow a flag to be set on the Diagnostic object, to mark it as 'causes substitution failure'. Refactor Diagnostic.td and the tablegen to use an enum for SFINAE behavior rather than a bunch of flags. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194444 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
emaOverload.cpp
|
126bd8f29558535f97511603769f9c81288c0c57 |
12-Nov-2013 |
Faisal Vali <faisalv@yahoo.com> |
COSMETIC: Right justify an asterix in the previous refactoring. Hopefully Richard won't notice this terrible egregiocity - clearly the work of a malevolent poltergeist - fixed now ;) No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194439 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
d78d6591fa2556b037d3571fde3631d0243c08d7 |
12-Nov-2013 |
Faisal Vali <faisalv@yahoo.com> |
REFACTOR: Have PushLambdaScope return the LambdaScopeInfo that it creates. No Functionality change. This refactoring avoids having to call getCurLambda right after PushLambdaScope, to obtain the LambdaScopeInfo that was created during the call to PushLambdaScope. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194438 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDecl.cpp
reeTransform.h
|
ce6426feda94ca716ee7743b71961850740eb08d |
08-Nov-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Issue a diagnostic if we see a templated friend declaration that we do not support. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194273 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplate.cpp
|
2f8b0cc5fa808368a4f84806a60a1254b772caea |
08-Nov-2013 |
Douglas Gregor <dgregor@apple.com> |
s/DebugPrint/dump/g git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194242 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
emaOverload.cpp
|
3940e3b9c7cc89284117112e07ad1c925dcd0ab4 |
08-Nov-2013 |
Douglas Gregor <dgregor@apple.com> |
Objective-C++ ARC: Improve the conversion to a const __unsafe_unretained reference. Under ARC++, a reference to a const Objective-C pointer is implicitly treated as __unsafe_unretained, and can be initialized with (e.g.) a __strong lvalue. Make sure this behavior does not break template argument deduction and (related) that partial ordering still prefers a 'T* const&' template over a 'T const&' template when this case kicks in. Fixes <rdar://problem/14467941>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194239 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaTemplateDeduction.cpp
|
a1977bf046b6f4721f63bdfa02e7887dc760bfd1 |
08-Nov-2013 |
Douglas Gregor <dgregor@apple.com> |
Fix a bogus assert I introduced in r194224 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194237 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
1ce550906a9163fdf4d174a2f4ed594aa18d75ac |
07-Nov-2013 |
Douglas Gregor <dgregor@apple.com> |
Re-instate contextual conversion to Objective-C pointers in message sends. When performing an Objective-C message send to a value of class type, perform a contextual conversion to an Objective-C pointer type. We've had this for a long time, but it recently regressed. Fixes <rdar://problem/15234703>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194224 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
emaOverload.cpp
|
baa9af171fd7ac6ff6a1b5ca09bf77168c1728e7 |
07-Nov-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR17800: When performing pack expansion, we must always rebuild the AST nodes to avoid breaking AST invariants by reusing Stmt nodes within the same function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194217 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
740265db4f5764782d3486d855bfccfc7d49f194 |
07-Nov-2013 |
Faisal Vali <faisalv@yahoo.com> |
Remove an unnecessary condition that I added hastily: Unsigned numbers are obviously >= 0 ;) Also - others have complained about some white space issues - sorry about that - continues to be a pain point for me - will try and see what I can do with clang-format this evening after work - as a short term fix, if anyone can email me the files that they have already identified with issues, it would help me speed up a focused fix. sorry. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194206 91177308-0d34-0410-b5e6-96231b3b80d8
copeInfo.cpp
|
3efb8e866d6d5c1ad9f59f8f27058c7a6ebedd3e |
07-Nov-2013 |
Benjamin Kramer <benny.kra@googlemail.com> |
Add parens for || in && in assert. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194200 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
54de9bb0e67a3c06f6daad27af74e87f84944fa3 |
07-Nov-2013 |
Enea Zaffanella <zaffanella@cs.unipr.it> |
Fixed bug in return type of __builtin_va_start(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194197 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
94358a855074605d7716604a92b88befd25fc58c |
07-Nov-2013 |
David Blaikie <dblaikie@gmail.com> |
Unbreak the Clang -Werror build by removing some unused variables git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194190 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
c00e4194296e994efab0e4bf64ca66737850bdf0 |
07-Nov-2013 |
Faisal Vali <faisalv@yahoo.com> |
This patch implements capturing of variables within generic lambdas. Both Richard and I felt that the current wording in the working paper needed some tweaking - Please see http://llvm-reviews.chandlerc.com/D2035 for additional context and references to core-reflector messages that discuss wording tweaks. What is implemented is what we had intended to specify in Bristol; but, recently felt that the specification might benefit from some tweaking and fleshing. As a rough attempt to explain the semantics: If a nested lambda with a default-capture names a variable within its body, and if the enclosing full expression that contains the name of that variable is instantiation-dependent - then an enclosing lambda that is capture-ready (i.e. within a non-dependent context) must capture that variable, if all intervening nested lambdas can potentially capture that variable if they need to, and all intervening parent lambdas of the capture-ready lambda can and do capture the variable. Of note, 'this' capturing is also currently underspecified in the working paper for generic lambdas. What is implemented here is if the set of candidate functions in a nested generic lambda includes both static and non-static member functions (regardless of viability checking - i.e. num and type of parameters/arguments) - and if all intervening nested-inner lambdas between the capture-ready lambda and the function-call containing nested lambda can capture 'this' and if all enclosing lambdas of the capture-ready lambda can capture 'this', then 'this' is speculatively captured by that capture-ready lambda. Hopefully a paper for the C++ committee (that Richard and I had started some preliminary work on) is forthcoming. This essentially makes generic lambdas feature complete, except for known bugs. The more prominent ones (and the ones I am currently aware of) being: - generic lambdas and init-captures are broken - but a patch that fixes this is already in the works ... - nested variadic expansions such as: auto K = [](auto ... OuterArgs) { vp([=](auto ... Is) { decltype(OuterArgs) OA = OuterArgs; return 0; }(5)...); return 0; }; auto M = K('a', ' ', 1, " -- ", 3.14); currently cause crashes. I think I know how to fix this (since I had done so in my initial implementation) - but it will probably take some work and back & forth with Doug and Richard. A warm thanks to all who provided feedback - and especially to Doug Gregor and Richard Smith for their pivotal guidance: their insight and prestidigitation in such matters is boundless! Now let's hope this commit doesn't upset the buildbot gods ;) Thanks! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194188 91177308-0d34-0410-b5e6-96231b3b80d8
copeInfo.cpp
emaDecl.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprMember.cpp
emaLambda.cpp
|
bafa74f360cb3ec82fa8c688845330f491d167fd |
07-Nov-2013 |
David Majnemer <david.majnemer@gmail.com> |
[-fms-extensions] Add support for __FUNCDNAME__ Summary: Similar to __FUNCTION__, MSVC exposes the name of the enclosing mangled function name via __FUNCDNAME__. This implementation is very naive and unoptimized, it is expected that __FUNCDNAME__ would be used rarely in practice. Reviewers: rnk, rsmith, thakis CC: cfe-commits, silvas Differential Revision: http://llvm-reviews.chandlerc.com/D2109 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194181 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
298028994ea4dae826422c15139682b82197a35e |
06-Nov-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix diagnostic goof in r194161. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194162 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
195dd7c8448893e13a0cd8e776520f14cba65b08 |
06-Nov-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Add a limit to the length of a sequence of 'operator->' functions we will follow when building a class member access expression. Based on a patch by Rahul Jain! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194161 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
0004329758b99d2b92096b353e35c427ebbee622 |
05-Nov-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Simplify: we don't care why constant evaluation might have failed when we're checking an expression for constant overflow. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194099 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
c879fe57330faa87ac22f39ec6f37d992db9790f |
05-Nov-2013 |
Joey Gouly <joey.gouly@arm.com> |
Do not allow functions or kernels called 'main' in OpenCL. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194068 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
6bae51a21c29e00050dddc76f3ea42af21745ebd |
05-Nov-2013 |
David Majnemer <david.majnemer@gmail.com> |
Sema: Improve comment introduced in r193397 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194052 91177308-0d34-0410-b5e6-96231b3b80d8
emaLambda.cpp
|
2b61039ceb9162e7b47ed4cb92b957c8a7668da1 |
05-Nov-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
ObjectiveC. Method implementations should only check for "Missing call to Super" in the overriding method and not in the method itself. // rdar://15385981. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194031 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
33b1f634e074835a1b49c23d2b7674161fef1762 |
04-Nov-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Issue a diagnostic if an implicitly-defined move assignment operator would move the same virtual base class multiple times (and the move assignment is used, and the move assignment for the virtual base is not trivial). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193977 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
a8d478ec139fde0069d671f584416566a4d072a9 |
04-Nov-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Update a comment to match current core issues list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193970 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
743cbb91499e138a63a398c6515667905f1b3be8 |
04-Nov-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Implement final resolution of DR1402: implicitly-declared move operators that would be deleted are still declared, but are ignored by overload resolution. Also, don't delete such members if a subobject has no corresponding move operation and a non-trivial copy. This causes us to implicitly declare move operations in more cases, but risks move-assigning virtual bases multiple times in some circumstances (a warning for that is to follow). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193969 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExprCXX.cpp
emaOverload.cpp
|
62e9370d9da9ee4f675da52d559a79c93c30642e |
04-Nov-2013 |
David Majnemer <david.majnemer@gmail.com> |
Sema: Do not allow overloading between methods based on restrict If the sole distinction between two declarations is that one has a __restrict qualifier then we should not consider it to be an overload. Instead, we will consider it as an incompatible redeclaration which is similar to how MSVC, ICC and GCC would handle it. This fixes PR17786. N.B. We must not mangle in __restrict into method qualifiers becase we don't allow overloading between such declarations anymore. To do otherwise would be a violation of the Itanium ABI. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193964 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
28165b7a977339253ce34b7b1b1c442b9b73f46d |
02-Nov-2013 |
David Majnemer <david.majnemer@gmail.com> |
Sema: Disallow inheriting from classes with flexible array members Flexible array members inherently index off of the end of their parent type. We shouldn't allow this type to be used as a base, virtual or otherwise, because indexing off the end may find us inside of another base or the derived types members. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193923 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
7041fcc6b8078a7f87713dac168c2bed64a9d191 |
02-Nov-2013 |
David Majnemer <david.majnemer@gmail.com> |
Sema: Remove stray whitespace around Sema::CheckBaseSpecifier git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193922 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
3a665576c16c353d8f524189d695e3c9140eefb8 |
02-Nov-2013 |
David Majnemer <david.majnemer@gmail.com> |
Sema: Disallow derived classes with virtual bases from having flexible array members Flexible array members only work out if they are the last field of a record, however virtual bases would give us many situations where the flexible array member would overlap with the virtual base fields. It is unlikely in the extreme that this behavior was intended by the user so raise a diagnostic instead of accepting. This is will not reject conforming code because flexible array members are an extension in C++ mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193920 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
633c0c2fbc1d9272b3f25220ffb8fe4b04ece3db |
02-Nov-2013 |
David Majnemer <david.majnemer@gmail.com> |
Sema: Cleanup and simplify anonymous union diagnostics The determination of which diagnostics would be issued for certain anonymous unions started to get a little ridiculous. Clean this up by inverting the condition-tree's logic from dialect -> issue to issue -> diagnostic. As part of this cleanup, move ext_c99_flexible_array_member from DiagnosticParseKinds.td to DiagnosticSemaKinds.td because it's driven by Sema, not Parse. Also, the liberty was taken to edit ext_c99_flexible_array_member to match other, similar, diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193919 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
6f6dc158ee2fbe5b9b8685dad45be02cba0873f5 |
02-Nov-2013 |
David Majnemer <david.majnemer@gmail.com> |
Sema: Flexible array members were introduced in C99, diagnose their use in C++ The declaration of a flexible array member was correctly diagnosed as an extension in C89 mode but not in C++. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193918 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
ada04a1f55ffa24dfc040032a2186466eace3435 |
02-Nov-2013 |
David Majnemer <david.majnemer@gmail.com> |
Sema: Properly indent statements in Sema::ActOnLastBitfield git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193917 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
895ff0d3f5b3e3a6bc5cbdede8d3d7367824b5d5 |
02-Nov-2013 |
David Majnemer <david.majnemer@gmail.com> |
Sema: trim trailing whitespace in Sema::ActOnLastBitfield git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193916 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
5423746bbd6128027ad16de77718d507cedc97a9 |
02-Nov-2013 |
Richard Trieu <rtrieu@google.com> |
Change the other -Wtautological-compare warnings to not trigger in template specializations. Also switch to -Wuninitialized for a test case that depended on a warning firing in template specializations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193906 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
2d023ecb2b9204a3dbc3b88ad9564b0a5bc211f6 |
02-Nov-2013 |
Warren Hunt <whunt@google.com> |
Wraps lazily generated builtins in an extern "C" context Differential Revision: http://llvm-reviews.chandlerc.com/D2082 Adds a lang_c LinkageSpecDecl to lazily generated builtins. This enforces correct behavior for builtins in a variety of cases without special treatment elsewhere within the compiler (special treatment is removed by the patch). It also allows for C++ overloads of builtin functions, which Microsoft uses in their headers e.g. _InterlockedExchangeAdd is an extern C builtin for the long type but an inline wrapper for int type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193896 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d9553e35e1e3af6fc4ca817b169dc796a5b54bcd |
01-Nov-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
ObjectiveC. Define a new cc1 flag -fobjc-subscripting-legacy-runtime which is off by default and on only when using ObjectiveC legacy runtime. Use this flag to allow array and dictionary subscripting and disallow objectiveC pointer arithmatic in ObjectiveC legacy runtime. // rdar://15363492 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193889 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprObjC.cpp
|
cbc198785c8ec64c1f869e65132cd4336f5c750a |
01-Nov-2013 |
Richard Trieu <rtrieu@google.com> |
Disable -Wtautological-compare in template instantiations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193888 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
311cb2b3221f6253ef86580151662f6c6788a320 |
01-Nov-2013 |
Richard Trieu <rtrieu@google.com> |
Disable -Wtautological-constant-out-of-range-compare in template instantiations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193887 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
e28bdc329ebe990844795018fc8271fbd9d28364 |
01-Nov-2013 |
Benjamin Kramer <benny.kra@googlemail.com> |
Sema: Make helper function static. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193857 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
ddc2a53584f91b1fdcc466f1ea1345d97c428802 |
31-Oct-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Store a TypeArgument on an attribute as a TypeSourceInfo*, rather than as a QualType with a SourceLocation stashed alongside. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193803 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
|
cd9d305fa4f613b89d101246bf58f6cb13247d12 |
31-Oct-2013 |
Kaelyn Uhrain <rikka@google.com> |
Fix a C struct diagnostic regression introduced by r187504 (PR17762). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193799 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprMember.cpp
|
d386fef64f1fd00fc9a97efb963d8ec393fd1ace |
31-Oct-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Factor out custom parsing for iboutletcollection and vec_type_hint attributes into a separate "parse an attribute that takes a type argument" codepath. This results in both codepaths being a lot cleaner and simpler, and fixes some bugs where the type argument handling bled into the expression argument handling and caused us to both accept invalid and reject valid attribute arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193731 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
190d1af17608f05bc9792af21fd0b4e20e438588 |
30-Oct-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR17731: When determining whether a tag and a non-tag were declared in the same scope, be careful about function-scope declarations (which are not declared in their semantic context). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193671 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
0e429f1f48298b749cd0b0d6e931ed15c2a7a2b1 |
29-Oct-2013 |
Chris Wailes <chris.wailes@gmail.com> |
Changed tests_typestate to test_typestate for consistency. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193648 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
a6306fc4b03672f7ecc0ae43d2620a0fc36764e9 |
29-Oct-2013 |
Tim Northover <tnorthover@apple.com> |
ARM: fix AST for __builtin_arm_strex call The AST was constructed so that this builtin returned the default BoolTy and since I'd opted for custom SemaChecking, I should have set it properly at that point. This caused an assertion failure when the types didn't match up with what we generated. This makes it return an IntTy, which is as good as anything. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193606 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
099791143ba548bf0a228da0d268b463a3507929 |
26-Oct-2013 |
David Majnemer <david.majnemer@gmail.com> |
Sema: Emit a nicer diagnostic when IndirectFieldDecls show up inappropriately in non-type template arguments git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193462 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
d7b485599cf23605e0e7e9846a7c5df11783b9f7 |
26-Oct-2013 |
David Majnemer <david.majnemer@gmail.com> |
Sema: Correctly build pointer-to-member arguments from a template argument with an IndirectFieldDecl We only considered FieldDecl and CXXMethodDecl as appropriate which would cause us to believe the IndirectFieldDecl corresponded to an argument of it's field type instead of a pointer-to-member type. This fixes PR17696. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193461 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
9d9a9436246160fe1dc3fe768ba5f69874d4b6ed |
26-Oct-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
ObjectiveC arc. Warn when an implicitly 'strong' property is redeclared as 'weak' in class extension. // rdar://15304886 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193453 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
7784d5166243ddd388b3a4c1f7bde7db6bbac4f2 |
26-Oct-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
Minor performance improvement to not do unnecessary work in my last patch. // rdar://14989999 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193441 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
4e7f00c74487bca84993a1f35d0a26a84ed2b1a0 |
25-Oct-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
ObjectiveC: under -Wunused-property-ivar warn if property's backing warning is not used in one of its accessor methods. // rdar://14989999 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193439 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclObjC.cpp
emaExpr.cpp
|
02debf605cd904edac8dceb196e5f142ce3d14eb |
25-Oct-2013 |
Jordan Rose <jordan_rose@apple.com> |
Add -Wstring-plus-char, which warns when adding char literals to C strings. Specifically, this warns when a character literal is added (using '+') to a variable with type 'char *' (or any other pointer to character type). Like -Wstring-plus-int, there is a fix-it to change "foo + 'a'" to "&foo['a']" iff the character literal is on the right side of the string. Patch by Anders Rönnholm! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193418 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
9d33c40838367ffcc3206a7120a0ce32922b66d8 |
25-Oct-2013 |
David Majnemer <david.majnemer@gmail.com> |
Sema: Do not allow lambda expressions to appear inside of constant expressions We would previously not diagnose this which would lead to crashes (on very strange code). This fixes PR17675. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193397 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaLambda.cpp
|
101e9dc388c92d1e58bf977ff9697572cbe8b422 |
25-Oct-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Consider used attributes in hidden decls. Without this patch we would warn and fail to output the function in the test. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193388 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
858d2ba136c8dcdc051fe20b3190c40bc25de189 |
25-Oct-2013 |
Richard Trieu <rtrieu@google.com> |
Simplify and refactor the uninitialized field warning. Change the uninitialized field warnings so that field initializers are checked inside the constructor. Previously, in class initializers were checked separately. Running one set of checks also simplifies the logic for preventing duplicate warnings. Added new checks to warn when an uninitialized field is used in base class initialization. Also fixed misspelling of uninitialized and moved all code for this warning together. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193386 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
9bd1c1332f7b2a82ed7b328b216a35a299a5945a |
25-Oct-2013 |
Faisal Vali <faisalv@yahoo.com> |
Refactor: Extract specializing the generic lambda call operator during conversion to fptr deduction into its own function. No functionality change. All clang regression tests pass. Thanks! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193383 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
605f91ffd18f35ffcb5fcdd38379bd09b67a6cb8 |
24-Oct-2013 |
Faisal Vali <faisalv@yahoo.com> |
Fix an instantiation bug with nested generic lambdas and conversion to fptrs. This patch fixes the typelocs of the conversion-operator and the conversion-operator-name and adds the parameters of the call operator to the FunctionProtoTypeLoc of the respective entities. Thus, when the template declarations (conversion operators) undergo deduction and instantiation/transformation/substitution - they add themselves to the local instantiation scope if needed. This patch supports the following: auto L = [](auto b) { return [](auto a) ->decltype(a) { return a; }; }; int (*fp)(int) = L(8); Richard LGTM'd this patch: http://llvm-reviews.chandlerc.com/D1831 Thanks! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193294 91177308-0d34-0410-b5e6-96231b3b80d8
emaLambda.cpp
|
645526c3e42170e356f792b1bc0ac2acb65c26c4 |
23-Oct-2013 |
David Majnemer <david.majnemer@gmail.com> |
Parse: Disable delayed template parsing for constexpr functions Commit r191484 treated constexpr function templates as normal function templates with respect to delaying their parsing. However, this is unnecessarily restrictive because there is no compatibility concern with constexpr, MSVC doesn't support it. Instead, simply disable delayed template parsing for constexpr function templates. This largely reverts the changes made in r191484 but keeps it's unit test. This fixes PR17661. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193274 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e7bd89af8aa96a779c0031baf1a21e960a51d0f0 |
23-Oct-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
A decl never becomes unused. Make that explicit in the API. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193248 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplateInstantiateDecl.cpp
|
bef582b0159e8f0deb606c7700e3590a6f5a4ab2 |
23-Oct-2013 |
Faisal Vali <faisalv@yahoo.com> |
Refactor out the circular reference to LambdaExpr in CXXRecordDecl. A prior commit of this patch was reverted because it was within the blamelist's purview of a failing test. The failure of that test has been addressed here: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20131021/091546.html. Therefore I am recommitting this patch (all tests pass on windows, except for the usual modules & index suspects that never pass on my box). Some background: Both Doug and Richard had asked me in Chicago to remove the circular reference in CXXRecordDecl to LambdaExpr by factoring out and storing the needed information from LambdaExpr directly into CXXRecordDecl. In addition, I have added an IsGenericLambda flag - this makes life a little easier when we implement capturing, and are Sema-analyzing the body of a lambda (and the calloperator hasn't been wired to the closure class yet). Any inner lambdas can have potential captures that could require walking up the scope chain and checking if any generic lambdas are capture-ready. This 'bit' makes some of that checking easier. No change in functionality. This patch was approved by Doug with minor modifications (comments were cleaned up, and all data members were converted from bool/enum to unsigned, as requested): http://llvm-reviews.chandlerc.com/D1856 Thanks! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193246 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaLambda.cpp
reeTransform.h
|
a3d311e468bce37defb97ed75105f8d36942b651 |
23-Oct-2013 |
Faisal Vali <faisalv@yahoo.com> |
And Again: Teach TreeTransform how to transform nested generic lambdas. A previous attempt http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130930/090049.html resulted in PR 17476, and was reverted, The original TransformLambdaExpr (pre generic-lambdas) transformed the TypeSourceInfo of the Call operator in its own instantiation scope via TransformType. This resulted in the parameters of the call operator being mapped to their transformed counterparts in an instantiation scope that would get popped off. Then a call to TransformFunctionParameters would add the parameters and their transformed mappings (but newly created ones!) to the current instantiation scope. This would result in a disconnect between the new call operator's TSI parameters and those used to construct the call operator declaration. This was ok in the non-generic lambda world - but would cause issues with nested transformations (when non-generic and generics were interleaved) in the generic lambda world - that I somewhat kludged around initially - but this resulted in PR17476. The new approach seems cleaner. We only do the transformation of the TypeSourceInfo - but we make sure to do it in the current instantiation scope so we don't lose the untransformed to transformed mappings of the ParmVarDecls when they get created. Another attempt caused a test to fail (http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20131021/091533.html) and also had to be reverted - my apologies - in my haste, i did not run all the tests - argh! Now all the tests seem to pass - but a Fixme has been added - since I suspect Richard will find the fix a little inelegant ;) I shall try and work on a more elegant fix once I have had a chance to discuss with Richard or Doug at a later date. Hopefully the third time;s a charm *fingers crossed* This does not yet include capturing. Please see test file for examples. This patch was LGTM'd by Doug: http://llvm-reviews.chandlerc.com/D1784 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193230 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
80f2b2e693422f84ec3735f16a08614a527b0bc5 |
23-Oct-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Revert r193223 and r193216. They were causing CodeGenCXX/mangle-exprs.cpp to fail. Revert "Remove the circular reference to LambdaExpr in CXXRecordDecl." Revert "Again: Teach TreeTransform and family how to transform generic lambdas nested within templates and themselves." git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193226 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaLambda.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
a4c91afe103063e983aa9bab535e442da8629636 |
23-Oct-2013 |
Faisal Vali <faisalv@yahoo.com> |
Remove the circular reference to LambdaExpr in CXXRecordDecl. Both Doug and Richard had asked me to remove the circular reference in CXXRecordDecl to LambdaExpr by factoring out and storing the needed information from LambdaExpr directly into CXXRecordDecl. No change in functionality. In addition, I have added an IsGenericLambda flag - this makes life a little easier when we implement capturing, and are Sema-analyzing the body of a lambda (and the calloperator hasn't been wired to the closure class yet). Any inner lambdas can have potential captures that could require walking up the scope chain and checking if any generic lambdas are capture-ready. This 'bit' makes some of that checking easier. This patch was approved by Doug with minor modifications (comments were cleaned up, and all data members were converted from bool/enum to unsigned, as requested): http://llvm-reviews.chandlerc.com/D1856 Thanks! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193223 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaLambda.cpp
reeTransform.h
|
f06a2893bc9778857295c64ee32b4a899a338480 |
23-Oct-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Make UsingShadowDecls redeclarable. This fixes some visibility problems with modules. With this fixed, I no longer see any test regressions in the libc++ test suite when enabling a single-module module.map for libc++ (other than issues with my system headers). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193219 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
|
b814a2ac581f7aa31aeef1abb8567ea123a13519 |
23-Oct-2013 |
Faisal Vali <faisalv@yahoo.com> |
Again: Teach TreeTransform and family how to transform generic lambdas nested within templates and themselves. A previous attempt http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130930/090049.html resulted in PR 17476, and was reverted, The original TransformLambdaExpr (pre generic-lambdas) transformed the TypeSourceInfo of the Call operator in its own instantiation scope via TransformType. This resulted in the parameters of the call operator being mapped to their transformed counterparts in an instantiation scope that would get popped off. Then a call to TransformFunctionParameters would add the parameters and their transformed mappings (but newly created ones!) to the current instantiation scope. This would result in a disconnect between the new call operator's TSI parameters and those used to construct the call operator declaration. This was ok in the non-generic lambda world - but would cause issues with nested transformations (when non-generic and generics were interleaved) in the generic lambda world - that I somewhat kludged around initially - but this resulted in PR17476. The new approach seems cleaner. We only do the transformation of the TypeSourceInfo - but we make sure to do it in the current instantiation scope so we don't lose the untransformed to transformed mappings of the ParmVarDecls when they get created. This does not yet include capturing. Please see test file for examples. This patch was LGTM'd by Doug: http://llvm-reviews.chandlerc.com/D1784 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193216 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
a8a2ebe9e729f69dc5775dee33cde1d5067a880a |
23-Oct-2013 |
Alp Toker <alp@nuanti.com> |
Retain previous language linkage of friend function declarations With this extension, friend function declarations will retain the language linkage specified for previous declarations instead of emitting an error diagnostic. The feature is known to be compatible with GCC and MSVC and permits a language to be specified indirectly where it cannot otherwise be written directly in class scope. Work is ongoing to improve linkage spec diagnostics. Fixes PR17337. Reviewed by Richard Smith. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193206 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
255ca71082810ac8d3084f43727675e02a384683 |
22-Oct-2013 |
David Majnemer <david.majnemer@gmail.com> |
Sema: Allow IndirectFieldDecl to appear in a non-type template argument We would not identify pointer-to-member construction in a non-type template argument if it was either a FieldDecl or a CXXMethodDecl. However, this would incorrectly reject declarations that were injected via an IndirectFieldDecl (e.g. a field inside of an anonymous union). This fixes PR17657. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193203 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
65f958dca64ef64d43bf85e871ec64e638ff2602 |
22-Oct-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Consider hidden decls for isUsed checks. This fixes pr17624. A FIXME from Richard Smith: It seems to me that the root cause is that a per-Decl 'used' flag doesn't really make much sense in the way we use it now. I think we should either track whether that particular declaration is used (with isUsed scanning the entire redecl chain), or we should only have one flag for the entire redeclaration chain (perhaps by always looking at the flag on either the most recent decl or the canonical decl). Modeling it as "is this declaration or any previous declaration used" is weird, and requires contortions like the loop at the end of Sema::MarkFunctionReferenced. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193202 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
b1c0e204046b72828e513bad369ab03252b2c42e |
22-Oct-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Treat aliases as definitions. This fixes pr17639. Before this patch clang would consider void foo(void) __attribute((alias("__foo"))); a declaration. It now correctly handles it as a definition. Initial patch by Alp Toker. I added support for variables. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193200 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d661d50118716e9695af5a893a2df45e87a6b3c8 |
22-Oct-2013 |
Chandler Carruth <chandlerc@gmail.com> |
Revert r193073 and the attempt to fix it in r193170. This patch wasn't reviewed, and isn't correctly preserving the behaviors relied upon by QT. I don't have a direct example of fallout, but it should go through the standard code review process. For example, it should never have removed the QT test case that was added when fixing those users. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193174 91177308-0d34-0410-b5e6-96231b3b80d8
cope.cpp
|
a2770ab2cfee53805ff603681317c425389356c2 |
22-Oct-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Use early return. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193166 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
87017a781f9e2d70a0478abaae26ba486f6e717e |
22-Oct-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Revert "This patch causes clang to reject alias attributes that point to undefined names. For example, with this patch we now reject" This reverts commit r193161. It broke void foo() __attribute__((alias("bar"))); void bar() {} void zed() __attribute__((alias("foo"))); Looks like we have to fix pr17639 first :-( git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193162 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
e37bf44c8012f36f900955d8513e03791803045e |
22-Oct-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
This patch causes clang to reject alias attributes that point to undefined names. For example, with this patch we now reject void f1(void) __attribute__((alias("g1"))); This patch is implemented in CodeGen. It is quiet a bit simpler and more compatible with gcc than implementing it in Sema. The downside is that the errors only fire during -emit-llvm. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193161 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
89673e0c7edb17927d531857be56766894c347c3 |
22-Oct-2013 |
Alp Toker <alp@nuanti.com> |
Fix comment typo git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193154 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
588a51a471b4cb23613e8183e05d2d193d2ab813 |
22-Oct-2013 |
David Majnemer <david.majnemer@gmail.com> |
Sema: Do not allow template declarations inside local classes Summary: Enforce the rule in C++11 [temp.mem]p2 that local classes cannot have member templates. This fixes PR16947. N.B. C++14 has slightly different wording to afford generic lambdas declared inside of functions. Fun fact: Some formulations of local classes with member templates would cause clang to crash during Itanium mangling, such as the following: void outer_mem() { struct Inner { template <typename = void> struct InnerTemplateClass { static void itc_mem() {} }; }; Inner::InnerTemplateClass<>::itc_mem(); } Reviewers: eli.friedman, rsmith, doug.gregor, faisalv Reviewed By: doug.gregor CC: cfe-commits, ygao Differential Revision: http://llvm-reviews.chandlerc.com/D1866 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193144 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
fb90266d8bb5a977de45d07e702277f4cb54d74e |
21-Oct-2013 |
Serge Pavlov <sepavloff@gmail.com> |
Fix to PR8880 (clang dies processing a for loop). Due to statement expressions supported as GCC extension, it is possible to put 'break' or 'continue' into a loop/switch statement but outside its body, for example: for ( ; ({ if (first) { first = 0; continue; } 0; }); ) Such usage must be diagnosed as an error, GCC rejects it. To recognize this and similar patterns the flags BreakScope and ContinueScope are temporarily turned off while parsing condition expression. Differential Revision: http://llvm-reviews.chandlerc.com/D1762 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193073 91177308-0d34-0410-b5e6-96231b3b80d8
cope.cpp
|
3abf5f6104bc0d668348a2c3e744f05853b5d79f |
21-Oct-2013 |
David Majnemer <david.majnemer@gmail.com> |
Sema: Explain our deviation from the standard by referencing the, now open, LWG issue. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193062 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
8b407727aef487051835440deb641e60f7a743f8 |
20-Oct-2013 |
Alp Toker <alp@nuanti.com> |
Fix crash in cleanup attr handling ResolveSingleFunctionTemplateSpecialization() returns 0 and doesn't emit diags unless the expression has template-ids, so we must null check the result. Also add a better diag noting which overloads are causing the problem. Reviewed by Aaron Ballman. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193055 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaOverload.cpp
|
d2b0cf38be1e6bd9b35353ae3da49eda5dc4e1e5 |
20-Oct-2013 |
David Majnemer <david.majnemer@gmail.com> |
Sema: Diagnose global replacement functions declared as inline This fixes PR17591. N.B. This actually goes beyond what the standard mandates by requiring the restriction to hold for declarations instead of definitions. This is believed to be a defect in the standard and an LWG issue has been submitted. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193044 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
87bcee88d9b49de8214aa23d07c96f7bec3198e0 |
19-Oct-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Simplify some implementations of get*Decl. * NamedDecl and CXXMethodDecl were missing getMostRecentDecl. * The const version can just forward to the non const. * getMostRecentDecl can use cast instead of cast_or_null. This then removes some casts from the callers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193039 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
7693b32af6863c63fcaf4de087760740ee675f71 |
19-Oct-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Add isFirstDecl to DecBase too and use it instead of getPreviousDecl() == 0. Redeclarable already had a isFirstDecl, but it was missing from DeclBase. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193027 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
a36ddbe8bf0c7269656f554288703afbb2b0a034 |
19-Oct-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Fix typo. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193026 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b5c7768a74936d4e2c7a484570a638cb74702d8b |
19-Oct-2013 |
Kaelyn Uhrain <rikka@google.com> |
Allow CorrectTypo to replace CXXScopeSpecifiers that refer to classes. Now that CorrectTypo knows how to correctly search classes for typo correction candidates, there is no good reason to only replace an existing CXXScopeSpecifier if it refers to a namespace. While the actual enablement was a matter of changing a single comparison, the fallout from enabling the functionality required a lot more code changes (including my two previous commits). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193020 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExprMember.cpp
emaLookup.cpp
|
6e4f6f865010649bc3969e57436b5501544a0c39 |
19-Oct-2013 |
Kaelyn Uhrain <rikka@google.com> |
Be smarter about deciding to add a leading '::' to a NestedNameSpecifier that replaces an existing specifier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193019 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
a831f17b233fb2f3c8422a45c58b7d0bc67db959 |
19-Oct-2013 |
Kaelyn Uhrain <rikka@google.com> |
Merge NamespaceSpecifierSet's AddNamespace and AddRecord as they are essentially the same. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193018 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
c85832f6feffd646458f5493710e433724e0cf34 |
18-Oct-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
ObjectiveC. Added support for methods annotated with format_arg attributes when such methods are actually envoked in message expression. // rdar://15242010 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193003 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
08235661cf457978ba4645ec8e22697aebabe4fa |
18-Oct-2013 |
Alp Toker <alp@nuanti.com> |
Fix missed exception spec checks and crashes Delayed exception specification checking for defaulted members and virtual destructors are both susceptible to mutation during iteration so we need to swap and process the worklists. This resolves both accepts-invalid and rejects-valid issues and moreover fixes potential invalid memory access as the contents of the vectors change during iteration and recursive template instantiation. Checking can be further delayed where parent classes aren't yet fully defined. This patch adds two assertions at end of TU to ensure no specs are left unchecked as was happenning before the fix, plus a test case from Marshall Clow for the defaulted member crash extracted from the libcxx headers. Reviewed by Richard Smith. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192947 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDeclCXX.cpp
|
7121bdb91b86f6053765bda18dd0a8a118929ace |
18-Oct-2013 |
David Majnemer <david.majnemer@gmail.com> |
[-fms-extensions] Permit 'override' in C++98 and 'sealed' as a synonym for 'final' Summary: Some MS headers use these features. Reviewers: rnk, rsmith CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1948 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192936 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
|
d4f0e1991f42c69111213699fb2d09dedee1cd36 |
18-Oct-2013 |
DeLesley Hutchins <delesley@google.com> |
Consumed analysis: Add param_typestate attribute, which specifies that function parameters must be in a particular state. Patch by chris.wailes@gmail.com. Reviewed by delesley@google.com. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192934 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
emaDeclAttr.cpp
|
cd0f6d7600a691ad81dab308e9905fb0cce1df4d |
18-Oct-2013 |
DeLesley Hutchins <delesley@google.com> |
Consumed Analysis: Allow parameters that are passed by non-const reference to be treated as return values, and marked with the "returned_typestate" attribute. Patch by chris.wailes@gmail.com; reviewed by delesley@google.com. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192932 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
emaDeclAttr.cpp
|
682a56b15ae01cc8154d4800d29498da93911981 |
17-Oct-2013 |
Alp Toker <alp@nuanti.com> |
Revert "Fix missed exception spec checks and crashes" The changes caused the sanitizer bot to hang: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/2311 Needs investigation. This reverts commit r192914. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192921 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDeclCXX.cpp
|
bb81f880aa77cfd09dedfc72a9b87262889ae75c |
17-Oct-2013 |
Alp Toker <alp@nuanti.com> |
Fix missed exception spec checks and crashes Delayed exception specification checking for defaulted members and virtual destructors are both susceptible to mutation during iteration so we need to process the worklists fully. This resolves both accepts-invalid and rejects-valid issues and moreover fixes potential invalid memory access as the contents of the vectors change during iteration and recursive template instantiation. This patch also adds two assertions at end of TU to ensure no specs are left unchecked as was happenning before the fix, plus a test case from Marshall Clow for the defaulted member crash extracted from the libcxx headers. Reviewed by Richard Smith. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192914 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDeclCXX.cpp
|
bc6509175e1ce5cc1b48d1b97ac8d23d8b74167c |
17-Oct-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Rename some functions for consistency. Every other function in Redeclarable.h was using Decl instead of Declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192900 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaTemplateInstantiateDecl.cpp
|
49ef481bc1b0b0f757ba6ac1ad6d0425390e7654 |
16-Oct-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR17592: Ensure we diagnose shadowing a template parameter with a local extern declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192846 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
289a0d810fb35c960f33c33ff8b7185c11d04d5f |
16-Oct-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
ObjectiveC++: support for passing C++11 style initialized temporaries to objc++ properties using property-dot syntax. // rdar://14654207 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192819 91177308-0d34-0410-b5e6-96231b3b80d8
emaPseudoObject.cpp
|
a32966fd8474e7a7002f65d32ace6b7e18dee66b |
16-Oct-2013 |
Benjamin Kramer <benny.kra@googlemail.com> |
Sema: Simplify the check if a method returns an instance of the class. Just checking if the parent of the method is the same as the return type should be sufficient. Also fixes PR17587. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192802 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
8690cee218a59d3f6eaca17b9c25d03a52ebacaa |
15-Oct-2013 |
Reid Kleckner <reid@kleckner.net> |
ms-compat: Fix taking the address of a member of a dependent base If unqualified id lookup fails while parsing a class template with a dependent base, clang with -fms-compatibility will pretend the user prefixed the name with 'this->' in order to delay the lookup. However, if there was a unary ampersand, Sema::ActOnDependentIdExpression() will create a DependentDeclRefExpr, which is not what we wanted at all. Fix this by building the CXXDependentScopeMemberExpr directly instead. In order to be fully MSVC compatible, we would have to defer all attempts at name lookup to instantiation time. However, until we have real problems with system headers that can't be parsed, we'll put off implementing that. Fixes PR16014. Reviewers: rsmith Differential Revision: http://llvm-reviews.chandlerc.com/D1892 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192727 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
reeTransform.h
|
0ccadb2835d169e834ab9bb44bdb299fbf7de660 |
15-Oct-2013 |
Serge Pavlov <sepavloff@gmail.com> |
Fixed code style of my change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192708 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
2c4a01dc568967eb048204c835c8816268cec5e6 |
15-Oct-2013 |
David Majnemer <david.majnemer@gmail.com> |
Sema: Cleanup formatting of C++ exceptions related code No functional change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192684 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
fc210490abcfe87667dd83e319e62c6c1716a3f3 |
15-Oct-2013 |
David Majnemer <david.majnemer@gmail.com> |
Sema: Cleanup formatting of SEH related code No functional change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192683 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
7752a741093888ea62e88777929fdaa4c23d0264 |
15-Oct-2013 |
David Majnemer <david.majnemer@gmail.com> |
Sema: Don't crash when __try/__except/__finally appears in a template function We wouldn't transform the compound statement in any of these forms, causing crashes when it got time to act on them. Additionally, we wouldn't check to see if the handler was invalid before deciding whether or not we should continue acting on the __try. This fixes PR17584. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192682 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
edb5fdfb732d9b05f7f3c3248edea7b14331f4a4 |
15-Oct-2013 |
David Majnemer <david.majnemer@gmail.com> |
Sema: Consider it an error to apply __builtin_offsetof to a member in a virtual base icc 13 and g++ 4.9 both reject this while we would crash. Fixes PR17578. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192674 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
656465d6743e24022b28f831f1fe249f69b8626e |
15-Oct-2013 |
Ted Kremenek <kremenek@apple.com> |
Special case '%C' handling in ObjC format strings to handle integer literals that can represent unicode characters Fixes <rdar://problem/13991617>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192673 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
b79b17b67f2c0de8fd343fdd070e5ccbfe20d602 |
15-Oct-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR17567: Improve diagnostic for a mistyped constructor name. If we see something that looks like a function declaration, except that it's missing a return type, try typo-correcting it to the relevant constructor name. In passing, fix a bug where the missing-type-specifier recovery codepath would drop a preceding scope specifier on the floor, leading to follow-on diagnostics and incorrect recovery for the auto-in-c++98 hack. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192644 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
9aa926143ba36c09bea5b93b22205b30784a7a04 |
15-Oct-2013 |
Aaron Ballman <aaron@aaronballman.com> |
Trivial formatting changes; no functional changes intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192640 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
2b1599c3a0b9e014535ce7495717e8cd03af512c |
15-Oct-2013 |
Aaron Ballman <aaron@aaronballman.com> |
Switching some custom logic to using table-generated helper methods. This also removes an unnecessary diagnostic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192639 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
0cd72319e74899c4e5561cc70b7c4939d3767bd9 |
14-Oct-2013 |
Ted Kremenek <kremenek@apple.com> |
Move comment to its proper place. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192613 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
728a1fb4fd6c1bcb200b5eed398e982fe1856ee1 |
14-Oct-2013 |
Ted Kremenek <kremenek@apple.com> |
GetExprRange() (used by -Wconversion checking) should look through OpaqueValueExprs. Fixes a false positive with -Wconversion involving Objective-C properties. Fixes <rdar://problem/14415662>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192611 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
7dcff5b56bc470c456f70ecb124c3a9013c50953 |
14-Oct-2013 |
Benjamin Kramer <benny.kra@googlemail.com> |
Reduce double set lookups by using the result of insert. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192598 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
81e34b1c137ffaa9b9c7d488744bdaa0cee8e845 |
14-Oct-2013 |
Serge Pavlov <sepavloff@gmail.com> |
Do not use typo correction that is unaccessible. This patch fixes PR17019. When doing typo correction, Sema::CorrectTypo uses correction already seen for the same typo. This causes problems if that correction is from another scope and cannot be accessed in the current. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192594 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
f30e194f9d797ebeb2f6c3f96e88160ed1a6519a |
12-Oct-2013 |
DeLesley Hutchins <delesley@google.com> |
Consumed analysis: replace the consumes attribute with a set_typestate attribute. Patch by chris.wailes@gmail.com; reviewed and edited by delesley. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192515 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
1bf6343612e394051fffc587e6899de6901065e0 |
12-Oct-2013 |
DeLesley Hutchins <delesley@google.com> |
Consumed analysis: switch from tests_consumed/unconsumed to a general tests_typestate attribute. Patch by chris.wailes@gmail.com. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192513 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
emaDeclAttr.cpp
|
f18e6e87c2fa41c2a891463483603d770a1e58a7 |
12-Oct-2013 |
Richard Trieu <rtrieu@google.com> |
Improve the error message for attempting to build a for range loop using a function parameter that has array type. Such a parameter will be treated as a pointer type instead, resulting in a missing begin function error is a suggestion to dereference the pointer. This provides a different, more informative diagnostic as well as point to the parameter declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192512 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
b2969b1e50580344891a98f5b241f8351fe371cf |
11-Oct-2013 |
Warren Hunt <whunt@google.com> |
Adds Microsoft compatiable C++ record layout code to clang. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192494 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
730a2c2f915d81f6cdb53918d8b155ee25b8175f |
11-Oct-2013 |
Douglas Gregor <dgregor@apple.com> |
Diagnose by-copy captures of abstract classes. Fixes <rdar://problem/14468891>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192419 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
84e41cd7b0f0d1c8724c765ce53b842bc50367cc |
10-Oct-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
ObjectiveC. ObjectiveC's collection selector expression in the fereach loop must be a non-const lvalue expression as it will be assigned to at the beginning of the loop. // rdar://15123684 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192399 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
6e04a849fec62c15968f8a1c94ac380f5eae7b99 |
10-Oct-2013 |
Benjamin Kramer <benny.kra@googlemail.com> |
Sema: Taking the address of a dtor is illegal per C++ [class.dtor]p2. Emit a proper error instead of crashing in CodeGen. PR16892. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192345 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
a18829860c8b186d3a7f6a4ba83e21e9cbbffac1 |
10-Oct-2013 |
Ted Kremenek <kremenek@apple.com> |
Refine string literal concatenation warning within an NSArray literal to not warn when the literal comes from a macro expansion. Fixes <rdar://problem/15147688>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192328 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
7385840b600d0e4a96d75042f612f6430e4a0390 |
09-Oct-2013 |
DeLesley Hutchins <delesley@google.com> |
Consumed analysis: improve loop handling. The prior version of the analysis marked all variables as "unknown" at the start of a loop. The new version keeps the initial state of variables unchanged, but issues a warning if the state at the end of the loop is different from the state at the beginning. This patch will eventually be replaced with a more precise analysis. Initial patch by chris.wailes@gmail.com. Reviewed and edited by delesley@google.com. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192314 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
45d3950e373412f395413c81a0310e8090508608 |
09-Oct-2013 |
Hans Wennborg <hans@hanshq.net> |
Tighten diagnostics for calling conventions on variadic functions Follow-up from r192240. This makes it an error to use callee-cleanup conventions on variadic functions, except for __fastcall and __stdcall, which we ignore with a warning for GCC and MSVC compatibility. Differential Revision: http://llvm-reviews.chandlerc.com/D1870 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192308 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
5dbed6674bda07dd147183932bc843c52205633f |
09-Oct-2013 |
Reid Kleckner <reid@kleckner.net> |
-Wmicrosoft: Don't warn on non-inline pure virtual method definitions MSVC and clang with -fms-extensions allow pure virtual methods to be defined inline after the "= 0" tokens. Clang warns on these because it is not standard, but incorrectly warns on out-of-line definitions, which are standard. With this change, clang will only warn on inline definitions of pure virtual methods. Fixes some self-host warnings on out-of-line definitions of pure virtual destructors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192244 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
3636fb126ffa22704c5eacb52fc5673247d8ad57 |
08-Oct-2013 |
Hans Wennborg <hans@hanshq.net> |
Turn error about fastcall variadic function into warning in MS mode (PR12535) MSVC allows this and silently falls back to __cdecl for variadic functions. This patch turns Clang's error into a warning in MS mode and adds a test to make sure we generate correct code. Differential Revision: http://llvm-reviews.chandlerc.com/D1861 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192240 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
bbec341e3685168fec20b5ca4a22a88e26ca0c57 |
08-Oct-2013 |
Ted Kremenek <kremenek@apple.com> |
Remove transient code I did not mean to check in. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192211 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f0d5861d2db5e3075bd722ff7874e88c4bfedaae |
08-Oct-2013 |
Ted Kremenek <kremenek@apple.com> |
Convert anachronistic use of 'void *' to 'DeclContext *' in Scope that was a holdover from the long-dead Action interface. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192203 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
ema.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaLookup.cpp
emaOpenMP.cpp
emaTemplate.cpp
|
d69f37b5822420e3c3a1b2e875b122aca8248533 |
08-Oct-2013 |
Alp Toker <alp@nuanti.com> |
Make InstantiatingTemplate depth checks clearer The bool conversion operator on InstantiatingTemplate never added value and only served to obfuscate the template instantiation routines. This replaces the conversion and its callers with an explicit isInvalid() function to make it clear what's going on at a glance. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192177 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
d1a32c328bce903fb1b17fc8147b646be818298e |
08-Oct-2013 |
Reid Kleckner <reid@kleckner.net> |
[ms-cxxabi] Fix the calling convention for operator new in records Summary: Operator new, new[], delete, and delete[] are all implicitly static when declared inside a record. CXXMethodDecl already knows this, but we need to account for that before we pick the calling convention for the function type. Fixes PR17371. Reviewers: rsmith CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1761 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192150 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
emaDecl.cpp
emaType.cpp
|
2dd68de1bf29993c8c8d7e20a3f230fc9a5a40e8 |
08-Oct-2013 |
Justin Bogner <mail@justinbogner.com> |
Sema: Only merge typedef attributes if the previous decl is a typedef In r186373, we started merging attributes on typedefs, but this causes us to try to merge attributes even if the previous declaration was not a typedef. Only merge the attributes if the previous decl was also a typedef. Fixes rdar://problem/15044218 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192146 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
b328e29173d15baf3f44ccdc9c310ee741caaaf7 |
07-Oct-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Add support for WG21 N3599 (literal operator template for strings) as a GNU extension. The GCC folks have decided to support this even though the standard committee have not yet approved this feature. Patch by Hristo Venev! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192128 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExpr.cpp
emaLookup.cpp
|
dc1031bf257457bd58cc19426a21e0fa1fa95789 |
07-Oct-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
ObjectiveC: Warn when 'readonly' property has explicit ownership attribute (such as 'copy', 'assign' etc.) // rdar://15131088 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192115 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
2815d9c9989c52ac9c5687253bc544fac9d32c7f |
07-Oct-2013 |
NAKAMURA Takumi <geek4civic@gmail.com> |
Sema::tryCaptureVariable(): Prune three unused variables, HasBlocksAttr, IsBlock, and IsLambda. [-Wunused-variable] git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192095 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
02d831c7e7dc1517abed9cc96abdfb937af954eb |
07-Oct-2013 |
Faisal Vali <faisalv@yahoo.com> |
Refactor tryCaptureVar using ExtractMethod. No functionality change. In chicago, Doug had requested that I go ahead and commit the refactor as a separate change, if all the tests passed. Lets hope the buildbots stay quiet. Thanks! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192087 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
9025a18c3601b37765ccdfdf76a151c213b8c0b3 |
06-Oct-2013 |
Aaron Ballman <aaron@aaronballman.com> |
Switching the CallableWhen attribute over to using the string literal helper function instead of custom logic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192050 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
6dfc04b4cc5db5f631243d0d8543d1dbc9cd58ed |
05-Oct-2013 |
Aaron Ballman <aaron@aaronballman.com> |
Silencing an MSVC warning; SmallSet::count returns a bool instead of a size_t. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192043 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
83372f8d2f01d9bcc47268eb282ec6f1f2d4cdb7 |
05-Oct-2013 |
Benjamin Kramer <benny.kra@googlemail.com> |
Sema: Cleanup redundant variable NumArgsToCheck Patch by Daniel Marjamäki! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192030 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
66540857c08de7f1be9bea48381548d3942cf9d1 |
04-Oct-2013 |
DeLesley Hutchins <delesley@google.com> |
Consumed Analysis: Change callable_when so that it can take a list of states that a function can be called in. This reduced the total number of annotations needed and makes writing more complicated behaviour less burdensome. Patch by chriswails@gmail.com. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191983 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
emaDeclAttr.cpp
|
1cd6fab3930d5c058c201895654c6b0bd6ecb8c1 |
04-Oct-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
ObjectiveC. Allow readonly properties without an explicit ownership (assign/unsafe_unretained/weak/retain/strong/copy) in super class to be overridden by a property with any explicit ownership in the subclass. // rdar://15014468 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191971 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
f003acd8e7bdb994743dc8ea64f90db5360a8b4a |
04-Oct-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Revert "Teach TreeTransform and family how to transform generic lambdas within templates and nested within themselves." This reverts commit r191879. It caused llvm.org/pr17476. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191955 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
4e49952712ff9b1b1696cb07580b2b24a3ca99e1 |
03-Oct-2013 |
Matthew Curtis <mcurtis@codeaurora.org> |
Gracefully (and correctly) handle init of multiple union members We now emit warnings when doing so and code generation is consistent with GCC. Note that the C99 spec is unclear as to the precise behavior. See also ... Bug: http://llvm.org/bugs/show_bug.cgi?id=16644 and cfe-dev discussion: http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-September/031918.html git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191890 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
618c28547a7f7cc785a6c6301f79febf5a584f9e |
03-Oct-2013 |
Faisal Vali <faisalv@yahoo.com> |
Teach TreeTransform and family how to transform generic lambdas within templates and nested within themselves. This does not yet include capturing (that is next). Please see test file for examples. This patch was LGTM'd by Doug: http://llvm-reviews.chandlerc.com/D1784 http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130930/090048.html When I first committed this patch - a bunch of buildbots were unable to compile the code that VS2010 seemed to compile. Seems like there was a dependency on Sema/Template.h which VS did not seem to need, but I have now added for the other compilers. It still compiles on Visual Studio 2010 - lets hope the buildbots remain quiet (please!) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191879 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
9683f1de5f8eb3a4dd7c7fcb4ff58033b9cfa46f |
03-Oct-2013 |
Faisal Vali <faisalv@yahoo.com> |
Revert changes from the nested lambdas commit till i figure out why the buildbots are failing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191876 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
aecbb9de3bed4372695756f18af2c1304a81e7c4 |
03-Oct-2013 |
Faisal Vali <faisalv@yahoo.com> |
Teach TreeTransform and family how to transform generic lambdas within templates and nested within themselves. This does not yet include capturing (that is next). Please see test file for examples. This patch was LGTM'd by Doug: http://llvm-reviews.chandlerc.com/D1784 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191875 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
fb61e462277751f519c14515b05799e62e2dcdfa |
02-Oct-2013 |
Kaelyn Uhrain <rikka@google.com> |
Speed up CorrectTypo by avoiding lookups on unreasonable candidates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191846 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
58a82a3971ec5966191e365d28c7132d3bf03f84 |
02-Oct-2013 |
Patrik Hagglund <patrik.h.hagglund@ericsson.com> |
Fix gcc -Wunused-but-set-variable warning in r191634. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191817 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
64eac850a04e33f5b37a4b17ed7e3a18f6edad82 |
01-Oct-2013 |
Tim Northover <tnorthover@apple.com> |
Implement ARM GNU-style interrupt attribute This attribute allows users to use a modified C or C++ function as an ARM exception-handling function and, with care, to successfully return control to user-space after the issue has been dealt with. rdar://problem/14207019 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191769 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
argetAttributesSema.cpp
|
f8aebef45428388ffbbd2ad9cbb3bfb15cd7069a |
01-Oct-2013 |
Tim Northover <tnorthover@apple.com> |
Move checkStringLiteralArgument into Sema class It's a useful function to have around for target-specific attributes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191768 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
d195bc38fd424b0c928e3c354038a8ca6e2ccac3 |
01-Oct-2013 |
Alexey Bataev <a.bataev@hotmail.com> |
[OpenMP] Added parsing and semantic analysis for firstprivate clause git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191730 91177308-0d34-0410-b5e6-96231b3b80d8
emaOpenMP.cpp
reeTransform.h
|
91d3f338e446e654392184e68f940c77b5c98f39 |
01-Oct-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Fix typo correction usage of SemaAccess.cpp. When we check access for lookup results, make sure we propagate the result's access to the access control APIs; this can be different from the natural access of the declaration depending on the path used by the lookup. PR17394. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191726 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaLookup.cpp
|
9b93f206d89dbf86805b610b417bb874f7f446e8 |
01-Oct-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Tweak changes in r186464 to avoid a crash. Currently, IR generation can't handle file-scope compound literals with non-constant initializers in C++. Fixes PR17415 (the first crash in the bug). (We should probably change (T){1,2,3} to use the same codepath as T{1,2,3} in C++ eventually, given that the semantics of the latter are actually defined by the standard.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191719 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
8a3f9e46cb988d2c664395b21910091e3730ae82 |
01-Oct-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Remove support for arrays of runtime bound in C++1y, now they have been voted out of the working paper. This reverts r179962 and r179992. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191718 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
emaType.cpp
|
2e563c28c456b48f43f38f5a92a4bc292d5cda91 |
30-Sep-2013 |
Manuel Klimek <klimek@google.com> |
Fix use-after-free. TemplateDeclInstantiator takes the MultiLevelArgumentList by const-ref and stores a const-ref member. Thus, we must not pass a temporary into the constructor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191665 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
70a499da9cafd8dd9d300d0e12dfa399f26ac262 |
30-Sep-2013 |
NAKAMURA Takumi <geek4civic@gmail.com> |
SemaTemplateDeduction.cpp: Suppress a warning. [-Wunused-variable] git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191648 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
998c518eb1c3e4fd881a559c170cd408049721aa |
29-Sep-2013 |
Faisal Vali <faisalv@yahoo.com> |
Remove an unnecessary overload from ASTLambda.h As Richard pointed out to me, dyn_cast is very cheap - there is no real benefit from adding cluttery overloads to only avoid that cast. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191646 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
56fe35b4e2a437bc7fee4ec321c742c8fd8c5cf6 |
29-Sep-2013 |
Faisal Vali <faisalv@yahoo.com> |
Fix windows newlines :( git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191641 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplateDeduction.cpp
|
d6992ab33b7113e1bd7af51c0c52d17c23706c01 |
29-Sep-2013 |
Faisal Vali <faisalv@yahoo.com> |
Implement conversion to function pointer for generic lambdas without captures. The general strategy is to create template versions of the conversion function and static invoker and then during template argument deduction of the conversion function, create the corresponding call-operator and static invoker specializations, and when the conversion function is marked referenced generate the body of the conversion function using the corresponding static-invoker specialization. Similarly, Codegen does something similar - when asked to emit the IR for a specialized static invoker of a generic lambda, it forwards emission to the corresponding call operator. This patch has been reviewed in person both by Doug and Richard. Richard gave me the LGTM. A few minor changes: - per Richard's request i added a simple check to gracefully inform that captures (init, explicit or default) have not been added to generic lambdas just yet (instead of the assertion violation). - I removed a few lines of code that added the call operators instantiated parameters to the currentinstantiationscope. Not only did it not handle parameter packs, but it is more relevant in the patch for nested lambdas which will follow this one, and fix that problem more comprehensively. - Doug had commented that the original implementation strategy of using the TypeSourceInfo of the call operator to create the static-invoker was flawed and allowed const as a member qualifier to creep into the type of the static-invoker. I currently kludge around it - but after my initial discussion with Doug, with a follow up session with Richard, I have added a FIXME so that a more elegant solution that involves the use of TrivialTypeSourceInfo call followed by the correct wiring of the template parameters to the functionprototypeloc is forthcoming. Thanks! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191634 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaLambda.cpp
emaTemplateDeduction.cpp
|
4cb295d3b32cb04215f87948fbf944ee4c31de1b |
29-Sep-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Implement C++1y sized deallocation (n3778). This is not enabled by -std=c++1y; instead, it's enabled by the -cc1 flag -fsized-deallocation, until we sort out the backward-compatibility issues. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191629 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
6ad3cdd401f35217aaa7b00fe765247aaf133cf2 |
28-Sep-2013 |
Benjamin Kramer <benny.kra@googlemail.com> |
Make helper function static. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191615 91177308-0d34-0410-b5e6-96231b3b80d8
ttributeList.cpp
|
9beaf20b882eb83082da27a74760277bb9fc0bdd |
28-Sep-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Add compat/extension warnings for init captures. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191609 91177308-0d34-0410-b5e6-96231b3b80d8
emaLambda.cpp
|
39edfeb34b0b0b8033179e35cf13cd5d95d56fa8 |
28-Sep-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Switch from putting init capture VarDecls in the surrounding DeclContext to putting them in the call operator's DeclContext. This better matches the language wording and avoids some cases where code gets confused by them for namespace-scope lambdas and the like. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191606 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaLambda.cpp
|
04fa7a33279808dc3e5117c41b5f84c40eeb7362 |
28-Sep-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Per latest drafting, switch to implementing init-captures as if by declaring and capturing a variable declaration, and complete the implementation of them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191605 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaLambda.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
bb791699c095edc3e8cfaeaba7a0fb513f8c8cf4 |
28-Sep-2013 |
Chandler Carruth <chandlerc@gmail.com> |
Fix a bug where we failed to diagnose class template specialization uses. This fixes one of the two remaining failures to implement [[deprecated]] as specified for C++14. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191572 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
d0629eb137d06bf6d46a430abdb7fa044909298b |
27-Sep-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Variable templates: handle instantiation of static data member templates appropriately, especially when they appear within class templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191548 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
2b17b472d2f503ee61c460ca23f226c2aebcdd62 |
27-Sep-2013 |
Kaelyn Uhrain <rikka@google.com> |
Cache the location of failed typo corrections so that typo correction isn't repeatedly attempted for the same identifier at the same location. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191543 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
emaLookup.cpp
|
54679205de1a348f410d03ce4b331b56b21dce49 |
27-Sep-2013 |
David Majnemer <david.majnemer@gmail.com> |
Sema: Respect -fdelayed-template-parsing when parsing constexpr functions Functions declared as constexpr must have their parsing delayed in -fdelayed-template-parsing mode so as not to upset later template instantiation. N.B. My reading of the standard makes it seem like delayed template parsing is at odds with constexpr. We may want to make refinements in other places in clang to make constexpr play nicer with this feature. This fixes PR17334. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191484 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
a934c31d1056429a1e32fbcd198b4c5d0a42d84e |
26-Sep-2013 |
Kaelyn Uhrain <rikka@google.com> |
Fix error recovery when a return type correction includes a new name specifier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191459 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
fad9e13f3cb85198f0ee5af620ba81cd78574faa |
26-Sep-2013 |
Faisal Vali <faisalv@yahoo.com> |
Implement a rudimentary form of generic lambdas. Specifically, the following features are not included in this commit: - any sort of capturing within generic lambdas - generic lambdas within template functions and nested within other generic lambdas - conversion operator for captureless lambdas - ensuring all visitors are generic lambda aware (Although I have gotten some useful feedback on my patches of the above and will be incorporating that as I submit those patches for commit) As an example of what compiles through this commit: template <class F1, class F2> struct overload : F1, F2 { using F1::operator(); using F2::operator(); overload(F1 f1, F2 f2) : F1(f1), F2(f2) { } }; auto Recursive = [](auto Self, auto h, auto ... rest) { return 1 + Self(Self, rest...); }; auto Base = [](auto Self, auto h) { return 1; }; overload<decltype(Base), decltype(Recursive)> O(Base, Recursive); int num_params = O(O, 5, 3, "abc", 3.14, 'a'); Please see attached tests for more examples. This patch has been reviewed by Doug and Richard. Minor changes (non-functionality affecting) have been made since both of them formally looked at it, but the changes involve removal of supernumerary return type deduction changes (since they are now redundant, with richard having committed a recent patch to address return type deduction for C++11 lambdas using C++14 semantics). Some implementation notes: - Add a new Declarator context => LambdaExprParameterContext to clang::Declarator to allow the use of 'auto' in declaring generic lambda parameters - Add various helpers to CXXRecordDecl to facilitate identifying and querying a closure class - LambdaScopeInfo (which maintains the current lambda's Sema state) was augmented to house the current depth of the template being parsed (id est the Parser calls Sema::RecordParsingTemplateParameterDepth) so that SemaType.cpp::ConvertDeclSpecToType may use it to immediately generate a template-parameter-type when 'auto' is parsed in a generic lambda parameter context. (i.e we do NOT use AutoType deduced to a template parameter type - Richard seemed ok with this approach). We encode that this template type was generated from an auto by simply adding $auto to the name which can be used for better diagnostics if needed. - SemaLambda.h was added to hold some common lambda utility functions (this file is likely to grow ...) - Teach Sema::ActOnStartOfFunctionDef to check whether it is being called to instantiate a generic lambda's call operator, and if so, push an appropriately prepared LambdaScopeInfo object on the stack. - various tests were added - but much more will be needed. There is obviously more work to be done, and both Richard (weakly) and Doug (strongly) have requested that LambdaExpr be removed form the CXXRecordDecl LambdaDefinitionaData in a future patch which is forthcoming. A greatful thanks to all reviewers including Eli Friedman, James Dennett, and especially the two gracious wizards (Richard Smith and Doug Gregor) who spent hours providing feedback (in person in Chicago and on the mailing lists). And yet I am certain that I have allowed unidentified bugs to creep in; bugs, that I will do my best to slay, once identified! Thanks! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191453 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaLambda.cpp
emaOverload.cpp
emaTemplateDeduction.cpp
emaType.cpp
reeTransform.h
|
e67ebbed3dfdd6950b1d56eab7cb66b9a209381b |
26-Sep-2013 |
Kaelyn Uhrain <rikka@google.com> |
Fix a bug in the typo correction replacement location. I noticed the wrong text was being replaced with the correction while working on expanding the "namespace-aware" typo correction to include classes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191450 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
3d9559b91c00757b296354cc6ca93e899266c7d2 |
26-Sep-2013 |
Kaelyn Uhrain <rikka@google.com> |
Teach typo correction to look inside of classes like it does namespaces. Unlike with namespaces, searching inside of classes requires also checking the access to correction candidates (i.e. don't suggest a correction to a private class member for a correction occurring outside that class and its methods or friends). Included is a small (one line) fix for a bug, that was uncovered while cleaning up the unit tests, where the decls from a TypoCorrection candidate were preserved in new TypoCorrection candidates that are derived (copied) from the old TypoCorrection--notably when creating a new candidate by changing the NestedNameSpecifier associated with the base idenitifer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191449 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaLookup.cpp
|
e688ddf351d5d77d18cd01727e672e4b69706b23 |
26-Sep-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
If a partial specialization of a member template is declared within a class template and defined outside it, don't instantiate it twice when instantiating the surrounding class template specialization. That would cause us to reject the code because we think two partial specializations instantiated to produce the same signature. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191418 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
d0dbb7e6d4f05f5d0a5978822476897fe3427787 |
26-Sep-2013 |
Alexey Bataev <a.bataev@hotmail.com> |
[OPENMP] Improved variable lookup procedure for threadprivate variables. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191416 91177308-0d34-0410-b5e6-96231b3b80d8
emaOpenMP.cpp
|
a924f847fcc3268ca2ce5c1bc5592a3774aeab80 |
25-Sep-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
ObjectiveC: Handle the case of qualifying protocols declared in a typedef declaraton used as super class of an ObjC class. Curretnly, these protocols are dropped from the class hierarchy. Test shows that it is now included. // rdar://15051465 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191395 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
7034fae7a14dd2241ba421132856ff7f3d62ddac |
25-Sep-2013 |
Benjamin Kramer <benny.kra@googlemail.com> |
Sema: Simplify code a bit, plug a potential leak. No intended functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191370 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
41d0958281627882fbe2049fb887d741eabd3fe3 |
25-Sep-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Refactor to use C++1y 'auto' semantics directly in lambdas with no specified return type in C++1y mode. No functionality change intended. Extracted and tweaked from a patch by Faisal Vali! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191354 91177308-0d34-0410-b5e6-96231b3b80d8
emaLambda.cpp
emaStmt.cpp
emaType.cpp
|
01ae093cbc7f347f509cfc8e53b8c2c36e0146b2 |
25-Sep-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Allow dynamic_cast to void* even with -fno-rtti. PR17346. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191340 91177308-0d34-0410-b5e6-96231b3b80d8
emaCast.cpp
|
2ae28e57a2d5e3456171fa1ade37060169583e38 |
25-Sep-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Fix -Wmissing-variable-declarations regression. This issue was introduced in r181677. PR17349. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191339 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
2330df43c89dfbcf888a1b0d608f71546f29b6cf |
24-Sep-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
Revert my patch in r191155 to allow forward class/protocol decls in @implementation and fixup modern rewriter to handle that. // rdar://15066233 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191311 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
ddd2dfc1d3f4a36cbe8cd775c588623a17049f9f |
24-Sep-2013 |
Daniel Jasper <djasper@google.com> |
Module use declarations (II) Review: http://llvm-reviews.chandlerc.com/D1546. I have picked up this patch form Lawrence (http://llvm-reviews.chandlerc.com/D1063) and did a few changes. From the original change description (updated as appropriate): This patch adds a check that ensures that modules only use modules they have so declared. To this end, it adds a statement on intended module use to the module.map grammar: use module-id A module can then only use headers from other modules if it 'uses' them. This enforcement is off by default, but may be turned on with the new option -fmodules-decluse. When enforcing the module semantics, we also need to consider a source file part of a module. This is achieved with a compiler option -fmodule-name=<module-id>. The compiler at present only applies restrictions to the module directly being built. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191283 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
ecbce69e354c77bf2d359111bad0c77c516e16f0 |
24-Sep-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Implement restriction that a partial specialization must actually specialize something, for variable templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191278 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
543c4ae954f2bce5ac58ed22080f23cbd94794d2 |
24-Sep-2013 |
Alexey Bataev <a.bataev@hotmail.com> |
[OPENMP] Bug fixes and improvements. 1. Fixed constructor of shared clause. 2. Some macros for clauses processing are replaced by private template methods. 3. Additional checks in sema analysis of OpenMP clauses. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191265 91177308-0d34-0410-b5e6-96231b3b80d8
emaOpenMP.cpp
reeTransform.h
|
90618ff0b53f063a880c4933d44c70d6c1cb8dc0 |
24-Sep-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Revert change accidentally committed in r191150. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191237 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
25b24eb889d633c4666001af107d8eb5c45dd065 |
23-Sep-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR16529: Don't forget to add the CXXFunctionalCastExpr type sugar to an InitListExpr for a C++11-style T{...} construction, if initialization registered a destructor for it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191182 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
ee0bc3b53795109e79daba77b279c3903c6150af |
22-Sep-2013 |
Nick Lewycky <nicholas@mxc.ca> |
Simplify code to equivalent code. No need to test for null after cast<>, use takeAs<> instead of cast<>(.take()). Fix 80-column violation in whitespace after comment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191170 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
199e370cf167c11f31e45302b3f860d95d00f760 |
22-Sep-2013 |
Nick Lewycky <nicholas@mxc.ca> |
Fix typo. Add missing whitespace. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191169 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
ff989a8b1d3cf52131c179fceea656d7977e5b3c |
22-Sep-2013 |
David Majnemer <david.majnemer@gmail.com> |
Parse: Don't crash during parsing if we lack a simple-type-specifier Summary: Parsing cast expressions during error recovery can put us in a bad state. Check to see if the token for a simple-type-specifier makes sense before further parsing. Fixes PR17255. Reviewers: rsmith, doug.gregor, CornedBee, eli.friedman CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1696 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191159 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
44242396a3cf647f4f45058856c7e751df1d9a6e |
22-Sep-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
ObjectiveC: ObjC declarations, including forward class and protocols can be at global scope only. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191155 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
b390e49da4f140fab12732a1c99f4074f5f351a2 |
21-Sep-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR17295: Do not allow explicit conversion functions to be used in cases where an additional conversion (other than a qualification conversion) would be required after the explicit conversion. Conversely, do allow explicit conversion functions to be used when initializing a temporary for a reference binding in direct-list-initialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191150 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
emaOverload.cpp
emaTemplateInstantiateDecl.cpp
|
867521c64254727a37bc9e50fa1045ef3c3b647d |
21-Sep-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Some comment updates and tweaks for clarity. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191147 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
13b228dacb6154d8b48d2f3a51e4e078fa7a7b9e |
21-Sep-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Rearrange narrowing checks in initialization to be a different form of step rather than a post-processing action, so we can support inserting these checks at stages other than the end of the initialization. No functionality change intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191146 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
b9bf312dabcc6ba29a9dd92f17bc0130ee12cb62 |
20-Sep-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Refactor: CheckExplicitInitList is only called to check an entire InitListExpr, so the Index in/out parameters are pointless (always passed in as 0, always ignored by the caller). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191103 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
09ab088dc196863e4027b98916acb98013afb10f |
20-Sep-2013 |
Reid Kleckner <reid@kleckner.net> |
Use -fms-compatibility to trigger lookup into dep. bases Update the docs for -fms-extensions and -fms-compatibility to try to clarify the difference between the two. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191095 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
|
ef8f90caa14d85cffba2fea4b6bd425c3b22eea7 |
20-Sep-2013 |
Richard Trieu <rtrieu@google.com> |
Modify the uninitialized field visitor to detect uninitialized use across the fields in the class. This allows a better checking of member intiailizers and in class initializers in regards to initialization ordering. For instance, this code will now produce warnings: class A { int x; int y; A() : x(y) {} // y is initialized after x, warn here A(int): y(x) {} // default initialization of leaves x uninitialized, warn here }; Several test cases were updated with -Wno-uninitialized to silence this warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191068 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
a41c97a5d1912ffd184381d269fd8e5a25ee5e59 |
20-Sep-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Switch the semantic DeclContext for a block-scope declaration of a function or variable from being the function to being the enclosing namespace scope (in C++) or the TU (in C). This allows us to fix a selection of related issues where we would build incorrect redeclaration chains for such declarations, and fail to notice type mismatches. Such declarations are put into a new IdentifierNamespace, IDNS_LocalExtern, which is only found when searching scopes, and not found when searching DeclContexts. Such a declaration is only made visible in its DeclContext if there are no non-LocalExtern declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191064 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaLookup.cpp
emaTemplateInstantiateDecl.cpp
|
8adf837adc65b55a3f74643c02c1ee077dc26f06 |
20-Sep-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR17290: Use 'false' macro in fix-it hint for initializing a variable of type _Bool in C, if the macro is defined. Also teach FixItUtils to look at whether the macro was defined at the source location for which it is creating a fixit, rather than looking at whether it's defined *now*. This is especially relevant for analysis-based warnings which are delayed until end of TU. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191057 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
emaChecking.cpp
emaFixItUtils.cpp
emaType.cpp
|
152b7d82252b57763f4222fb4e3d0a4ed9937e76 |
20-Sep-2013 |
Kaelyn Uhrain <rikka@google.com> |
Don't correct typos in Sema::BuildCXXNestedNameSpecifier with -fms-extensions When -fms-extensions is enabled, the typo correction was being called here on non-error paths (as in test/SemaTemplate/lookup-dependent-bases.cpp) and correct compilation depended on Sema::CorrectTypo not finding a viable candidate. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191046 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
|
af1d28f3fdafd05ac4f2a761b3b46b32b4267da2 |
19-Sep-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
Fixes a buildbot failure (was using local type in template instantiation). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191022 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
f35a356878c6c32af246f2ab6fdf1cd907b7a56f |
19-Sep-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
Refinement to my previous patch for objc_returns_inner_pointer on properties. // rdar://14990439 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191016 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
937ec1d9575ec455bc2d4e1f159f64980b476196 |
19-Sep-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
ObjectiveC: Allow NS_RETURNS_INNER_POINTER annotation of ObjectiveC properties to mean annotation of NS_RETURNS_INNER_POINTER on its synthesized getter. This also facilitates more migration to properties when methods are annotated with NS_RETURNS_INNER_POINTER. // rdar://14990439 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191009 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaObjCProperty.cpp
|
f91e86c9462006e819ff0d02df564d9b715c047e |
19-Sep-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Fix crash with cast of value-dependent expr. We don't really need to perform semantic analysis on the dependent expression anyway, so just call the cast dependent. <rdar://problem/15012610> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190981 91177308-0d34-0410-b5e6-96231b3b80d8
emaCast.cpp
|
58ee425b11e178c652fa6ff4c1c924fe9b98801e |
19-Sep-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Remove a bogus diagnostic preventing static data member templates from being defined with no initializer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190970 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
2a9dfb0d5cd51652063befce43bc8681109aba76 |
18-Sep-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Remove some dead code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190959 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
d56929515691f707754721f18911f0282cfeb43c |
18-Sep-2013 |
Stepan Dyatkovskiy <stpworld@narod.ru> |
Recommited: Fix for PR16752. Second commit. PR16752: 'mode' attribute for unusual targets doesn't work properly Description: Troubles could be happened due to some assumptions in handleModeAttr function (see SemaDeclAttr.cpp). For example, it assumes that 32 bit integer is 'int', while it could be 16 bit only. Instead of asking target: 'which type do you want to use for int32_t ?' it just hardcodes general opinion. That doesn't looks pretty correct. Please consider the next solution: 1. In Basic/TargetInfo add getIntTypeByWidth and getRealTypeByWidth methods. Methods asks target for proper type for given bit width. 2. Fix handleModeAttr according to new methods in TargetInfo. Fixes: 1st Commit (Done): Add new methods for TargetInfo: getRealTypeByWidth and getIntTypeByWidth for ASTContext names are almost same(invokes new methods from TargetInfo): getIntTypeForBitwidth and getRealTypeForBitwidth 2nd Commit (Current): Fix SemaDeclAttr, handleModeAttr function. Also test/Sema/attr-mode.c was fixed. 'XC' mode test was disabled for PPC64 machines. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190926 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
414a1bdbdaf250e0488589f12865c8961831b65d |
18-Sep-2013 |
Hal Finkel <hfinkel@anl.gov> |
Add the intrinsic __builtin_convertvector LLVM supports applying conversion instructions to vectors of the same number of elements (fptrunc, fptosi, etc.) but there had been no way for a Clang user to cause such instructions to be generated when using builtin vector types. C-style casting on vectors is already defined in terms of bitcasts, and so cannot be used for these conversions as well (without leading to a very confusing set of semantics). As a result, this adds a __builtin_convertvector intrinsic (patterned after the OpenCL __builtin_astype intrinsic). This is intended to aid the creation of vector intrinsic headers that create generic IR instead of target-dependent intrinsics (in other words, this is a generic _mm_cvtepi32_ps). As noted in the documentation, the action of __builtin_convertvector is defined in terms of the action of a C-style cast on each vector element. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190915 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExceptionSpec.cpp
emaExpr.cpp
reeTransform.h
|
8e6557e57e2b88fd3de8a87e53e30c774497f51d |
18-Sep-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix accepts-invalid if a variable template explicit instantiation is missing an argument list, but could be instantiated with argument list of <>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190913 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
6aa7df9df93bcf2d6399f6e535ef74c132db40ec |
18-Sep-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
If a variable template specialization with an incomplete array type is referenced, try to instantiate its definition in order to complete the type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190910 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
aa82461f696ced36b0cd817dfa492b6c93d15447 |
18-Sep-2013 |
David Majnemer <david.majnemer@gmail.com> |
Revert "Revert "[-cxx-abi microsoft] Mangle local TagDecls appropriately"" This reverts commit r190895 which reverted r190892. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190904 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplateInstantiateDecl.cpp
|
1f7fd68131872707a297335e6bc71beef47f9d73 |
18-Sep-2013 |
David Majnemer <david.majnemer@gmail.com> |
Revert "[-cxx-abi microsoft] Mangle local TagDecls appropriately" This reverts commit r190892. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190895 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplateInstantiateDecl.cpp
|
075404782734005e4742621ba4fa29e334cd4987 |
18-Sep-2013 |
David Majnemer <david.majnemer@gmail.com> |
[-cxx-abi microsoft] Mangle local TagDecls appropriately Summary: When selecting a mangling for an anonymous tag type: - We should first try it's typedef'd name. - If that doesn't work, we should mangle in the name of the declarator that specified it as a declaration specifier. - If that doesn't work, fall back to a static mangling of <unnamed-type>. This should make our anonymous type mangling compatible. This partially fixes PR16994; we would need to have an implementation of scope numbering to get it right (a separate issue). Reviewers: rnk, rsmith, rjmccall, cdavis5x CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1540 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190892 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplateInstantiateDecl.cpp
|
08f0bbc4d46daf1b66035b66f6ef497aedf59a42 |
17-Sep-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Don't build extra init lists. AssignConvertType::IncompatibleVectors means the two types are in fact compatible. :) No testcase; I don't think the extra init list has any actual visible effect other than making the resulting AST dump look a bit strange. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190845 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
e9f6f33f0cf98a3e39025a57a0079cd316ed98f8 |
17-Sep-2013 |
David Majnemer <david.majnemer@gmail.com> |
[-cxx-abi microsoft] Correctly identify Win32 entry points Summary: This fixes several issues with the original implementation: - Win32 entry points cannot be in namespaces - A Win32 entry point cannot be a function template, diagnose if we it. - Win32 entry points cannot be overloaded. - Win32 entry points implicitly return, similar to main. Reviewers: rnk, rsmith, whunt, timurrrr Reviewed By: rnk CC: cfe-commits, nrieck Differential Revision: http://llvm-reviews.chandlerc.com/D1683 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190818 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaOverload.cpp
|
225e9826336f85166cbc4636ae61028f6f7868be |
16-Sep-2013 |
Richard Trieu <rtrieu@google.com> |
Move the uninitialized field check to after all the field initializers are added to the CXXConstructorDecl so that information from the constructor can be used. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190810 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
3ddec88be4a322adeb9990db2f83abaca6579d5f |
16-Sep-2013 |
Richard Trieu <rtrieu@google.com> |
Pass additional information around the uninitialized field visitor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190805 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
e1668a3a07a048eb5520410119b8b06787bfcc10 |
16-Sep-2013 |
Aaron Ballman <aaron@aaronballman.com> |
Updated the way the ownership attributes are semantically diagnosed. Added test cases for the semantics checks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190802 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
2440fb1f91557912f8c43cb72201170254ae09f4 |
16-Sep-2013 |
Amara Emerson <amara.emerson@arm.com> |
Add error checking to reject neon_vector_type attribute on targets without NEON. Patch by Artyom Skrobov. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190801 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
3312933e244d820c1c6fec83c4c0c0f67f42d25b |
16-Sep-2013 |
Wei Pan <wei.pan@intel.com> |
Handle PredefinedExpr with templates and lambdas Summary: - lambdas, blocks or captured statements in templates were not handled which causes codegen crashes. Differential Revision: http://llvm-reviews.chandlerc.com/D1628 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190784 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaTemplateInstantiate.cpp
|
3225b9c9b35056f15b967bda1f1d8a3ca1680a42 |
14-Sep-2013 |
Serge Pavlov <sepavloff@gmail.com> |
Avoid getting an argument of allocation function if it does not exist. This is a fix to PR12778: in erroneous code an allocation function can be declared with no arguments, quering the first argument in this case causes assertion violation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190751 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
b445cb9662067b7c7586815937b07828ede9bb49 |
13-Sep-2013 |
Aaron Ballman <aaron@aaronballman.com> |
vector_size cannot be applied to Booleans. Updated the semantic checking logic, as well as the comment and added a test case. Fixes PR12649 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190721 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
422ac9ee19c177fe65e613ff49998bd5a6e55408 |
13-Sep-2013 |
Aaron Ballman <aaron@aaronballman.com> |
Switching the WeakRef attribute to using the new checkStringLiteralArgument helper function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190719 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
fbf6f5c8ac0a3feb9a5add5f9221a21f68ca487a |
13-Sep-2013 |
Aaron Ballman <aaron@aaronballman.com> |
Updated the PCS calling convention to use the new checkStringLiteralArgument helper function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190710 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaType.cpp
|
c561714647f16b028f2c098ae810bd553138d17b |
13-Sep-2013 |
Benjamin Kramer <benny.kra@googlemail.com> |
As Aaron pointed out it's simpler to reject wide string availability attr messages in the parser. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190706 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
f37e4f24c39d0fd3c7f954d2321c4590421907af |
13-Sep-2013 |
Benjamin Kramer <benny.kra@googlemail.com> |
Guard availability and thread safety attributes against wide strings. Found by inspection. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190701 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
1a343e26c76bb09d95b12c3693b19718f4811005 |
13-Sep-2013 |
Benjamin Kramer <benny.kra@googlemail.com> |
Unify handling of string literal arguments for attributes and add fixits. This fixes a couple of latent crashes for invalid attributes and also adds a fixit hint to turn identifiers into string literals if one was expected. It then proceeds recovery as if the identifier was a literal. Diagnostic locations are also changed to point at the literal instead of the attribute if the error concerns the argument. PR17175. For example: hidden.c:1:40: error: 'visibility' attribute requires a string extern int x __attribute__((visibility(hidden))); ^ " " hidden.c:2:29: error: visibility does not match previous declaration extern int x __attribute__((visibility("default"))); ^ hidden.c:1:29: note: previous attribute is here extern int x __attribute__((visibility(hidden))); ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190699 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
fbb08b5ec01fbdeb6219fbba0f5edfd95c752233 |
13-Sep-2013 |
Richard Trieu <rtrieu@google.com> |
Refactor the uninitialized field visitor. Also moved the calls to the visitor later in the code so that the expressions will have addition processing first. This catches a few additional cases of uninitialized uses of class fields. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190657 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
9bd3cdc3b78653275a36f15df81e1def3b2db8db |
13-Sep-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR13657 (and duplicates): When a comma occurs in a default argument or default initializer within a class, disambiguate whether it is part of the initializer or whether it ends the initializer. The way this works (which I will be proposing for standardization) is to treat the comma as ending the default argument or default initializer if the following token sequence matches the syntactic constraints of a parameter-declaration-clause or init-declarator-list (respectively). This is both consistent with the disambiguation rules elsewhere (where entities are treated as declarations if they can be), and should have no regressions over our old behavior. I think it might also disambiguate all cases correctly, but I don't have a proof of that. There is an annoyance here: because we're performing a tentative parse in a situation where we may not have seen declarations of all relevant entities (if the comma is part of the initializer, lookup may find entites declared later in the class), we need to turn off typo-correction and diagnostics during the tentative parse, and in the rare case that we decide the comma is part of the initializer, we need to revert all token annotations we performed while disambiguating. Any diagnostics that occur outside of the immediate context of the tentative parse (for instance, if we trigger the implicit instantiation of a class template) are *not* suppressed, mirroring the usual rules for a SFINAE context. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190639 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaLookup.cpp
|
0f115b3fc02be7b0d9c8bcefc36139ccb669f62e |
13-Sep-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Fix regression from r190427. <rdar://problem/14970968> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190635 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
8a1fdfc69cc6c2ccbfd57fc8ff643c589da9df9b |
12-Sep-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR16054: Slight strengthening for -Wsometimes-uninitialized: if we use a variable uninitialized every time we reach its (reachable) declaration, or every time we call the surrounding function, promote the warning from -Wmaybe-uninitialized to -Wsometimes-uninitialized. This is still slightly weaker than desired: we should, in general, warn if a use is uninitialized the first time it is evaluated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190623 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
d068607c136298bec0891d750389a55bac9f5c98 |
11-Sep-2013 |
Aaron Ballman <aaron@aaronballman.com> |
Tablegen now generates a StringSwitch for attributes containing enumeration arguments to map strings to the proper enumeration value. This makes error checking more consistent and reduces the amount of hand-written code required. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190545 91177308-0d34-0410-b5e6-96231b3b80d8
emaAttr.cpp
emaDeclAttr.cpp
emaType.cpp
|
71fcba874e399eb33e0ebf7c6b19bc2a5e876993 |
11-Sep-2013 |
Daniel Jasper <djasper@google.com> |
Split -Wunused-variable warning. With r190382, -Wunused-variable warns about unused const variables when appropriate. For codebases that use -Werror, this poses a problem as existing unused const variables need to be cleaned up first. To make the transistion easier, this patch splits -Wunused-variable by pulling out an additional -Wunused-const-variable (by default activated along with -Wunused-variable). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190508 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
09ec2003712ce9fc679ed4a2657c219cfe5d472d |
11-Sep-2013 |
NAKAMURA Takumi <geek4civic@gmail.com> |
SemaTemplateDeduction.cpp: Prune two stray \param(s), TPOC and NumCallArguments in Sema::getMostSpecialized(). They were removed since r190444. [-Wdocumentation] git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190501 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
a3d727ba775eaecd4fd69e1c90b81732394716a6 |
11-Sep-2013 |
Eli Friedman <eli.friedman@gmail.com> |
volatile types are not trivially copyable. PR17123. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190484 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
ba081617a9f116ca2d511d0bf96e45c53ecc2523 |
11-Sep-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Fix is_trivially_constructible preconditions. Fixes a crash in cases where the first argument was an incomplete type or an uninstantiated template type. <rdar://problem/14938471> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190482 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
ebaee6b74e56f28c088225b11a512e6e7d1fb9d8 |
11-Sep-2013 |
Aaron Ballman <aaron@aaronballman.com> |
The cleanup attribute no longer uses an unresolved, simple identifier as its argument. Instead, it takes an expression that is fully resolved. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190476 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
66118c215183dec714cbbdec8060497675cebcac |
11-Sep-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR17075: When performing partial ordering of a member function against a non-member function, the number of arguments in the two candidate calls will be different (the non-member call will have one extra argument). We used to get confused by this, and fail to compare the last argument when testing whether the member is better, resulting in us always thinking it is, even if the non-member is more specialized in the last argument. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190470 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaTemplateDeduction.cpp
|
e2e9a517f6a6bd4caad5500243597c871a516da7 |
11-Sep-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Remove unused class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190462 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
4ad09e6281a0b32a0705807159649bb81cb2b1e9 |
11-Sep-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
getMostSpecialized for function template sets is never used in the context of a call; remove its 'number of explicit arguments' and 'what kind of call' parameters. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190444 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
|
e8bcd4c8e5a867c52bef3837731e44b88eba6a36 |
11-Sep-2013 |
Reid Kleckner <reid@kleckner.net> |
Ignore noreturn when checking function template specializations As requested when applying the same logic to calling conventions. Reviewers: rsmith Differential Revision: http://llvm-reviews.chandlerc.com/D1634 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190441 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
812d6bcbd13190e6e5c2c915bf1499038d56b44b |
10-Sep-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR5683: Issue a warning when subtracting pointers to types of zero size, and treat such subtractions as being non-constant. Patch by Serge Pavlov! With a few tweaks by me. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190439 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
1507bf55c958bdd4b14a3ee49f66af874f179cf2 |
10-Sep-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Fix regression from r190382. Make sure we perform the correct "referenced-but-not-used" check for static member constants. Fixes bug reported on cfe-commits by Alexey Samsonov. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190437 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDecl.cpp
|
942f9fe11d3a9583eef6bc4ca2549b1f0d1694da |
10-Sep-2013 |
Reid Kleckner <reid@kleckner.net> |
[ms-cxxabi] Implement guard variables for static initialization Static locals requiring initialization are not thread safe on Windows. Unfortunately, it's possible to create static locals that are actually externally visible with inline functions and templates. As a result, we have to implement an initialization guard scheme that is compatible with TUs built by MSVC, which makes thread safety prohibitively difficult. MSVC's scheme is that every function that requires a guard gets an i32 bitfield. Each static local is assigned a bit that indicates if it has been initialized, up to 32 bits, at which point a new bitfield is created. MSVC rejects inline functions with more than 32 static locals, and the externally visible mangling (?_B) only allows for one guard variable per function. On Eli's recommendation, I used MangleNumberingContext to track which bit each static corresponds to. Implements PR16888. Reviewers: rjmccall, eli.friedman Differential Revision: http://llvm-reviews.chandlerc.com/D1416 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190427 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaLambda.cpp
|
8e366f090b009da18a9371c665a42881abe1c24f |
10-Sep-2013 |
Stepan Dyatkovskiy <stpworld@narod.ru> |
Rejected 190391, due to failures on clang-x86_64-darwin11-nobootstrap-RAincremental. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190393 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
9fd13796946d089a7a37084ef31c183328a60786 |
10-Sep-2013 |
Stepan Dyatkovskiy <stpworld@narod.ru> |
Fix for PR16752. Second commit. PR16752: 'mode' attribute for unusual targets doesn't work properly Description: Troubles could be happened due to some assumptions in handleModeAttr function (see SemaDeclAttr.cpp). For example, it assumes that 32 bit integer is 'int', while it could be 16 bit only. Instead of asking target: 'which type do you want to use for int32_t ?' it just hardcodes general opinion. That doesn't looks pretty correct. Please consider the next solution: 1. In Basic/TargetInfo add getIntTypeByWidth and getRealTypeByWidth methods. Methods asks target for proper type for given bit width. 2. Fix handleModeAttr according to new methods in TargetInfo. Fixes: 1st Commit (Done): Add new methods for TargetInfo: getRealTypeByWidth and getIntTypeByWidth for ASTContext names are almost same(invokes new methods from TargetInfo): getIntTypeForBitwidth and getRealTypeForBitwidth 2nd Commit (Current): Fix SemaDeclAttr, handleModeAttr function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190391 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
39bd371610af27b073c792c54c6c28133329f6ad |
10-Sep-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Make -Wunused warning rules more consistent. This patch does a few different things. This patch improves unused var diags for const vars: we no longer unconditionally suppress diagnostics for const vars, instead only suppressing the diagnostic when the declaration appears to be useful. This patch also makes us more consistently use whether a variable/function is declared in the main file to suppress diagnostics where appropriate. Fixes <rdar://problem/14907887>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190382 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDecl.cpp
|
35bc0055408131d34543c6b4a137d021b26f2d6a |
10-Sep-2013 |
Reid Kleckner <reid@kleckner.net> |
Ignore calling conventions when checking function template specializations Summary: Calling conventions are inherited during decl merging. Before this change, deduction would fail due to a type mismatch between the template and the specialization. This change adjusts the CCs to match before deduction, and lets the decl merging logic diagnose mismatch or inherit the CC from the template. This allows specializations of static member function templates in the Microsoft C++ ABI. Reviewers: rsmith CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1570 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190377 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
be116e2aab5e97d687f496ace0392e7701cf649f |
10-Sep-2013 |
Aaron Ballman <aaron@aaronballman.com> |
Adding a FIXME based on feedback from Richard Smith. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190369 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
bbb3b3237df2284f6f3c34798944fcfa4b43fd34 |
10-Sep-2013 |
Aaron Ballman <aaron@aaronballman.com> |
Attribute tablegen now understands that attribute arguments can be optional. This allows for automated checking of the number of arguments expected vs number of arguments given for attributes. Greatly reduces the amount of manual checking required. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190368 91177308-0d34-0410-b5e6-96231b3b80d8
ttributeList.cpp
MakeLists.txt
emaDeclAttr.cpp
|
b60fae50d38a0291e1c5731b2fb22849d26ca342 |
09-Sep-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
C++ modules: if a class is defined in multiple modules (for instance, because it is an implicit instantiation of a class template specialization), pick the first-loaded definition to be the canonical definition, and merge all other definitions into it. This is still rather incomplete -- we need to extend every form of declaration that can appear within a CXXRecordDecl to be redeclarable if it came from an AST file (this includes fields, enumerators, ...). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190315 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
ae3a83f578e48745f12b213c222217d91187a248 |
09-Sep-2013 |
Benjamin Kramer <benny.kra@googlemail.com> |
Sema: Don't crash on visibility attributes with an identifier argument. PR17105. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190312 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
e575359c34a9248c55ec0c03a8fc945f1ee4cb01 |
09-Sep-2013 |
Benjamin Kramer <benny.kra@googlemail.com> |
Fix constructor-related typos. Noticed by Roman Divacky. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190311 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
emaDeclCXX.cpp
emaOverload.cpp
|
5aad145958d233d05901cca2ae3c4975d4233d66 |
09-Sep-2013 |
Aaron Ballman <aaron@aaronballman.com> |
Silencing an MSVC warning about an empty control statement (it dislikes ; but is fine with {}). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190305 91177308-0d34-0410-b5e6-96231b3b80d8
emaOpenMP.cpp
|
e5934897fb4eb0ddc272e81b3aae0994cdee49e9 |
09-Sep-2013 |
Aaron Ballman <aaron@aaronballman.com> |
Removing the endian attribute and updating associated test cases. This functionality was never completely implemented, and this is an improvement over silently eating the attribute. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190303 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
b7165589b2eafc4b48d09a5914e21604ae580256 |
09-Sep-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
C++ modules: fix a bug where loading a declaration with some name would prevent name lookup from lazily deserializing the other declarations with the same name, by tracking a bit to indicate whether a name in a DeclContext might have additional external results. This also allows lazier reconciling of the lookup table if a module import adds decls to a pre-existing DC. However, this exposes a pre-existing bug, which causes a regression in test/Modules/decldef.mm: if we have a reference to a declaration, and a later-imported module adds a redeclaration, nothing causes us to load that redeclaration when we use or emit the reference (which can manifest as a reference to an undefined inline function, a use of an incomplete type, and so on). decldef.mm has been extended with an additional testcase which fails with or without this change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190293 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
14dcaa92eeff0fb1de5a36f90c8c0f2d01d126a3 |
07-Sep-2013 |
Enea Zaffanella <zaffanella@cs.unipr.it> |
Fixed bug in call to CXXTemporaryObjectExpr ctor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190249 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
29b37a06fc58bb2993d1c35cf7411b6b94b1116a |
07-Sep-2013 |
David Majnemer <david.majnemer@gmail.com> |
AST: __uuidof should leak through templated types Summary: __uuidof on templated types should exmaine if any of its template parameters have a uuid declspec. If exactly one does, then take it. Otherwise, issue an appropriate error. Reviewers: rsmith, thakis, rnk CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1419 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190240 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
1245a54ca6e9c5b14196461dc3f84b24ea6594b1 |
07-Sep-2013 |
Enea Zaffanella <zaffanella@cs.unipr.it> |
Fix missing source location in CXXTemporaryObjectExpr nodes. For clarity, renamed (get/set)ParenRange as (get/set)ParenOrBraceRange in CXXConstructExpr nodes. Added testcase. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190239 91177308-0d34-0410-b5e6-96231b3b80d8
emaCast.cpp
emaInit.cpp
reeTransform.h
|
798186ae9253c935f4a5cf19cc9610d9e9a370c5 |
07-Sep-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Remove error-prone 'list initialization' flag from an implicit conversion sequence. All that matters here is whether we're doing the std::initializer_list special case thing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190213 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
130fcc8097ac79c770d480765d4f79b428b285b8 |
06-Sep-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Preserve exception specs in function decl merging. Exception specs are not part of the canonical type, but we shouldn't drop them just because we merged a noreturn attribute. Fixes PR17110. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190206 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
0c018357b8bbb1f96bbf622a5807421e626b4228 |
06-Sep-2013 |
Alexey Bataev <a.bataev@hotmail.com> |
OpenMP: Data-sharing attributes analysis and clause 'shared' (fixed test threadprivate_messages.cpp) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190183 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaOpenMP.cpp
reeTransform.h
|
d7d94dc922075d131d51a4974f60c840e0e96cfb |
06-Sep-2013 |
David Tweed <david.tweed@arm.com> |
OpenCL allows the (pre/post)-(increment/decrement) operator on integer vector types, so allow that case and add appropriate tests. Patch by Ruiling Song! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190129 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
9c5716c30d91212dcdea5e5c9b9ded9ed2439a09 |
06-Sep-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Add self-comparison warnings for fields. This expands very slightly what -Wtautological-compare considers to be tautological to include implicit accesses to C++ fields and ObjC ivars. I don't want to turn this into a full expression-identity check, but these additions seem pretty well-contained, and maintain the theme of checking for "x == x". <rdar://problem/14431127> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190118 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
a33ab6074a2cc60fe895d6669f9ee776c5fea335 |
06-Sep-2013 |
David Blaikie <dblaikie@gmail.com> |
Consumed Analysis: The 'consumable' attribute now takes a identifier specifying the default assumed state for objects of this class This information is used for return states and pass-by-value parameter states. Patch by Chris Wailes. Review by DeLesley Hutchins and Aaron Ballman. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190116 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
3082be2f92c5d273ada989c1a13bcb46bc14e4c7 |
06-Sep-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
When creating an implicit conversion sequence for a reference of type T from an initializer list containing a single element of type T, be sure to mark the sequence as a list conversion sequence so that it is known to be worse than an implicit conversion sequence that initializes a std::initializer_list object. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190115 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
1ac6c93b7fc1dc29cc847079342172c2cc23c143 |
06-Sep-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Reduce stack usage of TreeTransform. Without this patch, TreeTransform::TransformExpr uses a ridiculous amount of stack space (around 5000 bytes). Preventing inlining brings the stack usage down to something sane. On a testcase I have, on my computer, this allows changing -ftemplate-depth from 210 to around 750 before we crash. I'm not sure I should commit the testcase, though: I don't want to cause test failures on platforms with less stack space available. <rdar://problem/14098189>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190114 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
dae9271c2c32527fea8b01953912e214eadc548e |
06-Sep-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Improve error for "override" + non-virtual func. Consider something like the following: struct X { virtual void foo(float x); }; struct Y : X { void foo(double x) override; }; The error is almost certainly that Y::foo() has the wrong signature, rather than incorrect usage of the override keyword. This patch adds an appropriate diagnostic for that case. Fixes <rdar://problem/14785106>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190109 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
86164e8f51fa89a3ec904607c3848dc4a21b12cf |
05-Sep-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Note when a decl is used in AST files. When an AST file is built based on another AST file, it can use a decl from the fist file, and therefore mark the "isUsed" bit. We need to note this in the AST file so that the bit is set correctly when the second AST file is loaded. This patch introduces the distinction between setIsUsed() and markUsed() so that we don't call into the ASTMutationListener callback when it wouldn't be appropriate. Fixes PR16635. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190016 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaLambda.cpp
emaStmt.cpp
emaTemplateInstantiateDecl.cpp
|
1e75a1a9e5c66ea09eababb1c8f3e2f49cadf0bd |
04-Sep-2013 |
Serge Pavlov <sepavloff@gmail.com> |
Clear LookupResult object if invalid candidate is found. If source code is invalid, error recovery can lead to name lookup in a set containing invalid declaration. The lookup is stopped once found such declaration, but LookupResult object could remain in inconsistent state. Its destructor triggered a check, which caused assert violation. This patch fixes PR16964 and PR12791. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189916 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
82b9709b6e6d4e9d0aa292c2c1cfd31e8fffb8f5 |
03-Sep-2013 |
David Blaikie <dblaikie@gmail.com> |
Reference extension is weird/surprising and unnecessary, let's not do that. Found by Chris Wailes git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189859 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
efd570e8ada25241840a0e7e22c4383f3d52038f |
03-Sep-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Simplify. This function bails out a few lines above if !Found.empty(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189857 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
caa5ab264ddea332e8423af1ebcea50d0cb37206 |
03-Sep-2013 |
Aaron Ballman <aaron@aaronballman.com> |
Switched FormatAttr to using an IdentifierArgument instead of a StringArgument since that is a more accurate modeling. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189851 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDecl.cpp
emaDeclAttr.cpp
|
99a7238b1acc6f4f41d39aeec6f25049375a24ec |
03-Sep-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Refactor computation of whether a variable declaration's type should be merged with a prior declaration. No functionality change intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189850 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
0e8534efc3c536795ede0128aed86a6b8ad53ab7 |
03-Sep-2013 |
DeLesley Hutchins <delesley@google.com> |
Consumed analysis: add return_typestate attribute. Patch by chris.wailes@gmail.com Functions can now declare what state the consumable type the are returning will be in. This is then used on the caller side and checked on the callee side. Constructors now use this attribute instead of the 'consumes' attribute. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189843 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
emaDeclAttr.cpp
|
8edabd95dd4c9099fd124c5e50322730b9200d23 |
03-Sep-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Factor out parsing and allocation of IdentifierLoc objects. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189833 91177308-0d34-0410-b5e6-96231b3b80d8
ttributeList.cpp
|
4367829b41e89d2f3dfae94a97af40ffa01c56c9 |
03-Sep-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Revert "OpenMP: Data-sharing attributes analysis and clause 'shared'" This reverts commit r189795. threadprivate_messages.cpp is faling on windows. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189811 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaOpenMP.cpp
reeTransform.h
|
8f1a2db8649eb151ee620273dcf34b700176430f |
03-Sep-2013 |
Alexey Bataev <a.bataev@hotmail.com> |
OpenMP: Data-sharing attributes analysis and clause 'shared' git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189795 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaOpenMP.cpp
reeTransform.h
|
bb0b6149611073bf83f13595f6155a27e05d408d |
02-Sep-2013 |
Jin-Gu Kang <jaykang10@imrc.kist.re.kr> |
the call to UsualArithmeticConversions should come after the call to CheckVectorOperands on CheckConditionalOperands function. This problem caused compilation error with test17 on "test/CodeGen/ext-vector.c". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189773 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
624421f98d8fcb8ed8ebc406da41217682159aa8 |
31-Aug-2013 |
Aaron Ballman <aaron@aaronballman.com> |
Consolidating the notion of a GNU attribute parameter with the attribute argument list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189711 91177308-0d34-0410-b5e6-96231b3b80d8
ttributeList.cpp
emaDeclAttr.cpp
emaType.cpp
argetAttributesSema.cpp
|
c55bee6e278d888d7a5d29fc17df6a9ae1e8b7d3 |
31-Aug-2013 |
DeLesley Hutchins <delesley@google.com> |
Consumed analysis: add 'consumable' class attribute. Patch by chris.wailes@gmail.com Adds the 'consumable' attribute that can be attached to classes. This replaces the previous method of scanning a class's methods to see if any of them have consumed analysis attributes attached to them. If consumed analysis attributes are attached to methods of a class that isn't marked 'consumable' a warning is generated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189702 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
66ea35d9f3d93cab3ca6d735c8eb19a5f701b86f |
30-Aug-2013 |
Pavel Labath <labath@google.com> |
Sema: avoid reuse of Exprs when synthesizing operator= Summary: Previously, Sema was reusing parts of the AST when synthesizing an assignment operator, turning it into a AS-dag. This caused problems for the static analyzer, which assumed an expression appears in the tree only once. Here I make sure to always create a fresh Expr, when inserting something into the AST, fixing PR16745 in the process. Reviewers: doug.gregor CC: cfe-commits, jordan_rose Differential Revision: http://llvm-reviews.chandlerc.com/D1425 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189659 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
e8519c31a6ef853b627d557702ac1890f18ce2c9 |
30-Aug-2013 |
Charles Davis <cdavis5x@gmail.com> |
Add ms_abi and sysv_abi attribute handling. Based on a patch by Benno Rice! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189644 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaType.cpp
|
4e1a82c14cba135ebd86bcc914fcbbc524d70a61 |
30-Aug-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Adjust clang for change to APFloat::toString. I changed the diagnostic printing code because it's probably better to cut off a digit from DBL_MAX than to print something like 1.300000001 when the user wrote 1.3. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189625 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
023b22045e6407052a5c456e19573b5cd4866dc1 |
29-Aug-2013 |
Serge Pavlov <sepavloff@gmail.com> |
Removed useless default branch of switch statement. The problem was caught by sanitizer build. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189575 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
8ed2f3ad9505962d8dec4630caeaad607edbbb7d |
29-Aug-2013 |
Serge Pavlov <sepavloff@gmail.com> |
Change return type of Sema::DiagnoseAmbiguousLookup from bool to void. The function always returned true value, which was never used. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189571 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
4a97b8e75f5dccf5a9537cf7358297437f55326d |
29-Aug-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Remove Inheritable/NonInheritable flags from ProcessDeclAttributes. They don't do anything useful. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189548 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
|
9d57b8dea3b139dc2e2976ffccef50c74ac03873 |
29-Aug-2013 |
David Majnemer <david.majnemer@gmail.com> |
Sema: Subst type default template args earlier Summary: We would not perform substitution at an appropriate point, allowing strange results to appear. We would accepts things that we shouldn't or mangle things incorrectly. Note that this hasn't fixed the other cases like template-template parameters or non-type template parameters. Reviewers: doug.gregor, rjmccall, rsmith Reviewed By: rsmith CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1507 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189540 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
19513232c63a45b1efdde0e4253d2fd815dafc8c |
29-Aug-2013 |
Aaron Ballman <aaron@aaronballman.com> |
Mode is now handled as a non-inheritable attribute, and CUDADevice & CUDAHost are now handled as inheritable attributes. In all three cases, this makes the processing behavior more consistent with the declared behavior in Attr.td. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189532 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
3f93d4ce2ba550f1dac4ae544ffe1349e42f708a |
28-Aug-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Improve error for assignment to incomplete class. PR7681. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189510 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
ef072033876e295ec5d3402f8730a3ae358ad815 |
28-Aug-2013 |
Reid Kleckner <reid@kleckner.net> |
Delete CC_Default and use the target default CC everywhere Summary: Makes functions with implicit calling convention compatible with function types with a matching explicit calling convention. This fixes things like calls to qsort(), which has an explicit __cdecl attribute on the comparator in Windows headers. Clang will now infer the calling convention from the declarator. There are two cases when the CC must be adjusted during redeclaration: 1. When defining a non-inline static method. 2. When redeclaring a function with an implicit or mismatched convention. Fixes PR13457, and allows clang to compile CommandLine.cpp for the Microsoft C++ ABI. Excellent test cases provided by Alexander Zinenko! Reviewers: rsmith Differential Revision: http://llvm-reviews.chandlerc.com/D1231 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189412 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaLambda.cpp
emaLookup.cpp
emaType.cpp
|
18062394db459158942ab491a88b9d52a5c0ab0d |
27-Aug-2013 |
Serge Pavlov <sepavloff@gmail.com> |
Cleanup of OpaquePtr. No functionality changes. - Some documenation were added. - Usages of OpaquePtr<A>.getAsVal<A>() were replaced by OpaquePtr<A>.get(). - Methods getAs and getAsVal were renamed to getPtrTo and getPtrAs respectively. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189346 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
emaDecl.cpp
emaDeclObjC.cpp
emaStmt.cpp
emaTemplate.cpp
reeTransform.h
|
fc2181301750feae060973a51176e9737145bf22 |
27-Aug-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Simplify a bit. This follows from computeKeyFunction having: // Template instantiations don't have key functions,see Itanium C++ ABI 5.2.6. // Same behavior as GCC. TemplateSpecializationKind TSK = RD->getTemplateSpecializationKind(); if (TSK == TSK_ImplicitInstantiation || TSK == TSK_ExplicitInstantiationDefinition) return 0; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189287 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
60c444d3f4d37875e725e542a34098dbf45321ed |
27-Aug-2013 |
Aaron Ballman <aaron@aaronballman.com> |
Since r179585, __declspec(property) has gotten special treatment as an attribute where it is not processed as part of the typical Sema attribute functionality. Specifying this attribute as being "ignored" because there is no sema handler for it as a Decl attribute, and no AST node generated for it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189284 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
15b2674896371ac2a0fe707b538a1a29dec9d8e4 |
26-Aug-2013 |
Wei Pan <wei.pan@intel.com> |
Handle predefined expression for a captured statement - __func__ or __FUNCTION__ returns captured statement's parent function name, not the one compiler generated. Differential Revision: http://llvm-reviews.chandlerc.com/D1491 Reviewed by bkramer git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189219 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
63f25e6719e3920a04f66a80958b792ac268aedd |
24-Aug-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Add a FIXME. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189153 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
8d2a5ea694ed0002b45deb2bd35db451b16a07d6 |
24-Aug-2013 |
Larisse Voufo <lvoufo@google.com> |
A clean-up pass, exploring the unification of traversals of class, variable and function templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189152 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateDeduction.cpp
|
344472ebeded2fca2ed5013b9e87f81d09bfa908 |
23-Aug-2013 |
Robert Wilhelm <robert.wilhelm@gmx.net> |
Use pop_back_val() instead of both back() and pop_back(). No functionality change intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189112 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaAccess.cpp
emaChecking.cpp
emaCodeComplete.cpp
emaDeclCXX.cpp
emaLookup.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
|
d1282ec56231c967439c1eb67fe4afe792287911 |
23-Aug-2013 |
David Majnemer <david.majnemer@gmail.com> |
Sema: Properly support Microsoft-mode template arguments Summary: There were two things known to be wrong with our implementation of MSVC mode template arguments: - We didn't properly handle __uuidof/CXXUuidofExpr and skipped all type checking completely. - We didn't allow for MSVC's extension of allowing certain constant "foldable" expressions from showing up in template arguments. They allow various casts dereference and address-of operations. We can make it more general as we find further peculiarities but this is the known extent. Reviewers: rsmith, doug.gregor, rjmccall Reviewed By: doug.gregor CC: cfe-commits, rnk Differential Revision: http://llvm-reviews.chandlerc.com/D1444 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189087 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
37fd27dbb941d27f4bd7412e534e7e5089d6781b |
23-Aug-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Remove SequenceNumber from class/variable template partial specializations. This was only used to ensure that the traversal order was the same as the insertion order, but that guarantee was already being provided by the use of a FoldingSetVector. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189075 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
5fdd207ec8f4c1f58bd74f8a84ce1935487563ce |
22-Aug-2013 |
DeLesley Hutchins <delesley@google.com> |
Update to consumed analysis. Patch by chris.wailes@gmail.com. The following functionality was added: * The same functionality is now supported for both CXXOperatorCallExprs and CXXMemberCallExprs. * Factored out some code in StmtVisitor. * Removed variables from the state map when their destructors are encountered. * Started adding documentation for the consumed analysis attributes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189059 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
152b4e4652baedfceba1cd8115515629225e713f |
22-Aug-2013 |
Manuel Klimek <klimek@google.com> |
Revert "Implement a rudimentary form of generic lambdas." This reverts commit 606f5d7a99b11957e057e4cd1f55f931f66a42c7. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189004 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaLambda.cpp
emaOverload.cpp
emaStmt.cpp
emaTemplateDeduction.cpp
emaType.cpp
reeTransform.h
|
28cc16a64a3bbad9e48309eb8b4ee68893cd85d0 |
22-Aug-2013 |
Manuel Klimek <klimek@google.com> |
Revert "Remove some unused variables identified by Juergen Ributzka *I need to turn on this warning in Visual C++ - sorry!*" This reverts commit d01d0b63d87ac465f15ce1d6b56bf3faf4525769. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189003 91177308-0d34-0410-b5e6-96231b3b80d8
emaLambda.cpp
|
21adb0ce21d8180b5dce0a31209cba3a5a33e26a |
22-Aug-2013 |
Robert Wilhelm <robert.wilhelm@gmx.net> |
const'ify Sema::ActOnCXXTryBlock by changing Parameter from MutableArrayRef to ArrayRef. No functionality change intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188994 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
reeTransform.h
|
ebf55350505523b1fe3e43aab8e1e88decb0ad09 |
22-Aug-2013 |
Faisal Vali <faisalv@yahoo.com> |
Remove some unused variables identified by Juergen Ributzka *I need to turn on this warning in Visual C++ - sorry!* git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188979 91177308-0d34-0410-b5e6-96231b3b80d8
emaLambda.cpp
|
ecb5819a9e64fb654d46a3b270a286cc570c58ff |
22-Aug-2013 |
Faisal Vali <faisalv@yahoo.com> |
Implement a rudimentary form of generic lambdas. Specifically, the following features are not included in this commit: - any sort of capturing within generic lambdas - nested lambdas - conversion operator for captureless lambdas - ensuring all visitors are generic lambda aware As an example of what compiles: template <class F1, class F2> struct overload : F1, F2 { using F1::operator(); using F2::operator(); overload(F1 f1, F2 f2) : F1(f1), F2(f2) { } }; auto Recursive = [](auto Self, auto h, auto ... rest) { return 1 + Self(Self, rest...); }; auto Base = [](auto Self, auto h) { return 1; }; overload<decltype(Base), decltype(Recursive)> O(Base, Recursive); int num_params = O(O, 5, 3, "abc", 3.14, 'a'); Please see attached tests for more examples. Some implementation notes: - Add a new Declarator context => LambdaExprParameterContext to clang::Declarator to allow the use of 'auto' in declaring generic lambda parameters - Augment AutoType's constructor (similar to how variadic template-type-parameters ala TemplateTypeParmDecl are implemented) to accept an IsParameterPack to encode a generic lambda parameter pack. - Add various helpers to CXXRecordDecl to facilitate identifying and querying a closure class - LambdaScopeInfo (which maintains the current lambda's Sema state) was augmented to house the current depth of the template being parsed (id est the Parser calls Sema::RecordParsingTemplateParameterDepth) so that Sema::ActOnLambdaAutoParameter may use it to create the appropriate list of corresponding TemplateTypeParmDecl for each auto parameter identified within the generic lambda (also stored within the current LambdaScopeInfo). Additionally, a TemplateParameterList data-member was added to hold the invented TemplateParameterList AST node which will be much more useful once we teach TreeTransform how to transform generic lambdas. - SemaLambda.h was added to hold some common lambda utility functions (this file is likely to grow ...) - Teach Sema::ActOnStartOfFunctionDef to check whether it is being called to instantiate a generic lambda's call operator, and if so, push an appropriately prepared LambdaScopeInfo object on the stack. - Teach Sema::ActOnStartOfLambdaDefinition to set the return type of a lambda without a trailing return type to 'auto' in C++1y mode, and teach the return type deduction machinery in SemaStmt.cpp to process either C++11 and C++14 lambda's correctly depending on the flag. - various tests were added - but much more will be needed. A greatful thanks to all reviewers including Eli Friedman, James Dennett and the ever illuminating Richard Smith. And yet I am certain that I have allowed unidentified bugs to creep in; bugs, that I will do my best to slay, once identified! Thanks! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188977 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaLambda.cpp
emaOverload.cpp
emaStmt.cpp
emaTemplateDeduction.cpp
emaType.cpp
reeTransform.h
|
567f917df048d42732997a479b2b257403fc88ef |
22-Aug-2013 |
Larisse Voufo <lvoufo@google.com> |
Refactor for clarity and simplicity. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188974 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
04592e7c1260a6a671a24d91dab16f5d5a024fe0 |
22-Aug-2013 |
Larisse Voufo <lvoufo@google.com> |
Improve support for static data member templates. This revision still has at least one bug, as it does not respect the variable template specialization hierarchy well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188969 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
24146975f1af8c1b4b14e8545f218129d0e7dfeb |
22-Aug-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Split isFromMainFile into two functions. Basically, isInMainFile considers line markers, and isWrittenInMainFile doesn't. Distinguishing between the two is useful when dealing with files which are preprocessed files or rewritten with -frewrite-includes (so we don't, for example, print useless warnings). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188968 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaChecking.cpp
emaDeclCXX.cpp
emaExpr.cpp
|
34776d429496601454a817451aede2ea39793b0e |
22-Aug-2013 |
Aaron Ballman <aaron@aaronballman.com> |
Updated the consumed analysis warnings to use a more standardized diagnostic. Patch thanks to Christian Wailes! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188940 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
0d28fdfeaa7deb9c0da369e02a25dac7cdf66648 |
21-Aug-2013 |
Aaron Ballman <aaron@aaronballman.com> |
Removed unnecessary asserts. Patch thanks to Christian Wailes! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188934 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
f96df620402f41ce9f1a97c0d286c2b42637d5b9 |
21-Aug-2013 |
Nick Lewycky <nicholas@mxc.ca> |
Fix the end sourcelocation of the call expression in a member access when recovering by adding empty parenthesis. Fixes PR16676! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188920 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
28bdbf0861fefb33474fddbda1d3c66ee29be2af |
21-Aug-2013 |
Benjamin Kramer <benny.kra@googlemail.com> |
Sema: Use the right type for PredefinedExpr when it's in a lambda. 1. We now print the return type of lambdas and return type deduced functions as "auto". Trailing return types with decltype print the underlying type. 2. Use the lambda or block scope for the PredefinedExpr type instead of the parent function. This fixes PR16946, a strange mismatch between type of the expression and the actual result. 3. Verify the type in CodeGen. 4. The type for blocks is still wrong. They are numbered and the name is not known until CodeGen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188900 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
37aa0f7ca567128fb00f88ceb4a7c229833f257e |
21-Aug-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
If we find an error in the range expression in a range-based for loop, and the loop variable has a type containing 'auto', set the declaration to be invalid (because we couldn't deduce its type) to prevent follow-on errors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188853 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
d67679d7439bd17b06574781b908630f4640c662 |
20-Aug-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
During typo correction, check for an exact match in an unimported module. If we find one, then report the error as a missing import instead of as a typo. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188821 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
48a2a3a6ec7a168abdb1e0116bceeac578c132ea |
20-Aug-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Handle init lists and _Atomic fields. Fixes PR16931. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188718 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
556ef7f8b833d20caf31b80f8c1b5cad2e32ef10 |
20-Aug-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR16727: don't try to evaluate a potentially value-dependent expression when checking for missing parens in &&/|| expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188716 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
c895f4d411152b08365cac48f330a8a7898fb382 |
19-Aug-2013 |
Robert Wilhelm <robert.wilhelm@gmx.net> |
const'ify Sema::ActOnCompoundStmt by changing Parameter of Sema::ActOnCompoundStmt from MutableArrayRef to ArrayRef. No functionality change intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188705 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaStmt.cpp
|
ecf119c68b9f20f022965fb4875f3fa1d4ffef70 |
19-Aug-2013 |
Robert Wilhelm <robert.wilhelm@gmx.net> |
Omit llvm:: before makeArrayRef. We have using directive in this file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188659 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
2f6a73c08b22393e1aa2800587b9bdd0870aad52 |
19-Aug-2013 |
David Majnemer <david.majnemer@gmail.com> |
Sema: Remove dead code in CheckTemplateArgumentAddressOfObjectOrFunction Summary: DeclRefExpr::getDecl gives us back a ValueDecl, this isa<> check will never fire. Reviewers: eli.friedman, doug.gregor, majnemer Reviewed By: majnemer CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1434 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188647 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
ab4e0c0ad9cbb744e159f6ff6022a9b7f889147c |
18-Aug-2013 |
Chandler Carruth <chandlerc@gmail.com> |
Fix a use-after-free found in libclang when doing code completion. The loop processing the candidates can cause new declerations to be added to the context, invalidating lookup_result. To avoid that, make a copy of the list of declarations to iterate over. I don't have a way to check in a test case for this as it involves a giant pile of source code and a generated PCH file used to accelerate code completion, all of this running under ASan. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188623 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
2d67097ad41f4c2fe82ebce3f587e06498f1bd71 |
17-Aug-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Refactor all diagnosing of TypoCorrections through a common function, in preparation for teaching this function how to diagnose a correction that includes importing a module. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188602 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprMember.cpp
emaExprObjC.cpp
emaInit.cpp
emaLookup.cpp
emaOpenMP.cpp
emaTemplate.cpp
emaTemplateVariadic.cpp
|
29535baf2a2bd1d92b8a80992164ea815dda16b3 |
17-Aug-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Don't reject attribute used in an "extern const" variable definition. Before this patch we would warn and drop the attribute in extern const char test3[] __attribute__((used)) = ""; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188588 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
|
360d23ef628bf891514e77c519d1d77305ca1743 |
16-Aug-2013 |
David Majnemer <david.majnemer@gmail.com> |
Parse: Do not 'HandleTopLevelDecl' on templated functions. Summary: HandleTopLevelDecl on a templated function leads us to try and mangle it. Reviewers: rsmith Reviewed By: rsmith CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1412 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188536 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
2f835ca26aad970be44227d40269db45e73d0a08 |
16-Aug-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Don't allow unary negation on scoped enums. PR16900. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188511 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
cdd4b78583120222b82148626119b3e80ae1d291 |
16-Aug-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Properly track l-paren of a CXXFucntionalCastExpr. In addition to storing more useful information in the AST, this fixes a semantic check in template instantiation which checks whether the l-paren location is valid. Fixes PR16903. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188495 91177308-0d34-0410-b5e6-96231b3b80d8
emaCast.cpp
emaExprCXX.cpp
reeTransform.h
|
41594c5489f783a8398c68da72abb87434cd5634 |
15-Aug-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
ObjectiveC [Sema]. This patch makes sure that all inherited properties (direct or indirect) setter/getter (or declared methods as well) are seen by the method implementation type matching logic before declaration of method in super class is seen. This fixes the warning coming out of that method mismatch. // rdar://14650159 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188438 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
37e849ad80731ac1b2ad1c64e73bced27802bd8b |
14-Aug-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR16875: The return type of a dependent function type is visible when it's referenced as a member of the current instantiation. In that case, deduce the type of the function to a dependent type rather than exposing an undeduced auto type to the rest of the current instantiation. The standard doesn't really say that the type is dependent in this case; I'll bring this up with CWG. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188410 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaStmt.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiateDecl.cpp
|
933c66b6956e91ef9017b28dd499b317aba83b7b |
14-Aug-2013 |
Larisse Voufo <lvoufo@google.com> |
Bug fix: note diagnosis on expression narrowing should say "variable template" instead of "static data member" when appropriate git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188409 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
4a91989b2dc901a4998fa5443aeba0276a8cfaa6 |
14-Aug-2013 |
Larisse Voufo <lvoufo@google.com> |
Bug fix: disallow a variable template to be redeclared as a non-templated variable git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188350 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
72a36a14b10c18bc72bf0472dc29e86327615c26 |
14-Aug-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Don't produce duplicate notes if we have deduction failure notes when resolving the address of an overloaded function template. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188334 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
dc25f8cf9e14b424708af52786af7fcf26445dee |
14-Aug-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
ObjectiveC [QoI] issue warning if an element of an nsarray expresison is a concatenated nsstring element. // rdar://14303083 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188332 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
c99b90edb85ea0a5be6ce567a8c0147b76534e15 |
14-Aug-2013 |
Eli Friedman <eli.friedman@gmail.com> |
sizeof(void) etc. should be a hard error in C++. PR16872. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188324 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
dd9459f8869f66409f7ea429053b453e33f6499c |
13-Aug-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix implementation of C11 6.2.7/4 and C++11 [dcl.array]p3: When a local extern declaration redeclares some other entity, the type of that entity is merged with the prior type if the prior declaration is visible (in C) or is declared in the same scope (in C++). - Make LookupRedeclarationWithLinkage actually work in C++, use it in the right set of cases, and make it track whether it found a shadowed declaration. - Track whether we found a declaration in the same scope (for C++) including across serialization and template instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188307 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaLookup.cpp
emaTemplateInstantiateDecl.cpp
|
439d665f4d1066ee5ebd8dd0938d85be83d490c4 |
13-Aug-2013 |
Larisse Voufo <lvoufo@google.com> |
variable templates updated for PCH serialization... Still working on test cases... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188249 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
039970aae2b7e59ac4de5f147dfbc3c91b275b9e |
13-Aug-2013 |
NAKAMURA Takumi <geek4civic@gmail.com> |
AnalysisBasedWarnings.cpp:: Prune "\param VariableName", possibly copypasto, in comments. [-Wdocumentation] git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188248 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
2d84f6b563e39c1e90e4d3d7e6846d46bc58ff5d |
13-Aug-2013 |
Reid Kleckner <reid@kleckner.net> |
Remove Sema includes from Analysis code to fix layering This moves a header-only class from Sema to Analysis and puts the option check in Sema. Patch by Chris Wailes! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188230 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
5d937b3fe7832f8ffa0a258d1b037c64708e97c1 |
13-Aug-2013 |
Kaelyn Uhrain <rikka@google.com> |
Add hooks to ExternalSemaSource for after-the-fact diagnosis of incomplete types, courtesy of Luke Zarko. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188212 91177308-0d34-0410-b5e6-96231b3b80d8
ultiplexExternalSemaSource.cpp
emaType.cpp
|
a03c5eee51439b4d4d891284126831d10972e05c |
12-Aug-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Fix crash w/BlockDecl and invalid qualified decl. I'm not really satisfied with the ad-hoc nature of Sema::diagnoseQualifiedDeclaration, but I'm not sure how to fix it. Fixes <rdar://problem/14639501>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188208 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
df7bef07eebd5c7913e8be09c62a6a470f255fd2 |
12-Aug-2013 |
DeLesley Hutchins <delesley@google.com> |
Patch by Chris Wailes <chris.wailes@gmail.com>. Reviewed by delesley, dblaikie. Add the annotations and code needed to support a basic 'consumed' analysis. Summary: This new analysis is based on academic literature on linear types. It tracks the state of a value, either as unconsumed, consumed, or unknown. Methods are then annotated as CallableWhenUnconsumed, and when an annotated method is called while the value is in the 'consumed' state a warning is issued. A value may be tested in the conditional statement of an if-statement; when this occurs we know the state of the value in the different branches, and this information is added to our analysis. The code is still highly experimental, and the names of annotations or the algorithm may be subject to change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188206 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
emaDeclAttr.cpp
|
70571f43ab9ae399cd005eaee02f4ca1ecbc3a81 |
12-Aug-2013 |
Kaelyn Uhrain <rikka@google.com> |
Add hooks for typo correction to ExternalSemaSource, courtesy of Luke Zarko. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188196 91177308-0d34-0410-b5e6-96231b3b80d8
ultiplexExternalSemaSource.cpp
emaLookup.cpp
|
30d237556fdd29b5075c990da953116225b95d9d |
10-Aug-2013 |
Robert Wilhelm <robert.wilhelm@gmx.net> |
Omit llvm:: before StringRef and SmallString. We have using directive in include/clang/Basic/LLVM.h. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188139 91177308-0d34-0410-b5e6-96231b3b80d8
emaAttr.cpp
emaType.cpp
|
e7205c0e2472dd66238f4c6b6db1b7cc2957b42a |
10-Aug-2013 |
Robert Wilhelm <robert.wilhelm@gmx.net> |
Omit llvm:: before SmallVector and SmallVectorImpl. We have using directive in include/clang/Basic/LLVM.h. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188138 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
reeTransform.h
|
29a46e63490176608efe13f13b293a6ce9862059 |
10-Aug-2013 |
Serge Pavlov <sepavloff@gmail.com> |
Fix to PR16225 (Assert-on-invalid: isa<LabelDecl>(D) && "declaration not instantiated in this scope") Differential Revision: http://llvm-reviews.chandlerc.com/D920 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188137 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
c1cef0892e049fcd31084f02d1efdd9985d4dfa4 |
10-Aug-2013 |
Enea Zaffanella <zaffanella@cs.unipr.it> |
Added source locs for angled parentheses in class/var template partial specs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188134 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
emaTemplateInstantiateDecl.cpp
|
f68af647dda5cca00b49be27d24f62b0a7fff986 |
10-Aug-2013 |
James Dennett <jdennett@google.com> |
Expose LambdaIntroducer::DefaultLoc in the AST's LambdaExpr. Summary: Source-centric tools need access to the location of a C++11 lambda expression's capture-default ('&' or '=') when it's present. It's possible for them to find it by re-lexing and re-implementing rules that Clang's parser has already applied, but the cost of storing the SourceLocation and making it available to them is 32 bits per LambdaExpr (a small delta, proportionally), and the simplification in client code is significant. Reviewers: rsmith Reviewed By: rsmith CC: cfe-commits, klimek, revane Differential Revision: http://llvm-reviews.chandlerc.com/D1192 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188121 91177308-0d34-0410-b5e6-96231b3b80d8
emaLambda.cpp
reeTransform.h
|
7ea491cd10c4ea5bf54b9dc15a07ff49cc8a44c6 |
09-Aug-2013 |
Richard Trieu <rtrieu@google.com> |
Fix for PR16570: when comparing two function pointers, discard qualifiers when comparing non-reference function parameters. The qualifiers don't matter for comparisons. This is a re-commit of r187769, which was accidentially reverted in r187770, with a simplification at the suggestion of Eli Friedman. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188112 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
834c058cb6b57465e60a4590afdab86c4ea6921d |
09-Aug-2013 |
Robert Wilhelm <robert.wilhelm@gmx.net> |
Omit llvm:: before ArrayRef, as we have using llvm::ArrayRef in include/clang/Basic/LLVM.h. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188089 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
emaDecl.cpp
emaExpr.cpp
emaLookup.cpp
emaOverload.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
|
541a28f4eed4b2d8c057d5c51142d176c9c561de |
09-Aug-2013 |
Benjamin Kramer <benny.kra@googlemail.com> |
Put back a microoptimization with a comment to make it more obvious. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188063 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
bb0ed290428223ac1441ff45bd9ae801adfb455d |
09-Aug-2013 |
David Majnemer <david.majnemer@gmail.com> |
Sema: Assertion failure during CodeGen in CodeGenModule::EmitUuidofInitializer Make sure we can properly generate code when the UUID has curly braces on it, strip the curly braces at the sema layer. This fixes PR16813. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188061 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
4e9686b1f9947f1747b4f4316deb2087a7f56282 |
09-Aug-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Implement [class.friend]p11's special name lookup rules for friend declarations of local classes. We were previously handling this by performing qualified lookup within a function declaration(!!); replace it with the proper scope lookup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188050 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaLookup.cpp
emaTemplate.cpp
|
47abb25dda5cb9d5cd340809549dffdc41ca74bf |
08-Aug-2013 |
Benjamin Kramer <benny.kra@googlemail.com> |
Remove unused variable. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187975 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
4ac73c7514f9e836b4d9781738f333c5cb91cb63 |
08-Aug-2013 |
Stephen Hines <srhines@google.com> |
Merge commit '51e75aecf4fb303b91c9e54fd88e3509e5acc7a6' into merge-20130807 Conflicts: lib/Basic/Targets.cpp lib/Sema/SemaDeclAttr.cpp Change-Id: If457223ecbee9e43c73d15333bf10d36590d05c4
|
fbbdc5daee4dc772d4d137080890fd79492592d6 |
08-Aug-2013 |
Richard Trieu <rtrieu@google.com> |
Emit an error for enum increments and decrements in C++ mode. Fixes PR16394. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187955 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ac32d9044b9c1e7492cef929a322d23ce899d276 |
07-Aug-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR9992: Serialize and deserialize the token sequence for a function template in -fdelayed-template-parsing mode. Patch by Will Wilson! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187916 91177308-0d34-0410-b5e6-96231b3b80d8
ultiplexExternalSemaSource.cpp
ema.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
a7b879723d3989d85b9492fd8218e7d745367fe3 |
07-Aug-2013 |
Jordan Rose <jordan_rose@apple.com> |
Eliminate CXXConstructorDecl::IsImplicitlyDefined. This field is just IsDefaulted && !IsDeleted; in all places it's used, a simple check for isDefaulted() is superior anyway, and we were forgetting to set it in a few cases. Also eliminate CXXDestructorDecl::IsImplicitlyDefined, for the same reasons. No intended functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187891 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
acdbbc7811c6045a718669a8a0740488edbbbd66 |
06-Aug-2013 |
Richard Trieu <rtrieu@google.com> |
Add a new warning to -Wloop-analysis to detect suspicious increments or decrements inside for loops. Idea for this warning proposed in PR15636: http://llvm.org/bugs/show_bug.cgi?id=15636 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187817 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
2521813d45e0af47b27673a095329ee33932d49c |
06-Aug-2013 |
Larisse Voufo <lvoufo@google.com> |
A bit of clean up based on peer's feedback... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187784 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateDeduction.cpp
|
3151b7c6dd49947b0a91b3e22c31f4864629e355 |
06-Aug-2013 |
Larisse Voufo <lvoufo@google.com> |
Fixing commit r187768: Moved diagnosis of forward declarations of variable templates from Parser to Sema. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187770 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaTemplateInstantiateDecl.cpp
|
1a81e74903cf4f24bf0c4921fc86727e66994e5a |
06-Aug-2013 |
Richard Trieu <rtrieu@google.com> |
Fix for PR16570: when comparing two function pointers, discard qualifiers when comparing non-reference function parameters. The qualifiers don't matter for comparisons. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187769 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
06935f32645c8965e398bbd141f9800eacdfd439 |
06-Aug-2013 |
Larisse Voufo <lvoufo@google.com> |
Moved diagnosis of forward declarations of variable templates from Parser to Sema. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187768 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplateInstantiateDecl.cpp
|
cec70f57925903c22937a7c9d3933d551a583566 |
06-Aug-2013 |
NAKAMURA Takumi <geek4civic@gmail.com> |
SemaTemplateInstantiateDecl.cpp: Suppress a warning. [-Wunused-variable] git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187765 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
ef4579cda09b73e3d4d98af48201da25adc29326 |
06-Aug-2013 |
Larisse Voufo <lvoufo@google.com> |
Started implementing variable templates. Top level declarations should be fully supported, up to some limitations documented as FIXMEs or TODO. Static data member templates work very partially. Static data member templates of class templates need particular attention... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187762 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
056ec12ca14ee5014ea49786f719ceaa299a7e19 |
05-Aug-2013 |
Daniel Jasper <djasper@google.com> |
Add option to disable module loading. This patch was created by Lawrence Crowl and reviewed in: http://llvm-reviews.chandlerc.com/D963 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187738 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
0e2189791acf7fcec4f1b32af24efb2d363f30c1 |
05-Aug-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Implement C++'s restrictions on the type of an expression passed to a vararg function: it can't be 'void' and it can't be an initializer list. We give a hard error for these rather than treating them as undefined behavior (we can and probably should do the same for non-POD types in C++11, but as of this change we don't). Slightly rework the checking of variadic arguments in a function with a format attribute to ensure that certain kinds of format string problem (non-literal string, too many/too few arguments, ...) don't suppress this error. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187735 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExpr.cpp
|
8b051ce94e59c37cfe09e34fe2bf15c037cbbdb3 |
05-Aug-2013 |
David Majnemer <david.majnemer@gmail.com> |
Sema: Don't assume a nested name specifier holds a type Sema::PerformObjectMemberConversion assumed that the Qualifier it was given holds a type. However, the specifier could hold just a namespace. In this case, we should ignore the qualifier and not attempt to cast to it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187715 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
6f4f8083931a92f9959168d4430da7ddf9183100 |
03-Aug-2013 |
Craig Topper <craig.topper@gmail.com> |
Add support for passing -1 to __builtin_shufflevector to signify an undefined element value to match IR capabilities. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187694 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
e2d20c9a539cdfa75db6382eb5a327a73e5e0e1b |
02-Aug-2013 |
Tim Northover <tnorthover@apple.com> |
Remove rather oddly merged logic from AArch64 commit. We seem to have ended up with both an inlined check of permitted NEON base types and a call to a function. Since the outer if was (I believe) strictly weaker than the one in the function, there's no actual user-visible behaviour change, so no tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187652 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
b61c294a24324ca0a403df770c01e0ba0b88770b |
02-Aug-2013 |
Craig Topper <craig.topper@gmail.com> |
Fix indentation. No functional change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187644 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
b793f0d3448a15277cd6b6cc4ba558ded39a8084 |
01-Aug-2013 |
Tim Northover <tnorthover@apple.com> |
AArch64: initial NEON support Patch by Ana Pazos - Completed implementation of instruction formats: AdvSIMD three same AdvSIMD modified immediate AdvSIMD scalar pairwise - Completed implementation of instruction classes (some of the instructions in these classes belong to yet unfinished instruction formats): Vector Arithmetic Vector Immediate Vector Pairwise Arithmetic - Initial implementation of instruction formats: AdvSIMD scalar two-reg misc AdvSIMD scalar three same - Intial implementation of instruction class: Scalar Arithmetic - Initial clang changes to support arm v8 intrinsics. Note: no clang changes for scalar intrinsics function name mangling yet. - Comprehensive test cases for added instructions To verify auto codegen, encoding, decoding, diagnosis, intrinsics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187568 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaType.cpp
|
789d82a568264543410a3bf0c2c431ccc11d5d1d |
01-Aug-2013 |
Arnaud A. de Grandmaison <arnaud.adegm@gmail.com> |
Check dynamic_cast is not used with -fno-rtti, unless it is a noop or can be resolved statically. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187564 91177308-0d34-0410-b5e6-96231b3b80d8
emaCast.cpp
|
576a9af150e4ddb34fd9cbede6eb5e3cf2bae9c8 |
01-Aug-2013 |
David Majnemer <david.majnemer@gmail.com> |
Sema: Diagnose explicitly bound unresolved member expressions decaying into pointers to function type We would disallow the case where the overloaded member expression is coming from an address-of operator but we wouldn't issue any diagnostics when the overloaded member expression comes by way of a function to pointer decay cast. Clang's implementation of DR61 is now seemingly complete. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187559 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
3d672e4aa51fcf231de5d5283b1ee3f6c6a79e8c |
01-Aug-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
ObjectiveC ARC: finishing off issuing error when retainable pointer is passed to an audited CF function expecting CF type. // rdar://14569171 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187543 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaInit.cpp
|
01ad048b70508bf21174cd25512b57f87b7c57a6 |
31-Jul-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
ObjectiveC ARC: Do not issue bridge cast diagnostic when passing a retainable object arg to a CF audited function expecting a CF object type. Issue a normal type mismatch diagnostic. This is wip // rdar://14569171 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187532 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprObjC.cpp
emaInit.cpp
|
c66e7e99d5acc560de5cea50909fcea22ef12ca5 |
31-Jul-2013 |
Reid Kleckner <reid@kleckner.net> |
Fix declaring class template methods with an attributed typedef This change unifies the logic for template instantiation of methods and functions declared with typedefs. It ensures that SubstFunctionType() always fills the Params out param with non-null ParmVarDecls or returns null. Reviewers: rsmith Differential Revision: http://llvm-reviews.chandlerc.com/D1135 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187528 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
c14e6dda1e1287d3e0aeaa0e8f7bb2c9126f312c |
31-Jul-2013 |
Kaelyn Uhrain <rikka@google.com> |
A few small cleanups to r187504. Thanks to dblaikie for the assist. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187521 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
650c6056cc3d3fb569cdd34d6c527ee15e05dc8a |
31-Jul-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
ObjectiveC arc: minor refactoring in my last patch to avoid future false positives. // rdar://14569171 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187509 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
2651b7a44d1db7c2a9fe70689e0708394c343a7e |
31-Jul-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
ObjectiveC arc: Introduce a new initialization kind for parameters passed to CF audited functions to be used for better diagnostics. Current set but unused. // rdar://14569171 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187508 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaInit.cpp
|
baaeb85f07640794f6a4fabb871e33deeab07df2 |
31-Jul-2013 |
Kaelyn Uhrain <rikka@google.com> |
Improve the diagnostic experience, including adding recovery, for changing '->' to '.' when there is no operator-> defined for a class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187504 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaExprMember.cpp
emaOverload.cpp
|
b316dc517d9721ac9047819e4eeaa0eb59c4020a |
31-Jul-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
ObjectiveC arc: Move check for type conversions in arc out of ImpCastExprToType and to the caller site as appropriate. This is in prep. to do more work for // rdar://14569171 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187503 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaExpr.cpp
emaExprCXX.cpp
|
89310785fe44470da0c1c1eefa54ad9c6dae8e78 |
31-Jul-2013 |
Richard Trieu <rtrieu@google.com> |
Fix a crasher than manifests when typo correction suggests a function template. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187467 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
750f73aadcfb9810a5825fd57325e310042e5617 |
30-Jul-2013 |
Aaron Ballman <aaron@aaronballman.com> |
err_attribute_missing_parameter_name has been replaced by err_attribute_argument_type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187420 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
9f939f75c64770c746d78579f75a49f9c657e426 |
30-Jul-2013 |
Aaron Ballman <aaron@aaronballman.com> |
Replacing err_attribute_argument_not_int with err_attribute_not_type_attr git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187419 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaType.cpp
argetAttributesSema.cpp
|
3cd6feb87a62fb52c31cbc83655d76ace020513f |
30-Jul-2013 |
Aaron Ballman <aaron@aaronballman.com> |
err_attribute_not_string has been subsumed by err_attribute_argument_type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187400 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaType.cpp
|
b3d7efe0f95bc44f0e93602f4617a53ca3b66e3a |
30-Jul-2013 |
Aaron Ballman <aaron@aaronballman.com> |
Refactor some attributes to use checkFunctionOrMethodArgumentIndex instead of using custom logic. No functional changes intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187398 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
88c4b5efc604b982ca9083548d568b02b1abd2ab |
29-Jul-2013 |
David Blaikie <dblaikie@gmail.com> |
Support for Thread Safety Analysis in C Patch by Ethan Jackson. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187365 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
bbe759cf95a5df5497549abadb56282939868da1 |
29-Jul-2013 |
Craig Topper <craig.topper@gmail.com> |
Return ExprError if both arguments to the mask form of __builtin_shufflvector don't have the same number of elements or the mask isn't an integer vector. Previously a diagnostic was issued, but the code went ahead and built the ShuffleVectorExpr. While I'm here also simplify a couple lines by wrapping the return ExprError around the Diag calls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187344 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
b44545aa3419eba3c5ad5fe5e30d534f27cfcb46 |
28-Jul-2013 |
Craig Topper <craig.topper@gmail.com> |
Fix up formatting. No functional change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187334 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
2437c8642da2728aab47262ffb74dfa796a1cf35 |
27-Jul-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Don't build expressions for invalid casts. This matches how we normally perform semantic analysis for other sorts of invalid expressions: it means we don't have to reason about invalid sub-expressions. Fixes PR16680. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187276 91177308-0d34-0410-b5e6-96231b3b80d8
emaCast.cpp
|
14d937afc2ad8f65dccbafeb62271e80dbd46a78 |
27-Jul-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Handle a difference in lambda return type deduction between C++11 and C++1y: if no return type is specified, C++11 will deduce a cv-qualified return type in some cases, but C++1y never will. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187275 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
ec0808decc682f76e411eed7206a82a34b87dd7d |
27-Jul-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR16708: If a lambda has an implicit return type, don't get confused if its return type has already been determined to be a type containing an 'auto'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187266 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
1652ed1cd2cb63e0d0cb74c67a40d9dc5cab6b89 |
26-Jul-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Tighten type-checking for vector attributes. Based on patch by Yunzhong Gao. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187176 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
34f3bcf7f2907f618f7a10d919bda47e53db60dd |
26-Jul-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Partially revert r186903. It turns out that Plum Hall depends on us not emitting an error on integer literals which fit into long long, but fit into unsigned long long. So C99 conformance requires not conforming to C99. :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187172 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b775100fea6d8955149897dae1adca50ca471d17 |
26-Jul-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
When we perform dependent name lookup during template instantiation, it's not sufficient to only consider names visible at the point of instantiation, because that may not include names that were visible when the template was defined. More generally, if the instantiation backtrace goes through a module M, then every declaration visible within M should be available to the instantiation. Any of those declarations might be part of the interface that M intended to export to a template that it instantiates. The fix here has two parts: 1) If we find a non-visible declaration during name lookup during template instantiation, check whether the declaration was visible from the defining module of all entities on the active template instantiation stack. The defining module is not the owning module in all cases: we look at the module in which a template was defined, not the module in which it was first instantiated. 2) Perform pending instantiations at the end of a module, not at the end of the translation unit. This is general goodness, since it significantly cuts down the amount of redundant work that is performed in every TU importing a module, and also implicitly adds the module containing the point of instantiation to the set of modules checked for declarations in a lookup within a template instantiation. There's a known issue here with template instantiations performed while building a module, if additional imports are added later on. I'll fix that in a subsequent commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187167 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaLookup.cpp
emaTemplateInstantiate.cpp
emaType.cpp
|
7185d6272b8dc75d5492a6ea0ed43d7631554b61 |
25-Jul-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Remove the mblaze backend from clang. Approval in here http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-July/064169.html git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187143 91177308-0d34-0410-b5e6-96231b3b80d8
argetAttributesSema.cpp
|
4c7736ec76fb35fe83eb4144137cf14df1c6d056 |
24-Jul-2013 |
Benjamin Kramer <benny.kra@googlemail.com> |
Sema: Minor const fixups and control flow tidying. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187047 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaInit.cpp
|
baec77865b3ce64bb942dddc5dc2fada84ce5099 |
23-Jul-2013 |
Aaron Ballman <aaron@aaronballman.com> |
Added the attribute name to the err_attribute_wrong_number_arguments diagnostic for clarity; updated almost all of the affected test cases. Thanks to Fariborz Jahanian for the suggestion! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186980 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaType.cpp
argetAttributesSema.cpp
|
d732928074294839feebc3b8f00fbf5922d271ba |
23-Jul-2013 |
Aaron Ballman <aaron@aaronballman.com> |
Going back to using getName for consistency. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186966 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
faf71a824488476eb813498f183977cc75abb0c6 |
23-Jul-2013 |
Aaron Ballman <aaron@aaronballman.com> |
Replacing some manual diagnostic checks with an existing helper method. Adding missing test cases for the diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186944 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
73883c3d9bf1a03e5c0240e5a8755d5bea07c386 |
23-Jul-2013 |
Aaron Ballman <aaron@aaronballman.com> |
Removed a redundant diagnostic and replaced it with a more standard one. Added a test case for the diagnostic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186942 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
437d43fa2c8e338de3285f4028f0578ddd1b8f80 |
23-Jul-2013 |
Aaron Ballman <aaron@aaronballman.com> |
Consolidate several attribute argument diagnostics into a single, selectable diagnostic. This makes the diagnostic more consistent. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186940 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaType.cpp
|
081c883c3f28d0031e2c8c465c9d18b6fd10e6e4 |
23-Jul-2013 |
Aaron Ballman <aaron@aaronballman.com> |
Correcting the NSObject and Overloadable attribute diagnostics so that the count reported matches reality. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186936 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
4ac537b0f07f2efb9fcf081f60d54e6cfb1cf2d5 |
23-Jul-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
C++1y literal suffix support: * Allow ns, us, ms, s, min, h as numeric ud-suffixes * Allow s as string ud-suffix git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186933 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
e6c8afcf449728a5096834393fc4a1acfad9b49d |
23-Jul-2013 |
Matt Arsenault <Matthew.Arsenault@amd.com> |
Error on more illegal kernel argument types for OpenCL bool, half, pointers and structs / unions containing any of these are not allowed. Does not yet reject size_t and related integer types that are also disallowed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186908 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
b3da613977f6b77dee2b382eeff5713168a4ca18 |
23-Jul-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Integers which are too large should be an error. Switch some warnings over to errors which should never have been warnings in the first place. (Also, a minor fix to the preprocessor rules for integer literals while I'm here.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186903 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
4e16bf2511ab335cfcf74a273332ad7c00a786de |
23-Jul-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Don't emit open-paren fixit without close-paren. getLocForEndOfToken() isn't guaranteed to succeed; if it doesn't, make sure we do something sane. Fixes PR16673. I'm not sure how to write a testcase for this short of grepping through the diagnostic output. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186889 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
8202630a58e5aa7f5630b44266e4460fa7021ac1 |
22-Jul-2013 |
Enea Zaffanella <zaffanella@cs.unipr.it> |
Fixed implementation of C89 6.5.7 p3. Warning should be emitted only for InitListExpr nodes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186859 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
e0883603389c5f380354474e0d6d1d63827f0c30 |
22-Jul-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Update comment to refer to core issue number. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186848 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
b9a5935c58a3bc78c4a511ee77ad2f0c4ca29dc1 |
22-Jul-2013 |
Enea Zaffanella <zaffanella@cs.unipr.it> |
Implement the part of C89 6.5.7 p3 requiring a constant initializer list when initializing aggregate/union types, no matter if static or not. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186817 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
8d030c7a6f36438f6c7dd977f8be0de0cc781ad5 |
22-Jul-2013 |
Enea Zaffanella <zaffanella@cs.unipr.it> |
Improve clarity/consistency of a few UsingDecl methods and related helpers. No functionality change. In Sema helper functions: * renamed isTypeName as HasTypenameKeyword In UsingDecl: * renamed get/setUsingLocation to get/setUsingLoc * renamed is/setTypeName as has/setTypename git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186816 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
0d317a08460d9e0eb826233db9c1c41ba27e2dee |
22-Jul-2013 |
Robert Wilhelm <robert.wilhelm@gmx.net> |
Remove superfluous cast. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186807 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
03c55be552d224c787c3dd2e981b47a23b05cc2d |
22-Jul-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR16288: A template is only missing a default template argument if it provides any default template arguments, not if it inherits some. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186804 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
cbc820af7193e3ad9c71fbe6e3c8bd3c1166e540 |
22-Jul-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Implement DR257 / fix PR16659: A constructor for an abstract class does not call constructors for virtual base classes, so it is not an error if no initializer is present for the virtual base and the virtual base cannot be default initialized. Also provide a (disabled by default, for now) warning for the case where a virtual base class's initializer is ignored in an abstract class's constructor, and address a defect in DR257 where it was not carried through to C++11's rules for implicit deletion of special member functions. Based on a patch by Maurice Bos. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186803 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
9fa667388fc44bc269a5e82909c8ac1c177a500d |
22-Jul-2013 |
NAKAMURA Takumi <geek4civic@gmail.com> |
SemaTemplate.cpp: Prune a stray "\param NumParamLists" in comment. [-Wdocumentation] git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186802 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
1169e2fa84939325bdf1d0f558c63e87404a6b57 |
21-Jul-2013 |
Robert Wilhelm <robert.wilhelm@gmx.net> |
Convert Sema::MatchTemplateParametersToScopeSpecifier to ArrayRef. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186794 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaTemplate.cpp
|
cfc57085a6eb8036d29164d4294cd95853ee1182 |
20-Jul-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Add missing check for creating an instance of an abstract class through an implicit conversion sequence. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186769 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
1d3ce65c190ef287ae3fa7bdff7f3621fd53b151 |
20-Jul-2013 |
Lubos Lunak <l.lunak@suse.cz> |
add type attribute warn_unused, for -Wunused-variable warnings (pr#14253) The functionality is equivalent to the GCC attribute. Variables of tagged types will be warned about as unused if they are not used in any way except for possible (even non-trivial) ctors/dtors called. Useful for tagging classes like std::string (which is not part of this commit). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186765 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
|
a5e660188a3c654cf0c88ed1093b28207e870b2b |
20-Jul-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Make IgnoreParens() look through ChooseExprs. This is the same way GenericSelectionExpr works, and it's generally a more consistent approach. A large part of this patch is devoted to caching the value of the condition of a ChooseExpr; it's needed to avoid threading an ASTContext into IgnoreParens(). Fixes <rdar://problem/14438917>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186738 91177308-0d34-0410-b5e6-96231b3b80d8
emaExceptionSpec.cpp
emaExpr.cpp
emaPseudoObject.cpp
|
4384712b3a0aedd7c68d6abdb0407850f7b46c8b |
20-Jul-2013 |
Larisse Voufo <lvoufo@google.com> |
FIXME fix: improving diagnostics for template arguments deduction of class templates and explicit specializations This patch essentially removes all the FIXMEs following calls to DeduceTemplateArguments() that want to keep track of deduction failure info. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186730 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
reeTransform.h
|
8c5d4078bb40642847164e7613828262d32db973 |
20-Jul-2013 |
Larisse Voufo <lvoufo@google.com> |
Revert "Use function overloading instead of template specialization for diagnosis of bad template argument deductions." This reverts commit a730f548325756d050d4caaa28fcbffdae8dfe95. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186729 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
|
ba037f2a0cd9bc5614813c3c9293e4e01436e4dd |
20-Jul-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Fix pack instantiation with function types. Make sure we correctly expand packs which expand to another pack in a function type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186728 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
a730f548325756d050d4caaa28fcbffdae8dfe95 |
20-Jul-2013 |
Larisse Voufo <lvoufo@google.com> |
Use function overloading instead of template specialization for diagnosis of bad template argument deductions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186727 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
|
20cfecac4421223e4f1f6fc825bee9a1275a994a |
19-Jul-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Correctly handle packs for variadic type traits. I'm not sure how to write a test for this; the following shows the difference in -ast-dump: template <int x> struct A {}; template <class T> struct B { }; template <class ...Args> using C = A<(__is_trivially_constructible(Args...))>; template <class ...Args> using D = C<B<Args>...>; However, I can't seem to write a test that triggers a visible difference in behavior. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186726 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
5b92696c8f1f8ef943ad87397b95c031b5787305 |
19-Jul-2013 |
Reid Kleckner <reid@kleckner.net> |
Create calling convention AttributedType sugar nodes Canonical types are unchanged. The type printer had to be changed to avoid printing any non-default implicit calling convention as well as the calling convention attribute. Reviewers: rjmccall Differential Revision: http://llvm-reviews.chandlerc.com/D1132 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186714 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
10ec0e4935e5d2efab4ee2731ccb350330dc5b34 |
19-Jul-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Fix for template substitution with packs. When we see a pack, and replace it with a template argument which is also a pack, we want to use the pack pattern, not the expanded pack. The caller should take care of expanding the pack afterwards. Fixes PR16646. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186713 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
fe6dec6efaf860ed3eb20ee13267f35129f7747a |
19-Jul-2013 |
Aaron Ballman <aaron@aaronballman.com> |
Replace some existing type attribute diagnostics with a single diagnostic that selects. No functional changes intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186708 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
de9ed71c696bee936a21323f61548164de0eda13 |
19-Jul-2013 |
Enea Zaffanella <zaffanella@cs.unipr.it> |
Fix source range of implicitly instantiated friend declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186702 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
e3fbbe9a486c4c8709726d8c79af33140eb02e53 |
19-Jul-2013 |
Craig Topper <craig.topper@gmail.com> |
Remove trailing whitespace. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186652 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
4fa7eab771ab8212e1058bd1a91061ff120c8fbb |
19-Jul-2013 |
Alexey Bataev <a.bataev@hotmail.com> |
OpenMP: basic support for #pragma omp parallel git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186647 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaOpenMP.cpp
reeTransform.h
|
c4ef9485252c6a408acb70aac5a153dcd9d860c7 |
19-Jul-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Clean up diagnostics for inheriting constructors. No new diagnostics, just better wording and notes pointing at more relevant locations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186629 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExpr.cpp
|
ffa9d57fa5f7467ed34daf839eff03b7c0b9895f |
18-Jul-2013 |
Aaron Ballman <aaron@aaronballman.com> |
Switching to use checkAttributeNumArgs for trivial cases. No functional changes intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186591 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
37a8953f71dcf5145c6dedb6467f50c62c9dd6e1 |
18-Jul-2013 |
Aaron Ballman <aaron@aaronballman.com> |
Replacing a morally duplicate diagnostic by adding it to an existing diagnostic's select list. Updates the tests for the more consistent diagnostic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186584 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
2dbdef237491cbe81b8597a6519c6c5f938877cd |
18-Jul-2013 |
Aaron Ballman <aaron@aaronballman.com> |
Removed a parameter from handleAttrWithMessage to make it more consistent with other attribute handlers, as well as other attribute error messages. Added missing test cases for the unavailable attribute, and updated the deprecated test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186578 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
22050f25e34ba0cd21ee2dc3d765951c48e27cde |
18-Jul-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Reinstate r186040, with additional fixes and more test coverage (reverted in r186331). Original commit log: If we friend a declaration twice, that should not make it visible to name lookup in the surrounding context. Slightly rework how we handle friend declarations to inherit the visibility of the prior declaration, rather than setting a friend declaration to be visible whenever there was a prior declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186546 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaLookup.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
0111e4da0133c7fb4815e5c60524d2aaddfbccf0 |
17-Jul-2013 |
Robert Wilhelm <robert.wilhelm@gmx.net> |
Even more code conformance. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186537 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
9a3ecb015448dad705829b683f2392cfda80fc13 |
17-Jul-2013 |
Reid Kleckner <reid@kleckner.net> |
MS wide bitfield error check in Sema cl.exe treats wide bitfields as an error. This patch causes them to be an error if IsMsStruct is true, as it is in straight C. Patch by Warren Hunt! Reviewers: eli.friedman Differential Revision: http://llvm-reviews.chandlerc.com/D1125 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186536 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
8df014e2b173f9c0595f87480d59caaf8979fca3 |
17-Jul-2013 |
Jean-Daniel Dupas <devlists@shadowlab.org> |
Improve idiomatic-parentheses by checking method family instead of relying on the selector name. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186524 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
fd527a4e1a62218285c0ea94dcd53e01b52c48b7 |
17-Jul-2013 |
NAKAMURA Takumi <geek4civic@gmail.com> |
SemaDeclCXX.cpp: Dissolve a ligature "fi" in comment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186523 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
d4de59d3e54421ef88316d650e35802ba9c572cf |
17-Jul-2013 |
Enea Zaffanella <zaffanella@cs.unipr.it> |
Fixed source range of C++03 access declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186522 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
80f8aca7aeac5be1c9c33813c2afcab6538199aa |
17-Jul-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
More code conformance. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186474 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
21cde050b64eefbb5094af67985752eee42d00e2 |
17-Jul-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Make Expr::isConstantInitializer match IRGen. Sema needs to be able to accurately determine what will be emitted as a constant initializer and what will not, so we get accurate errors in C and accurate -Wglobal-constructors warnings in C++. This makes Expr::isConstantInitializer match CGExprConstant as closely as possible. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186464 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
|
a3c6246950f23d7d4cd748badaf8f05d7bc3f14a |
16-Jul-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
This patch removes unused parameter allProperties and converts remaining parameters in ArrayRef'ize Sema::ActOnAtEnd to ArrayRef. Patch by Robert Wilhelm. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186421 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
09df2b066221d869f17f4b5762405f111a65f983 |
16-Jul-2013 |
Tim Northover <tnorthover@apple.com> |
ARM: implement low-level intrinsics for the atomic exclusive operations. This adds three overloaded intrinsics to Clang: T __builtin_arm_ldrex(const volatile T *addr) int __builtin_arm_strex(T val, volatile T *addr) void __builtin_arm_clrex() The intent is that these do what users would expect when given most sensible types. Currently, "sensible" translates to ints, floats and pointers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186394 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
9ec4099a0946a46108a8e22a4b30d45d5443decd |
16-Jul-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Merge attributes on typedef decls. Not completely sure this is right, but it's clearly better than what we did before this commit (effectively dropping the attribute). <rdar://problem/14413117> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186373 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
bf03b375d887403e78837c9453fbad45efaef91d |
16-Jul-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Fix member refs with using decl + anonymous union. Make sure we call BuildFieldReferenceExpr with the appropriate decl when a member of an anonymous union is made public with a using decl. Also, fix a crash on invalid field access into an anonymous union. Fixes PR16630. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186367 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprMember.cpp
|
d4224347be04594788fc0f26dff7d2c2cc90851e |
15-Jul-2013 |
Kaelyn Uhrain <rikka@google.com> |
Move the "->" to "." fixit from r186128 into a separate note since recovery is not attempted with the fixit. Also move the associated test case from FixIt/fixit.cpp to SemaCXX/member-expr.cpp since the fixit is no longer automatically applied. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186342 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
52c2575fc77a51f36129be89d1a0a90e31617a57 |
15-Jul-2013 |
Chandler Carruth <chandlerc@gmail.com> |
Re-revert r86040, which was un-reverted in r186199. This breaks the build of basic patterns with repeated friend declarations. See the added test case in SemaCXX/friend.cpp or the test case reported to the original commit log. Original commit log: If we friend a declaration twice, that should not make it visible to name lookup in the surrounding context. Slightly rework how we handle friend declarations to inherit the visibility of the prior declaration, rather than setting a friend declaration to be visible whenever there was a prior declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186331 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaLookup.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
3aa29df37b140f9c6786b6863a0cac195071b598 |
15-Jul-2013 |
Craig Topper <craig.topper@gmail.com> |
Add 'static' and 'const' qualifiers to some arrays of strings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186314 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
dc49d523db70a1c9005b7c09de80b22ccb1ed6a4 |
15-Jul-2013 |
Serge Pavlov <sepavloff@gmail.com> |
Fix to PR12262 - assertion when substituting explicit template arguments does not substitute a sizeof-pack expression. The solution is proposed by Richard Smith. Differential Revision: http://llvm-reviews.chandlerc.com/D869 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186306 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
b960232518a1cd79c5f64ab5ef54c88e34660191 |
15-Jul-2013 |
Craig Topper <craig.topper@gmail.com> |
Use llvm::array_lengthof to replace sizeof(array)/sizeof(array[0]). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186300 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
reeTransform.h
|
ad5b69da4774a4eec09af96af23a2fe793fd00f8 |
14-Jul-2013 |
Craig Topper <craig.topper@gmail.com> |
Use SmallVectorImpl& instead of SmallVector to avoid repeating small vector size. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186284 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
ace21ba7ba8a834a711154d8d1f29c12568dbc54 |
14-Jul-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
If an unimported submodule of an imported module contains a declaration of a global allocation or deallocation function, that should not cause that global allocation or deallocation function to become unavailable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186270 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
658cd2c287b1a0b419f51cd18e5a48d4560d1c56 |
13-Jul-2013 |
David Blaikie <dblaikie@gmail.com> |
PR16214, PR14467: DebugInfo: use "RequireCompleteType" to decide when to emit the full definition of a type in -flimit-debug-info This simplifies the core benefit of -flimit-debug-info by taking a more systematic approach to avoid emitting debug info definitions for types that only require declarations. The previous ad-hoc approach (3 cases removed in this patch) had many holes. The general approach (adding a bit to TagDecl and callback through ASTConsumer) has been discussed with Richard Smith - though always open to revision. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186262 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
f9e65a274d4e5c5a45503efc81da43be76503983 |
12-Jul-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Unrevert r186040, reverted in r186185, with fix for PR16597. Original commit log: If we friend a declaration twice, that should not make it visible to name lookup in the surrounding context. Slightly rework how we handle friend declarations to inherit the visibility of the prior declaration, rather than setting a friend declaration to be visible whenever there was a prior declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186199 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaLookup.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
1afa611e36e0ab23dd3cde4bbe5aa74ceb7d77c5 |
12-Jul-2013 |
Chandler Carruth <chandlerc@gmail.com> |
Revert r186040 to fix PR16597 while Richard investigates what the best fix is. Original commit log: If we friend a declaration twice, that should not make it visible to name lookup in the surrounding context. Slightly rework how we handle friend declarations to inherit the visibility of the prior declaration, rather than setting a friend declaration to be visible whenever there was a prior declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186185 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaLookup.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
fcb5a251e9c0c8c2d54323677d4f2ba5219301d0 |
12-Jul-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Fix crash on zero-argument assignment operator. Make sure we don't crash when checking whether an assignment operator without any arguments is a special member. <rdar://problem/14397774>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186137 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
45c3ba76e90753006bdfeea884972ddd24cb3131 |
12-Jul-2013 |
Kaelyn Uhrain <rikka@google.com> |
Provide a fixit hint for changing '->' to '.' if there is no operator-> defined for a class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186128 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
f5200d6865fc5867ee022f876d2cdee94b48b1ee |
11-Jul-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
Restore warning to its original text when certain familiy of methods have the wrong type. // rdar://14408244 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186111 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
f92a509d870f05a0e26babd8072171957770649e |
11-Jul-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
ObjectiveC arc[qoi]: When due to change of certain methods' result type, a diagnostic being issued, issue a 'note' mentioning reason behind the unexpected warning. // rdar://14121570. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186105 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
emaStmt.cpp
|
5154dce6388e3aaa445467030df7a45ed1211abe |
11-Jul-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Add a __builtin_addressof that performs the same functionality as the built-in & operator (ignoring any overloaded operator& for the type). The purpose of this builtin is for use in std::addressof, to allow it to be made constexpr; the existing implementation technique (reinterpret_cast to some reference type, take address, reinterpert_cast back) does not permit this because reinterpret_cast between reference types is not permitted in a constant expression in C++11 onwards. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186053 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
27ec2d0acc51fc661f3ab10693565f5f0653b294 |
11-Jul-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Make CheckAddressOfOperand a member of Sema so it can be reused by __builtin_addressof. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186052 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
433a13d0cdb1c48b828fe5bfb6a835c58e1e758b |
11-Jul-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
If we friend a declaration twice, that should not make it visible to name lookup in the surrounding context. Slightly rework how we handle friend declarations to inherit the visibility of the prior declaration, rather than setting a friend declaration to be visible whenever there was a prior declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186040 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaLookup.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
0daf1f4a0ff1cd6487c7040ac8f97eee48185536 |
10-Jul-2013 |
Kaelyn Uhrain <rikka@google.com> |
Offer typo suggestions for 'using' declarations. Patch courtesy of Luke Zarko <zarko@google.com> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186019 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
041d10caff48859c0de6d001559a73185f5e0601 |
10-Jul-2013 |
Serge Pavlov <sepavloff@gmail.com> |
Fixed comment of Sema::FindInstantiatedDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185997 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
5e867c8a07d82da0d3b0a43402ee4f1c6ba416e9 |
10-Jul-2013 |
Eli Friedman <eli.friedman@gmail.com> |
More local mangling fixes. Compute mangling numbers for externally visible local variables and tags. Change the mangler to consistently use discriminators where necessary. Tweak the scheme we use to number decls which are not externally visible to avoid unnecessary discriminators in common cases now that we request them more consistently. Fixes <rdar://problem/14204721>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185986 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaLambda.cpp
|
38b3bd8bf3c424e82b4dca0acaec84af28666656 |
10-Jul-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
Objective-C: merge objc_requires_super attribute of method declaration into its implementation to prevent a bogus warning about mismatched attributes. then make sure the warning about missing call to super comes out of the method implementation. // rdar://14251387 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185974 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
4549d7ffc15bdd7ab860aa68db089d9f559b79e7 |
09-Jul-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
ArrayRef'ize Sema::FinalizeDeclaratorGroup, Sema::BuildDeclaratorGroup and Sema::ActOnDocumentableDecls. Patch by Robert Wilhelm. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185931 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclObjC.cpp
emaStmt.cpp
reeTransform.h
|
27d4644f4fad002b9e1be87c4e07f0f0c8240e1d |
09-Jul-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Fix recovery for missing * in objc property. <rdar://problem/14354144> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185897 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
d739c4ecf7d7f2222f6f1c8de9e234d1c8a0468c |
09-Jul-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Fix crash typo-correcting dependent member func. PR16561. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185887 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
6c4898b6ff23950cddca6948ef3fa0dd1848f6f1 |
09-Jul-2013 |
Kaelyn Uhrain <rikka@google.com> |
Attempt typo correction for function calls with the wrong number of arguments. Combined with typo correction's new ability to apply global/absolute nested name specifiers to possible corrections, cases such as in PR12287 where the desired function is being shadowed by a lexically closer function with the same name but a different number of parameters will now include a FixIt. On a side note, since the test for this change caused test/SemaCXX/typo-correction.cpp to exceed the typo correction limit for a single file, I've included a test case for exceeding the limit and added some comments to both the original and part two of typo-correction.cpp warning future editors of the files about the limit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185881 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
761695fec3e4fe5aaae1544d489389bcf6cd9be4 |
09-Jul-2013 |
Kaelyn Uhrain <rikka@google.com> |
Make a couple of useful typo correction callbacks more widely available. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185880 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
emaOverload.cpp
|
09bddcf8c0ce4cc2f2a18e050e971539e8a396f8 |
08-Jul-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Fix Sema for compares with _Atomic vars. Use UsualArithmeticConversions unconditionally in analysis of comparisons and conditional operators: the method performs the usual arithmetic conversions if both sides are arithmetic, and usual unary conversions if they are not. This is just a cleanup for conditional operators; for comparisons, it fixes the issue that we would try to check isArithmetic() on an atomic type. Also, fix GetExprRange() in SemaChecking.cpp so it deals with variables of atomic type correctly. Fixes PR15537. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185857 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExpr.cpp
|
70d214f864987a06b27a92a2bd59df50037815f5 |
08-Jul-2013 |
Craig Topper <craig.topper@gmail.com> |
Introduce a typedef for the type of NewlyDeducedPacks to avoid repeating the small size of the inner SmallVector. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185789 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
cb9186e45c01dcf372d0ff708006daf194bf7d68 |
08-Jul-2013 |
Craig Topper <craig.topper@gmail.com> |
Remove 'else' after 'return' git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185787 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
d82c0910f40d70a6a8beff66d854a53c1cdc44c6 |
08-Jul-2013 |
Craig Topper <craig.topper@gmail.com> |
Function argument formatting fixes. No functional change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185786 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
1310aaca223be5001d58ba9c73fa03d484fd4582 |
08-Jul-2013 |
Craig Topper <craig.topper@gmail.com> |
Function argument formatting fixes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185785 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
163fbf810eaffc2c7b0170d91b6196b032911957 |
08-Jul-2013 |
Craig Topper <craig.topper@gmail.com> |
Use SmallVectorImpl::reverse_iterator instead of SmallVector to avoid specifying the vector size. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185784 91177308-0d34-0410-b5e6-96231b3b80d8
emaCast.cpp
|
bcd0650c1e50a2e73b11717731e074a1ac2ac5ba |
08-Jul-2013 |
David Majnemer <david.majnemer@gmail.com> |
Sema: Do not merge new decls with invalid, old decls Sema::MergeFunctionDecl attempts merging two decls even if the old decl is invalid. This can lead to interesting circumstances where we successfully merge the decls but the result makes no sense. Take the following for example: template <typename T> int main(void); int main(void); Sema will not consider these to be overloads of the same name because main can't be overloaded, which means that this must be a redeclaration. In this case the templated decl is compatible with the non-templated decl allowing the Sema::CheckFunctionDeclaration machinery to move on and do bizarre things like setting the previous decl of a non-templated decl to a templated decl! The way I see it, we should just bail from MergeFunctionDecl if the old decl is invalid. This fixes PR16531. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185779 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
bdf3d9ad85ef09544d14db0e848a01c7df9cb028 |
06-Jul-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
Objective-C: Warn when fast enumeration variable isn't used. // rdar://14182680. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185762 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
4cb3d909cb4af5efc073fd4122d4998c466a220e |
06-Jul-2013 |
Sylvestre Ledru <sylvestre@debian.org> |
Remove some useless declarations (found by scan-build) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185752 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDeclObjC.cpp
|
c371db6b1dac65d61c8952b6198cc970a9e25ee4 |
06-Jul-2013 |
David Majnemer <david.majnemer@gmail.com> |
Sema: Fix a crash when main is redeclared as a function-template. This boils down to us sending invalid function decls to CheckFunctionDeclaration becauswe we did not consider that CheckMain could cause the decl to be invalid. Instead, interogate the new decl's main-validity and *then* send it over to get CheckFunctionDeclaration'd if it was still valid after calling CheckMain. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185745 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
6b9240e058bf3451685df73fc8ce181b3046e92b |
05-Jul-2013 |
Craig Topper <craig.topper@gmail.com> |
Use SmallVectorImpl& for function arguments instead of SmallVector. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185715 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
emaExpr.cpp
|
8540b6e778545008fd521b002929b89ce10506ce |
05-Jul-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
Objective-C: diagnose when synthesizing an ivar of abstract class type. // rdar://14261999 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185710 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
c77039e1b6b81a4ec448ef7b57c894fefaa8433a |
05-Jul-2013 |
David Majnemer <david.majnemer@gmail.com> |
Sema: Call IgnoreParens fewer times in CheckAddressOfOperand git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185684 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ee0a47998ca7db5d31291a397aca38219d3dfd7d |
05-Jul-2013 |
Craig Topper <craig.topper@gmail.com> |
Add typedefs for Densemaps containing SmallVectors to avoid repeating the SmallVector size when creating iterators for the DenseMap. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185682 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaTemplateDeduction.cpp
|
8bc99dd30cd8716aa1f14b037ad1d70c45039911 |
04-Jul-2013 |
Craig Topper <craig.topper@gmail.com> |
Add a space between closing template '>' to unbreak build. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185611 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
09d19efaa147762f84aed55efa7930bb3616a4e5 |
04-Jul-2013 |
Craig Topper <craig.topper@gmail.com> |
Use SmallVectorImpl instead of SmallVector for iterators and references to avoid specifying the vector size unnecessarily. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185610 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
emaInit.cpp
emaLambda.cpp
emaLookup.cpp
emaStmt.cpp
emaTemplateInstantiate.cpp
|
305e5b4268685aa97d6338fe4362d1b73246cbe9 |
04-Jul-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Part of PR15673: If a function template has a default argument in which substitution failed, report that as a substitution failure rather than pretending that there was no default argument. The test cases in PR15673 have exposed some pre-existing poor diagnostics here. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185604 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateDeduction.cpp
|
14b7673b341c0c9edc719754b9c2faafac21fe36 |
04-Jul-2013 |
Richard Trieu <rtrieu@google.com> |
Improve -Wlogical-not-parentheses to catch when the not is applied to an enum. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185602 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
196455416bbac96ee05be1c107b384cb84a7d2ba |
03-Jul-2013 |
Roman Divacky <rdivacky@freebsd.org> |
Check LongDoubleFormat instead of just Width as this is PowerPC specific. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185584 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
3e3d20b2b26a885fcae855bb0b02dbc42d7c5739 |
03-Jul-2013 |
Bill Schmidt <wschmidt@linux.vnet.ibm.com> |
"bool" should be a context-sensitive keyword in Altivec mode. PR16456 reported that Clang implements a hybrid between AltiVec's "Keyword and Predefine Method" and its "Context Sensitive Keyword Method," where "bool" is always a keyword, but "vector" and "pixel" are context-sensitive keywords. This isn't permitted by the AltiVec spec. For consistency with gcc, this patch implements the Context Sensitive Keyword Method for bool, and stops treating true and false as keywords in Altivec mode. The patch removes KEYALTIVEC as a trigger for defining these keywords in include/clang/Basic/TokenKinds.def, and adds logic for "vector bool" that mirrors the existing logic for "vector pixel." The test case is taken from the bug report. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185580 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
|
f0d14cb8c8f95c9039e4ea1f5966f233a76ba1d8 |
03-Jul-2013 |
Roman Divacky <rdivacky@freebsd.org> |
Add support for TF/TC modes available on eg. PowerPC64. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185578 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
b2567ddad9a1142d7224e5363029d640e8f4f59d |
03-Jul-2013 |
Kaelyn Uhrain <rikka@google.com> |
Allow typo correction to try removing nested name specifiers. The removal is tried by retrying the failed lookup of a correction candidate with either the MemberContext or SS (CXXScopeSpecifier) or both set to NULL if they weren't already. If the candidate identifier is then looked up successfully, make a note in the candidate that the SourceRange should include any existing nested name specifier even if the candidate isn't adding a different one (i.e. the candidate has a NULL NestedNameSpecifier). Also tweak the diagnostic messages to differentiate between a suggestion that just replaces the identifer but leaves the existing nested name specifier intact and one that replaces the entire qualified identifier, in cases where the suggested replacement is unqualified. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185487 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprMember.cpp
emaLookup.cpp
emaTemplate.cpp
|
caa16dd469b6f7bfb5bce05afd8772f5d4196322 |
03-Jul-2013 |
Kaelyn Uhrain <rikka@google.com> |
Look for corrections in enclosing namespaces that require a global NestedNameSpecifier. CorrectTypo will now see and consider those corrections that are effectively shadowed by other declarations in a closer context when resolved via an unqualified lookup. This involves adding any parent namespaces to the set of namespaces as fully-qualified name specifiers, and also adding potential corrections that passed name lookup but were rejected by the given CorrectionCandidateCallback into the set of failed corrections that should be tried with the set of namespace specifiers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185486 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
439b7011de1c5089f255bbd98485b5620de5dadb |
02-Jul-2013 |
Serge Pavlov <sepavloff@gmail.com> |
Fix to PR15826 - clang hits assert in clang::ASTContext::getASTRecordLayout. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185446 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
ce9cd911c5b88d375ea1ff9f4719e4d63ce0fa7a |
02-Jul-2013 |
Andy Gibbs <andyg1001@hotmail.co.uk> |
Suppress "control reaches end of non-void function" warning when compiling with gcc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185439 91177308-0d34-0410-b5e6-96231b3b80d8
emaLambda.cpp
|
07369dde9d72213bf8a48288cd8b29999af9a40c |
01-Jul-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Fix mangling for block literals. Blocks, like lambdas, can be written in contexts which are required to be treated as the same under ODR. Unlike lambdas, it isn't possible to actually take the address of a block, so the mangling of the block itself doesn't matter. However, objects like static variables inside a block do need to be mangled in a consistent way. There are basically three components here. One, block literals need a consistent numbering. Two, objects/types inside a block literal need to be mangled using it. Three, objects/types inside a block literal need to have their linkage computed correctly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185372 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaLambda.cpp
|
fe09f3fb9ea2679d9eba7af3cc5cce6212ab9d6a |
01-Jul-2013 |
Craig Topper <craig.topper@gmail.com> |
Put helper class in anonymous namespace. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185305 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
3c3af140263c3761665aa2c0aac4266115f5caf1 |
01-Jul-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR16502: Fix a dumb bug where we might look past the last initializer in an InitListExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185304 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
0c0b3909d11de7440d77556089516918b9c04cef |
30-Jun-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Teach -Wunsequenced that the side-effects of a function evaluation are sequenced before the value computation of the result. In C, this is implied by there being a sequence point after their evaluation, and in C++, it's implied by the side-effects being sequenced before the expressions and statements in the function body. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185282 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
aa4bc18240c03b5ed7952aa5e013c081f8733ed3 |
30-Jun-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Reinstate r185229, reverted in r185256, with a tweak: further ignore the standard's rule that an extern "C" declaration conflicts with any entity in the global scope with the same name. Now we only care if the global scope entity is a variable declaration (and so might have the same mangled name as the extern "C" declaration). This has been reported as a standard defect. Original commit message: PR7927, PR16247: Reimplement handling of matching extern "C" declarations across scopes. When we declare an extern "C" name that is not a redeclaration of an entity in the same scope, check whether it redeclares some extern "C" entity from another scope, and if not, check whether it conflicts with a (non-extern-"C") entity in the translation unit. When we declare a name in the translation unit that is not a redeclaration, check whether it conflicts with any extern "C" entities (possibly from other scopes). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185281 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaOverload.cpp
|
e103979ceac63c98873f3307ee897eab559356a0 |
29-Jun-2013 |
Benjamin Kramer <benny.kra@googlemail.com> |
Compress pairs. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185264 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
emaCodeComplete.cpp
|
6e428a446ed7cc170346430afa7be54e83b2d28c |
29-Jun-2013 |
Timur Iskhodzhanov <timurrrr@google.com> |
Revert r185229 as it breaks compilation of <windows.h> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185256 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaOverload.cpp
|
5eab8d733ce7867fda4e6d5f5afa6dfe8a105c79 |
29-Jun-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR7927, PR16247: Reimplement handling of matching extern "C" declarations across scopes. When we declare an extern "C" name that is not a redeclaration of an entity in the same scope, check whether it redeclares some extern "C" entity from another scope, and if not, check whether it conflicts with a (non-extern-"C") entity in the translation unit. When we declare a name in the translation unit that is not a redeclaration, check whether it conflicts with any extern "C" entities (possibly from other scopes). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185229 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaOverload.cpp
|
5fb478be9b91f15624e855e7bd6ac2101021ac48 |
28-Jun-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Fix error recovery with in-class initializer. Previously, for a field with an invalid in-class initializer, we would create a CXXDefaultInitExpr referring to a null Expr*. This is not a good idea. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185216 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
b26f012c8354b85dff5d9a0eac3a78bd11c73e9b |
28-Jun-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Fix line endings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185215 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
ded9979a2997336cee8797deb6bb3194fccc2068 |
28-Jun-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Switch Decl instantiation to DeclNodes.inc. This replaces a long list of declarations for visitor functions with a list generated from DeclNodes.inc. Nothing really interesting came out of it; we had comprehensive coverage anyway (excluding FriendTemplateDecls). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185118 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
5771aab8027e317de1e3f2f67b5dae67b3d895f8 |
28-Jun-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix nested lifetime extension when a std::initializer_list member is initialized during aggregate initialization of the surrounding structure. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185117 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
02a01faadb2771f4ca5174ed3e798bec0afb96c4 |
28-Jun-2013 |
John McCall <rjmccall@apple.com> |
Ensure that debugger calls to signature-less functions default to passing arguments in the fixed style. We have an abstraction for deciding this, but it's (1) deep in IR-generation, (2) necessarily tied to exact argument lists, and (3) triggered by unprototyped function types, which we can't legitimately make in C++ mode. So this solution, wherein Sema rewrites the function type to an exact prototype but leaves the variadic bit enabled so as to request x86-64-like platforms to pass the extra variadic info, is very much a hack, but it's one that works in practice on the platforms that LLDB will support in the medium term --- the only place we know of where it's a problem is instance methods in Windows, where variadic functions are implicitly cdecl. We may have a more abstracted base on which to build a solution by then. rdar://13731520 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185112 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
2e236fb43bd08ef67115508c8e28ade7ad936aaa |
27-Jun-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Remove unnecessary check. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185108 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
d943352fabd065ce2eaa21f4a550ed2ffa5353ab |
27-Jun-2013 |
Douglas Gregor <dgregor@apple.com> |
Under -fms-extensions, only inject a friend tag name when we didn't see a tag with that name in an enclosing scope. r177473 made us correctly consider only those declarations in the enclosing namespace scope when looking for a friend declaration. Under ms-extensions mode, where we do some level of friend injection, this meant that we were introducing a new tag type into a different scope than what Microsoft actually does. Address this by only doing the friend injection when we didn't see any tag with that name in any outer scope. Fixes <rdar://problem/14250378>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185100 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
288f76ad86d5de6433eef097a1a5caff0c922e85 |
27-Jun-2013 |
Larisse Voufo <lvoufo@google.com> |
A bit of program simplification from r185056 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185058 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
emaOverload.cpp
|
7419d013fd2c4dda596066f4864d5c40e85ba330 |
27-Jun-2013 |
Larisse Voufo <lvoufo@google.com> |
Fix a conversion to incomplete type bug -- The error message now specifically states that the type is incomplete and points to the forward declaration of the incomplete type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185056 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
emaOverload.cpp
|
642038d7c5855b54afbca298631da93b7889d4a5 |
27-Jun-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Delete dead code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185053 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaObjCProperty.cpp
|
418dd3eb3e813235af089b5c88182941f8a03d20 |
27-Jun-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR16467: Teach -Wunsequenced that in C11 (unlike C++11), an assignment's side-effect is not sequenced before its value computation. Also fix a mishandling of ?: expressions where the condition is constant that was exposed by the tests for this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185035 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
3b20f581de2ddd824ef86114ff65fcf37fe02973 |
27-Jun-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
ObjectiveC: diagnose duplicate declaration of private ivars in class extensions and class @implementation. // rdar://14278560 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185025 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
7348454025693dd20a411c2bcaabd4460cb87559 |
26-Jun-2013 |
Joerg Sonnenberger <joerg@bec.de> |
Don't use unnamed local enums as template arguments. Fixes -Werror bootstrap. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185023 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
emaCast.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaType.cpp
|
b4f0f3f3f7adcbaf1cd56e53ddb7af92afba2c58 |
26-Jun-2013 |
Aaron Ballman <aaron@aaronballman.com> |
This patch fixes PR16395, when HandleMSProperty returns null due to a declaration with no name. Patch thanks to Robert Wilhelm. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185022 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
86648b13eb01c0565de7264b27799ba81c7ad060 |
26-Jun-2013 |
Faisal Vali <faisalv@yahoo.com> |
Fix PCH bug with member templates of local classes in nontemplate functions. As noted by Richard in the post: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130624/082605.html, the following code should not add an entry into PendingLocalImplicitInstantiations, since local instantiations should only occur within the context of other instantiations: int foo(double y) { struct Lambda { template<class T> T operator()(T t) const { return t; }; } lambda; return lambda(y); } Hence the attached code does the following: 1) In MarkFunctionReferenced, check if ActiveInstantiations.size() is non-zero before adding to PendingLocalImplicitInstantiations. 2) In InstantiateFunctionDefinition, we swap out/in PendingLocalImplicitInstantiations so that only those pending local instantiations that are added during the instantiation of the current function are instantiated recursively. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184903 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaTemplateInstantiateDecl.cpp
|
dccd04d8611b9d25fd17444f20566773e657a7e6 |
26-Jun-2013 |
Nick Lewycky <nicholas@mxc.ca> |
Don't check for triviality on fields of templated records. We can't know the answer until after instantiation. Fixes PR16061! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184890 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f6a144f5991c6b29622a31fdab86adede0648d12 |
26-Jun-2013 |
David Majnemer <david.majnemer@gmail.com> |
Implement DR136 Friend declarations that specify a default argument must be a definition and the only declaration in the translation unit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184889 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
c7e863f888bbcb2c6508acf193e74195c1b230e9 |
26-Jun-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR8302: Check for shadowing a template parameter when declaring a template template parameter. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184884 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
87b12b2e92c1670e551d66938a4c0a055b18b03a |
26-Jun-2013 |
David Majnemer <david.majnemer@gmail.com> |
Implement DR21 A default template-argument shall not be specified in a friend template declaration. Interestingly, we properly handled default template arguments on friend class members but not on just friend classes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184882 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
ac83a3cdbfa3dad298ab3d87fb608b9b08176e57 |
25-Jun-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix null pointer dereference if we redeclare an unprototyped function. Patch by WenHan Gu! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184875 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
db2fe739e5aac227d85d149efc9036696997a26f |
25-Jun-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
More of N3652: don't add an implicit 'const' to 'constexpr' member functions when checking for overloads in C++1y. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184865 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
548fba96250b6624a96459780e30fd459eed1528 |
25-Jun-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
Objective-C: Warn when IBOutletCollection property is declared to have 'assign' attribute. // rdar://14212998 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184863 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
f9b4fea4bf6cebe614e49ab4b582dcf4bf0a6806 |
25-Jun-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Fix regression from r184810. Specifically, CallExpr::getCalleeDecl() can return null, so make sure to handle that correctly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184813 91177308-0d34-0410-b5e6-96231b3b80d8
emaExceptionSpec.cpp
|
72aa4c431b650800140457636c8481fd965f1534 |
25-Jun-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Fix noexcept for delete expressions. Using "delete" on a pointer to an incomplete type can't throw. While I'm here, clean up the signature of the canCalleeThrow() helper. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184810 91177308-0d34-0410-b5e6-96231b3b80d8
emaExceptionSpec.cpp
|
6e98678f638cfb47cd281ce9a89e0b7443b29487 |
25-Jun-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Delete a couple dead checks. Use castAs<> where appropriate. Don't check conditionals which are always true. Delete a bit of dead code. Reindent a bunch of code which is no longer guarded by an if statement. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184801 91177308-0d34-0410-b5e6-96231b3b80d8
emaExceptionSpec.cpp
|
7652222a5c9c279f6415e8516f286e9af2e14b85 |
25-Jun-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Delete dead code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184795 91177308-0d34-0410-b5e6-96231b3b80d8
emaExceptionSpec.cpp
|
ea943145787bd286256b72c3e658db27674cfc44 |
24-Jun-2013 |
Ted Kremenek <kremenek@apple.com> |
Tweak -Wdeprecated-objc-pointer-introspection to have a subgroup for results of using -performSelectorXXX. -performSelector: and friends return a value that is boxed as an Objective-C pointer. Sometimes it is an Objective-C pointer, sometimes it isn't. Some clients may wish to silence this warning based on calling this method. Fixes <rdar://problem/14147304> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184789 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
12df246d6dea2ee1f92c186f922f1afcf499647a |
24-Jun-2013 |
Reid Kleckner <reid@kleckner.net> |
[AST] Introduce a new DecayedType sugar node The goal of this sugar node is to be able to look at an arbitrary FunctionType and tell if any of the parameters were decayed from an array or function type. Ultimately this is necessary to implement Microsoft's C++ name mangling scheme, which mangles decayed arrays differently from normal pointers. Reviewers: rsmith Differential Revision: http://llvm-reviews.chandlerc.com/D1014 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184763 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaType.cpp
reeTransform.h
|
8d90b4ab994c48c4b6d53122282dc93ac722bfc7 |
24-Jun-2013 |
Kaelyn Uhrain <rikka@google.com> |
Add the global namespace (the "::" namespace specifier) to the list of namespaces to try for potential typo corrections. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184762 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
8c0501c7370d894a735692b92fab62bbb05d86bd |
24-Jun-2013 |
Reid Kleckner <reid@kleckner.net> |
[Sema] Call CheckParmForFunctionDef on ObjC method parameters CheckParmForFunctionDef performs standard checks for type completeness and other things like a destructor check for the MSVC++ ABI. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184740 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDeclObjC.cpp
|
572cf585da655522651b589101784c58902f8690 |
24-Jun-2013 |
Dmitri Gribenko <gribozavr@gmail.com> |
ArrayRef'ize Sema::CodeCompleteConstructorInitializer Patch by Robert Wilhelm. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184675 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
b1ce9297371b65b3726c09e85aed9781f70bca14 |
23-Jun-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix assert if an attempt is made to explicitly instantiate an alias template. Patch by Ismail Pazarbasi! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184650 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
2f686697187e8834346b7924797d44c978252ec6 |
22-Jun-2013 |
David Majnemer <david.majnemer@gmail.com> |
Revert r184401 which reverted r183462. The problem with r183462 was that we assumed that a diagnostic id of zero would be silent. This small correction to CheckDerivedToBaseConversion changes it's behavior to omit the diagnostic when given a diagnostic id of zero. This fix passes the test case added in r184402. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184631 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
e2a90b8bb054fc8de6c115a31bfadf7868bcf0c3 |
22-Jun-2013 |
Richard Trieu <rtrieu@google.com> |
Extend -Wnon-pod-varargs to check calls made from member pointers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184629 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaOverload.cpp
|
0538f0e9200df56974b5a71bc276dbce456e9781 |
22-Jun-2013 |
Richard Trieu <rtrieu@google.com> |
Extend -Wnon-pod-varargs to more cases, such as function pointers as return types and function pointer arrays. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184616 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExpr.cpp
|
c8fa525b5b81eeb7a62294dd3218ca2a6ccf0a6a |
22-Jun-2013 |
David Blaikie <dblaikie@gmail.com> |
Provide suggested no-arg calls for overloaded member functions missing calls Reviewed by Richard Smith. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184612 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaChecking.cpp
|
538fccb44c521f5f26e7aa4cebf6a55284e28b3d |
21-Jun-2013 |
Matt Beaumont-Gay <matthewbg@google.com> |
Propagate the invalid bit from bases to derived template classes. Fixes PR16292. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184581 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
9b60195ad4843c9e2e231673a0dbc0d5c8c6eb2b |
21-Jun-2013 |
Reid Kleckner <reid@kleckner.net> |
[ms-cxxabi] Destroy temporary record arguments in the callee Itanium destroys them in the caller at the end of the full expression, but MSVC destroys them in the callee. This is further complicated by the need to emit EH-only destructor cleanups in the caller. This should help clang compile MSVC's debug iterators more correctly. There is still an outstanding issue in PR5064 of a memcpy emitted by the LLVM backend, which is not correct for C++ records. Fixes PR16226. Reviewers: rjmccall Differential Revision: http://llvm-reviews.chandlerc.com/D929 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184543 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
8a52dce457673cfa90fff5749dc3b797404857f2 |
21-Jun-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Delete dead code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184520 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
104f96ba1a59026d6a71b4ef39ca127b56324e4a |
21-Jun-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Delete dead code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184517 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
fc46be997f8219e11900473c373b639525396064 |
21-Jun-2013 |
Douglas Gregor <dgregor@apple.com> |
When building a module, keep *all* declared methods in the global method pool. As an optimization, we only kept declared methods with distinct signatures in the global method pool, to keep the method lists small. Under modules, however, one could have two different methods with the same signature that occur in different (sub)modules. If only the later submodule is important, message sends to 'id' with that selector would fail because the first method (the only one that got into the method pool) was hidden. When building a module, keep *all* of the declared methods. I did a quick check of both module build time and uses of modules, and found no performance regression despite this causing us to keep more methods in the global method pool. Fixes <rdar://problem/14148896>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184504 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
a4993778f65212f01168c857cf3043e99ba85c9f |
21-Jun-2013 |
Richard Trieu <rtrieu@google.com> |
Add back a condition accidentially removed in r184470. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184496 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
3e1aca289f56310f20f3d97e154337275adf17a4 |
21-Jun-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Don't allow __attribute__((common)) in C++. PR16330. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184493 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
674700516fb7ef0277fbb2a01f56f0c2fa8e7ce5 |
21-Jun-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Avoid repeatedly evaluating subexpressions when checking for unsequenced operations in the case where evaluating a subexpression fails. No functionality change, but test/Sema/many-logical-ops.c gets ~100x faster with this change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184489 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
cac18add73d095eaab600aefe27ea7174aec4922 |
20-Jun-2013 |
Nico Weber <nicolasweber@gmx.de> |
Lazily provide a __float128 dummy type in -std=gnu++11 mode. This is needed to parse libstdc++ 4.7's type_traits, see PR13530. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184476 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaLookup.cpp
emaType.cpp
|
f462b0152f10eed0b989b07bcf457b6fb0d83bdb |
20-Jun-2013 |
Richard Trieu <rtrieu@google.com> |
Extend -Wnon-pod-varargs to check calls made from function pointers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184470 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExpr.cpp
|
4cde94a04694d5d24dc9e3bf6c5fa3403629838e |
20-Jun-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Clean up warning and add a test. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184466 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
040bfc553daac6f23fbc3c83fccddf0a1ec4fdc4 |
20-Jun-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Remove dead code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184453 91177308-0d34-0410-b5e6-96231b3b80d8
emaCast.cpp
|
c2fa6b6f9a89f55397355937544fbbe8258ead5d |
20-Jun-2013 |
Enea Zaffanella <zaffanella@cs.unipr.it> |
Improved source code fidelity for gcc mode attribute. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184417 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
62341d3bde21c85405318950ed8d26b6b3e36544 |
20-Jun-2013 |
Chandler Carruth <chandlerc@gmail.com> |
Temporarily revert r183462: "Implement DR7" This fixes PR16370, I'll add the test case in a follow-up commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184401 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
850cf510b8e310a99344c29731f0b68e096a8658 |
20-Jun-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Fix one place I missed that was memcpy'ing TypeLocs in a way that messes up alignment. Fixes utilities/tuple/tuple.tuple/tuple.creation/tuple_cat.pass.cpp from the libc++ testsuite. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184397 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateVariadic.cpp
reeTransform.h
|
87c29321c4b819d8a10f362f42fb7f7226820041 |
20-Jun-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Add a workaround for a libstdc++-4.2 <tr1/hashtable> bug. This header uses return false; in a function returning a pointer. 'false' was a null pointer constant in C++98 but is not in C++11. Punch a very small hole in the initialization rules in C++11 mode to allow this specific case in system headers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184395 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
8db6cc7146fbdc84f8109b72c953863f92ece487 |
20-Jun-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Remove dead code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184379 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
|
fa0d3f815e6de3f5129572b179b8027c4a3eecde |
20-Jun-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Improve diagnostic for redeclaring static member function. Fixes PR16382. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184378 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
08dc71f4f2a75fd9869ee91b12f36695b700adfc |
19-Jun-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Delete dead code. (Array element types are always complete in C.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184332 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
f67129ab204e2884d674075d74e8ffe1f17f67e3 |
19-Jun-2013 |
Reid Kleckner <reid@kleckner.net> |
[Windows] Fix __declspec(property) when the getter returns a ref This fixes an issue when parsing atlbase.h. Patch by Will Wilson! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184319 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
3882aed80cbb38e007e4fb80076b400a9a4b8445 |
19-Jun-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Fix pr16354. We now reject things like struct ABC { static double a; }; register double ABC::a = 1.0; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184300 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
de7afe02300009ff9babb3ad50e79e7981b6632c |
19-Jun-2013 |
Andy Gibbs <andyg1001@hotmail.co.uk> |
Silence 'set but not used' warning when building in release mode using gcc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184299 91177308-0d34-0410-b5e6-96231b3b80d8
emaCast.cpp
|
c894b326cf10b1ea4610ccddcc40e5648363c9ba |
19-Jun-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Delete dead code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184277 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
|
0601700e8d8e8d0f42bea1c0137c04e8c8ae5ac3 |
19-Jun-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Introduce a new mangling for protocol-qualified ObjC types in C++. This allows to provide proper overloading, and also prevents mangling conflicts with template arguments of protocol-qualified type. This is a non-backward-compatible mangling change, but per discussion with John, the benefits outweigh this cost. Fixes <rdar://problem/14074822>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184250 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
e7e8fcacef233f35ad7e81083f7edd12497f6c40 |
18-Jun-2013 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
When declaring an ObjC interface decl with a @compatibility_alias alias name, change the class name to the "real" one. If we have something like @class NewImage; @compatibility_alias OldImage NewImage; @class OldImage; the lookup for 'OldImage' will return the 'NewImage' decl ("@class NewImage"). In such a case, when creating the decl for "@class OldImage" use the real declaration name ("NewImage"), instead of the alias one ("OldImage"), otherwise we will break IdentifierResolver and redecls-chain invariants. Fixes crash of rdar://14112291. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184238 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
662f41bd9d4bfb4aebaba05e6043a6ff5f0dc2ff |
18-Jun-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
DR14, DR101, and part of DR1: fix handling of extern "C" declarations in namespaces, by treating them just like we treat extern "C" declarations in function scope. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184223 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
2243e78a6580ead4d17b76c924cd4b630b50d6ae |
18-Jun-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Correctly compute the index of the first string format argument when deciding whether to emit a -Wformat-security warning. <rdar://problem/14178260>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184214 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
cd9c9b5c464419116cc00145286589b13fd9eadf |
18-Jun-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
Objective-C: Fixes a typo correction bug where a selector would be correted to identical selector name in certain corner cases. // rdar://7853549 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184208 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
emaExprObjC.cpp
|
419245e0719e1785e4eb3954ddaee122e921c738 |
18-Jun-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
Objective-C [qoi]: privide typo correction for selectors in addition of receiver having static type, but also when receiver has dynamic type (of 'id' variety) as well as when receiver is of 'Class' type vareity. // rdar://7853549 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184195 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
emaExprObjC.cpp
|
904df3e61a8043c60dc733933219a1e1466de5a6 |
18-Jun-2013 |
Larisse Voufo <lvoufo@google.com> |
contextual conversion fix: C++98 compatibility warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184167 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
0bb5199941d6058b866afe01956cca36e64cc247 |
18-Jun-2013 |
Larisse Voufo <lvoufo@google.com> |
r184100 Fix -- Updated test cases for contextual conversion git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184165 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
f8421a3e44e9ef78372cc50b212a482e51c2c41c |
18-Jun-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Delete dead code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184154 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
b67313d9136559ec0f8cda43550f73399fe2b76a |
17-Jun-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Revert "Updated test cases for contextual conversion" This reverts commit r184100. It was faling on some bots: http://bb.pgr.jp/builders/cmake-clang-i686-mingw32/builds/1973/steps/test_clang/logs/Clang%20%3A%3A%20SemaCXX__cxx1y-contextual-conversion-tweaks.cpp git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184108 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
37aba4797703ebadbd480b757ce40b81036539bc |
17-Jun-2013 |
Larisse Voufo <lvoufo@google.com> |
Updated test cases for contextual conversion git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184100 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
0dcea35c21b001c9c2c9b4d4a8cfd4c82dc5f00c |
17-Jun-2013 |
Serge Pavlov <sepavloff@gmail.com> |
Clean up empty struct/union recognition. Make use of getTypeSizeInChars to detect structs/unions of zero size. It allows more accurate detection of types of zero size. It however has a side effect - sequence of used types may change, that is why the test 'override-layout' was modified. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184088 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d395e34ae7aeeeaf9a37a12bc0f6de87158c95c3 |
17-Jun-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
Objective-C [qoi]: Provide fixit hint when message with typo is sent to a receiver object. This is wip. // rdar://7853549 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184086 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
emaExprObjC.cpp
|
9109bf10d50d3b5aa57205db1b8e38a31e3ae477 |
17-Jun-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
C++11: don't warn about the deprecated 'register' keyword if it's combined with an asm label. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184069 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
050315bfd0473323a68f2da99b51bbe2842f6c36 |
16-Jun-2013 |
Dmitri Gribenko <gribozavr@gmail.com> |
ArrayRef'ize Sema::CodeComplete* Patch by Robert Wilhelm. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184052 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
539470e7d38f71b7a0700e1f1b371e76480cf0a6 |
15-Jun-2013 |
Larisse Voufo <lvoufo@google.com> |
Updated the support for contextual conversion tweaks (n3323) with a previously overlooked part: implicitly converting array sizes to size_t, rather than contextually converting them to some unique type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184048 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
d570a9282fd1793cbf21c090d80cb0b6b4b89982 |
15-Jun-2013 |
Faisal Vali <faisalv@yahoo.com> |
A quick fix to allow return type deduction on member templates by ensuring DiagnoseUseOfDecl is called both on the found decl and the decl being used (i.e the specialization in the case of member templates) whenever they are different. Per the exchange captured in http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130610/081636.html a more comprehensive fix that allows both decls to be passed into DiagnoseUseOfDecl is (or should be) forthcoming relatively soon. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184043 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
d6b698739ab157348acafcec5b06a05d3d35377d |
15-Jun-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR16263: Implement current direction of core issue 1376. Binding a reference to the result of a cast-to-reference-type lifetime-extends the object to which the reference inside the cast binds. This requires us to look for subobject adjustments on both the inside and the outside of the MaterializeTemporaryExpr when looking for a temporary to lifetime-extend (which we also need for core issue 616, and possibly 1213). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184024 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
41cb3d90c2114a7df7aa04f80c8be4b62994fb0d |
15-Jun-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix handling of const_cast from prvalue to rvalue reference: such a cast is only permitted if the source object is of class type, and should materialize a temporary for the reference to bind to. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184017 91177308-0d34-0410-b5e6-96231b3b80d8
emaCast.cpp
|
ddb5a3926d715ab4354ca36117679e3f4d5d3e21 |
14-Jun-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Unify return type checking for functions and ObjC methods. Move all the random checks for ObjC object return types to SemaType.cpp. Fixes issue with ObjC method type checking reported on cfe-dev. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184006 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaLambda.cpp
emaType.cpp
reeTransform.h
|
93f32da079874f70857af42eb9be382f307d4f1e |
14-Jun-2013 |
Chandler Carruth <chandlerc@gmail.com> |
Fix the warning for divide by zero to be a bit more robust. ;] Previously, it only ever fired for zeros which formed null pointers. Now, hilariously, in C++98 this was almost anything. Including tricks like warning on the divisor in this code: typedef char c3[3]; size_t f(c3* ptr) { return (sizeof(ptr) / sizeof(*ptr)) / (size_t)(!(sizeof(ptr) % sizeof(*ptr))); } Why the RHS of the outer divide is a null pointer constant is a sordid tale of sorrow. Anyways, the committee fixed this for C++11 and onward as part of core isssue 903, and Richard recently implemented this fix causing the warning to go away here (and elsewhere). This patch restores the warning here and adds it for numerous other somewhat obvious gaffes: int g(int x) { return x / (int)(0.0); } The patch is essentially just using the full power of our constant folding in Clang to produce the warning, but insisting that it must fold to an *integer* which is zero so that we don't get false positives anywhere. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183970 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
3a936caf79bc7448ac5ec60c14faeb87c74e5392 |
13-Jun-2013 |
Stephen Hines <srhines@google.com> |
Update clang for merge to r183849. Add missing libLLVMObject to clang dependencies. Add AttrExprArgs.inc build rule to clang-tblgen-rules.mk Add AttrExprArgs.inc to Parse dependencies Add DiagnosticSemaKinds.inc to CodeGen dependencies. Android.mk updates: Add TypeLocBuilder.cpp Change-Id: I034b209e82e02062860752f17b2eb0dd1081f6b0
ndroid.mk
|
95099ef43aff8fb3d5d47bed0a583e7977f4b3f4 |
13-Jun-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Followup to r183931 to fix the lambda conversion-to-block-pointer member. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183942 91177308-0d34-0410-b5e6-96231b3b80d8
emaLambda.cpp
|
38fa961573efb0fb9ef53f3e8a9e730701bc9375 |
13-Jun-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Fix a small bug in the linkage computation for the lambda conversion-to-function-pointer member. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183931 91177308-0d34-0410-b5e6-96231b3b80d8
emaLambda.cpp
|
ad24ad4c741cad0fe79d6e4a74edc58d592a0f90 |
13-Jun-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Allow clang to build __clear_cache on ARM. __clear_cache is special. It needs no signature, but is a real function in compiler_rt or libgcc. Patch by Andrew Turner. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183926 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
36155c14b691720ee3e94bfe99886229650bbfb5 |
13-Jun-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
C++11: If a class has a user-declared copy operation or destructor, the implicit definition of a copy operation is deprecated. Add a warning for this to -Wdeprecated. This warning is disabled by default for now, pending investigation into how common this situation is. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183884 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
1b2209fd149436c98e73d4b8667b40b5f4b974cd |
13-Jun-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
In C++11, promote access declaration diagnostic from warning to error. There doesn't seem to be any value in even adding a -W flag for this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183882 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
4e47ecb6b2e399d2a7cc3a91d1eab9e501c5580f |
13-Jun-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
When copy-initializing a temporary for a reference binding, don't allow use of explicit constructors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183879 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
98a75581e155a7dac853a69b0151960f8e2aacbd |
13-Jun-2013 |
Nick Lewycky <nicholas@mxc.ca> |
Include the unexpanded packs in the initializer expression when checking a pack expanded constructor initializer list. Fixes PR16303! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183878 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
d3ff325a8d95a58783a3ea2675e2d59a393bd637 |
13-Jun-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Don't suggest putting 'operator new' or 'operator delete' in a namespace to fix a two-phase lookup issue. That's not permitted. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183874 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
7c3e615f01e8f9f587315800fdaf2305ed824568 |
13-Jun-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR12086, PR15117 Introduce CXXStdInitializerListExpr node, representing the implicit construction of a std::initializer_list<T> object from its underlying array. The AST representation of such an expression goes from an InitListExpr with a flag set, to a CXXStdInitializerListExpr containing a MaterializeTemporaryExpr containing an InitListExpr (possibly wrapped in a CXXBindTemporaryExpr). This more detailed representation has several advantages, the most important of which is that the new MaterializeTemporaryExpr allows us to directly model lifetime extension of the underlying temporary array. Using that, this patch *drastically* simplifies the IR generation of this construct, provides IR generation support for nested global initializer_list objects, fixes several bugs where the destructors for the underlying array would accidentally not get invoked, and provides constant expression evaluation support for std::initializer_list objects. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183872 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExceptionSpec.cpp
emaInit.cpp
reeTransform.h
|
a4bb99cd0055ba0e1f3107890e5b6cbe31e6d1cc |
12-Jun-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Move detection of reference members binding to temporaries from building of CXXCtorInitializers to the point where we perform the questionable lifetime extension. This exposed a selection of false negatives in the warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183869 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaInit.cpp
|
8a07cd3f59a0ede54906bdc8ed21724815db27ad |
12-Jun-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Reapply r183721, reverted in r183776, with a fix for a bug in the former (we were lacking ExprWithCleanups nodes in some cases where the new approach to lifetime extension needed them). Original commit message: Rework IR emission for lifetime-extended temporaries. Instead of trying to walk into the expression and dig out a single lifetime-extended entity and manually pull its cleanup outside the expression, instead keep a list of the cleanups which we'll need to emit when we get to the end of the full-expression. Also emit those cleanups early, as EH-only cleanups, to cover the case that the full-expression does not terminate normally. This allows IR generation to properly model temporary lifetime when multiple temporaries are extended by the same declaration. We have a pre-existing bug where an exception thrown from a temporary's destructor does not clean up lifetime-extended temporaries created in the same expression and extended to automatic storage duration; that is not fixed by this patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183859 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaInit.cpp
|
2049840b0ffe8ee4bf39051cfa8ca08440c8f667 |
12-Jun-2013 |
Stephen Hines <srhines@google.com> |
Merge commit '1342a4ef62dd7b839c6f09348b246a4f00282f29' into merge_20130612
|
81359b0a88510087a873de771f9a2f5ee7ed97d9 |
12-Jun-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Tweak r183791 so we don't print a note without a source location. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183803 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
188ddb14a82792f2d9405706ae38fccb79a066fd |
11-Jun-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Correctly handle designated initializers which modify an array initialized with a string. This case is sort of tricky because we can't modify the StringLiteral used to represent such initializers. We are forced to decompose the string into individual characters. Fixes <rdar://problem/10465114>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183791 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
a57be5617a0735a654d4c8145be1fd752f776772 |
11-Jun-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Revert r183721. It caused cleanups to be delayed too long in some cases. Testcase to follow. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183776 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
0f9b855e6869970975db23863ac3d0eb1866a3ca |
11-Jun-2013 |
David Majnemer <david.majnemer@gmail.com> |
Remove some unicode that sneaked in. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183725 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
01e0b1f24af250da37faf953cd82626b360622f6 |
11-Jun-2013 |
David Majnemer <david.majnemer@gmail.com> |
Implement DR61: Address of ambiguous bound methods should be disallowed DR61 affirms that expressions containing unresolved member access should be disallowed when performing "address of" operations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183723 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
2ec2b8459392f3f2f00d816b40e73113d444d838 |
11-Jun-2013 |
David Majnemer <david.majnemer@gmail.com> |
Implement DR85: Redeclaration of member is forbidden Disallow the existence of a declaration of a member class that isn't a forward declaration before it's definition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183722 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
85af7cecadbf5d4b905d6b3b4b1b6fa684183aff |
11-Jun-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Rework IR emission for lifetime-extended temporaries. Instead of trying to walk into the expression and dig out a single lifetime-extended entity and manually pull its cleanup outside the expression, instead keep a list of the cleanups which we'll need to emit when we get to the end of the full-expression. Also emit those cleanups early, as EH-only cleanups, to cover the case that the full-expression does not terminate normally. This allows IR generation to properly model temporary lifetime when multiple temporaries are extended by the same declaration. We have a pre-existing bug where an exception thrown from a temporary's destructor does not clean up lifetime-extended temporaries created in the same expression and extended to automatic storage duration; that is not fixed by this patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183721 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
4017d7378b1544e6c43f0ad857e6c18c3957efe0 |
11-Jun-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
Objective-C [qoi]: Issue better warning when nsstring literal is missing the '@'. PR16287 and // rdar://14106083 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183713 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
0567a79130a251bf464ce21ecf3f8b9fb5207900 |
10-Jun-2013 |
Reid Kleckner <reid@kleckner.net> |
Use FPT::getArgTypes() instead of manually building ArrayRefs Made significantly easier with git-clang-format. Differential Revision: http://llvm-reviews.chandlerc.com/D947 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183694 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExceptionSpec.cpp
emaExpr.cpp
emaLambda.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
|
ef0e4e6eda13c2dcd6d4d43f1750d1d73202d16a |
10-Jun-2013 |
Richard Trieu <rtrieu@google.com> |
Add a new warning, -Wlogical-not-parentheses, to -Wparentheses. This warning triggers on the logical not of a non-boolean expression on the left hand side of comparison. Often, the user meant to negate the comparison, not just the left hand side of the comparison. Two notes are also emitted, the first with a fix-it to add parentheses around the comparison, and the other to put parenthesis around the not expression to silence the warning. bool not_equal(int x, int y) { return !x == y; // warn here } return !(x == y); // first fix-it, to negate comparison. return (!x) == y; // second fix-it, to silence warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183688 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
7acc5a64822093ec746748efcdabb162bd1b8560 |
10-Jun-2013 |
Larisse Voufo <lvoufo@google.com> |
Support for contextual conversion tweaks (N3323) was added, as Revision 183637 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183639 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
50b60b35a9377bb621f21955b956b581f9860baf |
10-Jun-2013 |
Larisse Voufo <lvoufo@google.com> |
reverted test git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183637 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaTemplateInstantiateDecl.cpp
|
817e01f509649b7fb1b879412f9c99766af6315f |
10-Jun-2013 |
Larisse Voufo <lvoufo@google.com> |
test git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183636 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
c910d4cfa5042f2c9da1eb4e0b6ed59240c0eeee |
08-Jun-2013 |
Reid Kleckner <reid@kleckner.net> |
Revert "[Sema] Make FunctionType's TSI use unadjusted argument types" This reverts commit r183614. It broke test/Sema/block-printf-attribute-1.c on non-Windows platforms, and the fix is not trivial. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183616 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaType.cpp
|
63c9a92a805394c1ca9e4a5fd8afb3acbb918d03 |
08-Jun-2013 |
Reid Kleckner <reid@kleckner.net> |
[Sema] Make FunctionType's TSI use unadjusted argument types This helps preserve the type-as-written in the AST, which we need for MSVC mangling. In particular, we need to preserve the types of array parameters in function pointer types. The essence of this change is: - QualType ArgTy = Param->getType(); + QualType ArgTy = Param->getTypeSourceInfo()->getType(); ... followed by the adjustment in ActOnFunctionDeclarator(). Differential Revision: http://llvm-reviews.chandlerc.com/D883 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183614 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaType.cpp
|
122e601886ae527d6e7100c589339c05190a168a |
08-Jun-2013 |
Serge Pavlov <sepavloff@gmail.com> |
Recognition of empty structures and unions is moved to semantic stage Differential Revision: http://llvm-reviews.chandlerc.com/D586 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183609 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
cc28eff95644b247d2cac643ff83ff7db7d8adb2 |
08-Jun-2013 |
Jin-Gu Kang <jaykang10@imrc.kist.re.kr> |
Added a type checking which handle the case of an ext vector and integral scalar git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183602 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b6e3808bfe385da8d90bb431e41e30d721d5433f |
08-Jun-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Recursively lifetime-extend into array temporaries. These can get implicitly created through binding a reference-to-array to an initializer list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183594 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
80e8ea92d6dcaa05165dcb4730485db82dcd4629 |
08-Jun-2013 |
Adrian Prantl <aprantl@apple.com> |
address some comments on r183474: - factor the name construction part out from constructSetterName - rename constructSetterName to the more appropriate constructSetterSelector no functionality change intended. rdar://problem/14035789 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183582 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprMember.cpp
emaExprObjC.cpp
emaPseudoObject.cpp
|
f9eaf98bf524f7e2dcb9875a9f4afd9e25fc615d |
08-Jun-2013 |
David Majnemer <david.majnemer@gmail.com> |
Revert "Properly consider the range of enum for range comparisons in C mode" The approach r183084 took was wrong, back it out. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183575 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
d88d7abe0dc0f2aeed061432cc60d2dd29f62fe8 |
07-Jun-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Add missing file from r183563 (the recommit of 183466). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183564 91177308-0d34-0410-b5e6-96231b3b80d8
ypeLocBuilder.cpp
|
44ee0a710c59d8e6793189f903bae21c16814324 |
07-Jun-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Re-commit r183466 with a fix to make the TypeLoc casting machinery work correctly in the presence of qualified types. (I had to change the unittest because it was trying to cast a QualifiedTypeLoc to TemplateSpecializationTypeLoc.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183563 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
emaLambda.cpp
emaTemplateVariadic.cpp
emaType.cpp
reeTransform.h
ypeLocBuilder.h
|
6071af93f9b3c5a361c2f11566003d729418be3d |
07-Jun-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
Objective-C: Another case of issuing warning about misusing property auto-synthesis before knowingit it is to be auto-synthesized. // rdar://14094682 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183556 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
33f0faa082b1aa5b52ae50f2ccaffc34629e01da |
07-Jun-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR16273: Weaken a bogus assertion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183550 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
a6ba40c1e573aee7882baa804e596e243b9c4e2a |
07-Jun-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
Objective-C: Removes a bogus warning about auto-synthesis of properties. Fixes // rdar://14085456 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183542 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
b165fddec068f75c876063bb1a8e724cf12b3039 |
07-Jun-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
fix up recogtion of block pointer type in my last patch. // rdar://14085217. e-This line, and those below, will be ignored-- M lib/Sema/SemaExpr.cpp git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183531 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
20387efff0870da2c8b30bb62ae661239a903021 |
07-Jun-2013 |
Manuel Klimek <klimek@google.com> |
Reverts r183466: "Perform dynamic alignment computations..." This introduces bugs in TemplateSpecializationTypeLoc's angle bracket locations. Regression test follows in a subsequent commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183513 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
emaLambda.cpp
emaTemplateVariadic.cpp
reeTransform.h
ypeLocBuilder.cpp
ypeLocBuilder.h
|
cafeb948e6067b8dc897c441da522367917b06f9 |
07-Jun-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR16243: Use CXXThisOverride during template instantiation, and fix up the places which weren't setting it up properly. This allows us to get the right cv-qualifiers for 'this' when it appears outside a method body in a class template. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183483 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
8150da3796300bdc876775e1782331f0e43d2d94 |
07-Jun-2013 |
Eli Friedman <eli.friedman@gmail.com> |
When we're synthesizing copy/move-assignment, we can't form a reference to an invalid field; make sure we don't try. Fixes <rdar://problem/14084171>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183479 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
7523606638128e19d6993c356851fd3e88078201 |
07-Jun-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
blocks: fixes an ast bug when block pointer variable is evaluated in a condition expression and then dereferenced to envoke the block. This is pr15663 and I applied a slight variation of the patch with a test case. (patch is from Arthur O'Dwyer). Also // rdar://14085217 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183471 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
86875b11db3536858116effd80cbb06b6810303d |
07-Jun-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Perform dynamic alignment computations so that the data in TypeLocs is correctly aligned. Not performing such computations led to misaligned loads, which crash on some platforms and are generally bad on other platforms. The implementation of TypeLocBuilder::pushImpl is rather messy; code using TypeLocBuilder accidentally assumes that partial TypeLocs are laid out like a complete TypeLoc. As a followup, I intend to work on fixing the TypeLocBuilder API to avoid exposing partial TypeLocs; this should substantially simplify the implemementation. Fixes PR16144. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183466 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
emaLambda.cpp
emaTemplateVariadic.cpp
reeTransform.h
ypeLocBuilder.cpp
ypeLocBuilder.h
|
585bee48bac063f31696e308798f9432b5ba4116 |
07-Jun-2013 |
David Majnemer <david.majnemer@gmail.com> |
Implement DR7 Disallowing deriving from classes that have private virtual base classes except in instances where the deriving class would be able to cast itself to the private virtual base via a different derivation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183462 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
48a1e81715bf9c37a4168d83f4218e6517e29541 |
06-Jun-2013 |
Joey Gouly <joey.gouly@arm.com> |
Fix a crash with -Wassign-enum, where we didn't adjust the APInt type of the constant. Also fix some spelling mistakes and formatting issues. Reviewed by Richard Smith over IRC. Fixes PR15069. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183409 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
40cba90626044ff28b58c33e743366e94c898227 |
06-Jun-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Implement DR1270: braces can be elided in all aggregate initialization, not just copy-list-initialization in a variable declaration. This effectively reverts r142147. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183397 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
649c6c50fd3dd13577071b26fec4495f7538d923 |
06-Jun-2013 |
Hans Wennborg <hans@hanshq.net> |
Disallow reinterpret_cast from pointer to bool on Windows This became allowed by accident in r131201, but triggers an assert. That patch added an exception to allow conversion from pointers to narrow integral types for MSVC compatibility. However, a pointer can already be converted to bool in a civilized manner; allowing conversion via reinterpret_cast is a bad idea. Fixes PR16222. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183394 91177308-0d34-0410-b5e6-96231b3b80d8
emaCast.cpp
|
4fe9644dc3533e4517f980645957c6fc9408c6f6 |
06-Jun-2013 |
Richard Trieu <rtrieu@google.com> |
Don't create a StringRef from a temporary string. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183372 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
9464a08a743295d6aefaca1a751b5b4d371cf99c |
05-Jun-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
Objective-C: Provide fixit with suggested spelling correction for -Wundeclared-selector warnings. // rdar://14039037 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183331 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
emaExprObjC.cpp
|
d62d9015c76d4e7dee1fddd9603b92098b355e15 |
05-Jun-2013 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
When the template specialization header is missing, set a valid source location for the template keyword when recovering. Otherwise ClassTemplateSpecializationDecl::getSourceRange() will mistakenly consider itself as an implicit partial specialization and lead to a crash. Fixes rdar://14063074 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183325 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
6f773e87eeb2ca04f86b1dcb98683887dfbe1ffa |
05-Jun-2013 |
Benjamin Kramer <benny.kra@googlemail.com> |
Silence GCC warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183317 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
211c8ddb5b500ed84833751363d0cfe1115f4dd3 |
05-Jun-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Model temporary lifetime-extension explicitly in the AST. Use this model to handle temporaries which have been lifetime-extended to static storage duration within constant expressions. This correctly handles nested lifetime extension (through reference members of aggregates in aggregate initializers) but non-constant-expression emission hasn't yet been updated to do the same. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183283 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaInit.cpp
|
a7ff62f9443efa3b13a28a1e566d4625b15b8553 |
04-Jun-2013 |
Aaron Ballman <aaron@aaronballman.com> |
Adding support for MSVC #pragma detect_mismatch functionality by emitting a FAILIFMISMATCH linker command into the object file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183178 91177308-0d34-0410-b5e6-96231b3b80d8
emaAttr.cpp
|
c2fe81898b1b3b948791ca4ababd3d495601f22a |
04-Jun-2013 |
David Blaikie <dblaikie@gmail.com> |
Bound member function diagnostic - suggest no-args calls and note overload candidates Still missing cases for templates, but this is a step in the right direction. Also omits suggestions that would be ambiguous (eg: void func(int = 0); + void func(float = 0); func;) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183173 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
b45a4d217cf1513b14a143143a2c3af8738a3cd7 |
03-Jun-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix a couple of bugs where jump diagnostics would not notice that a variable has an initializer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183092 91177308-0d34-0410-b5e6-96231b3b80d8
umpDiagnostics.cpp
|
4e43dec4df9d7dd8e07b47bb15967f1b733a9bc6 |
03-Jun-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix handling of pointers-to-members and comma expressions when lifetime-extending temporaries in reference bindings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183089 91177308-0d34-0410-b5e6-96231b3b80d8
umpDiagnostics.cpp
|
c063cb1e1a2e4b76f27762fcf56b4ba2ede8f0a9 |
02-Jun-2013 |
David Majnemer <david.majnemer@gmail.com> |
Allow paren casted throw statements inside of ternary expressions clang would incorrectly not allow the following: int x = true ? (throw 1) : 2; The problem exists because we don't see beyond the parens. This, in turn, causes us to believe that we are choosing between void and int which we diagnose as an error. Instead, allow clang to see the 'throw' inside the parens. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183085 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
ad69e0cc6590f2d208fa863c48697563960e4a61 |
02-Jun-2013 |
David Majnemer <david.majnemer@gmail.com> |
Properly consider the range of enum for range comparisons in C mode In some cases, clang applies the C++ rules for computing the range of a value when said value is an enum. Instead, apply C semantics when in C mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183084 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
923cadadd2662827ce9029f72d399cf22c443ff9 |
01-Jun-2013 |
Richard Trieu <rtrieu@google.com> |
Fix the indentation on the AST visitors used in -Wloop-analysis. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183056 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
69f86d92ae940c5c8d979951d9c55fe9111627a0 |
31-May-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
Objective-C: Fixes an ivar lookup bug where 'ivar' was used inside a record/union used as argument to __typeof. // rdar14037151 pr5984 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183048 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
6242a45ca50586ed3f363d4ac7422e07092e4d96 |
31-May-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix handling of braced-init-list as reference initializer within aggregate initialization. Previously we would incorrectly require an extra set of braces around such initializers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182983 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
858c2c317e7f176df72c4507a91eeddcfc5316fd |
31-May-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Walk over MaterializeTemporaryExpr when reverting an initializer to its syntactic form in template instantiation. Previously, this blocked the reversion and we ended up losing inner CXXBindTemporaryExprs (and thus forgetting to call destructors!). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182969 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
639aa529211c266c83546c3047bdb428e9c7a87c |
30-May-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
fixes a comment in my last patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182966 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
f98c688968777214bfff7a6cc9bbd4ff78e9c1d3 |
30-May-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
Objective-C: Implements gcc's -Wselector option which diagnoses type mismatches of identical selectors declared in classes throughout. // rdar://14007194 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182964 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
df08c4b371522025d1d3aec4992fb0f27d7c4571 |
30-May-2013 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Fix potential infinite loop when iterating over redeclarations of an ObjMethodDecl, resulting from invalid code. Check for invalid decls in ObjCMethodDecl::getNextRedeclaration(); otherwise if we start from an invalid redeclaration of an @implementation we would move to the @interface and not reach the original declaration again. Fixes rdar://14024851 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182951 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
76eed42f99158082fae5b903f46dfb6355e66f95 |
30-May-2013 |
Aaron Ballman <aaron@aaronballman.com> |
Microsoft has a language extension which allows union members to be references. What's more, they use this language extension in their ATL header files (which come as part of MFC and the Win32 SDK). This patch implements support for the Microsoft extension, and addresses PR13737. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182936 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
5537e0a4df10d3445e9714736534e4d33a44fa5d |
30-May-2013 |
Aaron Ballman <aaron@aaronballman.com> |
Add support to fallback on operator new when a placement operator new[] is called for which there is no valid declaration. This fallback only happens in Microsoft compatibility mode. This patch addresses PR13164, and improves support for the WDK. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182905 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
2628b44e100da28972a14854f98d0aa6f7b888e0 |
29-May-2013 |
Ted Kremenek <kremenek@apple.com> |
Split off casts to void* for -Wint-to-pointer-cast to subgroup -Wint-to-void-pointer-cast. This change is motivated from user feedback that some APIs use void* as an opaque "context" object that may not really be a pointer. Such users want an ability to turn off the warning for casts to void* while preserving the warning for other cases. Implements <rdar://problem/14016721>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182884 91177308-0d34-0410-b5e6-96231b3b80d8
emaCast.cpp
|
fe038a32903c935e1bd9f2b62190c2c75a6754fe |
29-May-2013 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[libclang] For "@import .." code-completion results, associate a CXCursor_ModuleImportDecl cursor instead of CXCursor_NotImplemented. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182871 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
aa71567ba4b8a10e9a7d668bf93e35413d7260a8 |
29-May-2013 |
David Majnemer <david.majnemer@gmail.com> |
Disallow extern decls of type void in C++ mode C++ and C differ with respect to the handling of extern void declarations. Enforce the C++ behavior in C++ mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182814 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
538bbe597b935a74d95c668ad209536753f13481 |
28-May-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to issue error when target of MacOS and iOS does not support large load/store of atomic objects. // rdar://13973577 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182781 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
b07d448a625d7399d871079d55491c6b10316e6f |
25-May-2013 |
Nico Weber <nicolasweber@gmx.de> |
Warn on va_start() when called with a reference parameter. http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1905.pdf 18.7p3 explicitly calls this (and some other things) out as undefined. Also move 2 other existing warnings behind the new -Wvarargs flag. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182694 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
942dfe2e4d75f9d7c6f2e73eadac6fa659a5f853 |
24-May-2013 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Don't diagnose an empty lookup for inline assmebly. This happen for labels in inline assembly that aren't in the lookup tables. E.g., __asm { a: jmp a } rdar://13983623 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182659 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaStmtAsm.cpp
|
89735b9516b1a378c6d33620a6c3a0d5705f9d04 |
24-May-2013 |
Aaron Ballman <aaron@aaronballman.com> |
Suffixing #pragma comment(lib) library names with .lib if necessary. This matches MSVC behavior, as well as allows us to properly link libraries such as the ones provided by the MSDN examples. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182647 91177308-0d34-0410-b5e6-96231b3b80d8
emaAttr.cpp
|
2c2f09ec4842be9933f803b1ec9488b62afc9f5c |
24-May-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix crash-on-invalid if list-initialization works, but we bail out when building the resulting expression because it invokes a deleted constructor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182624 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
b1a4d37c0549501fe12907bc6ffa81bc5d04b98a |
23-May-2013 |
Benjamin Kramer <benny.kra@googlemail.com> |
Make helper functions static. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182589 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
5705f211472f19fc38e58d81365f9261024b3ba3 |
23-May-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR14772: Support constant expression evaluation for _Atomic types. * Treat _Atomic(T) as a literal type if T is a literal type. * Evaluate expressions of this type properly. * Fix a lurking bug where we built completely bogus ASTs for converting to _Atomic types in C++ in some cases, caught by the tests for this change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182541 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
aa9df09729fb8aee3e645549e95fcb413306a7aa |
23-May-2013 |
Aaron Ballman <aaron@aaronballman.com> |
Adding in parsing and the start of semantic support for __sptr and __uptr pointer type qualifiers. This patch also fixes the correlated __ptr32 and __ptr64 pointer qualifiers so that they are truly type attributes instead of declaration attributes. For more information about __sptr and __uptr, see MSDN: http://msdn.microsoft.com/en-us/library/aa983399.aspx Patch reviewed by Richard Smith. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182535 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaType.cpp
|
82b0001f79568199c7e5aa564f7ca9d43cc89d86 |
22-May-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix crash-on-invalid: only use TransformAddressOfOperand when transforming the operand of a unary address-of expression, not for *all* expressions! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182436 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
569b4ad6506960f1a7f191107c185cb1566a7fbb |
21-May-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
Objective-C arc: don't count use of __weak variables when they are used in such unevaluated contexts as __typeof, etc. // rdar://13942025 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182423 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprMember.cpp
emaPseudoObject.cpp
|
097e0a2cb08c8244a6923489acc8f890e6a99b59 |
21-May-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Refactor places which perform contextual implicit conversions to go through a common function. The C++1y contextual implicit conversion rules themselves are not yet implemented, however. This also fixes a subtle bug where template instantiation context notes were dropped for diagnostics coming from conversions for integral constant expressions -- we were implicitly slicing a SemaDiagnosticBuilder into a DiagnosticBuilder when producing these diagnostics, and losing their context notes in the process. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182406 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprCXX.cpp
emaOverload.cpp
emaStmt.cpp
|
beba3e80378f38f3d1e1ef030dacdd438373d3d5 |
20-May-2013 |
Reid Kleckner <reid@kleckner.net> |
Warn on and drop dllimport attrs from variable definitions AsmPrinter::EmitLinkage() does not handle dllimport linkage. The LLVM verifier should also be fixed to reject this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182320 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
argetAttributesSema.cpp
|
8dbda516d343706bae904f800c6d64e145d58a8c |
20-May-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
Objective-C [qoi]: When an class conforms to multiple protocols that declare the same property of incompatible types, issue a warning when class implementation synthesizes the property. // rdar://13075400 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182316 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
f51cfb89b3fe317318e434db4856b06a90afc126 |
20-May-2013 |
Peter Collingbourne <peter@pcc.me.uk> |
[ms-cxxabi] Look up operator delete() at every virtual dtor declaration. While the C++ standard requires that this lookup take place only at the definition point of a virtual destructor (C++11 [class.dtor]p12), the Microsoft ABI may require the compiler to emit a deleting destructor for any virtual destructor declared in the TU, including ones without a body, requiring an operator delete() lookup for every virtual destructor declaration. The result of the lookup should be the same no matter which declaration is used (except in weird corner cases). This change will cause us to reject some valid TUs in Microsoft ABI mode, e.g.: struct A { void operator delete(void *); }; struct B { void operator delete(void *); }; struct C : A, B { virtual ~C(); }; As Richard points out, every virtual function declared in a TU (including this virtual destructor) is odr-used, so it must be defined in any program which declares it, or the program is ill formed, no diagnostic required. Because we know that any definition of this destructor will cause the lookup to fail, the compiler can choose to issue a diagnostic here. Differential Revision: http://llvm-reviews.chandlerc.com/D822 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182270 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
a722534711fd93b5685e1a00f37a62f6a578dacd |
20-May-2013 |
Reid Kleckner <reid@kleckner.net> |
Implement __declspec(selectany) under -fms-extensions selectany only applies to externally visible global variables. It has the effect of making the data weak_odr. The MSDN docs suggest that unused definitions can only be dropped at linktime, so Clang uses weak instead of linkonce. MSVC optimizes away references to constant selectany data, so it must assume that there is only one definition, hence weak_odr. Reviewers: espindola Differential Revision: http://llvm-reviews.chandlerc.com/D814 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182266 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
|
5c6134fd09bc5b738dafdd1c774edde13d95cb20 |
18-May-2013 |
DeLesley Hutchins <delesley@google.com> |
Thread safety analysis: add two new attributes to the thread safety analysis: assert_exclusive_lock and assert_shared_lock. These attributes are used to mark functions that dynamically check (i.e. assert) that a lock is held. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182170 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
2521dfa550805e3ca50c63eccbb185e6720a4041 |
17-May-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
Objective-C++ (and c++) Sema: Patch fixes a sema crash when gnu’s ?: extension is used for Objective-C++’s dictionary subscripting. This is done by filtering out all placeholder types before check on lowering of the common expression is done. // rdar://1374918. Reviewed by John McCall. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182120 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
8fbda8e4a028d67a2aba0176a10607c3e743f759 |
17-May-2013 |
Reid Kleckner <reid@kleckner.net> |
Refactor diagnostics for MS attributes without -fms-extensions This shares the warn_attribute_unused diagnostic and reduces the indentation level. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182096 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
7a9f7c7c68673c46d6e2b83fec6f4cbfbd25f475 |
17-May-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
A little ArrayRef'ization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182074 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateInstantiate.cpp
|
b5eb3f5bf383807103dc1377a124fd96ee21d02a |
17-May-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR15757: When we instantiate an inheriting constructor template, also instantiate the inherited constructor template and mark that as the constructor which the instantiated specialization is inheriting. This fixes a crash-on-valid when trying to compute the exception specification of a specialization of the inheriting constructor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182072 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
b8ed071b88c1fd100eaa701f5fd7f5ebe8b9e362 |
16-May-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
Objective-C arc: Diagnose when user attempts to synthesize a property getter method that overrides a method definition named 'retain' and the like. Fixes // rdar://13885083 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182039 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
emaObjCProperty.cpp
|
c1fb1e0b79cf2762896e57e43f51da5fedd88d77 |
16-May-2013 |
Hans Wennborg <hans@hanshq.net> |
SemaInit.cpp: give both IsStringInit() functions the same return type. This addresses Richard's comment on r181880. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181995 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
0d8e9646bc000bab521ce52ed294209a92298cef |
16-May-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
First pass of semantic analysis for init-captures: check the initializer, build a FieldDecl from it, and propagate both into the closure type and the LambdaExpr. You can't do much useful with them yet -- you can't use them within the body of the lambda, because we don't have a representation for "the this of the lambda, not the this of the enclosing context". We also don't have support or a representation for a nested capture of an init-capture yet, which was intended to work despite not being allowed by the current standard wording. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181985 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaLambda.cpp
emaStmt.cpp
emaTemplateVariadic.cpp
reeTransform.h
|
62ab010d5acb3752475bf0caf918406c470f7063 |
16-May-2013 |
Richard Trieu <rtrieu@google.com> |
Check a pointer is not null before attempting to use it. This prevents a crash on an explicit specialization of a member function in a class scope. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181971 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
ee2f8f2f7c4eacfa305a29fcd916d63c650ca847 |
16-May-2013 |
Richard Trieu <rtrieu@google.com> |
Return QualType() when a too large array is attempting to be created. This prevents further errors and some overflows in size calculations. One overflow was previously triggering an assert. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181970 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
a1bfe1ceeb633fe955bcaf218a101106ad97fc74 |
16-May-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
Objective-C: More cases of -Wsign-conversion not working on new Objective-C array subscripting syntax. // rdar://13855682 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181940 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
6f2a9fa0f787d3023b643496e8c321bdb7a85fa0 |
15-May-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
Objective-C: patch to issue the conversion warning when property-dot syntax is used with -Wsign-conversion. // rdar://13855394 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181914 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
14040142a3b3c1029092bc1f7c51e347c3fa8f89 |
15-May-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
improve of note message and minor refactoring of my last patch (r181847). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181896 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
0ff5074f37a66bca244a9d5d0da050ff68693ce2 |
15-May-2013 |
Hans Wennborg <hans@hanshq.net> |
Better diagnostics for string initialization. This commit improves Clang's diagnostics for string initialization. Where it would previously say: /tmp/a.c:3:9: error: array initializer must be an initializer list wchar_t s[] = "Hi"; ^ /tmp/a.c:4:6: error: array initializer must be an initializer list or string literal char t[] = L"Hi"; ^ It will now say /tmp/a.c:3:9: error: initializing wide char array with non-wide string literal wchar_t s[] = "Hi"; ^ /tmp/a.c:4:6: error: initializing char array with wide string literal char t[] = L"Hi"; ^ As a bonus, it also fixes the fact that Clang would previously reject this valid C11 code: char16_t s[] = u"hi"; char32_t t[] = U"hi"; because it would only recognize the built-in types for char16_t and char32_t, which do not exist in C. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181880 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
7247c88d1e41514a41085f83ebf03dd5220e054a |
15-May-2013 |
David Blaikie <dblaikie@gmail.com> |
Use only explicit bool conversion operator The most common (non-buggy) case are where such objects are used as return expressions in bool-returning functions or as boolean function arguments. In those cases I've used (& added if necessary) a named function to provide the equivalent (or sometimes negative, depending on convenient wording) test. DiagnosticBuilder kept its implicit conversion operator owing to the prevalent use of it in return statements. One bug was found in ExprConstant.cpp involving a comparison of two PointerUnions (PointerUnion did not previously have an operator==, so instead both operands were converted to bool & then compared). A test is included in test/SemaCXX/constant-expression-cxx1y.cpp for the fix (adding operator== to PointerUnion in LLVM). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181869 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
|
9f00b1d3962147a2fe049b8b45f70680bc12fbc1 |
15-May-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
Objective-C [diagnostics] [QOI], when method is not found for a receiver, note where receiver class is declaraed (this is most common when receiver is a forward class). // rdar://3258331 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181847 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
86a87308f11e7ee7c71ff608aec0cde11aa7df58 |
15-May-2013 |
Douglas Gregor <dgregor@apple.com> |
Don't mark a type specifier as "owned" if there is no declaration to own. This simplifies error recovery elsewhere, eliminating the crash in <rdar://problem/13853540>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181846 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
|
17828ca5857d5d9cadfffd339f888de58182c8f1 |
14-May-2013 |
David Blaikie <dblaikie@gmail.com> |
Provide operator<< for stream output of DeclarationNames ASTDumper was already trying to do this & instead got an implicit bool conversion by surprise (thus printing out 0 or 1 instead of the name of the declaration). To avoid that issue & simplify call sites, simply make it the normal/expected operator<<(raw_ostream&, ...) overload & simplify all the existing call sites. (bonus: this function doesn't need to be a member or friend, it's just using public API in DeclarationName) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181832 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
fbff0c4510c7f0e0f30a005960e434b973f5bd21 |
13-May-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
Objective-C error recovery. This patch makes a quick recovery form duplicate method definition error thus preventing doc parsing to loop trying to find comment for the invalid redefinition in a previous declaration. // rdar://13836387 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181710 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
6af701f29be43e49a25ab098c79940ae4cbb69c7 |
13-May-2013 |
Alexey Bataev <a.bataev@hotmail.com> |
OpenMP threadprivate with qualified names. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181683 91177308-0d34-0410-b5e6-96231b3b80d8
emaOpenMP.cpp
emaTemplateInstantiateDecl.cpp
|
181e3ecc0907ae0103586a9f4db52241995a8267 |
13-May-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Cleanup handling of UniqueExternalLinkage. This patch renames getLinkage to getLinkageInternal. Only code that needs to handle UniqueExternalLinkage specially should call this. Linkage, as defined in the c++ standard, is provided by getFormalLinkage. It maps UniqueExternalLinkage to ExternalLinkage. Most places in the compiler actually want isExternallyVisible, which handles UniqueExternalLinkage as internal. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181677 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaTemplate.cpp
|
f45c2992a3aac7591310cd824b7c7319afd432fc |
12-May-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
C++1y: provide full 'auto' return type deduction for lambda expressions. This completes the implementation of N3638. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181669 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
9cbcab88d441761b5c5d7811c4d0c205250991bf |
10-May-2013 |
Enea Zaffanella <zaffanella@cs.unipr.it> |
Avoid patching storage class for block scope thread_local variables. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181627 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
42860f1133f1ea37cc7a8a590436f169bdfc8755 |
10-May-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR15966: don't get confused by a complex integer -> complex integer conversion and misclassify it as a complex-real conversion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181626 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
daaa468cdd8be3bc4f5861c34d0686d3d7a373fa |
10-May-2013 |
Dmitri Gribenko <gribozavr@gmail.com> |
ArrayRef'ize Sema::FindAllocationFunctions Patch by Robert Wilhelm. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181594 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
8061322dabc3adc58ad20832170942eb72f009e6 |
10-May-2013 |
Dmitri Gribenko <gribozavr@gmail.com> |
ArrayRef'ize GenericSelectionExpr git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181592 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
reeTransform.h
|
15f92bad58c8650b1306729744b1a1230197497a |
10-May-2013 |
Hans Wennborg <hans@hanshq.net> |
Add support for __wchar_t in -fms-extensions mode. MSVC provides __wchar_t. This is the same as the built-in wchar_t type from C++, but it is also available with -fno-wchar and in C. The commit changes ASTContext to have two different types for this: - WCharTy is the built-in type used for wchar_t in C++ and __wchar_t. - WideCharTy is the type of a wide character literal. In C++ this is the same as WCharTy, and in C it is an integer type compatible with the type in <stddef.h>. This fixes PR15815. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181587 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExpr.cpp
emaExprObjC.cpp
emaInit.cpp
emaTemplateInstantiate.cpp
|
25d8c856681120581315edcdb48257c99af6b45c |
10-May-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
C++1y auto return type: when a function contains no 'return' statements at all, substitute 'void' into the return type rather than replacing it with 'void', so that we maintain the 'auto' type sugar. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181584 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaStmt.cpp
|
96c2473661be846174ffeb429fc567f6554952df |
10-May-2013 |
Dmitri Gribenko <gribozavr@gmail.com> |
Remove redundant variable git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181574 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
416c9b318e0100729a803e747736e7c968be69c9 |
10-May-2013 |
Dmitri Gribenko <gribozavr@gmail.com> |
ArrayRef'ize Sema::CheckMessageArgumentTypes git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181571 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
a7b7d0e4bb13a7ca5da4869197f43e923dadbb38 |
10-May-2013 |
Dmitri Gribenko <gribozavr@gmail.com> |
ArrayRef'ize Sema::FindAllocationOverload Now tests should pass. The previous error was caused by a misplaced backing array for MutableArrayRef that I introduced. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181570 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
ed09bfcf04b7470b1c6fca54477f6d3bfcfb3b64 |
10-May-2013 |
Dmitri Gribenko <gribozavr@gmail.com> |
Revert my r181563, breaks tests on buildbots git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181568 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
a36bbac10f7b74ef198ec2fb0eb52dbd8a50e7f0 |
10-May-2013 |
Dmitri Gribenko <gribozavr@gmail.com> |
ArrayRef'ize Sema::ActOnMemInitializer git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181565 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
8e6b7093c840ddd4054523333b5a0d3262c3c2c2 |
10-May-2013 |
Dmitri Gribenko <gribozavr@gmail.com> |
ArrayRef'ize Sema::FindAllocationOverload git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181563 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
7297a2ecbf97db3153088660e15be1eb296d4659 |
10-May-2013 |
Dmitri Gribenko <gribozavr@gmail.com> |
ArrayRef'ize Sema::BuildCallToObjectOfClassType git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181562 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaOverload.cpp
|
0a664b863255065d960342dd074a77d63c753d35 |
09-May-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
C++1y n3648: parse and reject init-captures for now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181553 91177308-0d34-0410-b5e6-96231b3b80d8
emaLambda.cpp
|
9e00f12a2558bc4af77bc2e4171572052ea7d9a2 |
09-May-2013 |
Dmitri Gribenko <gribozavr@gmail.com> |
ArrayRef'ize some SemaOverload methods Patch by Robert Wilhelm. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181544 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaOverload.cpp
|
524387ae3dfc0c4cf2b095f83f9e47aa549b7e55 |
09-May-2013 |
Ben Langmuir <ben.langmuir@intel.com> |
CodeGen for CapturedStmts EmitCapturedStmt creates a captured struct containing all of the captured variables, and then emits a call to the outlined function. This is similar in principle to EmitBlockLiteral. GenerateCapturedFunction actually produces the outlined function. It is based on GenerateBlockFunction, but is much simpler. The function type is determined by the parameters that are in the CapturedDecl. Some changes have been added to this patch that were reviewed as part of the serialization patch and moving the parameters to the captured decl. Differential Revision: http://llvm-reviews.chandlerc.com/D640 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181536 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
3190ca922d3743137e15fe0c525c04b177b9983b |
08-May-2013 |
Reid Kleckner <reid@kleckner.net> |
Forward #pragma comment(lib/linker) through as flags metadata Summary: Most of this change is wiring the pragma all the way through from the lexer, parser, and sema to codegen. I considered adding a Decl AST node for this, but it seemed too heavyweight. Mach-O already uses a metadata flag called "Linker Options" to do this kind of auto-linking. This change follows that pattern. LLVM knows how to forward the "Linker Options" metadata into the COFF .drectve section where these flags belong. ELF support is not implemented, but possible. This is related to auto-linking, which is http://llvm.org/PR13016. CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D723 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181426 91177308-0d34-0410-b5e6-96231b3b80d8
emaAttr.cpp
|
70133b5b4ad863f7d73fabfaf799b2f4e30d98ec |
08-May-2013 |
John McCall <rjmccall@apple.com> |
In block enum-return inference, don't die on loads of enum lvalues. More of rdar://13200889. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181390 91177308-0d34-0410-b5e6-96231b3b80d8
emaLambda.cpp
|
d9de51f83d606ceab521e2cc17afc62e011c7cd8 |
08-May-2013 |
Nick Lewycky <nicholas@mxc.ca> |
When typo correction produces an overloaded result when looking up a member, return all the overloads instead of just picking the first possible declaration. This removes an invalid note (and on occasion other invalid diagnostics) and also makes clang's parsing recovery behave as if the text from its fixit were applied. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181370 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprMember.cpp
|
99e9fe08bbba3d71db41cfd7585b9658ee85ef55 |
07-May-2013 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Try to recognise hidden tag type names in potential declarations, in ObjC code as well. rdar://13829073 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181345 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
5068b6f6bd166c50d045bf33901759a2417fdee4 |
07-May-2013 |
Serge Pavlov <sepavloff@gmail.com> |
Test commit git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181332 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
a8942d7686dde6d221a176c502ce857bdc409dab |
07-May-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
C++1y: an assignment operator is implicitly 'constexpr' if it would only call 'constexpr' assignment operators for a literal class type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181284 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
b491e684395ee19123abdd73b75776fea966d8cf |
03-May-2013 |
Stephen Hines <srhines@google.com> |
Update Clang for merge to r180944. Change-Id: Ic42c9b2576c8da6a73092734c392ef5b3cf949c1
ndroid.mk
|
993f43f24d7a45a5cd4678a3316b0852261fc5d4 |
06-May-2013 |
John McCall <rjmccall@apple.com> |
Grab-bag of bit-field fixes: - References to ObjC bit-field ivars are bit-field lvalues; fixes rdar://13794269, which got me started down this. - Introduce Expr::refersToBitField, switch a couple users to it where semantically important, and comment the difference between this and the existing API. - Discourage Expr::getBitField by making it a bit longer and less general-sounding. - Lock down on const_casts of bit-field gl-values until we hear back from the committee as to whether they're allowed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181252 91177308-0d34-0410-b5e6-96231b3b80d8
emaCast.cpp
emaChecking.cpp
emaExpr.cpp
emaInit.cpp
emaOverload.cpp
|
009735db957ac4bcca8f5ad1a5c01354b1b57fbd |
06-May-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Add missing initialization for Sema::CurScope. This is important for AST consumers which don't create a Parser. Pointed out by Tom Honermann. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181251 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
2624b8157660902303bfce5551cfdd38272d01e5 |
06-May-2013 |
Jordan Rose <jordan_rose@apple.com> |
Fix representation of compound literals for C++ objects with destructors. Previously, this compound literal expression (a GNU extension in C++): (AggregateWithDtor){1, 2} resulted in this AST: `-CXXBindTemporaryExpr [...] 'struct Point' (CXXTemporary [...]) `-CompoundLiteralExpr [...] 'struct AggregateWithDtor' `-CXXBindTemporaryExpr [...] 'struct AggregateWithDtor' (CXXTemporary [...]) `-InitListExpr [...] 'struct AggregateWithDtor' |-IntegerLiteral [...] 'int' 1 `-IntegerLiteral [...] 'int' 2 Note the two CXXBindTemporaryExprs. The InitListExpr is really part of the CompoundLiteralExpr, not an object in its own right. By introducing a new entity initialization kind in Sema specifically for compound literals, we avoid the treatment of the inner InitListExpr as a temporary. `-CXXBindTemporaryExpr [...] 'struct Point' (CXXTemporary [...]) `-CompoundLiteralExpr [...] 'struct AggregateWithDtor' `-InitListExpr [...] 'struct AggregateWithDtor' |-IntegerLiteral [...] 'int' 1 `-IntegerLiteral [...] 'int' 2 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181212 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaInit.cpp
|
10f6f065456a2cfb6c2ab5dfedefb930e5e52e9d |
06-May-2013 |
John McCall <rjmccall@apple.com> |
Require the containing type to be complete when we see __alignof__ of a field. This problem can only happen in C++11. Also do some petty optimizations. rdar://13784901 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181185 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
27f9cf3a5a92f70f043b6cfbc5f3f2ac3a38f182 |
06-May-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix assert if __extension__ or _Generic is used when initializing a char array from a string literal. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181174 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
62ed889272d7e9da8e367d8682fdcdeeec0d83b5 |
05-May-2013 |
Dmitri Gribenko <gribozavr@gmail.com> |
Replace 'MultiExprArg()' with 'None' git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181166 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
emaPseudoObject.cpp
reeTransform.h
|
d8ffd0b7b61566f15a67192883a607f7703bcece |
05-May-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Make all 'is in extern "C"' tests use the lexical context. I was not able to find a case (other than the fix in r181163) where this makes a difference, but it is a more obviously correct API to have. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181165 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
287f24d3991994b9a263af9e2a873f4feadfb8fa |
05-May-2013 |
Dmitri Gribenko <gribozavr@gmail.com> |
ArrayRef'ize Sema::CheckObjCMethodCall Patch by Robert Wilhelm. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181164 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExprObjC.cpp
|
b98cf79a3add5c80b40a956a4cd3d9b3a23b9b22 |
05-May-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Use lexical contexts when checking for conflicting language linkages. This fixes pr14958. I will audit other calls to isExternCContext to see if there are any similar bugs left. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181163 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
30ae1ed71dc99a396b7ddba9cabe9846a0c4449d |
05-May-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Handle parens properly when initializing a char array from a string literal. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181159 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
958ba64dabe674660130d914abfd13ffeca4151d |
05-May-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
ArrayRef'ization of some methods in SemaOverload. Patch by Robert Wilhelm! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181158 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaOverload.cpp
|
5543169296beeb183b9c9392debc774fcf493eeb |
05-May-2013 |
Dmitri Gribenko <gribozavr@gmail.com> |
Replace ArrayRef<T>() with None, now that we have an implicit ArrayRef constructor from None Patch by Robert Wilhelm. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181139 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprObjC.cpp
emaInit.cpp
emaLambda.cpp
emaLookup.cpp
emaObjCProperty.cpp
emaOverload.cpp
emaPseudoObject.cpp
|
dc17384581e37436582a007be4d9185bcf7003ec |
04-May-2013 |
Enea Zaffanella <zaffanella@cs.unipr.it> |
In VarDecl nodes, store the thread storage class specifier as written. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181113 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplateInstantiateDecl.cpp
|
60e141e1f87211ca831de6821003d80fe20a06f3 |
04-May-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Implement most of N3638 (return type deduction for normal functions). Missing (somewhat ironically) is support for the new deduction rules in lambda functions, plus PCH support for return type patching. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181108 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
emaOverload.cpp
emaStmt.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
|
82f145d4ed86d19cb2a1680cda53fdc39bb38eb6 |
04-May-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Don't build a call expression referring to a function which we're not allowed to use. This makes very little difference right now (other than suppressing follow-on errors in some cases), but will matter more once we support deduced return types (we don't want expressions with undeduced return types in the AST). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181107 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
|
ffd015e316fff53f23e9ffd4907b88b8706e4183 |
04-May-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Say 'decltype(auto)' not 'auto' as appropriate in mismatched-deduction diagnostic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181103 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
9fd6b8f5a73788f288edd01fa99d434d1e6588ad |
04-May-2013 |
Wei Pan <wei.pan@intel.com> |
Implement template support for CapturedStmt - Sema tests added and CodeGen tests are pending Differential Revision: http://llvm-reviews.chandlerc.com/D728 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181101 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
reeTransform.h
|
df6217ec356f1e8f440ea7222be3603c011a295d |
04-May-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Simplify slightly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181092 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
14f78f4a11df4c06667e2cbb87eeb179e4cb46fe |
04-May-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Separate out and special-case the diagnostic for 'auto' in a conversion-type-id, in preparation for this becoming valid in c++1y mode. No functionality change; small diagnostic improvement. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181089 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
c95d413660756c474bc8f97e5b32edc7ddff3850 |
04-May-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
ArrayRef'ize MultiLevelTemplateArgumentList::ArgList. Patch by Faisal Vali! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181077 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaTemplateInstantiateDecl.cpp
|
d99990df0b4aca43a0315b2928ff1b8baf704052 |
04-May-2013 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Revert r177218. Per discussion in cfe-commits, asserting may be a better way than introducing a special test flag. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181073 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
55c7d02e6c76cdf1dfc67bd9cbeb5d3b69eec353 |
03-May-2013 |
Wei Pan <wei.pan@intel.com> |
Test commit git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181057 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
83eba02c2ea333015335e2f74c4d11c5315b655d |
03-May-2013 |
Stephen Hines <srhines@google.com> |
Merge remote-tracking branch 'upstream/master' into merge-20130502
|
0f2fc5ff49cb9abd6c6972ffd6db066295672867 |
03-May-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR15906: The body of a lambda is not an evaluated subexpression; don't visit it when visiting such subexpressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181046 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
8c045ace381972f41d385b0a661ccf172834f459 |
03-May-2013 |
Ben Langmuir <ben.langmuir@intel.com> |
Move CapturedStmt parameters to CapturedDecl Move the creation of CapturedStmt parameters out of CodeGen and into Sema, making it easier to customize the outlined function. The ImplicitParamDecls are stored in the CapturedDecl using an ASTContext-allocated array. Differential Revision: http://llvm-reviews.chandlerc.com/D722 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181043 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaStmt.cpp
|
634c5634817b9ad384a706fe87ab302985566bba |
03-May-2013 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Keep track of an @implementation's super class name location, if one was provided. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181039 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
1f78a50f8aee58f8e07f6307f4b8d0b1742e9a2b |
03-May-2013 |
Dmitri Gribenko <gribozavr@gmail.com> |
ArrayRef'ize InitializationSequence constructor and InitializationSequence::Diagnose() Patch by Robert Wilhelm. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181022 91177308-0d34-0410-b5e6-96231b3b80d8
emaCast.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaInit.cpp
emaStmt.cpp
|
8eead16398c003dc2a8be22f44e8c2d92af80479 |
03-May-2013 |
Dmitri Gribenko <gribozavr@gmail.com> |
Add const qualifier to Sema::getTypeName's parameter `II` Patch by Ismail Pazarbasi. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181011 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f5ebf9bf1df10ac15ba32a4b24dfe171b7848c58 |
03-May-2013 |
John McCall <rjmccall@apple.com> |
Correctly emit certain implicit references to 'self' even within a lambda. Bug #1 is that CGF's CurFuncDecl was "stuck" at lambda invocation functions. Fix that by generally improving getNonClosureContext to look through lambdas and captured statements but only report code contexts, which is generally what's wanted. Audit uses of CurFuncDecl and getNonClosureAncestor for correctness. Bug #2 is that lambdas weren't specially mapping 'self' when inside an ObjC method. Fix that by removing the requirement for that and using the normal EmitDeclRefLValue path in LoadObjCSelf. rdar://13800041 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181000 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
aeeacf725c9e0ddd64ea9764bd008e5b6873ce51 |
03-May-2013 |
John McCall <rjmccall@apple.com> |
Move parsing of identifiers in MS-style inline assembly into the actual parser and support arbitrary id-expressions. We're actually basically set up to do arbitrary expressions here if we wanted to. Assembly operands permit things like A::x to be written regardless of language mode, which forces us to embellish the evaluation context logic somewhat. The logic here under template instantiation is incorrect; we need to preserve the fact that an expression was unevaluated. Of course, template instantiation in general is fishy here because we have no way of delaying semantic analysis in the MC parser. It's all just fishy. I've also fixed the serialization of MS asm statements. This commit depends on an LLVM commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180976 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprMember.cpp
emaLambda.cpp
emaStmt.cpp
emaStmtAsm.cpp
reeTransform.h
|
92eb7d847cb1273a63d5e3b7dc98a7c97a81b703 |
03-May-2013 |
Douglas Gregor <dgregor@apple.com> |
Use attribute argument information to determine when to parse attribute arguments as expressions. This change partly addresses a heinous problem we have with the parsing of attribute arguments that are a lone identifier. Previously, we would end up parsing the 'align' attribute of this as an expression "(Align)": template<unsigned Size, unsigned Align> class my_aligned_storage { __attribute__((align((Align)))) char storage[Size]; }; while this would parse as a "parameter name" 'Align': template<unsigned Size, unsigned Align> class my_aligned_storage { __attribute__((align(Align))) char storage[Size]; }; The code that handles the alignment attribute would completely ignore the parameter name, so the while the first of these would do what's expected, the second would silently be equivalent to template<unsigned Size, unsigned Align> class my_aligned_storage { __attribute__((align)) char storage[Size]; }; i.e., use the maximal alignment rather than the specified alignment. Address this by sniffing the "Args" provided in the TableGen description of attributes. If the first argument is "obviously" something that should be treated as an expression (rather than an identifier to be matched later), parse it as an expression. Fixes <rdar://problem/13700933>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180973 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
fa5f03052bc39d9c8f2fa8b4002597a8219760a4 |
03-May-2013 |
Douglas Gregor <dgregor@apple.com> |
Revert r180970; it's causing breakage. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180972 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
3796d1539a39b999fd50bed7aea726ef6f845e17 |
03-May-2013 |
Douglas Gregor <dgregor@apple.com> |
Use attribute argument information to determine when to parse attribute arguments as expressions. This change partly addresses a heinous problem we have with the parsing of attribute arguments that are a lone identifier. Previously, we would end up parsing the 'align' attribute of this as an expression "(Align)": template<unsigned Size, unsigned Align> class my_aligned_storage { __attribute__((align((Align)))) char storage[Size]; }; while this would parse as a "parameter name" 'Align': template<unsigned Size, unsigned Align> class my_aligned_storage { __attribute__((align(Align))) char storage[Size]; }; The code that handles the alignment attribute would completely ignore the parameter name, so the while the first of these would do what's expected, the second would silently be equivalent to template<unsigned Size, unsigned Align> class my_aligned_storage { __attribute__((align)) char storage[Size]; }; i.e., use the maximal alignment rather than the specified alignment. Address this by sniffing the "Args" provided in the TableGen description of attributes. If the first argument is "obviously" something that should be treated as an expression (rather than an identifier to be matched later), parse it as an expression. Fixes <rdar://problem/13700933>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180970 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
39b60dc786950e553f5e12fa0e692a33f650a568 |
02-May-2013 |
Douglas Gregor <dgregor@apple.com> |
Fix crasher when the range in a C++ range-for loop has an ill-formed initializer. Fixes <rdar://problem/13712739>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180937 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
a07a6c3e756d0a6a5baa2cad9d165f79f0fb1b42 |
01-May-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR15884: In the 'taking the address of a temporary' extension, materialize the temporary to an lvalue before taking its address. This removes a weird special case from the AST representation, and allows the constant expression evaluator to deal with it without (broken) hacks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180866 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
f4d02398936c0fdc9fe981348519fbc323f24ad0 |
01-May-2013 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Point diagnostics that complain about a use of a selector in an objc message, to the selector location. Previously it would point to the left bracket or the receiver, which can be particularly problematic if the receiver is a block literal and we end up point the diagnostic far away for the selector that is complaining about. rdar://13620447 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180833 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
58eb37036b47bbe7433f72d92a2cb60848507707 |
01-May-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix PR15845: apparently MSVC does not support implicit int in C++ mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180822 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
emaType.cpp
|
9b1317531d376738fd6631291b0a04109c76a63b |
30-Apr-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
When deducing an 'auto' type, don't modify the type-as-written. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180808 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExprCXX.cpp
emaStmt.cpp
emaTemplateDeduction.cpp
|
dc7a4f5d7a7e3b60d4dc4a80338d7a2728540998 |
30-Apr-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Don't treat a non-deduced 'auto' type as being type-dependent. Instead, there are now two distinct canonical 'AutoType's: one is the undeduced 'auto' placeholder type, and the other is a deduced-but-dependent type. All deduced-to-a-non-dependent-type cases are still non-canonical. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180789 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExprCXX.cpp
emaLookup.cpp
emaStmt.cpp
emaTemplateDeduction.cpp
emaType.cpp
reeTransform.h
|
676ea9dce44ed2d1dc3d7f431824045764d8a3e9 |
30-Apr-2013 |
Daniel Jasper <djasper@google.com> |
Fix very confusing indent in Sema.cpp. This came up during my Euro LLVM 2013 talk on clang-format and I was asked to submit it :-). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180772 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
443adec6b06878be2180bf389ec88a68e9b5997c |
30-Apr-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
Objective-C (mostly arc): Under ARC, we often have unneeded qualifiers in the diagnostics. Remove them when reporting incompatible Objective-C pointer types. // rdar://13752880. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180765 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
d237d2e6b85a74f31c986dc585fa6c39733b74a2 |
30-Apr-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
c language: diagnose use of "[*]" on any array dimension in the parameter of a function definition. Currently, it crashes in irgen if it is on other than the 1st dimension. // rdar://13705391 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180732 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
548107ee5241037b4533d86afbe0cf38ddf6b5d9 |
29-Apr-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Use ArrayRef in AddMethodCandidate. Patch by Robert Wilhelm! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180724 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
3a2f91280a49f4747063f983dc6a3296bd9359d2 |
29-Apr-2013 |
Ben Langmuir <ben.langmuir@intel.com> |
Small CapturedStmt improvements Add a CapturedStmt.h similar to Lambda.h to reduce the typing required to get to the CapturedRegionKind enum. This also allows codegen to access this enum without including Sema/ScopeInfo.h. Also removes some duplicated code for capturing 'this' between CapturedStmt and Lambda. Differential Revision: http://llvm-reviews.chandlerc.com/D712 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180710 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaExprCXX.cpp
emaStmt.cpp
|
a0152d4e8a602c71ca403172ba0fd025a0b353ca |
29-Apr-2013 |
Ben Langmuir <ben.langmuir@intel.com> |
Test commit git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180709 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
cad7e43c5aba88bf6affc155b02d8609485db41b |
29-Apr-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Implement DR580: access checks for template parameters of a class template are performed within the context of that class template. Patch by Ismail Pazarbasi! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180707 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
97aea95f46f27ff0927faa72baa7fe2b0bce1d2d |
29-Apr-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix an assertion failure / accepts-invalid in -fms-extensions mode. Don't build a dependent-scope id expression when a templated member function of a non-templated class references an unknown identifier, since instantiation won't rebuild it (and we can tell at parse time that it'll never work). Based on a patch by Faisal Vali! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180701 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
9ff2b421f352fe0a0769c0a2a75af922c147b878 |
27-Apr-2013 |
Dmitri Gribenko <gribozavr@gmail.com> |
ArrayRef'ize Sema::ActOnEnumBody. No functionality change. Patch by Robert Wilhelm. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180682 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplateInstantiateDecl.cpp
|
c6a31777fe03c73aca654c7c54224e36e75398dd |
27-Apr-2013 |
Benjamin Kramer <benny.kra@googlemail.com> |
Silence a silly sign compare warning from GCC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180673 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
|
ab3d509bc45218c278454962ff644bb13d18ce1a |
27-Apr-2013 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Fix an assertion hit in Sema::CheckObjCMethodOverrides. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180651 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
a2c3646c35dd09d21b74826240aa916545b1873f |
26-Apr-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Implement C++1y decltype(auto). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180610 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
emaDecl.cpp
emaExprCXX.cpp
emaTemplateDeduction.cpp
emaTemplateVariadic.cpp
emaType.cpp
reeTransform.h
|
bebf5b1bcfbf591dd3cd80c4aebd6486bb34f41c |
26-Apr-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
C++1y: support simple variable assignments in constexpr functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180603 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaInit.cpp
|
e5e575ded9cd4b80229fb299a2d97e9d44728eda |
26-Apr-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Add r180263 back, but fix hasBraces() to be correct during parsing. Original commit message: Fix a case in linkage computation that should check for single line extern "C". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180591 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
f3f0f357f8d6b4511b6d605cc8a39ae3787fef6d |
25-Apr-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
Objective-C: This is a small modification to my patch -n r180198. When reporting on missing property accessor implementation in categories, do not report when they are declared in primary class, class's protocol, or one of it super classes or in of the other categories. // rdar://13713098 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180580 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
11dc6347bb01b766cf4f357d707ff789cba9114b |
25-Apr-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Put friend decls in the correct context. When we find a friend declaration we have to skip transparent contexts for doing lookups, but we should not skip them when inserting the new decl if the lookup found nothing. Fixes PR15841. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180571 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
65dfa2b31794ff4013cb3f9a8178305b56a3d549 |
25-Apr-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Don't mark 'extern "C" void f(void)' as having extern storage class. Instead, we check for one line extern "C" context in linkage computation and when deciding if a variable is a definition. This hopefully completes the transition to having "as written" semantics for hasExternalStorage. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180258 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
80abce3d1597edaf427f65ce15d8433f3f13315d |
24-Apr-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
Objective-C arc: Improve disgnostics when 'weak' property cannot be synthesized because its backing ivar does not support weak references. // rdar://13676793 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180211 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
c775b1a0702621e297d00452a897381c8bf10f3f |
24-Apr-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
Objective-C: When reporting on missing property accessor implementation in categories, do not report when they are declared in primary class, class's protocol, or one of it super classes. This is because, its class is going to implement them. // rdar://13713098 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180198 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
emaObjCProperty.cpp
|
2fb5d1297e874d8f6d86a3586c7d25dcfb104f69 |
23-Apr-2013 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
When modifying an implicit instantiation with information from an explicit one, make sure to reset the "right brace" location. Otherwise the source range of the explicit instantiation may become invalid (begin location will be after the end location). rdar://13706991 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180070 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
3aaf41aea00507c019d1e3d016c0334ceb49dd61 |
23-Apr-2013 |
Ted Kremenek <kremenek@apple.com> |
Add a warning for Objective-C pointer introspection, which is solely the job of the Objective-C runtime. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180062 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
734479a1638ee2573f74bfd8e1f82731e8efa683 |
23-Apr-2013 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Set the OpDecl to the InlineAsmIdentifierInfo struct. Part of rdar://13663589 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180055 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
1e7ca6211c77208c8a339c2a26e612be81c70ec5 |
22-Apr-2013 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Refactor/clean up the SemaLookup interface. No functional change indended. Part of rdar://13663589 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180027 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
a10b97898ee6339c3110e6ca33f178ff52f05238 |
22-Apr-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
C++1y constexpr extensions, round 1: Allow most forms of declaration and statement in constexpr functions. Everything which doesn't require variable mutation is also allowed as an extension in C++11. 'void' becomes a literal type to support constexpr functions which return 'void'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180022 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaType.cpp
|
840462670ba7a6bc26265a2306b35f2f0f01f51c |
21-Apr-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
The 'constexpr implies const' rule for non-static member functions is gone in C++1y, so stop adding the 'const' there. Provide a compatibility warning for code relying on this in C++11, with a fix-it hint. Update our lazily-written tests to add the const, except for those ones which were testing our implementation of this rule. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179969 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
39b0e269dc8895ecc0f92f08126d3082b2a837a8 |
21-Apr-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Disable VLA diagnostic in C++1y mode, and add some tests. Still to do here: - we have a collection of syntactic accepts-invalids to diagnose - support non-PODs in VLAs, including dynamic initialization / destruction - runtime checks (and throw std::bad_array_length) for bad bound - support VLA capture by reference in lambdas - properly support VLAs in range-based for (don't recompute bound) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179962 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
emaType.cpp
|
c3bf52ced9652f555aa0767bb822ec4c64546212 |
21-Apr-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
C++1y: Allow aggregates to have default initializers. Add a CXXDefaultInitExpr, analogous to CXXDefaultArgExpr, and use it both in CXXCtorInitializers and in InitListExprs to represent a default initializer. There's an additional complication here: because the default initializer can refer to the initialized object via its 'this' pointer, we need to make sure that 'this' points to the right thing within the evaluation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179958 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExceptionSpec.cpp
emaInit.cpp
reeTransform.h
|
e410be9f3f08684c04a611f2ab57257c2d2eb0ae |
20-Apr-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Implement core issue 1608: class members can be found via operator lookup in a trailing return type in that class's body. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179941 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
87a9f2b2d7fb287ccd9ed5dfdbe75cc4ce906122 |
19-Apr-2013 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] The parsing of C++ identifiers is a task of the front-end parser, not the asm parser. As such, begin moving the parsing logic in that direction. This patch is just a temporary hack until the real frontend parser can be hooked up. Part of rdar://13663589 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179882 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
324645a2cc058a86bc12c6a63a74da2b2590c74f |
18-Apr-2013 |
Chad Rosier <mcrosier@apple.com> |
Specify that we're parsing ms-style inline assembly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179762 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
1a7df995d4a62cd579c390b2d0cfb34a61878434 |
18-Apr-2013 |
Richard Trieu <rtrieu@google.com> |
Switch the note order for -Woverloaded-shift-op-parentheses so that the note with the silence fix-it comes first. This is more consistent with the rest of the warnings in -Wparentheses. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179742 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
987c03085558277a5fe8cef8e1b628cabcc626dc |
17-Apr-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR15755: don't drop parameter packs when dropping parameters with default arguments in the formation of a candidate set of inheriting constructors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179708 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
82b0f86252c050b43f2e5d5425d6e37970aabd7c |
17-Apr-2013 |
Benjamin Kramer <benny.kra@googlemail.com> |
Sema: Remove unused variable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179701 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
7974c60375b2b9dfc20defc77c9ed8c3d6d241a1 |
17-Apr-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
DR974: Lambdas can have default arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179688 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
092140a434366007a611c0a1a73fb6a4e8ff7f5e |
17-Apr-2013 |
Douglas Gregor <dgregor@apple.com> |
Fix PR15291: noreturn adjustment in overload resolution for function templates, from Alexander Zinenko! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179680 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaTemplateDeduction.cpp
|
2a6e528cbd687e22744d5d7eba428afea99da300 |
17-Apr-2013 |
Richard Trieu <rtrieu@google.com> |
Add warning group -Woverloaded-shift-op-parentheses to -Wparentheses. This will fire on code such as: cout << x == 0; which the compiler will intrepret as (cout << x) == 0; This warning comes with two fixits attached to notes, one for parentheses to silence the warning, and another to evaluate the comparison first. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179662 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e7a77727804c12750cb39e8732e26f2a26e4ce0f |
17-Apr-2013 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Use the extra info in global method pool to speed up looking for ObjC overridden methods. When we are in a implementation, we check the global method pool whether there were category methods with the same selector. If there were none (common case) we don't need to do lookups for overridden methods again. Note that for an interface method (if we don't encounter its implementation), it is considered that it overrides methods that were declared before it, not for category methods introduced after it. This is tradeoff in favor of performance, since it is expensive to do lookups in case there was a category, and moving the global method pool to ASTContext (so we can check it) would increase complexity. rdar://13508196 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179654 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
2e3d8c0815acaf1bc5995ebe56cea07471e5c9c7 |
17-Apr-2013 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Enhance the ObjC global method pool to record whether there were 0, 1, or >= 2 methods (with a particular selector) inside categories. This is done by extending ObjCMethodList (which is only used by the global method pool) to have 2 extra bits of information. We will later take advantage of this info in global method pool for the overridden methods calculation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179652 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
emaDeclObjC.cpp
|
d314abeffba04dffc101e4e71cc3a32ddeed4ae6 |
17-Apr-2013 |
John McCall <rjmccall@apple.com> |
Don't put too much thought into whether or not to capture a type-dependent intermediate result in a postfix ++ pseudo- object operation. Test case by Tong Shen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179637 91177308-0d34-0410-b5e6-96231b3b80d8
emaPseudoObject.cpp
|
6afcf8875d4e447645cd7bf3733dd8e2eb8455dc |
16-Apr-2013 |
Tareq A. Siraj <tareq.a.sriaj@intel.com> |
Sema for Captured Statements Add CapturedDecl to be the DeclContext for CapturedStmt, and perform semantic analysis. Currently captures all variables by reference. TODO: templates Author: Ben Langmuir <ben.langmuir@intel.com> Differential Revision: http://llvm-reviews.chandlerc.com/D433 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179618 91177308-0d34-0410-b5e6-96231b3b80d8
copeInfo.cpp
ema.cpp
emaExpr.cpp
emaExprCXX.cpp
emaLambda.cpp
emaStmt.cpp
|
051303ce09291dfbed537fa33b0d8a4d92c82b75 |
16-Apr-2013 |
Tareq A. Siraj <tareq.a.sriaj@intel.com> |
Implement CapturedStmt AST CapturedStmt can be used to implement generic function outlining as described in http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-January/027540.html. CapturedStmt is not exposed to the C api. Serialization and template support are pending. Author: Wei Pan <wei.pan@intel.com> Differential Revision: http://llvm-reviews.chandlerc.com/D370 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179615 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
236d9d16c9b42001085611a82d37b9d5a4f39c1f |
16-Apr-2013 |
Douglas Gregor <dgregor@apple.com> |
Fix handling of atomic shift operations, from Serge Pavlov. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179600 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
6ca6752992103964706ca0983efbc2b9fcfe3307 |
16-Apr-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Suppress unused warning on static inline function template specializations. Patch by Halfdan Ingvarsson! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179598 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
76da55d3a49e1805f51b1ced7c5da5bcd7f759d8 |
16-Apr-2013 |
John McCall <rjmccall@apple.com> |
Basic support for Microsoft property declarations and references thereto. Patch by Tong Shen! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179585 91177308-0d34-0410-b5e6-96231b3b80d8
ttributeList.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaExceptionSpec.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprMember.cpp
emaInit.cpp
emaPseudoObject.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
459ef03126f9f0420efb3355e3b2ed3c1fdfb38a |
16-Apr-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Correctly propagate the storage class to function template instantiations. This fixes pr15753. This is another case of the fuzzy definition of the "as written" storage class of an instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179581 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
62165c93f529ba3b714c446e61c561abaee81599 |
15-Apr-2013 |
Joey Gouly <joey.gouly@arm.com> |
Remove some dead code that has not been used since 2010. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179558 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
90cc390c4955029dd56d125af5512e68efa0c2b2 |
15-Apr-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Remove hasExternalLinkageUncached. It was being used correctly, but it is a very dangerous API to have around. Instead, move the logic from the filtering to when we are deciding if we should link two decls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179523 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaOverload.cpp
|
72fdc8947e54be1a8dd36b03e24f112aba1241e1 |
15-Apr-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Fix the storage class of method instantiations. We keep the "as written" storage class, but that is a fuzzy concept for instantiations. With this patch instantiations of methods of class templates now get a storage class that is based on the semantics of isStatic(). With this can simplify isStatic() itself. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179521 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
df4cc0a0c75ff9d92ca501ecd40c5413b97506d6 |
15-Apr-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Local thread_local variables are implicitly 'static'. (This doesn't apply to _Thread_local nor __thread.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179517 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
b6b127f279f89d992e0713866f17fed267147a79 |
15-Apr-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Properly check for a constant initializer for a thread-local variable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179516 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
6a570f610c101054e79af2fcdb73a10f8e3f337d |
14-Apr-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Diagnose if a __thread or _Thread_local variable has a non-constant initializer or non-trivial destructor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179491 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
088831d0b9185b806ead7dc47865b0d1b1a1d164 |
14-Apr-2013 |
John McCall <rjmccall@apple.com> |
Handle incompatible redeclarations of library builtins better. Invalid redeclarations of valid explicit declarations shouldn't take the same path as redeclarations of implicit declarations, and invalid local extern declarations shouldn't foul things up for everybody else. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179482 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
38afbc7361d861968232defaeaf8e302af75b5ee |
13-Apr-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Annotate flavor of TLS variable (statically or dynamically initialized) onto the AST. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179447 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
emaOpenMP.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
927b0af2f0834bad37e3d2a1953804b0845d8711 |
13-Apr-2013 |
John McCall <rjmccall@apple.com> |
Don't replace an existing decl in the scope chains with its local-extern redeclaration; type refinements, default arguments, etc. must all be locally scoped. rdar://13535367 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179430 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
ec64244f5939fa81596fbeddad966cca4b4a4c51 |
13-Apr-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Parsing support for thread_local and _Thread_local. We give them the same semantics as __thread for now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179424 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
|
3bbffd549c76dfeb3c8d7c73860736a6523cde92 |
12-Apr-2013 |
Benjamin Kramer <benny.kra@googlemail.com> |
Sema: Give a typically small DenseMap some inline capacity. Also reflow code a bit, no change in functionality. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179382 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
93b64571e92c10bb168c2a2786c1380f334ba960 |
11-Apr-2013 |
John McCall <rjmccall@apple.com> |
Drop ObjCIndirectCopyRestoreExprs during template instantiation. It's a kind of implicit conversion, which we generally drop, but more importantly it's got very specific placement requirements. rdar://13617051 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179254 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
1fd1e288d0f45b86d191d8f53f569e5143f3a18a |
11-Apr-2013 |
Jordan Rose <jordan_rose@apple.com> |
Force a load when creating a reference to a temporary copied from a bitfield. For this source: const int &ref = someStruct.bitfield; We used to generate this AST: DeclStmt [...] `-VarDecl [...] ref 'const int &' `-MaterializeTemporaryExpr [...] 'const int' lvalue `-ImplicitCastExpr [...] 'const int' lvalue <NoOp> `-MemberExpr [...] 'int' lvalue bitfield .bitfield [...] `-DeclRefExpr [...] 'struct X' lvalue ParmVar [...] 'someStruct' 'struct X' Notice the lvalue inside the MaterializeTemporaryExpr, which is very confusing (and caused an assertion to fire in the analyzer - PR15694). We now generate this: DeclStmt [...] `-VarDecl [...] ref 'const int &' `-MaterializeTemporaryExpr [...] 'const int' lvalue `-ImplicitCastExpr [...] 'int' <LValueToRValue> `-MemberExpr [...] 'int' lvalue bitfield .bitfield [...] `-DeclRefExpr [...] 'struct X' lvalue ParmVar [...] 'someStruct' 'struct X' Which makes a lot more sense. This allows us to remove code in both CodeGen and AST that hacked around this special case. The commit also makes Clang accept this (legal) C++11 code: int &&ref = std::move(someStruct).bitfield PR15694 / <rdar://problem/13600396> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179250 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
6fd7d3067dd06584ef3940e88e31fea1a0e83588 |
10-Apr-2013 |
Dmitri Gribenko <gribozavr@gmail.com> |
Add an option to parse all comments as documentation comments Patch by Amin Shali. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179180 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
02be968a08184acd42aaefa6f9a7dc883a4d1937 |
10-Apr-2013 |
Ted Kremenek <kremenek@apple.com> |
Handle "typeof" in Objective-C format string checking. This previously crashed. Yes, this came from actual code. Fixes <rdar://problem/13557053>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179155 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
0b0ca4724d1c05dc0dd1d6e5aff4c8a439cbb1a2 |
10-Apr-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Add support for computing the exception specification for an inheriting constructor. This isn't quite perfect (as usual, we don't handle default arguments correctly yet, and we don't deal with copy/move constructors for arguments correctly either, but this will be fixed when we implement core issue 1351. This completes our support for inheriting constructors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179154 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
4841ca5f83bf970f910ac7d154cdd71d2a3cf481 |
10-Apr-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
C++11 inheriting constructors: support for inheriting constructor templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179151 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
|
7e0c22714e4750a2f730035957f9bb678ae681c0 |
10-Apr-2013 |
Douglas Gregor <dgregor@apple.com> |
<rdar://problem/13605348> Don't consider invalid user-defined literal operators during overload resolution. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179150 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
19b6a707a86302adc80d64464cbc3cb8a7a7f3a6 |
10-Apr-2013 |
Matt Beaumont-Gay <matthewbg@google.com> |
Suppress -Wunused-variable for variables declared in headers, which may in fact be defined and used in another TU. Reshuffle some test cases because we suppress -Wunused-variable after we've emitted an error. This fixes PR15558. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179138 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
3c9a0240b6db6ee02a24f48c753089bda48843ae |
09-Apr-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
Objective-C: This patch fixes a none-issuance of warning when result type of protocol property and getter method differ by fixing a more serious problem. When a forward protocol declaration comes between its definition and its use in class protocol list, the forward protocol ast was being used in building the protocol list. // rdar://12522752 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179108 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
045d2524e136fabd10613d7ac0063df632a7c2a5 |
09-Apr-2013 |
John McCall <rjmccall@apple.com> |
When checking for illegal expressions in a default-argument expression, look through pseudo-object expressions. rdar://13602832 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179080 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
34366208e3ec6876ef501e85978466d2ddecb3d2 |
09-Apr-2013 |
Douglas Gregor <dgregor@apple.com> |
Skip transparent contexts when looking for using directives in name lookup. Fixes the bootstrap regression I introduced in r179067. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179079 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
391ca9f2c9e9b93fe7196b56f20701cbb6dc0dd7 |
09-Apr-2013 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Mark as referenced the functions from instantiated UserDefinedLiterals. Fixes rdar://13589856 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179078 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
484f6fa0bd6b16b64e5c4cb40260f69a3dd52b4a |
09-Apr-2013 |
Douglas Gregor <dgregor@apple.com> |
<rdar://problem/13584715> Converted constant expressions are expected to have integral values. We were assuming that any expression used as a converted constant expression would either not have a folded constant value or would be an integer, which is not the case for some ill-formed constant expressions. Because converted constant expressions are only used where integral values are expected, we can simply treat this as an error path. If that ever changes, we'll need to widen the interface of Sema::CheckConvertedConstantExpression() anyway. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179068 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
44b2ea97957b553e76e757c1926c3ad1fadbe1b2 |
09-Apr-2013 |
Douglas Gregor <dgregor@apple.com> |
<rdar://problem/13540899> Collect using directives from all of the semantic contexts not represented by scopes. This fixes a regression I introduced in r178136, where we would not consider the using directives from the semantic declaration contexts that aren't represented by the lexical scopes (Scope) when performing unqualified name lookup. This lead to horribly funny diagnostics like "no identifier named 'foo'; did you mean 'foo'?". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179067 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
0db9d2066318f3721a45954e23b26ac8ef0723bb |
08-Apr-2013 |
Nick Lewycky <nicholas@mxc.ca> |
Fix typo in assertion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179061 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
eef35f8b9a935d14c2070dd83aa12ae04c701514 |
08-Apr-2013 |
Richard Trieu <rtrieu@google.com> |
Fix PR15634, better error message for template deduction failure. When two template decls with the same name are used in this diagnostic, force them to print their qualified names. This changes the bad message of: candidate template ignored: could not match 'array' against 'array' to the better message of: candidate template ignored: could not match 'NS2::array' against 'NS1::array' git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179056 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
12849d0ed2e88f8c6420944538b9c9d1985df14a |
08-Apr-2013 |
Douglas Gregor <dgregor@apple.com> |
<rdar://problem/13540921> Fix a crasher when an Objective-C for-in loop gets a non-variable iteration declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179053 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
5696884053b4a60dbed01ea8c7e6cd8dcf9b5de9 |
08-Apr-2013 |
DeLesley Hutchins <delesley@google.com> |
Thread safety analysis: turn on checking within lock and unlock functions. These checks are enabled with the -Wthread-safety-beta flag. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179046 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
6f96f4b2b2b24f187f6e8402a260de0c27dd37e9 |
08-Apr-2013 |
Douglas Gregor <dgregor@apple.com> |
<rdar://problem/13540921> Cope with instantiations of the C++11 range-based for loop that end up being Objective-C fast enumeration loops. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179037 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
1cd1f73f09c6ddcf01e3a287d6604cd705190d14 |
08-Apr-2013 |
Douglas Gregor <dgregor@apple.com> |
<rdar://problem/13540921> Cope with deduced 'auto' in a C++11 for-range loop that is actually an Objective-C fast enumeration loop. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179035 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
efac8da4cfa49799d5fdbc9d10b0e9f9a53ff6c8 |
07-Apr-2013 |
Benjamin Kramer <benny.kra@googlemail.com> |
Sema: Don't crash when trying to emit a warning for a duplicate value in an invalid enum. Fixes PR15693. A null check on a pointer returned from cast<> is a very dubious construct, do we have a checker for this somewhere? git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178975 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
cb3443925f967b5d51e582b39e28f67d41d73199 |
06-Apr-2013 |
Ted Kremenek <kremenek@apple.com> |
Rework how ObjC method inherit deprecated/availability. New rule: - Method decls in @implementation are considered "redeclarations" and inherit deprecated/availability from the @interface. - All other cases are consider overrides, which do not inherit deprecated/availability. For example: (a) @interface redeclares a method in an adopted protocol. (b) A subclass redeclares a method in a superclass. (c) A protocol redeclares a method from another protocol it adopts. The idea is that API authors should have the ability to easily move availability/deprecated up and down a class/protocol hierarchy. A redeclaration means that the availability/deprecation is a blank slate. Fixes <rdar://problem/13574571> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178937 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
|
f608aff66c5412ab583258f989417b4974ba507a |
06-Apr-2013 |
Richard Trieu <rtrieu@google.com> |
When -Woverloaded-virtual is triggered, call HandleFunctionTypeMismatch to add more information to the notes. This information is already present on other diagnostic messages that involves overloads. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178923 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
8aa86d1155fb99e34fd084d83da3345b1ec2b2e4 |
05-Apr-2013 |
Tanya Lattner <tonic@nondot.org> |
Add an error to check that all program scope variables are in the constant address space in OpenCL. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178906 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
b0eb771fb5fcbbf283e357f95230adeb6570380f |
05-Apr-2013 |
Tanya Lattner <tonic@nondot.org> |
Revert 178811 until I fix the unit tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178813 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
98bb78885c36800d23fe247f10131bc6dcb30581 |
05-Apr-2013 |
Tanya Lattner <tonic@nondot.org> |
Add an error to check that all program scope variables are in the constant address space in OpenCL. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178811 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
ea4b1113cea2190e4ac1d07f99102a1c0fd3eddd |
04-Apr-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Don't patch the storage class of static data members. This removes a bit of patching that survived r178663. Without it we can produce better a better error message for const int a = 5; static const int a; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178795 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
740991bdf8bb2638ff111ae2084791c52c1cee00 |
04-Apr-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
Objective-C: Issue deprecated warning when using a deprecated typedef to subclass or invoke a class method. // rdar://13569424 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178775 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
emaExprObjC.cpp
|
29c41b51137b2cbc21a8c93f7c61149247c6b01a |
04-Apr-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Use isExternalLinkage instead of hasExternalLinkage. Having these not be the same makes an easy to misuse API. We should audit the uses and probably rename to something like foo->hasExternalLinkage(): The c++ standard one. That is UniqueExternalLinkage or ExternalLinkage. foo->hasUniqueExternalLinkage(): Is UniqueExternalLinkage. foo->hasCogeGenExternalLinkage(): Is ExternalLinkage. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178768 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
ba2bfa07cbcb088e3afc5565a3b301a7873771a3 |
04-Apr-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Fix a recent linkage regression. Now that we don't have a semantic storage class, use the linkage. Thanks to Bruce Stephens for reporting this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178766 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d9802dc5391bb2d2dbadc82dd4d594212d754a95 |
04-Apr-2013 |
Ted Kremenek <kremenek@apple.com> |
Revert r177948. We decided that we do not want ObjC property redeclarations to inherit "deprecated". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178743 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
c855ce7ab97aa25c609a5f83e19b27289fede21a |
04-Apr-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Add hasExternalLinkageUncached back with the test that Richard provided, but keep the call at the current location. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178741 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
6a7664c4a8b378da5a7f58d940d39b76fb0d6673 |
04-Apr-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Avoid computing the linkage instead of avoiding caching it. This mostly reverts 178733, but keeps the tests. I don't claim to understand how hidden sub modules work or when we need to see them (is that documented?), but this has the same semantics and avoids adding hasExternalLinkageUncached which has the same foot gun potential as the old hasExternalLinkage. Last but not least, not computing linkage when it is not needed is more efficient. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178739 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
80a8689b274f758d9d7fb04c5cad81a582525497 |
04-Apr-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Fix linkage related crash. This test was exactly the opposite of what it should be. We should check if there old decl has linkage (where it makes sense) and if the new decl has the extern keyword. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178735 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d613ac9c57936d219d9eecba1d061a45ff7a3ae8 |
04-Apr-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix 41 of the 61 tests which fail with modules enabled: we were computing and caching the linkage for a declaration before we set up its redeclaration chain, when determining whether a declaration could be a redeclaration of something from an unimported submodule. We actually want to look at the declaration as if it were not a redeclaration here, so compute the linkage but don't cache it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178733 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
b846381fc3099b2340ba8c74d16178203a60d9a0 |
04-Apr-2013 |
John McCall <rjmccall@apple.com> |
Be sure to check ARC conventions on the implicit method declarations of a property just in case the property's getter happens to be +1. We won't synthesize a getter for such a property, but we will allow the user to define a +1 method for it. rdar://13115896 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178731 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
emaObjCProperty.cpp
|
d1cc514a6ac03f34de0aa5a4f4010d21d650d8f9 |
04-Apr-2013 |
Tanya Lattner <tonic@nondot.org> |
Update OpenCL comments to mention spec section and version. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178716 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
96df3562752e13237df051469271f8999ad60fe6 |
04-Apr-2013 |
Douglas Gregor <dgregor@apple.com> |
<rdar://problem/13560075> Teach name lookup for builtin names to find hidden declarations. Normal name lookup ignores any hidden declarations. When name lookup for builtin declarations fails, we just synthesize a new declaration at the point of use. With modules, this could lead to multiple declarations of the same builtin, if one came from a (hidden) submodule that was later made visible. Teach name lookup to always find builtin names, so we don't create these redundant declarations in the first place. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178711 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
78037ac3e7562aa3e306eaba97f1c609b86337d9 |
03-Apr-2013 |
John McCall <rjmccall@apple.com> |
Complain about attempts to befriend declarations via a using declaration. Patch by Stephen Lin! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178698 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaOverload.cpp
|
d2615cc53b916e8aae45783ca7113b93de515ce3 |
03-Apr-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Add 178663 back. http://lab.llvm.org:8011/builders/clang-x86_64-darwin10-gdb went back green before it processed the reverted 178663, so it could not have been the culprit. Revert "Revert 178663." This reverts commit 4f8a3eb2ce5d4ba422483439e20c8cbb4d953a41. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178682 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
ema.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaLambda.cpp
emaObjCProperty.cpp
emaPseudoObject.cpp
emaStmt.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
reeTransform.h
|
4f8a3eb2ce5d4ba422483439e20c8cbb4d953a41 |
03-Apr-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Revert 178663. Looks like it broke http://lab.llvm.org:8011/builders/clang-x86_64-darwin10-gdb Revert "Don't compute a patched/semantic storage class." This reverts commit 8f187f62cb0487d31bc4afdfcd47e11fe9a51d05. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178681 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
ema.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaLambda.cpp
emaObjCProperty.cpp
emaPseudoObject.cpp
emaStmt.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
reeTransform.h
|
20a7cf4d782e32b2752e651a11ed3712d2debd65 |
03-Apr-2013 |
Kaelyn Uhrain <rikka@google.com> |
Give the default CorrectionCandidateCallback::ValidateCandidate some smarts so that it doesn't approve of keywords and/or type names when it knows (based on its flags) that those kinds of corrections are not wanted. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178668 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
8f187f62cb0487d31bc4afdfcd47e11fe9a51d05 |
03-Apr-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Don't compute a patched/semantic storage class. For variables and functions clang used to store two storage classes. The one "as written" in the code and a patched one, which, for example, propagates static to the following decls. This apparently is from the days clang lacked linkage computation. It is now redundant and this patch removes it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178663 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
ema.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaLambda.cpp
emaObjCProperty.cpp
emaPseudoObject.cpp
emaStmt.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
reeTransform.h
|
d4582b8e6d056f5d991f1b8372e89a6aae58feae |
03-Apr-2013 |
Jordan Rose <jordan_rose@apple.com> |
Escape more @ signs in Doxygen comments. Doxygen treats "@command" the same as "\command" in a doc comment, so whenever we talk about Objective-C things like "@interface" we have to make sure to escape them. Let's try to keep Clang -Wdocumentation-clean! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178603 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
0ab5b4c438b40c72252933072d4c9e9a948106f0 |
02-Apr-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
If a defaulted special member is implicitly deleted, check whether it's overriding a non-deleted virtual function. The existing check for this doesn't catch this case, because it fires before we mark the method as deleted. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178563 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
0c70181854a95fca0e0d56dfa1203eb2216052ea |
02-Apr-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
Objective-C: Provide fixit hints when warning about 'isa' ivar being explicitely accessed when base is a user class object reference. // rdar://13503456 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178562 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprMember.cpp
emaObjCProperty.cpp
|
b0707c9a933b1839fa966e4c72e4dcb9a198f11f |
02-Apr-2013 |
Alexander Kornienko <alexfh@google.com> |
Fixed "fallthrough annotation does not directly precede switch label" warning in case when [[clang::fallthrough]]; is used in a method of a local class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178543 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
b421d926cdc632489915d39556f04c14f59d2392 |
02-Apr-2013 |
John McCall <rjmccall@apple.com> |
Add -Wstatic-local-in-inline, which warns about using a static local variable in a C99 inline (but not static-inline or extern-inline) function definition. The standard doesn't actually say that this doesn't apply to "extern inline" definitions, but that seems like a useful extension, and it at least doesn't have the obvious flaw that a static mutable variable in an externally-available definition does. rdar://13535367 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178520 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
|
d94a3a06b7306aea0455c21abe1cadfe275469fc |
02-Apr-2013 |
Chad Rosier <mcrosier@apple.com> |
Use the ASYContext::getTypeSizeInChars API to cleanup some ugliness, per John and Jordan's suggestion. No functional change intendend. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178507 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
725fe0ede4c5355666a300f4fd7dae9454f35a37 |
01-Apr-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR15633: Note that we are EnteringContext when parsing the nested name specifier for an enumeration. Also fix a crash-on-invalid if a non-dependent name specifier is used to declare an enum template. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178502 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
5b8740f840238b3616691e5b300df57a758f32a6 |
01-Apr-2013 |
John McCall <rjmccall@apple.com> |
Only merge down a variable type if the previous declaration was visible. There's a lot of potential badness in how we're modelling these things, but getting this much correct is reasonably easy. rdar://13535367 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178488 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
e3faa6ec8005f34b705cef363b071b933e111e1c |
01-Apr-2013 |
Chad Rosier <mcrosier@apple.com> |
Cleanup. No functional change intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178481 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
66dca6eaaa2e9c24023fc919ab72b8ae2df1e288 |
30-Mar-2013 |
Benjamin Kramer <benny.kra@googlemail.com> |
Sema: Don't crash when trying to emit a precedence warning on postinc/decrement. Post-Inc can occur as a binary call (the infamous dummy int argument), but it's not really a binary operator. Fixes PR15628. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178412 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
04593d0f9d84f6adf942bd66f1587e05c6a47c42 |
29-Mar-2013 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
When looking for overridden ObjC methods, don't ignore 'hidden' ones. When using modules we should not ignore overridden methods from categories that are hidden because the module is not visible. This will give more consistent results (when imports change) and it's more correct since the methods are indeed overridden even if they are not "visible" for lookup purposes. rdar://13350796 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178374 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
52b2e7085f09bf7834b41f6e807aff5ac97bd3a5 |
29-Mar-2013 |
Benjamin Kramer <benny.kra@googlemail.com> |
Sema: Warn on sizeof on binary ops on decayed arrays. The array will decay into a pointer, creating an unexpected result. sizeof(array + int) is an easy to make typo for sizeof(array) + int. This was motivated by a NetBSD security bug, used sizeof(key - r) instead of sizeof(key) - r, reducing entropy in a random number generator. http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/kern/subr_cprng.c.diff?r1=1.14&r2=1.15&only_with_tag=MAIN&f=h Differential Revision: http://llvm-reviews.chandlerc.com/D571 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178371 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
5b34b9c5135971b01ed0dc8d4ef35cd3b79bd2c0 |
29-Mar-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Fix thinko (and the bots): We still want to warn in C. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178335 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
b6bead467640e4d05f6a0a90255eebc939f690a2 |
29-Mar-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Don't special case one line extern "C" decls. We already avoided warning for extern "C" const char *Version_string = "2.9"; now we also don't produce any warnings for extern "C" { extern const char *Version_string2 = "2.9"; } git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178333 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
dff2be8ba441f5c61af8444479f7133b22dcfcf4 |
29-Mar-2013 |
Timur Iskhodzhanov <timurrrr@google.com> |
Revert r178273 as it broke the Linux bootstrap due to false positives git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178320 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
99a72d2d875321b4d91e6aef4e20b289f3d05db4 |
29-Mar-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
Objective-C: Produce precise diagnostic when 'isa' ivar is accessed provided it is the first ivar. Fixit hint will follow in another patch. This is continuation of // rdar://13503456 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178313 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprMember.cpp
|
e93e2552e76ab704ec85919cc2c76f02b8b081ee |
29-Mar-2013 |
Reid Kleckner <reid@kleckner.net> |
[ms-cxxabi] Add more tests for r178297 This covers a few cases where the class of a member pointer is not a CXXRecordDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178307 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
4bbae38abf4145b81a3bf8658968fdaa2a8941c1 |
28-Mar-2013 |
Reid Kleckner <reid@kleckner.net> |
[sema] Check the result of getAsCXXRecordDecl() to fix the build I'm not 100% sure what should happen here to find the real CXXRecordDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178297 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
59d8ccb45eeb33d255fd39933e75b45770a7a009 |
28-Mar-2013 |
Matt Beaumont-Gay <matthewbg@google.com> |
Warn about more than the first unused variable when -Werror is set. To do this, thread DiagnosticErrorTrap's hasUnrecoverableErrorOccurred through to Scope. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178294 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
edd2cb381e9c7a45354677c7fb6a93ae2a0080b7 |
28-Mar-2013 |
Reid Kleckner <reid@kleckner.net> |
[sema] Remove unused variable from r178283 Wouldn't it be cool if we had a compiler for Windows that could warn about these things? git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178289 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
84e9ab44af3a16f66d62590505db2036ef0aa03b |
28-Mar-2013 |
Reid Kleckner <reid@kleckner.net> |
[ms-cxxabi] Correctly compute the size of member pointers Summary: This also relaxes the requirement on Windows that the member pointer class type be a complete type (http://llvm.org/PR12070). We still ask for a complete type to instantiate any templates (MSVC does this), but if that fails we continue as normal, relying on any inheritance attributes on the declaration. Reviewers: rjmccall CC: triton, timurrrr, cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D568 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178283 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
ec8deba768e7ba93ad9974763dc3902896924a3c |
28-Mar-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
Objective-C: Provide fixit suggestions when class object is accessed via accessing 'isa' ivar to use object_getClass/object_setClass apis. // rdar://13503456 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178282 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprMember.cpp
reeTransform.h
|
5fd1fac0104e22533bc0284fdd0f42f843c975f5 |
28-Mar-2013 |
Jordan Rose <jordan_rose@apple.com> |
Provide a fixit to static_cast for reinterpret_casts within a class hierarchy. The suggestion was already in the text of the note; this just adds the actual fixit and the appropriate test cases. Patch by Alexander Zinenko! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178274 91177308-0d34-0410-b5e6-96231b3b80d8
emaCast.cpp
|
25ffbef84450f0c666957a2d00cdf928c61b44d7 |
28-Mar-2013 |
Sam Panzer <espanz@gmail.com> |
Implemented a warning when an input several bitwise operations are likely be implicitly truncated: * All forms of Bitwise-and, bitwise-or, and integer multiplication. * The assignment form of integer addition, subtraction, and exclusive-or * The RHS of the comma operator * The LHS of left shifts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178273 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
eb82a53aaa7880b7d3fd733aeee38b9aeee919ba |
28-Mar-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
For -Wignored-qualifiers, don't warn on qualifiers which we acquire via a typedef. Also don't warn on the _Atomic type specifier, just on the _Atomic type qualifier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178218 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
8c952cd40ccec9d720931f27e7d722fed207d536 |
28-Mar-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Teach -Wigored-qualifiers about exotic flavors of declarator and the _Atomic type qualifier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178217 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
47681531ce5330b0bb42d4a7882ddd258e34de26 |
28-Mar-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Remove outdated FIXME. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178211 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
4cf4a5e96ab0babd13774b17112e7c1d83042ea7 |
28-Mar-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Support C11 _Atomic type qualifier. This is more-or-less just syntactic sugar for the _Atomic type specifier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178210 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaType.cpp
|
93d6b07cd79d74e343d81c0e8fb5365376a33097 |
28-Mar-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fold together the two implementations of 6.7.3p2 in SemaType. Fix two bugs, each of which was only present in one version: * Give the right diagnostic for 'restrict' applied to a non-pointer, non-reference type. * Don't reject 'restrict' applied indirectly to an Objective-C object pointer type (eg, through template instantiation). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178200 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
9807a2e0ddb1eafb8725dbf0247271a4a694037b |
28-Mar-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Don't reject __restrict applied to a dependent type; it might instantiate to a pointer or reference type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178198 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
reeTransform.h
|
7e35274df4a598d5e3e4b8b5567bcb256fc2ab2f |
27-Mar-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
Objective-C: Issue more precise warning when user is accessing 'isa' as an object pointer. // rdar://13503456. FixIt to follow in another patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178179 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprMember.cpp
|
6bed88e9d25fd7e16edf3d95447ba414d9d73d72 |
27-Mar-2013 |
Douglas Gregor <dgregor@apple.com> |
<rdar://problem/13317030> Consider using directives when performing unqualified name lookup into declarations contexts represented by the qualified-id but not in the actual scope hierarchy. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178136 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
d835d9496c55848981c1d9db383a0de1be160925 |
27-Mar-2013 |
Bill Wendling <isanbard@gmail.com> |
Pass the diagnostic in for better error messages. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178120 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
9ef9875bbe19dc9f73c6c95b803d9a4945168690 |
27-Mar-2013 |
Joao Matos <ripzonetriton@gmail.com> |
Implement compiler intrinsics needed for compatibility with MSVC 2012 <type_traits>. Patch by me and Ryan Molden. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178111 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
12fef490dce56bf8abc1bad7fec798eb882aabf7 |
27-Mar-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR15597: Fix a confusion between the implicit exception specification and the uninstantiated exception specification when a special member within a class template is both defaulted and given an exception specification on its first declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178103 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExceptionSpec.cpp
|
fdb468fc8ab84af5f32868cc6511cf1160074d53 |
27-Mar-2013 |
John McCall <rjmccall@apple.com> |
Make the -Wreinterpret-base-class logic safe against invalid declarations at any point. Patch by Alexander Zinenko, and report by Richard Smith. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178098 91177308-0d34-0410-b5e6-96231b3b80d8
emaCast.cpp
|
8b43d2b0ea2d72b53a10f38903b176e58cb93b9c |
27-Mar-2013 |
Ted Kremenek <kremenek@apple.com> |
Split "incomplete implementation" warnings for ObjC into separate warnings. Previously all unimplemented methods for a class were grouped under a single warning, with all the unimplemented methods mentioned as notes. Based on feedback from users, most users would like a separate warning for each method, with a note pointing back to the original method declaration. Implements <rdar://problem/13350414> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178097 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
defa32ef4fdc166d39d2d0859e5edbd78da2ddd0 |
27-Mar-2013 |
Douglas Gregor <dgregor@apple.com> |
<rdar://problem/13278115> Improve diagnostic when failing to bind an rvalue reference to an lvalue of compatible type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178095 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
0162c1ce296fc48fbe03a31a2ae00b939eef86a8 |
27-Mar-2013 |
Douglas Gregor <dgregor@apple.com> |
<rdar://problem/13267210> Ensure that Sema::CompareReferenceRelationship returns consistent results with invalid types. When Sema::RequireCompleteType() is given a class template specialization type that then fails to instantiate, it returns 'true'. On subsequent invocations, it can return false. Make sure that this difference doesn't change the result of Sema::CompareReferenceRelationship, which is expected to remain stable while we're checking an initialization sequence. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178088 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaOverload.cpp
|
e79ce292d93f955c1219c3977c02199bd3dc6544 |
26-Mar-2013 |
Douglas Gregor <dgregor@apple.com> |
<rdar://problem/13473493> Handle 'this->' insertion recovery within trailing return types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178081 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
c56fff7fd231aebf4b152f60f8f11ef91835c48a |
26-Mar-2013 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[Preprocessor/Modules] Separate the macro directives kinds into their own MacroDirective's subclasses. For each macro directive (define, undefine, visibility) have a separate object that gets chained to the macro directive history. This has several benefits: -No need to mutate a MacroDirective when there is a undefine/visibility directive. Stuff like PPMutationListener become unnecessary. -No need to keep extra source locations for the undef/visibility locations for the define directive object (which is the majority of the directives) -Much easier to hide/unhide a section in the macro directive history. -Easier to track the effects of the directives across different submodules. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178037 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
8af742a499bf13f0a3d53b03aa44ae748fadd61e |
26-Mar-2013 |
Richard Trieu <rtrieu@google.com> |
Handle CXXOperatorCallExpr when checking self referrnce during initialization of class types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177987 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
2db075b1d3b16f0100fe06408dfb4ab7d50700a4 |
26-Mar-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Implement special-case name lookup for inheriting constructors: member using-declarations with names which look constructor-like are interpreted as constructor names. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177957 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
c2e935f28079862b212f6b2af3057a5f203dcbc0 |
26-Mar-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Remove some no-op static_casts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177954 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
|
b501aeb238c9cf03f946778be438f1aca9c29aad |
26-Mar-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
Objective-C: Property declaration overiding one in its super class or protocols inherit their availability/deprecated attribute. // rdar://13467644 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177948 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
6c5aaed0d4faf9ab8793423529306e7116e9f0fd |
26-Mar-2013 |
Douglas Gregor <dgregor@apple.com> |
<rdar://problem/13395022> Strip references when extracting an initializer_list's element type during application of an initialization sequence. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177944 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
dc392c1bae3306af7aec25f0b0b14637d2dc6b39 |
26-Mar-2013 |
Douglas Gregor <dgregor@apple.com> |
<rdar://problem/13185264> Don't crash when attempting to redundantly initialize a member of an anonymous union. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177941 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
6edb029026d290f12393ed8389a3e1de596c77ec |
25-Mar-2013 |
Ted Kremenek <kremenek@apple.com> |
For printf checking, handle nested typedefs for darwin-specific checking. Fixes <rdar://problem/13491605>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177931 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
abde2c7f2c0699c7db395166f4e89b80bb87bf67 |
25-Mar-2013 |
Douglas Gregor <dgregor@apple.com> |
<rdar://problem/13459871> Allow forward declaration of enums with a fixed underlying type in Objective-C (as well as C++11). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177930 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
14df23bd114919abc374b2bcd2b2e16b79936584 |
25-Mar-2013 |
Bill Wendling <isanbard@gmail.com> |
Emit an error message instead of crashing when dereferencing an incomplete pointer type. If the ASM statement is dereferencing an incomplete pointer type, issue an error instead of crashing. <rdar://problem/12700799> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177915 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
1db7040604154f71c54cf1329ae384fbef196668 |
24-Mar-2013 |
Guy Benyei <guy.benyei@intel.com> |
Generate metadata to implement the -cl-kernel-arg-info option. OpenCL 1.2 spec. 5.7.3. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177839 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
168613735dce8103ef78390ac28786b5a278f439 |
23-Mar-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
documentation parsing: when providing code completion comment for a getter used in property-dot syntax, if geter has its own comment use it. // rdar://12791315 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177797 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
984f2783ad8319aa0cbfca1c4a719688b1ecfd5e |
22-Mar-2013 |
Bill Wendling <isanbard@gmail.com> |
Use RequireCompleteType() instead of isIncompleteType(). isIncompleteType() returns true or false for template types depending on whether the type is instantiated yet. In this context, that's arbitrary. The better way to check for a complete type is RequireCompleteType(). Thanks to Eli Friedman for noticing this! <rdar://problem/12700799> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177768 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
c02ddb23c0a27ff95859b3eacab134613b0b1d1d |
22-Mar-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
documentation parsing. Provide code completion comment for self.GetterName where GetterName is the getter method for a property with name different from the property name (declared via a property getter attribute) // rdar://12791315 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177744 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
8ff563c2178866779903cb1b47c2962c39309995 |
22-Mar-2013 |
Daniel Jasper <djasper@google.com> |
Fix DeclRefExpr::getFoundDecl() for usages by reference. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177721 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
c640058aa7f224a71ce3b1d2601d84e1b57f82d3 |
22-Mar-2013 |
Alexey Bataev <a.bataev@hotmail.com> |
OpenMP threadprivate directive parsing and semantic analysis git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177705 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
emaOpenMP.cpp
emaTemplateInstantiateDecl.cpp
|
437da054125a1e5cdd8c9765e09e42da922482f3 |
22-Mar-2013 |
John McCall <rjmccall@apple.com> |
Warn about attempts to reinterpret_cast between two types that are hierarchy-related at a possibly nonzero offset. Patch by Alexander Zinenko! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177698 91177308-0d34-0410-b5e6-96231b3b80d8
emaCast.cpp
|
b760f11fae94e3003b9241ac50c02617465f2fa2 |
22-Mar-2013 |
John McCall <rjmccall@apple.com> |
Fix a crash-on-valid where a block capture copy expression was picking up cleanups from earlier in the statement. Also fix a crash-on-invalid where a reference to an invalid decl from an enclosing scope was causing an expression to fail to build, but only *after* a cleanup was registered from that statement, causing an assertion downstream. The crash-on-valid is rdar://13459289. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177692 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaStmt.cpp
|
30262b7316bb8d0d17b083bebfc3da6c0ba551cb |
21-Mar-2013 |
David Blaikie <dblaikie@gmail.com> |
Fix indentation git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177665 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
5bdaef55d486f20346fe16f3d41324694d3ff0d5 |
21-Mar-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
Objective-C: Tighten the rules when warning is issused for on overriding 'readwrite' property which is not auto-synthesized. Buttom line is that if hueristics determine that there will be a user implemented setter, no warning will be issued. // rdar://13388503 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177662 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
906d66acc5cf2679453e10a4f0a67feedd765b21 |
20-Mar-2013 |
Douglas Gregor <dgregor@apple.com> |
<rdar://problem/12368093> Extend module maps with a 'conflict' declaration, and warn when a newly-imported module conflicts with an already-imported module. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177577 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDecl.cpp
|
36771d910b049cc534841c48ced90772784af446 |
20-Mar-2013 |
David Blaikie <dblaikie@gmail.com> |
PR7256: Provide a fixit for incorrect destructor declarations Fix by Ismail Pazarbasi (ismail.pazarbasi@gmail.com), review by Dmitri Gribenko. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177546 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
70c5361c9fdb4f6c78ff39c8592db2cbfe2b647f |
20-Mar-2013 |
John McCall <rjmccall@apple.com> |
Remove some dead code. Patch by Stephen Lin! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177490 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
c96cd7a07a68f74fec35297cc1f2a3d2171fdcdb |
20-Mar-2013 |
John McCall <rjmccall@apple.com> |
Don't look outside the innermost enclosing namespace when performing unqualified lookup for a friend class declaration. rdar://13393749 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177473 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
7cca821e1acf0f1b4fe892c3111bfb2086832e4e |
19-Mar-2013 |
John McCall <rjmccall@apple.com> |
Add a clarifying note when a return statement is rejected because we expect a related result type. rdar://12493140 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177378 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
emaExpr.cpp
emaExprObjC.cpp
emaInit.cpp
emaStmt.cpp
|
15d68882f5fa4afae8333e75b2bfd5e2834c8aaf |
19-Mar-2013 |
Stephen Hines <srhines@google.com> |
Merge branch 'upstream' into merge_2013_03_18 Conflicts: lib/Sema/SemaDeclAttr.cpp Change-Id: I05e70941163ec5a461eba43ef78f6738cd5a1e69
|
7132be1ef46248746990590b91e693dfc3cce251 |
19-Mar-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Diagnose uses of 'alignof' on functions in -pedantic mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177354 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
c7f811638f8603fa373d2be724e8b1c8ba51ad75 |
18-Mar-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Add missing diagnostic for a nested-name-specifier on a free-standing type definition. Bump some related diagnostics from warning to extension in C++, since they're errors there. Add some missing checks for function specifiers on non-function declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177335 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclObjC.cpp
|
07b0fdcee8d64222b274779d02851cc53d18e0db |
18-Mar-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Bring inheriting constructor implementation up-to-date with current defect reports, and implement implicit definition of inheriting constructors. Remaining missing features: inheriting constructor templates, implicit exception specifications for inheriting constructors, inheriting constructors from dependent bases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177320 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExpr.cpp
emaInit.cpp
|
6aa240c03dd68ab413106d6af7a18af1c9b4e872 |
16-Mar-2013 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Remove -Wspellcheck and replace it with a diagnostic option. Thanks to Richard S. for pointing out that the warning would show up with -Weverything. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177218 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
9de50947ba381561a5236b3c878c83e4bb8c1088 |
15-Mar-2013 |
Ted Kremenek <kremenek@apple.com> |
Simplify print logic, per feedback from Jordan Rose. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177193 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
7adf3a9f84688f334a1cd977317bb42f9e06c9f4 |
15-Mar-2013 |
Ted Kremenek <kremenek@apple.com> |
Enhance -Wtautological-constant-out-of-range-compare to include the name of the enum constant. This is QoI. Fixes <rdar://problem/13076064>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177190 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
62bbe07f5aed5a2f9ae55ef480c4268cb4435d99 |
15-Mar-2013 |
Jordan Rose <jordan_rose@apple.com> |
Add some assertions to appease the static analyzer. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177185 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
1fd8d46d222fab7f17b91846e2c50bef640a60a0 |
15-Mar-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
c: perform integer overflow check on all binary operations. // rdar://13423975 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177181 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
a30bab4b5d421fb148a732da31621cffe51519ee |
15-Mar-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
c: Also chek for integer overflow for '%' operator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177163 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
2cd889d6d97db0cf73930873871aa4a542e84b89 |
15-Mar-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
c: add the missing binary operatory when checking for integer overflow. // rdar://13423975 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177162 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
96db329b3a982ac83c700c4469a3f618dc53cb42 |
15-Mar-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
Diagnose about extern "C" functions returning c++ objects on first declaration only. // rdar://13364028 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177127 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
57f8da506a0db208a936e26a8cb77267f638b26b |
14-Mar-2013 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Don't try to typo-correct 'super' in an objc method. This created 2 issues: 1) Performance issue, since typo-correction with PCH/modules is rather expensive. 2) Correctness issue, since if it managed to "correct" 'super' then bogus compiler errors would be emitted, like this: 3.m:8:3: error: unknown type name 'super'; did you mean 'super1'? super.x = 0; ^~~~~ super1 t3.m:5:13: note: 'super1' declared here typedef int super1; ^ t3.m:8:8: error: expected identifier or '(' super.x = 0; ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177126 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaCodeComplete.cpp
emaLookup.cpp
|
96cead513761d287c88a4f05c712aee3b26b9d6f |
14-Mar-2013 |
Joey Gouly <joey.gouly@arm.com> |
Add support for the 'endian' attribute for OpenCL. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177035 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
975d353997a13f7dfdaf4ec7a547fe1adb15f35e |
14-Mar-2013 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[modules] Check for delegating constructor cycles when building a module and don't write them out to the module file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177000 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
2d1b09641ecf2e754bf3fd244dc45dbf3e460c1b |
14-Mar-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Avoid computing the linkage too early. Don't invalidate it. Before this patch we would compute the linkage lazily and cache it. When the AST was modified in ways that could change the value, we would invalidate the cache. That was fairly brittle, since any code could ask for the a linkage before the correct value was available. We should change the API to one where the linkage is computed explicitly and trying to get it when it is not available asserts. This patch is a first step in that direction. We still compute the linkage lazily, but instead of invalidating a cache, we assert that the AST modifications didn't change the result. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176999 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDecl.cpp
emaExpr.cpp
emaOverload.cpp
|
1d0d2fe76496ee2f8da9f56cb7f7eb24c4ffba05 |
12-Mar-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
Objective-C: In my last path, also check for existence of user setter before issuing the warning about non-synthesizable property. // rdar://13388503 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176906 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
2d9e8838712f3fcacedaf898fd85654cd2bb3600 |
12-Mar-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Whitespace cleanup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176896 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
6114a3c9baf29b3db1e0853a829ae1278285aef4 |
12-Mar-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
Objective-C: Issue warning in couple of obscure cases when property autosynthesis does not synthesize a property. When property is declared 'readonly' in a super class and is redeclared 'readwrite' in a subclass. When a property autosynthesis causes it to share 'ivar' with another property. // rdar://13388503 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176889 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
024c1199fa9d28e00160d5f05ed7dc3d25264837 |
12-Mar-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
We already reported an error for extern "C" { void test5_f() { extern int test5_b; } } static float test5_b; This patch makes us report one for extern "C" { void test6_f() { extern int test6_b; } } extern "C" { static float test6_b; } Not because we think the declaration would be extern C, but because of the rule: An entity with C language linkage shall not be declared with the same name as an entity in global scope... We were just not looking past the extern "C" to see if the decl was in global scope. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176875 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
10b1d1cf5ebb14b672d6b0c88f5160ad3cf1e988 |
12-Mar-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Error if an extern C declaration matches a previous hidden extern C declaration. Without this patch we produce an error for extern "C" { void f() { extern int b; } } extern "C" { extern float b; } but not for extern "C" { void f() { extern int b; } } extern "C" { float b; } git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176867 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
6fc9e7ad3576dcbee3028a42ef5dac931df8754c |
11-Mar-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
Objective-C: When using super.prop, property should be looked up the current class's super class. // rdar://13349296 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176832 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
41d016454b48f25c93d4b3fb84cfc7e426a9bd73 |
09-Mar-2013 |
John McCall <rjmccall@apple.com> |
Adjust the special non-C++ enum block return type inference so that it looks through certain syntactic forms and applies even if normal inference would have succeeded. There is potential for source incompatibility from this change, but overall we feel that it produces a much cleaner and more defensible result, and the block compatibility rules should curb a lot of the potential for annoyance. rdar://13200889 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176743 91177308-0d34-0410-b5e6-96231b3b80d8
emaLambda.cpp
|
83972f128e9218c051692bf96361327a701aeb79 |
09-Mar-2013 |
John McCall <rjmccall@apple.com> |
Add TagDecl::hasNameForLinkage(), which is true if the tag is non-anonymous or is defined in a typedef of itself. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176742 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaCodeComplete.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
e4743be8984f9544878aee88b435f6381590878d |
08-Mar-2013 |
Douglas Gregor <dgregor@apple.com> |
<rdar://problem/13170740> Be a little more careful when instantiating 'this' expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176731 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
0918989f0eed08870e50418df97d1486d977d773 |
08-Mar-2013 |
Jordan Rose <jordan_rose@apple.com> |
Sema: Preserve attributes on parameters in instantiated function templates. This was causing correctness issues for ARC and the static analyzer when a function template has "consumed" Objective-C object parameters (i.e. parameters that will be released by the function before returning). The fix is threefold: (1) Actually copy over the attributes from old ParmVarDecls to new ones. (2) Have Sema::BuildFunctionType only work for building FunctionProtoTypes, which it was doing anyway. This allows us to pass an ExtProtoInfo instead of a plain ExtInfo and several flags. (3) Drop param attributes as part of StripImplicitInstantiation, which is used when an implicit instantiation is followed by an explicit one. <rdar://problem/12685622> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176728 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaType.cpp
reeTransform.h
|
c61361b102fcb9be7b64cc493fb797ea551eb8e7 |
08-Mar-2013 |
Douglas Gregor <dgregor@apple.com> |
<rdar://problem/13094134> Don't try to wire up typedef names for invalid anonymous tag declarations encountered during template instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176727 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
bea522ff43a3f11c7a2bc7949119dbb9fce19e39 |
08-Mar-2013 |
Jordan Rose <jordan_rose@apple.com> |
ArrayRef-ize ASTContext::getFunctionType and Sema::BuildFunctionType. No (intended) functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176726 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaExceptionSpec.cpp
emaExpr.cpp
emaExprCXX.cpp
emaLambda.cpp
emaLookup.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
reeTransform.h
|
303b96f255d61ae3dff913d777d3f40332786257 |
08-Mar-2013 |
Douglas Gregor <dgregor@apple.com> |
<rdar://problem/13140795> Transform the scope type of a pseudo-destructor expression within the object scope. We were transforming the scope type of a pseudo-destructor expression (e.g., the first T in x->T::~T()) as a freestanding type, which meant that dependent template specialization types here would stay dependent even when no template parameters were named. This would eventually mean that a dependent expression would end up in what should be fully-instantiated ASTs, causing IRgen to assert. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176723 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
37453b9580e293eef3bd60bd36047a93ac4515b1 |
08-Mar-2013 |
Joey Gouly <joey.gouly@arm.com> |
Add support for the OpenCL attribute 'vec_type_hint'. Patch by Murat Bolat! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176686 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
0689863f7b7fddf4a96e3036f3abe1d6f695ae51 |
08-Mar-2013 |
Douglas Gregor <dgregor@apple.com> |
Add code completion for @import <rdar://problem/13344306>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176666 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
1344e94cdf51cabb09d7b598323e54bbf333fcd5 |
07-Mar-2013 |
Douglas Gregor <dgregor@apple.com> |
Improve LLDB's implicit cast-to-id to work with C++11 auto and any Objective-C object type <rdar://problem/13338107>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176665 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExprCXX.cpp
|
6cda3e604f2a2fa289cc9145719ba84461315e21 |
07-Mar-2013 |
Douglas Gregor <dgregor@apple.com> |
When possible, move __block variables to the heap rather than copying them. Fixes <rdar://problem/13330126>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176663 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
531db82c6ecfb4772c6870731c06ad8718f1e0ce |
07-Mar-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Add a hasExternalLinkage helper. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176607 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDecl.cpp
emaDeclCXX.cpp
|
bd3aca04d304b9f31240b94af0aad818f6f932ab |
06-Mar-2013 |
Stephen Hines <srhines@google.com> |
Update build rules for Clang merge to version 176138. Change-Id: Ib028329a591e6175998d969f11b5404bf3f19e81
ndroid.mk
|
450b86c0c9ff8307f5145ced621914600196c500 |
06-Mar-2013 |
Stephen Hines <srhines@google.com> |
Merge commit 'b58f810669d9c17bcc025b7560de01d162856f34' into merge_20130226 Conflicts: include/clang/Basic/LangOptions.def lib/Sema/SemaDeclAttr.cpp Change-Id: Ia10b4d3b2c949a72d328cb58b113f90237d4a5d5
|
3cdbbdc53241907939486ba4a9b0c9b5655419c3 |
06-Mar-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR15390: If a function returns a pointer to a function, that function type can't have default arguments even though it's a parameter-declaration-clause in a function declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176542 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
75525c4cce5e1e097d3fab4391b11619d87cedfd |
06-Mar-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-C: don't crash after diagnosing using object subscripting without declaring objectForKeyedSubscript: // rdar://13333205 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176539 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
41f3f3a4792f46787632fdb94f952f6b3ce3f4ae |
05-Mar-2013 |
Jordan Rose <jordan_rose@apple.com> |
Silence a number of static analyzer warnings with assertions and such. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176469 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaStmt.cpp
emaType.cpp
|
48f904271effd381ec3c1ae33b97d1ec7d95860a |
04-Mar-2013 |
John McCall <rjmccall@apple.com> |
Centralize and refine the __unknown_anytype argument rules and be sure to apply them whether or not the debugger gave us a method declaration. rdar://12565338 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176432 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprObjC.cpp
|
7a534b94138ef2ad1a75b26b3b5bf1aa948d4121 |
04-Mar-2013 |
John McCall <rjmccall@apple.com> |
Perform non-overload placeholder conversions on the operands to a subscript operator. rdar://13332183 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176428 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
65611bf036dab4e2ba90b1316b1b21b276dde185 |
02-Mar-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Process #pragma weak only after we know the linkage of the function or variable we are looking at. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176414 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
|
fc09336a5965040736f9bc63a70416003972364e |
01-Mar-2013 |
Stefanus Du Toit <stefanus.dutoit@rapidmind.com> |
Fix typos: [Dd]iagnosic -> [Dd]iagnostic These all appear in comments or (ironically) diagnostics output. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176383 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
emaChecking.cpp
|
2fbe92cc2464c77825209df9a262d9d13e5ba64c |
01-Mar-2013 |
John McCall <rjmccall@apple.com> |
Perform the receiver-expression transformations regardless of whether we already have a method. Fixes a bug where we were failing to properly contextually convert a message receiver during template instantiation. As a side-effect, we now actually perform correct method lookup after adjusting a message-send to integral or non-ObjC pointer types (legal outside of ARC). rdar://13305374 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176339 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
b2381b1c91ac5dc2407e98f36e3a6ba93d771791 |
01-Mar-2013 |
John McCall <rjmccall@apple.com> |
Attempt to not place ownership qualifiers on the result type of block declarators. Document the rule we use. Also document the rule that Doug implemented a few weeks ago which drops ownership qualifiers on function result types. rdar://10127067 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176336 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
b98f7af5685458a00d4efd60429378efe88ad10f |
28-Feb-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-C code completion. Property accessors may not have their own code completion comments. Use those in their properties in this case. // rdar://12791315 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176271 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
c0cedbe537e4b25eeb8d61d0c30a2ac31a7fddab |
27-Feb-2013 |
David Blaikie <dblaikie@gmail.com> |
PR15360: nullptr as a non-type template argument to a function type non-type template parameter git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176216 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
714b509bb4f8be76e6616944551efe7a6e8358cd |
27-Feb-2013 |
John McCall <rjmccall@apple.com> |
Don't crash when diagnosing path-constrained protected access to a private member to which we have special access. rdar://12926092 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176146 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
34b0adb52f1528fb03313bdd5fd73632c11fc678 |
26-Feb-2013 |
Matt Arsenault <Matthew.Arsenault@amd.com> |
Fix assertion failure when a field is given an address space. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176122 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExprMember.cpp
|
5509f37aacf8a4d65f759554c9ec18adc1ac7b4e |
26-Feb-2013 |
Matt Arsenault <Matthew.Arsenault@amd.com> |
Fix initializer for variables with attribute address_space set. This would error in C++ mode unless the variable also had a cv qualifier. e.g. __attribute__((address_space(2))) float foo = 1.0f; would error but __attribute__((address_space(2))) const float foo = 1.0f; would not. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176121 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
9016bb771265a10f188c76342254badecc695253 |
26-Feb-2013 |
Matt Beaumont-Gay <matthewbg@google.com> |
Warn on dropping the return value from a warn_unused_result function, even in macros. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176114 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
d7a60ad800d64b7c444b26a58e76ec337dbd7bc2 |
26-Feb-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Be more careful in applying pragma weak. Fixes pr14974. GCC applies a pragma weak to a decl if it matches the mangled name. We used to apply if it matched the plain name. This patch is a compromise: we apply the pragma only if it matches the name and the decl has C language linkage. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176110 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
85aee96c62a99069ea60cb47d5ae69150ca44746 |
26-Feb-2013 |
Kostya Serebryany <kcc@google.com> |
Unify clang/llvm attributes for asan/tsan/msan (Clang part) These are two related changes (one in llvm, one in clang). LLVM: - rename address_safety => sanitize_address (the enum value is the same, so we preserve binary compatibility with old bitcode) - rename thread_safety => sanitize_thread - rename no_uninitialized_checks -> sanitize_memory CLANG: - add __attribute__((no_sanitize_address)) as a synonym for __attribute__((no_address_safety_analysis)) - add __attribute__((no_sanitize_thread)) - add __attribute__((no_sanitize_memory)) for S in address thread memory If -fsanitize=S is present and __attribute__((no_sanitize_S)) is not set llvm attribute sanitize_S git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176076 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
afda905e60151f0bc34c187d51a798b4265f69af |
24-Feb-2013 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
In Sema::InstantiateStaticDataMemberDefinition, pass the var decl to the consumer just using ASTConsumer::HandleCXXStaticMemberVarInstantiation(), don't pass it with ASTConsumer::HandleTopLevelDecl. ASTConsumer::HandleTopLevelDecl is intended for user-written top-level decls; a consumer can treat an instantiated static data member however it wants of course. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175976 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
b07805485c603be3d8011f72611465324c9e664b |
23-Feb-2013 |
David Blaikie <dblaikie@gmail.com> |
Remove the CFGElement "Invalid" state. Use Optional<CFG*> where invalid states were needed previously. In the one case where that's not possible (beginAutomaticObjDtorsInsert) just use a dummy CFGAutomaticObjDtor. Thanks for the help from Jordan Rose & discussion/feedback from Ted Kremenek and Doug Gregor. Post commit code review feedback on r175796 by Ted Kremenek. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175938 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
02fb50d54042982bccc04c276ad2342827c8fcd3 |
23-Feb-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Remove the hack that avoided mangling static functions in extern C contexts. Weather we should give C language linkage to functions and variables with internal linkage probably depends on how much code assumes it. The standard says they should have no language linkage, but gcc and msvc assign them C language linkage. This commit removes the hack that was preventing the mangling on static functions declare in extern C contexts. It is an experiment to see if we can implement the rules in the standard. If it turns out that many users depend on these functions and variables having C language linkage, we should change isExternC instead and try to convince the CWG to change the standard. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175937 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
7728cddd7866fadd07f1191eee40985e3cdbc6bf |
23-Feb-2013 |
Peter Collingbourne <peter@pcc.me.uk> |
Revert r175912, "Add support for coldcc to clang" at John's request. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175936 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaType.cpp
|
f799ae1afb897151a84a7170951e367d8307ae04 |
22-Feb-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-C arg: provide fixit support when c++'s named cast need be replaced for bridge casting. // rdar://12788838 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175923 91177308-0d34-0410-b5e6-96231b3b80d8
emaCast.cpp
emaExprObjC.cpp
reeTransform.h
|
4c67aa96401b67b5200e701cff87485067ab0792 |
22-Feb-2013 |
Peter Collingbourne <peter@pcc.me.uk> |
Add support for coldcc to clang git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175912 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaType.cpp
|
4c8cba87e49ec2fd39c1ff3b903924e791734a8a |
22-Feb-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Make sure pragmas don't attach visibility attributes to auto variables with internal linkage. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175903 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
684aa73192d92850a926870be62a1787eb5b7ed9 |
22-Feb-2013 |
Michael Han <fragmentshaders@gmail.com> |
[Sema] Semantic analysis for empty-declaration and attribute-declaration. Introduce a new AST Decl node "EmptyDecl" to model empty-declaration. Have attributes from attribute-declaration appertain to the EmptyDecl node by creating the AST representations of these attributes and attach them to the EmptyDecl node so these attributes can be sema checked just as attributes attached to "normal" declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175900 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
5eada844fa70b6e2bc941dd7306f7a4fb1e8529d |
22-Feb-2013 |
Benjamin Kramer <benny.kra@googlemail.com> |
Streamify getNameForDiagnostic and remove the string versions of PrintTemplateArgumentList. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175894 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
33b52ad7d30ebd9119e2c3e34e9294ee830288f6 |
22-Feb-2013 |
Timur Iskhodzhanov <timurrrr@google.com> |
Fix MergeFunctionDecl implicit CC for static methods. Patch by Alexander Zinenko! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175890 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
4da090394caafe7be5b66ad03409c06566444926 |
22-Feb-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Don't crash if we try to apply 'alignas' to a variable declared with an incomplete type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175880 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
f6565a9f7318b1ca6ea9510003dde7b89696daab |
22-Feb-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Handle alignas(foo...) pack expansions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175875 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaTemplateInstantiateDecl.cpp
|
745af1c348191bf31cfcd3ae61443a0321ec2d75 |
22-Feb-2013 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
In LookupResult::resolveKind(), when handling multiple found declarations, ignore invalid declarations. This reduces the "ambiguous reference" errors (which are rather strange in C/ObjC) and fixes an assertion hit with an invalid code test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175869 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
d5668a2447c2afeea38815b51a80a5a6ac235599 |
22-Feb-2013 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
When a parameter list in a C function has an error, recover by forming a K&R function, instead of a non-function type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175868 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
28965bfa833926fd908a902cf2373d07c47b9067 |
22-Feb-2013 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Don't crash when applying an alloc_size attribute on a K&R function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175867 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
671b3219c2be00ef8f26234ec993816c3ba56a4f |
22-Feb-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Implement C++11 [dcl.align]p6-p8, and C11 6.7.5/7. This had to be split out of the normal attribute-merging path, because we can't merge alignment attributes without knowing the complete set of alignment attributes which apply to a particular declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175861 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
emaTemplateInstantiateDecl.cpp
|
1f12c47ae90c03633496d96e79a61762097a4681 |
22-Feb-2013 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[libclang] Fix a crash with invalid code, while skip function bodies is enabled. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175860 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
637619b915888ead5576d19508644e4eb9024078 |
22-Feb-2013 |
John McCall <rjmccall@apple.com> |
Only suppress instance context if a member is actually accessible in its declaring class; otherwise we might fail to apply [class.protected] when considering accessibility in derived classes. Noticed by inspection; <rdar://13270329>. I had an existing test wrong. Here's why it's wrong: Follow the rules (and notation) of [class.access]p5. The naming class (N) is B and the context (R) is D::getX. - 'x' as a member of B is protected, but R does not occur in a member or friend of a class derived from B. - There does exist a base class of B, A, which is accessible from R, and 'x' is accessible at R when named in A because 'x' as a member of A is protected and R occurs in a member of a class, D, that is derived from A; however, by [class.protected], the class of the object expression must be equal to or derived from that class, and A does not derive from D. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175858 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
f0b1a0ee4787cd60a34951950baa6dd7d3d53a64 |
22-Feb-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-C arc: Diagnostic can not say to use bridge casts with c++ named casts. Change notes to say use bridge with c-style cast instead. // rdar://12788838 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175850 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
94f3f549a7e0c426d5ffda7f25d1983c885dab9c |
21-Feb-2013 |
Ted Kremenek <kremenek@apple.com> |
Remove superfluous null pointer check. The pointer is used prior to this check. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175807 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
63631bd173df1decfff98ae6a7ed7f3d5f886b86 |
21-Feb-2013 |
Ted Kremenek <kremenek@apple.com> |
Teach serialized diagnostics about notes without locations. Along the way, improve a diagnostic for "previous declaration here" for implicit parameters. Fixes <rdar://problem/13211384>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175802 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
fdf6a279c9a75c778eba382d9a156697092982a1 |
21-Feb-2013 |
David Blaikie <dblaikie@gmail.com> |
Replace CFGElement llvm::cast support to be well-defined. See r175462 for another example/more details. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175796 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
52e933b0c3a1d552ab0e4d629ee15cff99a94447 |
21-Feb-2013 |
Joey Gouly <joey.gouly@arm.com> |
Add support to Sema and CodeGen for floating point vector types in OpenCL. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175734 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
0adb17502365b56dca99bfa971c59514ece54877 |
21-Feb-2013 |
David Blaikie <dblaikie@gmail.com> |
Avoid implicit conversions of Optional<T> to bool. This is a precursor to making Optional<T>'s operator bool 'explicit' when building Clang & LLVM as C++11. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175722 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
66874fb18afbffb8b2ca05576851a64534be3352 |
21-Feb-2013 |
David Blaikie <dblaikie@gmail.com> |
Use None rather than Optional<T>() where possible. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175705 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaTemplateVariadic.cpp
emaType.cpp
reeTransform.h
|
d6d864fc0674039d1884e6b8d9089f40370af7d8 |
20-Feb-2013 |
Jim Grosbach <grosbach@apple.com> |
MCParser: Update method names per coding guidelines. s/ParseMSInlineAsm/parseMSInlineAsm/ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175680 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
dc84cd5efdd3430efb22546b4ac656aa0540b210 |
20-Feb-2013 |
David Blaikie <dblaikie@gmail.com> |
Include llvm::Optional in clang/Basic/LLVM.h Post-commit CR feedback from Jordan Rose regarding r175594. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175679 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaChecking.cpp
emaExprObjC.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaTemplateVariadic.cpp
emaType.cpp
reeTransform.h
|
6b3d3e54c003b03f16e235ad2ff49e95587bbf92 |
20-Feb-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Process and handle attributes on conditions and for loop variables. Process and diagnose attributes on alias declarations, using directives, and attribute declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175649 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaType.cpp
|
d4c3d66be70ae2d0bd828329022dc428cc277a1c |
20-Feb-2013 |
John McCall <rjmccall@apple.com> |
Add a new 'type_visibility' attribute to allow users to control the visibility of a type for the purposes of RTTI and template argument restrictions independently of how visibility propagates to its non-type member declarations. Also fix r175326 to not ignore template argument visibility on a template explicit instantiation when a member has an explicit attribute but the instantiation does not. The type_visibility work is rdar://11880378 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175587 91177308-0d34-0410-b5e6-96231b3b80d8
emaAttr.cpp
emaDecl.cpp
emaDeclAttr.cpp
|
9818a1d443e97677dd3422305de9cc2b1fb2a8c1 |
20-Feb-2013 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[preprocessor] Split the MacroInfo class into two separate concepts, MacroInfo class for the data specific to a macro definition (e.g. what the tokens are), and MacroDirective class which encapsulates the changes to the "macro namespace" (e.g. the location where the macro name became active, the location where it was undefined, etc.) (A MacroDirective always points to a MacroInfo object.) Usually a macro definition (MacroInfo) is where a macro name becomes active (MacroDirective) but splitting the concepts allows us to better model the effect of modules to the macro namespace (also as a bonus it allows better modeling of push_macro/pop_macro #pragmas). Modules can have their own macro history, separate from the local (current translation unit) macro history; MacroDirectives will be used to model the macro history (changes to macro namespace). For example, if "@import A;" imports macro FOO, there will be a new local MacroDirective created to indicate that "FOO" became active at the import location. Module "A" itself will contain another MacroDirective in its macro history (at the point of the definition of FOO) and both MacroDirectives will point to the same MacroInfo object. Introducing the separation of macro concepts is the first part towards better modeling of module macros. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175585 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaCodeComplete.cpp
|
053214013990ad8ec096dafc64aa7c0ad2b05bc0 |
20-Feb-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR15300: Support C++11 attributes on base-specifiers. We don't support any such attributes yet, so just issue the appropriate diagnostics. Also generalize the fixit for attributes-in-the-wrong-place code and reuse it here, if attributes are placed after the access-specifier or 'virtual' in a base specifier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175575 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaStmtAttr.cpp
|
39e6ab4be93d9c5e729a578ddd9d415cd2d49872 |
18-Feb-2013 |
David Blaikie <dblaikie@gmail.com> |
Replace TypeLoc llvm::cast support to be well-defined. The TypeLoc hierarchy used the llvm::cast machinery to perform undefined behavior by casting pointers/references to TypeLoc objects to derived types and then using the derived copy constructors (or even returning pointers to derived types that actually point to the original TypeLoc object). Some context is in this thread: http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-December/056804.html Though it's spread over a few months which can be hard to read in the mail archive. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175462 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaExceptionSpec.cpp
emaExpr.cpp
emaInit.cpp
emaStmt.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaTemplateVariadic.cpp
emaType.cpp
reeTransform.h
ypeLocBuilder.h
|
0dc4ff2209b7b3b5ee479754d12176e43df0cd8e |
18-Feb-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
Prevent crash on multiple user errors (which I cannot reproduce in a small test case). // rdar://13178483. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175450 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
896c7dd62801c0aacf14b05183c3c471c1fe9f7a |
16-Feb-2013 |
David Blaikie <dblaikie@gmail.com> |
Don't warn on conversion from NULL to nullptr_t git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175331 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
3285c78041f80a26f6a947e2922e15c4af6e00bb |
15-Feb-2013 |
Enea Zaffanella <zaffanella@cs.unipr.it> |
Fixed diagnostic nondeterministic order bug (pr14901). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175289 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
db546fa2ce65dd2e275fc3fdee961767d53f77cf |
15-Feb-2013 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Fix crash-on-invalid where a ParenListExpr shows up as a message receiver while trying to do error recovery. rdar://13207886 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175282 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
820b23dc924a4ae7af07d5a75d6b1d781c267d57 |
15-Feb-2013 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
When a statement is dropped from the AST because it was invalid, make sure we don't do the scope checks otherwise we are going to hit assertion checks since a label may not have been actually added. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175281 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
2e85e743dc3d5b2f7ee6cd94a0c35fbc2e40e829 |
15-Feb-2013 |
Benjamin Kramer <benny.kra@googlemail.com> |
Sema: Unnest early exit and remove an unnecessary bad cast. cast<ObjCObjectPointerType> doesn't look through sugar, getAs does. Fixes PR15257. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175272 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
a574c8909748fc0d2fd723a48334d6d2c72c8227 |
15-Feb-2013 |
Benjamin Kramer <benny.kra@googlemail.com> |
Make helper functions static. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175265 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaInit.cpp
|
cfaed8d399a34e79fbab9f70eb4ea1bbeb81a02b |
14-Feb-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-C: synthesize properties in order of their declarations to synthesize their ivars in similar determinstic order so they are laid out in a determinstic order. // rdar://13192366 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175214 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
26202291b161f8598c0c342cba12c6552e44d44c |
14-Feb-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-C: When implementing custom accessor method for a property, the -Wdirect-ivar-access should not warn when accessing the property's synthesized instance variable. // rdar://13142820 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175195 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprMember.cpp
emaObjCProperty.cpp
|
68a932d416c52cef609e2c6c79ae99cbf4b9acd6 |
14-Feb-2013 |
Dmitri Gribenko <gribozavr@gmail.com> |
Remove a const_cast by propagating constness to called functions git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175161 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
747836e5c79b5e12fe9cfb9b724dc4edeb115419 |
14-Feb-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Partially revert r175117 so that we don't break assumptions about how static functions in extern "C" contexts are mangled. Should fix the bootstrap. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175132 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
d2fdd4256a2efc41365ccdd27a210d1d99a1fe3a |
14-Feb-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
merge hasCLanguageLinkage and isExternC. Keep the shorter name. I added hasCLanguageLinkage while fixing some language linkage bugs some time ago so that I wouldn't have to check all users of isExternC. It turned out to be a much longer detour than expected, but this patch finally merges the two again. The isExternC function now implements just the standard notion of having C language linkage. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175119 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaOverload.cpp
|
950fee2555f7a6bd193e588d6b6a941fd182391a |
14-Feb-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Add a getLanguageLinkage method to VarDecls and FunctionDecls. Use it to fix some cases where functions with no language linkage were being treated as having C language linkage. In particular, don't warn in extern "C" { static NonPod foo(); } Since getLanguageLinkage checks the language linkage, the linkage computation cannot use the language linkage. Break the loop by checking just the context in the linkage computation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175117 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d3b4f0e27ffa8d73f8c69a717c39c39a4d47ff0c |
14-Feb-2013 |
Nick Lewycky <nicholas@mxc.ca> |
When marking derived classes' virtual methods ODR-used in order to trigger instantiation in order to permit devirtualization later in codegen, skip over pure functions since those can't be devirtualization targets. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175116 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
3c86a5c2f60d4f68afde96e2138b6933b30d6aa8 |
12-Feb-2013 |
Nick Lewycky <nicholas@mxc.ca> |
The meat of this patch is in BuildCXXMemberCalLExpr where we make it use MarkMemberReferenced instead of marking functions referenced directly. An audit of callers to MarkFunctionReferenced and DiagnoseUseOfDecl also caused a few other changes: * don't mark functions odr-used when considering them for an initialization sequence. Do mark them referenced though. * the function nominated by the cleanup attribute should be diagnosed. * operator new/delete should be diagnosed when building a 'new' expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174951 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
|
a2905ea609c8ed1bf41a6b917358983d9f26dc6d |
12-Feb-2013 |
John McCall <rjmccall@apple.com> |
Perform placeholder conversions on the controller of a _Generic expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174930 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
9dd74c5504c743c96ea3a1d691d6a75ec3a98147 |
12-Feb-2013 |
John McCall <rjmccall@apple.com> |
Diagnose loads of 'half' l-values in OpenCL. Patch by Joey Gouly! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174928 91177308-0d34-0410-b5e6-96231b3b80d8
emaCast.cpp
emaExpr.cpp
emaType.cpp
|
f4e955b694be22926f5ceb41e55d319ce9ff4aab |
11-Feb-2013 |
Douglas Gregor <dgregor@apple.com> |
[Modules] Cope better with top-level declarations loaded after being declared in the current translation unit <rdar://problem/13189985>. These two related tweaks to keep the information associated with a given identifier correct when the identifier has been given some top-level information (say, a top-level declaration) and more information is then loaded from a module. The first ensures that an identifier that was "interesting" before being loaded from an AST is considered to be different from its on-disk counterpart. Otherwise, we lose such changes when writing the current translation unit as a module. Second, teach the code that injects AST-loaded names into the identifier chain for name lookup to keep the most recent declaration, so that we don't end up confusing our declaration chains by having a different declaration in there. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174895 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
|
b7b25659355d736a4f19099d96acc54d672340a5 |
10-Feb-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-C: Fixes a bogus warning due to not setting the "nonatomic" attribute in property redeclaration in class extension. Also, improved on diagnostics in this area while at it. // rdar://13156292 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174821 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
223f0ff6a9a5d0eaf63b98b3aa92888b4c088868 |
09-Feb-2013 |
Jordan Rose <jordan_rose@apple.com> |
Remove some stray uses of <ctype.h> functions. These are causing assertions on some MSVC builds. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174805 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
a4475a6b8277f24ed15d7b67d9dab77444c77cb1 |
09-Feb-2013 |
Ted Kremenek <kremenek@apple.com> |
QoI: -Wreadonly-iboutlet-property should have the warning's location on the property. There's no need to refer to the @implementation at all. Fixes <rdar://problem/13186515> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174802 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
125643455953069b925b30d2e4ae5674063984ed |
09-Feb-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-C: don't issue bogus warning about "auto-synthesized may not work correctly with 'nib' loader" when 'readonly' property is redeclared 'readwrite' in class extension. // rdar://13123861 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174775 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
3f6f51e28231f65de9c2dd150a2d757b2162cfa3 |
08-Feb-2013 |
Jordan Rose <jordan_rose@apple.com> |
Excise <cctype> from Clang (except clang-tblgen) in favor of CharInfo.h. Nearly all of these changes are one-to-one replacements; the few that aren't have to do with custom identifier validation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174768 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDeclAttr.cpp
emaPseudoObject.cpp
|
7666b03d499819214752ae392efe666ca856d0e7 |
07-Feb-2013 |
Douglas Gregor <dgregor@apple.com> |
Retain all hidden methods in the global method pool, because they may become visible <rdar://problem/13172858>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174648 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
6959acd4bb0979361365e675968173ede7183489 |
07-Feb-2013 |
Guy Benyei <guy.benyei@intel.com> |
Enable overloading of OpenCL events - this is needed for the overloaded OpenCL builtin functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174630 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaOverload.cpp
|
21f18c4fda167dc5f72feddbd6a7ac1b63200a0d |
07-Feb-2013 |
Guy Benyei <guy.benyei@intel.com> |
Add OpenCL samplers as Clang builtin types and check sampler related restrictions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174601 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
emaDecl.cpp
emaInit.cpp
emaOverload.cpp
emaTemplateVariadic.cpp
emaType.cpp
|
f5a6aefa37d73fff3c47953e2c447f074e726a0e |
07-Feb-2013 |
Nick Lewycky <nicholas@mxc.ca> |
Apply the pure-virtual odr rule to other constructs which can call overloaded operators. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174584 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
3646c68676c3c46a026b23d52188ef6e0d856178 |
07-Feb-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Simplify FindExternalVisibleDeclsByName by making it return a bool indicating if it found any decls, rather than returning a list of found decls. This removes a returning-ArrayRef-to-deleted-storage bug from MultiplexExternalSemaSource (in code not exercised by any of the clang binaries), reduces the work required in the found-no-decls case with PCH, and importantly removes the need for DeclContext::lookup to be reentrant. No functionality change intended! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174576 91177308-0d34-0410-b5e6-96231b3b80d8
ultiplexExternalSemaSource.cpp
|
878d0ad2c9d83ee6485fd16e21c5082acc63a890 |
07-Feb-2013 |
Alexander Kornienko <alexfh@google.com> |
-Wimplicit-fallthrough: fixed two cases where "fallthrough annotation in unreachable code" was issued incorrectly. Summary: -Wimplicit-fallthrough: fixed two cases where "fallthrough annotation in unreachable code" was issued incorrectly: 1. In actual unreachable code, but not immediately on a fall-through execution path "fallthrough annotation does not directly precede switch label" is better; 2. After default: in a switch with covered enum cases. Actually, these shouldn't be treated as unreachable code for our purpose. Reviewers: rsmith Reviewed By: rsmith CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D374 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174575 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
ce6a10eaadd152f05103dfffe22ac20ef2c04615 |
06-Feb-2013 |
Nick Lewycky <nicholas@mxc.ca> |
Don't check whether a friend declaration is correctly formed when instantiating, we already checked it when parsing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174486 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
5e25301c24c92a9b7018cee20e524c4eb7192bf0 |
06-Feb-2013 |
Chad Rosier <mcrosier@apple.com> |
Use a dyn_cast to avoid a crash when the TypeLoc is not a ConstantArrayTypeLoc. rdar://13153516 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174477 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
7cea1487602536e91a2c36511f5ad56ff1b2dc68 |
05-Feb-2013 |
Nick Lewycky <nicholas@mxc.ca> |
Test for virtual instead of pure here. It has the exact same effect, and John claims it will improve performance. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174341 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
afbcab8d10d4208c7ad8da79e948432117d4a326 |
05-Feb-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR15095: Use more correct source locations for the InitListExpr we fake up for vector initialization. Patch by John Stratton! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174339 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
a4dc51b46861eb52626f89183da7610437baba93 |
05-Feb-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Add some missing diagnostics for C++11 narrowing conversions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174337 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExpr.cpp
emaInit.cpp
|
3fa3feab35096b608f1d79bb541798b37a55e7b9 |
02-Feb-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR15132: Replace "address expression must be an lvalue or a function designator" diagnostic with more correct and more human-friendly "cannot take address of rvalue of type 'T'". For the case of & &T::f, provide a custom diagnostic, rather than unhelpfully saying "cannot take address of rvalue of type '<overloaded function type>'". For the case of &array_temporary, treat it just like a class temporary (including allowing it as an extension); the existing diagnostic wording for the class temporary case works fine. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174262 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
802e22682c17c4a9df3f747abd224db38e382e39 |
02-Feb-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Don't forget to run destructors when we create an array temporary of class type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174257 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
b7e5eec2f57bd82c6ddb762ca3dd7b7d8697e9d5 |
02-Feb-2013 |
Nick Lewycky <nicholas@mxc.ca> |
This patch makes "&Cls::purevfn" not an odr use. This isn't what the standard says, but that's a defect (to be filed). "Cls::purevfn()" is still an odr use. Also fixes a bug that caused us to not mark the function referenced just because we didn't want to mark it odr used. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174242 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaTemplate.cpp
emaTemplateVariadic.cpp
|
41f7b1a854362f7de5cb6d6b0c2964373dede51d |
01-Feb-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
objc: Provide correct fixit instruction when two mismatched nsstringis are compared without. // rdar://12716301 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174214 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
5ebcb20b0331a6e64c213f0bb5f4bed9a9e8eb34 |
01-Feb-2013 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
For ModuleLoader::makeModuleVisible() also pass the source location where the module import occurred. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174191 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
0162b832fd6450cd3a23019a3c900382d0e9415c |
01-Feb-2013 |
Alexander Kornienko <alexfh@google.com> |
Fixed segmentation fault when a CFGBlock has NULL successor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174182 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
57dab7135269ba12b979a91415153d00794c7727 |
01-Feb-2013 |
Bill Schmidt <wschmidt@linux.vnet.ibm.com> |
Fix PR14881 by implementing conversion rules between int and complex int. Prior to the patch, Clang does not properly promote types when a complex integer operand is combined with an integer via a binary operator, or when one is assigned to the other in either order. This patch detects when promotion is needed (and permissible) and generates the necessary code. The test assmes no target has the same size operands for "char" and "long long," and that no target performs arithmetic on char operands without extending them to a larger format first. If there are any targets for which this is not the case, they should be XFAILed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174181 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
5f838aa9c82c22b6ed2a0cb090969a706c8a1775 |
01-Feb-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix diagnostic for bad alignas use: it can't be applied to functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174160 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
cd0655b17249c4c4908ca91462657f62285017e6 |
01-Feb-2013 |
Nick Lewycky <nicholas@mxc.ca> |
Add a new -Wundefined-inline warning for inline functions which are used but not defined. Fixes PR14993! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174158 91177308-0d34-0410-b5e6-96231b3b80d8
ultiplexExternalSemaSource.cpp
ema.cpp
emaDecl.cpp
emaExpr.cpp
|
be507b6e72df8ab5e7d8c31eb4453e1bdf5fcfaf |
01-Feb-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Implement [dcl.align]p5 and C11 6.7.5/4: alignas cannot underalign. Also support alignas(0), which C++11 and C11 require us to ignore. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174157 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
emaTemplateInstantiateDecl.cpp
|
10318845f40d50b9d0ce010b0ea8d93a7b5ab029 |
01-Feb-2013 |
Douglas Gregor <dgregor@apple.com> |
Don't do delayed exception-specification checking on an invalid class. Fixes <rdar://problem/13017229>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174145 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
a31f65b10e61ca8f2f427b1df176c10ea8a0efa2 |
01-Feb-2013 |
Michael Han <fragmentshaders@gmail.com> |
[Sema][Attr]Fix alignment attribute printing. Remove "IsMSDeclspec" argument from Align attribute since the arguments in Attr.td should only model those appear in source code. Introduce attribute Accessor, and teach TableGen to generate syntax kind accessors for Align attribute, and use those accessors to decide if an alignment attribute is a declspec attribute. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174133 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaTemplateInstantiateDecl.cpp
|
8c84028ed9aa0dfd54ab729dee78f29c961d7f37 |
31-Jan-2013 |
Enea Zaffanella <zaffanella@cs.unipr.it> |
Added outer template parameter lists to friend type AST nodes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174050 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
29805ca6d278b4d9563adfee67f2478f0fecdcfc |
31-Jan-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Improve 'failed template argument deduction' diagnostic for the case where we have a direct mismatch between some component of the template and some component of the argument. The diagnostic now says what the mismatch was, but doesn't yet say which part of the template doesn't match. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174039 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaTemplateDeduction.cpp
|
626799b2903a2ab7f58ed82f10153bad4e0f1b7f |
31-Jan-2013 |
Douglas Gregor <dgregor@apple.com> |
When code completing in a statement, parenthesized expression, or Objective-C message receiver, the user is as likely to want to write a type name as any other declaration, so give types the same priority as other declarations. Fixes <rdar://problem/12480600>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174038 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
d1f09b482b3874be07dfe9dd24bfad98915989c3 |
31-Jan-2013 |
Douglas Gregor <dgregor@apple.com> |
Allow the computation of the base priority for a declaration code completion result to consider the completion context git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174037 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
|
0efa62f2096f28a610ac2ea8d2651448a7ec89c7 |
31-Jan-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Replace "failed template argument deduction" diagnostic with something useful in the one case where we've already factored out a reason code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174036 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaTemplateDeduction.cpp
|
995e26b0523ac8e3b6199a509b871b81fa5df6ee |
31-Jan-2013 |
Nick Lewycky <nicholas@mxc.ca> |
Remove elements from Sema.UndefinedInternals as functions are defined. Also filter the elements before emitting them into a PCH. No user-visible functionality change, except that PCH files may be smaller? git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174034 91177308-0d34-0410-b5e6-96231b3b80d8
ultiplexExternalSemaSource.cpp
ema.cpp
emaDecl.cpp
|
869709c06eefd1d756ae4290646d4412103697bd |
31-Jan-2013 |
Nick Lewycky <nicholas@mxc.ca> |
Fix grammar in comment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174033 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
f2705196d83a162665d4350bf3bb464972974ee3 |
31-Jan-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Clarify the diagnostic for -Wnested-anon-types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174032 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
4ceaf337be78fa89b4a97f351be6d0bda962d7de |
31-Jan-2013 |
Nick Lewycky <nicholas@mxc.ca> |
Fix ODR-use of a MemberExpr to check before marking a pure function used. Remove a workaround for this bug from the -Wundefined-internals warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174020 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaExpr.cpp
|
3e55e3e9f5e89c0cd433f6c01e0b067911228612 |
31-Jan-2013 |
Matt Beaumont-Gay <matthewbg@google.com> |
Fix unused variable warnings in -asserts build git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173996 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
7564bcca9f2a56bdbde3c6788d3f09cca0d8e312 |
30-Jan-2013 |
Tanya Lattner <tonic@nondot.org> |
Add OpenCL error that a kernel function must have void return type. Includes a test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173963 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
16bdd3b98e40a5a04705d399b90ddd88babd1c3d |
30-Jan-2013 |
Ted Kremenek <kremenek@apple.com> |
Hoist retrieval of Expr* into caller. No functionality change. Just makes the code a little cleaner, and easier to reason about. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173953 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
cb5620c9b213f4bd323912159fdddda35e258a14 |
30-Jan-2013 |
Dmitri Gribenko <gribozavr@gmail.com> |
Move UTF conversion routines from clang/lib/Basic to llvm/lib/Support This is required to use them in TableGen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173924 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
e1ac4aec0d30d2d81876e555017e727cc374ff5e |
30-Jan-2013 |
Tim Northover <Tim.Northover@arm.com> |
Also promote fp16 types to double when they're anonymous variadic arguments. __fp16 isn't covered by the standard, but this resolves the oddity that float gets promoted when passed variadically, but not the smaller type. This is required by the AArch64 ABI, and a sane action elsewhere. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173918 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
31aa57715090f29f9ad67e2e5c1fb528fc633563 |
30-Jan-2013 |
Douglas Gregor <dgregor@apple.com> |
Add "instancetype" as a code completion result for the return type of an Objective-C method. Fixes <rdar://problem/13069990>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173905 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
5824b803bb964247d2633ae893af409f915c80b1 |
30-Jan-2013 |
Douglas Gregor <dgregor@apple.com> |
The instance methods of the root class of an Objective-C hieararchy can be messaged via the metaclass. Provide code completions for this case. Fixes <rdar://problem/12560296>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173903 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
7586a6e6b7d79d4be031d2d0d6a35d5996cd0db9 |
30-Jan-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Semantic analysis and CodeGen support for C11's _Noreturn. This is modeled as an attribute for consistency with our other noreturn mechanisms. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173898 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
4874a8143dc3032205f97527ff619730db3d1f57 |
30-Jan-2013 |
Alexander Kornienko <alexfh@google.com> |
Don't warn on fall-through from unreachable code. Summary: A motivating example: class ClassWithDtor { public: ~ClassWithDtor() {} }; void fallthrough3(int n) { switch (n) { case 2: do { ClassWithDtor temp; return; } while (0); // This generates a chain of unreachable CFG blocks. case 3: break; } } Reviewers: rsmith, doug.gregor, alexfh Reviewed By: alexfh CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D330 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173889 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
1d87fbaeea4a9fbbd73b3a53641f59f1673098e5 |
30-Jan-2013 |
David Blaikie <dblaikie@gmail.com> |
Provide a fixit for constexpr non-static data members. If the member has an initializer, assume it was probably intended to be static and suggest/recover with that. If the member doesn't have an initializer, assume it was probably intended to be const instead of constexpr and suggest that. (if the attempt to apply these changes fails, don't make any suggestion & produce the same diagnostic experience as before. The only case where this can come up that I know of is with a mutable constexpr with an initializer, since mutable is incompatible with static (but it's already incompatible with const anyway)) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173873 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
7adf4179f827b14b025135829dadeaa2442e1d42 |
30-Jan-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
c: When checking on validity of sizeof passed as size of argument to be memset, check for its type to be complete before calling Context.getTypeSize(PointeeTy) to prevent crash. // rdar://13081751. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173872 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
a367e9de80eb05e78f06dc35c1e050799e735282 |
29-Jan-2013 |
David Blaikie <dblaikie@gmail.com> |
Move -Wstatic-float-init fixit into a note & don't recover as if constexpr git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173841 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
6933e3b037fcb15b68f41d2b91ee01db45a2d43a |
29-Jan-2013 |
David Blaikie <dblaikie@gmail.com> |
Don't fixit/recover from -Wstatic-float-init when it's not an error. Fix to change r173414 that lead to Clang changing const to constexpr even under -Wno-static-float-init. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173835 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
3d207e76a1c7ece5deec3d6ee35af04fe7f6212e |
29-Jan-2013 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Mark a struct definition in an objc container with the TopLevelDeclInObjCContainer bit. Fixes accurately getting a cursor inside an objc container containing a struct definition, from a PCH/preamble file. rdar://12584613 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173811 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
98f988dc1bea127fbc2db76d9ffafdcf5f4435e4 |
29-Jan-2013 |
Joey Gouly <joey.gouly@arm.com> |
Add a diagnostic for an OpenCL kernel with a pointer pointer argument. Also refactor the surrounding code a little. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173791 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d03de6aaa312d57dcd6e2bc76bed1e89f5c5019d |
29-Jan-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Downgrade 'attribute ignored when parsing type' from error to warning, to match the diagnostic's warn_ name. Switch some places (notably C++11 attributes) which really wanted an error over to a different diagnostic. Finally, suppress the diagnostic entirely for __ptr32, __ptr64 and __w64, to avoid producing diagnostics in important system headers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173788 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaType.cpp
|
4cd81c5bf5957b2b10ddf253035f6e1596082108 |
29-Jan-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Implement C++11 [dcl.align]p1 and C11 6.7.5/2 rules for alignas and _Alignas. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173779 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
8f3aacc8c4849c9e0e7a236954725fffdeb917a6 |
29-Jan-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Propagate the spelling list index for an attribute across template instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173768 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaTemplateInstantiateDecl.cpp
|
485b31292752252328de0a3db1d1cd39c87026c0 |
29-Jan-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR15100: look through type sugar when determining whether we have one of the forms of 'main' which we accept as an extension. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173758 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
cda7968b38d76848b4fb24f7cc28ab83835b4ea3 |
29-Jan-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Actually remove the hack which was blocking the Borland-style attributes from working, and add the missing attribute spellings. This brings _pascal, _fastcall, _stdcall and _cdecl to life in -fborland-extensions mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173749 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
5cd532ca0bc1cb8110e24586d064f72332d8b767 |
29-Jan-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Replace AS_MSTypespec with AS_Keyword, for representing any attribute spelled as a keyword. Rationalize existing attributes to use it as appropriate, and to not lie about some __declspec attributes being GNU attributes. In passing, remove a gross hack which was discarding attributes which we could handle. This results in us actually respecting the __pascal keyword again. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173746 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaType.cpp
|
3a2b7a18a4504f39e3ded0d2b5749c5c80b8b9b5 |
28-Jan-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Finish semantic analysis for [[carries_dependency]] attribute. This required plumbing through a new flag to determine whether a ParmVarDecl is actually a parameter of a function declaration (as opposed to a function typedef etc, where the attribute is prohibited). Weirdly, this attribute (just like [[noreturn]]) cannot be applied to a function type, just to a function declaration (and its parameters). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173726 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
|
bde67cfdf05f7c569661e7a490b0b0811ac1ec56 |
28-Jan-2013 |
Douglas Gregor <dgregor@apple.com> |
Undo my re-wording of the "ARC forbids Objective-C objects in ..." error. Jordan is right. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173713 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
4581d45405f07374770366be8644d52733985833 |
28-Jan-2013 |
Douglas Gregor <dgregor@apple.com> |
Forbid the use of objects in unions in Objective-C++ ARC. Fixes <rdar://problem/13098104>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173708 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d98f708a9b17dc57c1305cd1ab15f72912db7db3 |
28-Jan-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Tests and a minor bugfix for [dcl.attr.depend]p1 (C++11 [[carries_dependency]] attribute). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173645 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
c5f7d6aed586fc492383255633c7ea5591256bfe |
28-Jan-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Add a -pedantic warning: an anonymous union within an anonymous union is not permitted in standard C++, despite being silently accepted by many (all?) major C++ implementations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173643 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
98bfbf5354b8b35fd3efd12932894d7452697226 |
26-Jan-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix mismatch between pointer and pointee type when diagnosing an incorrect object argument type for a member call. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173554 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
87827616cd5540a4893e0c2c285c90dedb50fb91 |
26-Jan-2013 |
Nick Lewycky <nicholas@mxc.ca> |
Remove function that is newly dead as of r173538. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173550 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
25cf8abf30189323199b1424848b105940267c1b |
26-Jan-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Revert r172285 (suppressing a 'redundant' -Wc++98-compat warning) and add a testcase for a situation it caused us to miss. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173540 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
01a41140cd8ec9475ed0c33384310fbdd3b6de11 |
26-Jan-2013 |
Nick Lewycky <nicholas@mxc.ca> |
Preserve Sema::UndefinedInternals across PCH boundaries. Fixes -Wundefined-internal warnings with PCH. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173538 91177308-0d34-0410-b5e6-96231b3b80d8
ultiplexExternalSemaSource.cpp
ema.cpp
emaLookup.cpp
|
3ac83d69c61238cd0d38e90fcdd03390530ab2fb |
26-Jan-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
patch for PR9027 and // rdar://11861085 Title: [PR9027] volatile struct bug: member is not loaded at -O; This is caused by last flag passed to @llvm.memcpy being false, not honoring that aggregate has at least one 'volatile' data member (even though aggregate itself has not been qualified as 'volatile'. As a result, optimization optimizes away the memcpy altogether. Patch review by John MaCall (I still need to fix up a test though). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173535 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d5617eeafc93209a26b9f88276c88cf997c3a0a7 |
25-Jan-2013 |
John McCall <rjmccall@apple.com> |
The standard ARM C++ ABI dictates that inline functions are never key functions. We did not implement that rule for the iOS ABI, which was driven by what was implemented in gcc-4.2. However, implement it now for other ARM-based platforms. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173515 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDecl.cpp
emaDeclCXX.cpp
|
b8b2c9da87e7d70a1679db026f40548b3192b705 |
25-Jan-2013 |
John McCall <rjmccall@apple.com> |
First pass at abstracting out a class for the target C++ ABI. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173514 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
c6dcea93b499b504da22f9921fc198423ad0b13b |
25-Jan-2013 |
Alexander Kornienko <alexfh@google.com> |
Silence unintended fallthrough diagnostic on a case label preceded with a normal label. Summary: It's unlikely that a fallthrough is unintended in the following code: switch (n) { ... label: case 1: ... goto label; ... } Reviewers: rsmith, doug.gregor Reviewed By: doug.gregor CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D329 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173486 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
e992ed1a065d857947b3969e6b779c41cc35c234 |
25-Jan-2013 |
Alexander Kornienko <alexfh@google.com> |
Don't suggest to insert [[clang::fallthrough]] before empty cases. Fix for multiple case labels. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173458 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
b4b1d69f19f32e8aeb2ce1e0239c6e20a7f9e952 |
25-Jan-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Sync 'in class initialization of static const double' extension up with GCC, and split it out of -Wgnu into its own warning flag. * In C++11, this is now a hard error (GCC has no extension here in C++11 mode). The error can be disabled with -Wno-static-float-init, and has a fixit to add 'constexpr'. * In C++98, this is still an ExtWarn, but is now controlled by -Wstatic-float-init as well as -Wgnu. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173414 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d4497dde6fc8f5ce79e0ec37682b8dc920bbbef0 |
25-Jan-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Clean up: since we have FunctionDecl::IsInline, make it store the right value for template instantiations, and use it to simplify the implementation of FunctionDecl::isInlined(). This incidentally changes the result of isInlined on a declared-but-not-defined non-inline member function from true to false. This is sort of a bug fix, but currently isInlined is only called on function definitions, so it has no visible effects. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173397 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
ad48a500596d7d678b99c7f94326cfa856c3b49f |
24-Jan-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to check for integer overflow. It has been commented on and approved by Richard Smith. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173377 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDecl.cpp
emaExprCXX.cpp
emaStmt.cpp
|
ae07378ff9bf4af9bdd97a4607437ace4c32b7e7 |
24-Jan-2013 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Add an error when trying to compile MS-style inline assembly for an unsupported architecture. rdar://13063988 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173364 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
51d8c52ad36129760eaa586f85176037e2cd0d0e |
24-Jan-2013 |
Michael Han <fragmentshaders@gmail.com> |
PR14922: when printing an attribute, use the real syntax of the attribute (GNU, C++11, MS Declspec) instead of hardcoded GNU syntax. Introduce a spelling index to Attr class, which is an index into the attribute spelling list of an attribute defined in Attr.td. This index will determine the actual spelling used by an attribute, as it incorporates both the syntax and naming of the attribute. When constructing an attribute AST node, the spelling index is computed based on attribute kind, scope (if it's a C++11 attribute), and name, then passed to Attr that will use the index to print itself. Thanks to Richard Smith for the idea and review. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173358 91177308-0d34-0410-b5e6-96231b3b80d8
ttributeList.cpp
MakeLists.txt
emaDecl.cpp
emaDeclAttr.cpp
argetAttributesSema.cpp
|
9b7ea0d2cc86c949ed70ad810f51ff34c7ce2f83 |
24-Jan-2013 |
Nick Lewycky <nicholas@mxc.ca> |
Start checking nonnull (as well as format and argument_with_type_tag) on overloaded binary operators. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173315 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
5d9484da2168e20a70a16938bd8dee86ac82521a |
24-Jan-2013 |
Nick Lewycky <nicholas@mxc.ca> |
Fix some wonky formatting, remove spurious emacs major mode marker. No functionality change! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173314 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaOverload.cpp
|
4ea6a646af4765791d0829034016bd47eff8c789 |
24-Jan-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Micro cleanup: use an array of const char, rather than an array of char, as the type of the string literal implicitly used for a raw user-defined literal call. No test; this has no semantic impact. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173309 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
630f4bb9f12e330438281c4e46deb6656620b73a |
23-Jan-2013 |
Dmitri Gribenko <gribozavr@gmail.com> |
Implement -Wvla correctly GCC implements -Wvla as "warn on every VLA" (this is useful to find every VLA, for example, if they are forbidden by coding guidelines). Currently Clang implements -Wvla as "warn on VLA when it is an extension". The attached patch makes our behavior match GCC. The existing vla extwarn is moved under -Wvla-extension and is still included into -Wgnu. This fixes PR5953. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173286 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
89cf425f1136f8d24a64ed94450e488b6794dfa4 |
23-Jan-2013 |
Dmitri Gribenko <gribozavr@gmail.com> |
Use 'const Decl *' throughout code completion in Sema git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173277 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCXXScopeSpec.cpp
emaCodeComplete.cpp
emaTemplateDeduction.cpp
|
19dbb20ac4371fae3190379a7e7bd467af3c00aa |
23-Jan-2013 |
Joey Gouly <joey.gouly@arm.com> |
Add a new LangOpt NativeHalfType. This option allows for native half/fp16 operations (as opposed to storage only half/fp16). Also add some semantic checks for OpenCL half types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173254 91177308-0d34-0410-b5e6-96231b3b80d8
emaCast.cpp
emaDecl.cpp
emaExpr.cpp
emaOverload.cpp
emaType.cpp
|
3edf387e4338ff98d9874b4c1b41d787e49d6c2b |
23-Jan-2013 |
Nick Lewycky <nicholas@mxc.ca> |
Make __attribute__((nonnull)) use the general expression evaluator to search for nulls instead of limiting itself to the language-defined "null pointer constant". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173227 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
3548068c22f809e5bc64b83d2c3622018469256c |
22-Jan-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
Small code change to improve performance in my last patch, suggested by Argyrios. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173182 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
48f3cc2b2be1d32df14234904539b34e6e387e4a |
22-Jan-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
objectiveC (take two): don't warn when in -Wselector mode and an unimplemented selector is consumed by "respondsToSelector:". // rdar://12938616 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173179 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
f11ccc1cbb26cacac36abebe6ce9add43bf32585 |
21-Jan-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
objectiveC: don't warn when in -Wselector mode and an unimplemented selector is consumed by "respondsToSelector:". // rdar://12938616 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173097 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
cd376b63c42214c7851ca917e7da9d30f9e84fa4 |
09-Jan-2013 |
Stephen Hines <srhines@google.com> |
Update Clang for merge to r171906. clang-tblgen-rules.mk - New AttrDump.inc target lib/AST/Android.mk lib/Analysis/Android.mk lib/Basic/Android.mk lib/Lex/Android.mk lib/Parse/Android.mk lib/Sema/Android.mk lib/StaticAnalyzer/Checkers/Android.mk Change-Id: If31b4c9123f730ab851f11b00b0688166b14b4b2
ndroid.mk
|
15bb58edc9d053aa49c28167deb41ff0409ddabc |
21-Jan-2013 |
Stephen Hines <srhines@google.com> |
Merge commit 'd130fd2e141f1fef412c2d58e7385370801bd718' into merge-llvm Conflicts: lib/Basic/Targets.cpp Change-Id: I90a669a33ffe4de8b32c8459016fd0b2a55da0ad
|
b892d7010f9c2c61e2f3a2686546cbfbffbedef3 |
21-Jan-2013 |
Douglas Gregor <dgregor@apple.com> |
Eliminate Sema::CompareProperties(), which was walking over a pile of lexical declarations looking for properties when we could more efficiently check for property mismatches at property declaration time. Good for ~1% of -fsyntax-only time when most of the properties we're checking against come from an AST file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173079 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
emaObjCProperty.cpp
|
aabd094cf694039fe823987e133af7ac25cb9711 |
21-Jan-2013 |
Douglas Gregor <dgregor@apple.com> |
Eliminate the oddly-named Sema::ComparePropertiesInBaseAndSuper, which did a redundant traversal of the lexical declarations in the superclass. Instead, when we declare a new property, look into the superclass to see whether we're redeclaring the property. Goot for 1% of -fsyntax-only time on Cocoa.h and a little less than 3% on my modules test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173073 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
emaObjCProperty.cpp
|
0dfe23c5d571222e74e3ed74c6fff3cee792118e |
21-Jan-2013 |
Douglas Gregor <dgregor@apple.com> |
Replace some unnecessary O(N^2) lookups for properties with DeclContext lookups. The performance win is negligible in my tests, but it's the Right Thing To Do (TM). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173068 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
445743dec72f675070d4789c348607cd8cbf6090 |
21-Jan-2013 |
Dmitri Gribenko <gribozavr@gmail.com> |
Add a fixit for _Noreturn main, add tests for fixits removing static and inline from main git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173024 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
e6b9d802fb7b16d93474c4f1c179ab36202e8a8b |
20-Jan-2013 |
Guy Benyei <guy.benyei@intel.com> |
Implement OpenCL event_t as Clang builtin type, including event_t related OpenCL restrictions (OpenCL 1.2 spec 6.9) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172973 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
emaDecl.cpp
emaInit.cpp
emaTemplateVariadic.cpp
emaType.cpp
|
0116a40116616701282e12f3d92cf2949102d76a |
20-Jan-2013 |
Michael Gottesman <mgottesman@apple.com> |
Fixed trailing whitespace. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172939 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
39371b8bbf1bb54bcadef74cffefc98ca8f00b76 |
19-Jan-2013 |
Ted Kremenek <kremenek@apple.com> |
Reapply r172878 with test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172888 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f30527901f84c9bf223db143b216a9061ee9e342 |
19-Jan-2013 |
NAKAMURA Takumi <geek4civic@gmail.com> |
Whitespace. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172881 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
6adfff14ee7eaaf50af00bcb793a79e7d82f1265 |
19-Jan-2013 |
NAKAMURA Takumi <geek4civic@gmail.com> |
Revert r172878, "Reword warning about using a *static* variable within its own initialization." It broke, at least, linux, msvc and mingw bots. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172879 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
1bdac1d447f0a9e8db97ed5598d15174bc00e5e1 |
19-Jan-2013 |
Ted Kremenek <kremenek@apple.com> |
Reword warning about using a *static* variable within its own initialization. The warning is still under -Wuninitialized (although technically this is defined behavior), but under a subgroup -Wstatic-self-init. This addresses PR 10265. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172878 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
299adab3e2033e9addc1df4544d8486fc596c6ff |
19-Jan-2013 |
David Blaikie <dblaikie@gmail.com> |
Remove windows line endings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172865 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
22eaced5cac3cf0522c953f593419fc6cf184aaf |
18-Jan-2013 |
Douglas Gregor <dgregor@apple.com> |
Once we've collected the template arguments for a partially-substituted parameter pack in a template, forget about the partially-substituted parameter pack: it is now completed. Fixes <rdar://problem/12176336>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172859 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
f373c5d0b7f04fc3fa4e34bdfb868d118de6a641 |
18-Jan-2013 |
Douglas Gregor <dgregor@apple.com> |
When checking the parameter types of an Objective-C method, don't decay the parameter type immediately; let CheckParameter() do its job. Fixes <rdar://problem/12071218>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172780 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
92d1387ca9a1b2becdf7d72e0111872cff135197 |
18-Jan-2013 |
Douglas Gregor <dgregor@apple.com> |
One can override an Objective-C ARC ownership qualifier that came from a template parameter; make that also include one that came from 'auto'. Fixes <rdar://problem/12078752>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172770 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
02dd79830979e6d83d4420377e8f4c9e4a77439b |
18-Jan-2013 |
Douglas Gregor <dgregor@apple.com> |
In Objective-C ARC, completely ignore ownership qualifiers on the return type of a function by canonicalizing them away. They are useless anyway, and conflict with our rules for template argument deduction and __strong. Fixes <rdar://problem/12367446>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172768 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
1a2dcd55a1924b46c919474390a3f0cdf2cebeb0 |
18-Jan-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Defer checking for unsequenced operations on the RHS of && and || in order to reduce stack usage and hopefully bring back the linux x86_64 buildbot. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172765 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
de03c15ad92b44a4be11507ca2501bb9dd014dce |
17-Jan-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Parsing support for C11's _Noreturn keyword. No semantics yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172761 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
emaDecl.cpp
|
995e4a7530d705147c875b63608532c483c011a8 |
17-Jan-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
-Wunsequenced: if the LHS of an &&, || or ?: is not constant, check for unsequenced operations in the RHS. We don't compare the RHS with the rest of the expression yet; such checks will need care to avoid diagnosing unsequenced operations which are both in conditionally-evaluated subexpressions which actually can't occur together, such as in '(b && ++x) + (!b && ++x)'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172760 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
b8b5cbc169c9f6c523ada0d37dd126f7af65f3f8 |
17-Jan-2013 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Extend the Sema interface to get the size and length of a VarDecl. Part of rdar://12576868 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172742 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
617bb317a7aeb6c3468a4170a5d6c1058da7cea1 |
17-Jan-2013 |
Joey Gouly <joey.gouly@arm.com> |
Add some semantic checks for OpenCL. Variadic macros, VLAs and bitfields are not supported. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172732 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaType.cpp
|
ee000bb236fd99f297c253206e5f110a8f49661e |
17-Jan-2013 |
David Blaikie <dblaikie@gmail.com> |
Improve -Wreorder to handle cases of anonymous class member ordering git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172707 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
93c8617bec98aeb769ee9f569d7ed439eec03249 |
17-Jan-2013 |
David Blaikie <dblaikie@gmail.com> |
ArrayRef-ize some ctor initializer related APIs git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172701 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
|
72190da43924db7d0238fe5c696ecab2bb5bf196 |
17-Jan-2013 |
David Blaikie <dblaikie@gmail.com> |
Remove some unnecessary casts git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172700 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
87b73ba920f523ef13f2420cbdb958a281aa6f33 |
17-Jan-2013 |
Matt Beaumont-Gay <matthewbg@google.com> |
Suppress all -Wunused-value warnings from macro body expansions. This is inspired by a number of false positives in real code, including PR14968. I've added test cases reduced from these false positives to test/Sema/unused-expr.c, as well as corresponding test cases that pass the offending expressions as arguments to a no-op macro to ensure that we do warn there. This also removes my previous tweak from r166522/r166534, so that we warn on unused cast expressions in macro arguments. There were several test cases that were using -Wunused-value to test general diagnostic emission features; I changed those to use other warnings or warn on a macro argument expression. I stared at the test case for PR14399 for a while with Richard Smith and we believe the new test case exercises the same codepaths as before. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172696 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
e5096c8f2f2e64d5ac98531ff9aa952bbe60d5fc |
17-Jan-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Attempt to work around bug in older GCCs to fix buildbot. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172693 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
cd8ab51a44e80625d84126780b0d85a7732e25af |
17-Jan-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Implement C++11 semantics for [[noreturn]] attribute. This required splitting it apart from [[gnu::noreturn]] / __attribute__((noreturn)), since their semantics are not equivalent (for instance, we treat [[gnu::noreturn]] as affecting the function type, whereas [[noreturn]] does not). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172691 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaStmt.cpp
emaType.cpp
|
6c3af3d0e3e65bcbca57bfd458d684941f6d0531 |
17-Jan-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Add -Wunsequenced (with compatibility alias -Wsequence-point) to warn on expressions which have undefined behavior due to multiple unsequenced modifications or an unsequenced modification and use of a variable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172690 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
|
0f9b9f37941ea709104f02d7dbe4ea18ab457605 |
17-Jan-2013 |
Douglas Gregor <dgregor@apple.com> |
Treat hidden Objective-C protocol definitions as if they were undefined, and don't find methods or protocols within those protocol definitions. This completes <rdar://problem/10634711>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172686 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
a6f97071338e525d18e607ca286e338639dd2a5e |
17-Jan-2013 |
Dmitri Gribenko <gribozavr@gmail.com> |
Implement a fixit for -Wmain-return-type git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172684 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
4d8a33b4cea46948f86afccf0ad3675aff924148 |
17-Jan-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Delay linkage checks when validating the weakref attribute. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172678 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
|
afb7ce3f877594362381926eaeac8ed6bbe18069 |
17-Jan-2013 |
Aaron Ballman <aaron@aaronballman.com> |
Fixes crash when illegal function definitions are deleted or defaulted. Fixes PR14577. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172676 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
2df0df8de44845a441f07a37db5bfcadd0215019 |
17-Jan-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Simplify code. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172673 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
2a5bb509e2d33a0f7aa4bb0ba53c73b5dfdd6bb4 |
17-Jan-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Check for internal weak decls after merging. This fixes pr14946. The problem was that the linkage computation was done too early, so things like "extern int a;" would be given external linkage, even if a previous declaration was static. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172667 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
|
d329724745b49f894b768d47275b7c2713106e89 |
17-Jan-2013 |
Douglas Gregor <dgregor@apple.com> |
Rework the traversal of Objective-C categories and extensions to consider (sub)module visibility. The bulk of this change replaces myriad hand-rolled loops over the linked list of Objective-C categories/extensions attached to an interface declaration with loops using one of the four new category iterator kinds: visible_categories_iterator: Iterates over all visible categories and extensions, hiding any that have their "hidden" bit set. This is by far the most commonly used iterator. known_categories_iterator: Iterates over all categories and extensions, ignoring the "hidden" bit. This tends to be used for redeclaration-like traversals. visible_extensions_iterator: Iterates over all visible extensions, hiding any that have their "hidden" bit set. known_extensions_iterator: Iterates over all extensions, whether they are visible to normal name lookup or not. The effect of this change is that any uses of the visible_ iterators will respect module-import visibility. See the new tests for examples. Note that the old accessors for categories and extensions are gone; there are *Raw() forms for some of them, for those (few) areas of the compiler that have to manipulate the linked list of categories directly. This is generally discouraged. Part two of <rdar://problem/10634711>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172665 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
emaDecl.cpp
emaDeclObjC.cpp
emaLookup.cpp
emaObjCProperty.cpp
|
f0e00046711280d494f3ef2d85ae67a442b97406 |
16-Jan-2013 |
Douglas Gregor <dgregor@apple.com> |
Teach global selector lookup to ignore hidden methods, which occur when the methods are declared in a submodule that has not yet been imported. Part of <rdar://problem/10634711>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172635 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
7dfd18275259df609f8574a25302fc73a000aa64 |
16-Jan-2013 |
Reed Kotler <rkotler@mips.com> |
First step in implementation of mips16 and nomips16 attributes. Waiting for new llvm attribute code for the next step. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172626 91177308-0d34-0410-b5e6-96231b3b80d8
argetAttributesSema.cpp
|
72daa3f2de226952825f19d7e60a3e9d77ea8c81 |
16-Jan-2013 |
Douglas Gregor <dgregor@apple.com> |
One can have an unavailable method overridden by an available method, but not vice-versa. Fix bug introduced in r172567 and noticed by Jordan, thanks! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172586 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
b9df75f1b83d36be7bfbafc2f25d9fcf768874a3 |
16-Jan-2013 |
Douglas Gregor <dgregor@apple.com> |
Apply adjustment to function- and array-typed non-type template parameters (per C++ [temp.param]p8) when computing the type of a reference to a non-type template parameter. Fixes <rdar://problem/13000548>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172585 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
f4d918fdf7da64215db8abe63945798c66e6d132 |
15-Jan-2013 |
Douglas Gregor <dgregor@apple.com> |
When checking availability attributes for consistency between an overriding and overridden method, allow the overridden method to have a narrower contract (introduced earlier, deprecated/obsoleted later) than the overriding method. Fixes <rdar://problem/12992023>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172567 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
emaDeclObjC.cpp
|
c23e69d761e369bb7ffeef52926ab0442c41670f |
15-Jan-2013 |
David Greene <greened@obbligato.org> |
Fix Cast Code Eliminate a cast and resulting cast-qual warning by using a temporary as the target of memcpy. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172557 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
|
02d65ee373feb1cb029185aa0de04d0c214eda3d |
15-Jan-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Don't crash when binding a reference to a temporary pointer created from resolving an overloaded function reference within an initializer list. Previously we would try to resolve the overloaded function reference without first stripping off the InitListExpr wrapper. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172517 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
a121eb3af061a9402aa88630a0eb535d92962e2c |
15-Jan-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR14950: Fix out-of-bounds function parameter access in literal operator lookup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172514 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
5c52166525f8714c3e3a979b156ec23426947fd3 |
15-Jan-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix behavior of [[gnu::]] function attributes. Per g++'s behavior, these attributes appertain to a declaration, even though they would be much more naturally modelled as appertaining to a function type. Previously, we would try to distribute them from the declarator to the function type, then reject them for being at an incorrect location. Now, we just distribute them as far as the declarator; the existing attribute handling code can actually apply them there just fine. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172504 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
419563768ef4929a622d7c2b066856e82901bb91 |
14-Jan-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Refactor to call ActOnFinishFullExpr on every full expression. Teach ActOnFinishFullExpr that some of its checks only apply to discarded-value expressions. This adds missing checks for unexpanded variadic template parameter packs to a handful of constructs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172485 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaStmt.cpp
reeTransform.h
|
714fcc1bcb42508983f9fd3435aa1dcd06212a8c |
14-Jan-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix regression in r172376. Don't try to detect missing 'constexpr' specifiers on redeclarations, since that makes us pick wrong prior declarations under some circumstances. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172384 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
f7a052732c2b6c82f74708038f75fa92c9b4dba0 |
14-Jan-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Accept [[gnu::*]] for all __attribute__((*))s which are: 1) Supported by Clang, and 2) Supported by GCC, and 3) Documented in GCC's manual. g++ allows its C++11-style attributes to appertain only to the entity being declared, and never to a type (even for a type attribute), so we do the same. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172382 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
21c8fa87a3517d835072193a59a955ec7f6bf408 |
14-Jan-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR12008: defer adding the implicit 'const' to a constexpr member function until we know whether it is static. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172376 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaOverload.cpp
emaTemplate.cpp
emaType.cpp
|
1c030e9a3f290a1eea5de82fe1e63dfde2bd8f1e |
13-Jan-2013 |
Dmitri Gribenko <gribozavr@gmail.com> |
ArrayRef'ize Sema APIs related to format string checking git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172367 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDeclCXX.cpp
|
a4fa9008988985f9cf01712a99ddd923aea278a0 |
13-Jan-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Remove some duplication in the handling of __attribute__((ext_vector_size(N))). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172340 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaType.cpp
|
cfa88f893915ceb8ae4ce2f17c46c24a4d67502f |
12-Jan-2013 |
Dmitri Gribenko <gribozavr@gmail.com> |
Remove useless 'llvm::' qualifier from names like StringRef and others that are brought into 'clang' namespace by clang/Basic/LLVM.h git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172323 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
odeCompleteConsumer.cpp
ema.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaLambda.cpp
emaLookup.cpp
emaOverload.cpp
emaStmt.cpp
emaStmtAsm.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
reeTransform.h
|
838dc597e25614c653a062a124b06a04d6b7f5eb |
12-Jan-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Disable caching of visibility. The testcase in pr14929 shows that this is extremely hard to do. If we choose to apply the attribute, that causes the visibility of some decls to change and that can happen really late (during codegen). Current gcc warns and ignores the attribute in this testcase with a warning. This suggest that the correct solution is to find a point in the compilation where we can compute the visibility and * assert it was never computed before * reject any attempts to compute it again in the future (with warnings). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172305 91177308-0d34-0410-b5e6-96231b3b80d8
emaAttr.cpp
emaDecl.cpp
emaDeclAttr.cpp
|
7a525acb2ba57ea03cfc8f843bfb2e5f81caf65f |
12-Jan-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Fix a regression from 171193: main cannot be overloaded. Thanks Eli Friedman for noticing it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172292 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
ca2ab45341c448284cf93770018c717810575f86 |
12-Jan-2013 |
Douglas Gregor <dgregor@apple.com> |
Provide Decl::getOwningModule(), which determines the (sub)module in which a particular declaration resides. Use this information to customize the "definition of 'blah' must be imported from another module" diagnostic with the module the user actually has to import. Additionally, recover by importing that module, so we don't complain about other names in that module. Still TODO: coming up with decent Fix-Its for these cases, and expand this recovery approach for other name lookup failures. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172290 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaType.cpp
|
193649c2a3ff0616777de934a2bf47eaeb4f1076 |
12-Jan-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Only produce one -Wc++98-compat warning when initializing a reference from an init list with multiple elements. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172285 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
c3cd6f7a5d33ad44f6c9cf4faa7046c77baa128e |
12-Jan-2013 |
Matt Beaumont-Gay <matthewbg@google.com> |
Fix -Wunused-comparison for comparisons in arguments to function-like macros. Previously, -Wunused-comparison ignored comparisons in both macro bodies and macro arguments, but we would still emit a -Wunused-value warning for either. Now we correctly emit -Wunused-comparison for expressions in macro arguments. Also, add isMacroBodyExpansion to SourceManager, to go along with isMacroArgExpansion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172279 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
06d8c60e37cd8cfdff1bf73ec8d58c2373cfd8f1 |
11-Jan-2013 |
Dmitri Gribenko <gribozavr@gmail.com> |
Constify parameter of clang::getCursorKindForDecl git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172249 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
294ddc63398f2c9435fcfbdb4da4ac3a23c1cbba |
11-Jan-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Reject incompatible redeclarations of extern C symbols. Before we were only checking if the new declaration itself was marked extern C. Fixes prpr14766. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172243 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
601e6e894c2a38243588b375bed0b9a9e60060bb |
11-Jan-2013 |
Enea Zaffanella <zaffanella@cs.unipr.it> |
Fixed an assertion failure triggered by invalid code. Set invalid type of declarator after emitting error diagnostics, so that it won't be later considered when instantiating the template. Added test5_inst in test/SemaCXX/condition.cpp for non-regression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172201 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
5ea6ef490547917426d5e2ed14c9f36521bbeacf |
11-Jan-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Truth in advertising: LocallyScopedExternalDecls actually only contains external declarations with C language linkage. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172150 91177308-0d34-0410-b5e6-96231b3b80d8
ultiplexExternalSemaSource.cpp
emaDecl.cpp
|
3973f28f347bf8ca3cca31ea30da235c95701231 |
10-Jan-2013 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Extend the inline asm Sema lookup interface to determine if the Decl is a VarDecl. Part of rdar://12991541 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172120 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
f6e65cc9a654d54411c43fd014e911a407ad4075 |
10-Jan-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
Provide a better warning when case value overflows. // rdar://11577384 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172102 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
a18e70b25c85d7e653e642b5e6e58d6063af3d83 |
10-Jan-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
Issue warning when case value is too large to fit in case condition type. // rdar://11577384. Test is conditionalized on x86_64-apple triple as I am not sure if the INT_MAX/LONG_MAX values in the test will pass this test for other hosts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172016 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
7dc80e1c4dd44ce2b2da0fc3daff786c3d02348b |
09-Jan-2013 |
Douglas Gregor <dgregor@apple.com> |
When name lookup for a redeclaration finds declarations that are known (because they are part of some module) but have not been made visible (because they are in a submodule that wasn't imported), filter out those declarations unless both the old declaration and the new declaration have external linkage. When one or both has internal linkage, there should be no conflict unless both are imported. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171925 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
e178e70e14380cf8828a307f912fcdbd3882b752 |
09-Jan-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
put back diagnostics when flexible members are captured in lambdas. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171921 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b20eb10c8f51d26b0c486f345db25e26f96acb06 |
09-Jan-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
Fix typo (again). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171917 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
4b3040f51a96248fa34ba14cf54914d361142bd7 |
09-Jan-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
Remove lambda from my last patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171915 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
456cfc0010ceb785f1e41735935302884b8b4250 |
09-Jan-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
Fixes typo in comment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171913 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
9c0816f36d9012c5ed1445ed969fba5b60bcec01 |
09-Jan-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
objectiveC blocks: It is impractical to capture struct variables with flexiable array members in blocks (and lambdas). Issue error instead of crashing in IRGen. // rdar://12655829 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171912 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
d130fd2e141f1fef412c2d58e7385370801bd718 |
08-Jan-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Clear LV cache when dropping availability attributes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171906 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
51be6e3487c4b7f43d9f5b2db962382b79295acb |
08-Jan-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Tighten types a bit. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171902 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
|
8c4222adbc0fd22928e751be6a75328fc9283a72 |
08-Jan-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Don't crash when trying to apply the availability attribute to a block. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171899 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
fc35cbca942ccdfe43742c1d786ed168517e0a47 |
08-Jan-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Tighten types a bit. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171894 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
a6d2020412455ec582454811435202eadc037081 |
08-Jan-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Move loop variable update. Thanks to Dmitri Gribenko for the suggestion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171889 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b9725cfb0a50731930a6331beb70f361b4d52a29 |
08-Jan-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Mark all subsequent decls used. In the source static void f(); static void f(); template<typename T> static void g() { f(); } static void f() { } void h() { g<int>(); } the call to f refers to the second decl, but it is only marked used at the end of the translation unit during instantiation, after the third f decl has been linked in. With this patch we mark all subsequent decls used, so that it is easy to check if a symbol is used or not. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171888 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaExpr.cpp
|
7cdc45751cb5b200ad5fff0de28c5d1a64b6fce3 |
08-Jan-2013 |
Douglas Gregor <dgregor@apple.com> |
Use Decl::getAvailability() rather than checking for the "unavailable" attribute when determining whether we need to see an implementation of a property. Fixes <rdar://problem/12958191>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171877 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
d63b19ea855a66df8c58764604d48497c48829d9 |
08-Jan-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Clear the LV cache when merging the availability attribute. The availability implies default visibility, so it can change the computed visibility. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171840 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
cbb99efceb3a2c27ba2382df97f3b69c75974f94 |
08-Jan-2013 |
Ted Kremenek <kremenek@apple.com> |
Don't warn about undefined varargs argument behavior in unreachable code. Fixes <rdar://problem/12322000>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171831 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
774d8b4679ce1317da0f18336c3d27bdb11e5f63 |
08-Jan-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR14838: When a member reference is bound to a temporary, don't forget to perform the semantic checks associated with the destruction of that temporary. It'll be destroyed at the end of the constructor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171818 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
3c7236e01dfb69b370857ccd71c7bcf5ce80b36f |
08-Jan-2013 |
Douglas Gregor <dgregor@apple.com> |
Back out my no-op change from r171783. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171817 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
57cbb141ca7ee020d6853cd098065a9e0c2d69cc |
07-Jan-2013 |
Douglas Gregor <dgregor@apple.com> |
Use the C++11 POD definition in C++11 mode to determine whether one can create a VLA of class type. Fixes <rdar://problem/12151822>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171783 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
0b1de54fd69da1424084588196883ad4c0a57a57 |
07-Jan-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Use getter. Fixes the build from a bad merge. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171782 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
8e721b714a92de803000c65fb8a57a1d8a810322 |
07-Jan-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Add support for attribute((mode(unwind_word))). Patch by Nick Lewycky. Fixes pr8703. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171781 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
32b94bedc6a789e4091626e7433e73555cf9df00 |
07-Jan-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-C: when searching for declarations in protocol list of classes, etc., make sure to look into protocol definitions. // rdar://12958878 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171777 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
7a83421776416d6a9044fb03b5b02208b47646c1 |
07-Jan-2013 |
David Tweed <david.tweed@arm.com> |
Scalar shifts in the OpenCL specification (as of v. 1.2) are defined to be with respect to the lower "left-hand-side bitwidth" bits, even when negative); see OpenCL spec 6.3j. This patch both implements this behaviour in the code generator and "constant folding" bits of Sema, and also prevents tests to detect undefinedness in terms of the weaker C99 or C++ specifications from being applied. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171755 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
9ef1518fb0e7ab7586655265de5f69c9310bc2e6 |
05-Jan-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
Fixes a breakage in dejagnu++ test suite where it included <objc/Protocol.h>. Caused by my recent changes for various builtin declarations of objc_msgSendSuper variety. // rdar://12489098 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171638 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f7992132207d7ddc8810a135cec97ebe5805e500 |
04-Jan-2013 |
Fariborz Jahanian <fjahanian@apple.com> |
Fix up various builtin declaration of objc_msgSend families to match those foung in objc.h an avoid spurious warnings. // rdar://12489098 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171492 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
6769ccb6853871c085c8366ab5e993841ad56d00 |
03-Jan-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Warn on unused auto variables. To do so we have to wait until we know that the type of a variable has been deduced. Sema::FinalizeDeclaration is the first callback that is used for decl with or without initializers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171458 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
da844b3483669c64d02082ff2a9e68d46bd00c1f |
03-Jan-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Use early returns to reduce indentation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171457 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
1b46eade5cd4f4e146d74610b9e0b719e3ab2fc8 |
02-Jan-2013 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Remove the anonymous namespace from lib/Sema/TreeTransform.h git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171402 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
4e24f0f711e2c9fde79f19fa1c80deaab3f3b356 |
02-Jan-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
s/CXX0X/CXX11/g, except for __GNU_EXPERIMENTAL_CXX0X__, and update a few nearby 'C++0x' comments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171372 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaExpr.cpp
|
80ad52f327b532bded5c5b0ee38779d841c6cd35 |
02-Jan-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
s/CPlusPlus0x/CPlusPlus11/g git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171367 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
eclSpec.cpp
umpDiagnostics.cpp
ema.cpp
emaCXXScopeSpec.cpp
emaCast.cpp
emaChecking.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExceptionSpec.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprMember.cpp
emaFixItUtils.cpp
emaInit.cpp
emaLookup.cpp
emaOverload.cpp
emaStmt.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
reeTransform.h
|
87b8127c2c65c8229e5b874c10a33f1ce13493ad |
30-Dec-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Don't warn on unused member functions that are extern because of a typedef. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171267 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
de210a51dc26de6bee00a9ab172111c6f245a9fe |
30-Dec-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Use hasCLanguageLinkage when warning about non C return types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171263 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
9f409549fa36f1a69042d4793321e82004dbfea9 |
30-Dec-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Don't warn for undefined but used decls that are external because of a typedef. This fixes pr14736. It is fairly ugly, but I don't think we can do much better as we have to wait at least until the end of the typedef to know if the function will have external linkage or not. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171240 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
07cf58c96dc599d1c25dae4efd9445b6f5d3596c |
29-Dec-2012 |
Nico Weber <nicolasweber@gmx.de> |
ArrayRefize CXXTryStmt. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171239 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
d36aa359e2f45cd22c7366a015ad94de08044dbb |
29-Dec-2012 |
Nico Weber <nicolasweber@gmx.de> |
ArrayRefize a CompoundStmt constructor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171238 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExprCXX.cpp
emaStmt.cpp
|
78eeba8c7d53b6b2983c76b77b23b45b89ed939d |
28-Dec-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Reject overloading of two static extern C functions. This patch moves hasCLanguageLinkage to be VarDecl and FunctionDecl methods so that they can be used from SemaOverload.cpp and then fixes the logic in Sema::IsOverload. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171193 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaOverload.cpp
|
0f46e64947bdd570a499732c4b459961627d8745 |
28-Dec-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Improve diagnostic wording for when an implicitly-deleted special member function is selected by overload resolution. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171190 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaOverload.cpp
|
e57e3d3783586934e26191cfc06ed5f3d966ea9c |
27-Dec-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Implement dcl.link paragraph 5. The language linkage of redeclarations must match. GCC was already reporting an error for this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171139 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
137d6625eb61a41e776d89b39f3cb958d4a21140 |
26-Dec-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Fix a regression from the previous commit. Template instantiation can set the canonical decl to used after subsequent decls have been chained, so we have to check that too. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171088 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
485458aa998c12e43bc9883b49060425d58b351d |
26-Dec-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Use the most recent redecl to decide if it is needed. This fixes pr14691, which I think is a regression from r168519. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171077 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
65d78312ce026092cb6e7b1d4d06f05e18d02aa0 |
25-Dec-2012 |
Erik Verbruggen <erikjv@me.com> |
Fix for PR12222. Changed getLocStart() and getLocEnd() to be required for Stmts, and make getSourceRange() optional. The default implementation for getSourceRange() is build the range by calling getLocStart() and getLocEnd(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171067 91177308-0d34-0410-b5e6-96231b3b80d8
umpDiagnostics.cpp
emaInit.cpp
|
38980086c0f791e8c23cc882574f18e5b4a87db6 |
25-Dec-2012 |
Guy Benyei <guy.benyei@intel.com> |
Add intel_ocl_bicc calling convention as a function attribute to clang. The calling convention is already implemented in LLVM. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171056 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaType.cpp
|
140aadf5b927ae294388c680a7db44e5de39578a |
25-Dec-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Add 171048 back but invalidate the cache of all redeclarations when setting the body of a functions. The problem was that hasBody looks at the entire chain and causes problems to -fvisibility-inlines-hidden if the cache was not invalidated. Original message: Cache visibility of decls. This unifies the linkage and visibility caching. I first implemented this when working on pr13844, but the previous fixes removed the performance advantage of this one. This is still a step in the right direction for making linkage and visibility cheap to use. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171053 91177308-0d34-0410-b5e6-96231b3b80d8
emaAttr.cpp
emaDecl.cpp
emaDeclAttr.cpp
|
eaf5ec43ec52f650a00254d1c20d51fb7671aead |
25-Dec-2012 |
NAKAMURA Takumi <geek4civic@gmail.com> |
Revert r171048, "Cache visibility of decls." It broke stage2. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171050 91177308-0d34-0410-b5e6-96231b3b80d8
emaAttr.cpp
emaDecl.cpp
emaDeclAttr.cpp
|
dfb316613a40d0efc033c7bd0a49da59c915fc63 |
25-Dec-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Cache visibility of decls. This unifies the linkage and visibility caching. I first implemented this when working on pr13844, but the previous fixes removed the performance advantage of this one. This is still a step in the right direction for making linkage and visibility cheap to use. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171048 91177308-0d34-0410-b5e6-96231b3b80d8
emaAttr.cpp
emaDecl.cpp
emaDeclAttr.cpp
|
e6bb76cde5488eca94e087e8929f29f3f3debfd3 |
23-Dec-2012 |
Nico Weber <nicolasweber@gmx.de> |
Move a declaration closer to its use. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170992 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
19e0d959171860e207205d31af223b27c925fbec |
22-Dec-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR14695: Fix assert from bad cast<>. Not every namespace is a NamespaceDecl; it might instead be a TranslationUnitDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170976 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
a734a0eab27678262bea07786b6ff30d5c7a6356 |
22-Dec-2012 |
Ted Kremenek <kremenek@apple.com> |
Add back -Wduplicate-enum which I mistakenly removed. This was removed with -Wunique-enum, which is still removed. The corresponding thread on cfe-comments for that warning is here: http://lists.cs.uiuc.edu/pipermail/cfe-dev/2012-September/024224.html If we get specific user feedback for -Wduplicate-enum we can evaluate whether or not to keep it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170974 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d3292c88ad6360823818b78d67875eceb3caedfb |
21-Dec-2012 |
Ted Kremenek <kremenek@apple.com> |
Tweak Sema::CheckLiteralKind() to also include block literals This simplifies some diagnostic logic in checkUnsafeAssignLiteral(), hopefully making it less error prone. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170945 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExpr.cpp
|
67a0f6ef5ae38e1abddb278544e18aede6ea7833 |
21-Dec-2012 |
Chad Rosier <mcrosier@apple.com> |
Add comments back that were accidentally removed in r170933. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170938 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
|
22aa6901b8134c51771245255b32cd7d026e7913 |
21-Dec-2012 |
Chad Rosier <mcrosier@apple.com> |
Remove unused arguments and rename to conform to coding standards. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170933 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
|
f530ff76de3b270f2287d3555d93b5d270643eeb |
21-Dec-2012 |
Ted Kremenek <kremenek@apple.com> |
Change checkUnsafeAssignLiteral() to use the new Sema::CheckLiteralKind(). Along the way, fix a bug in CheckLiteralKind(), previously in diagnoseObjCLiteralComparison, where we didn't ignore parentheses in boxed expressions for purpose of classification. In other words, both @42 and @(42) should be classified as numeric literals. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170931 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExpr.cpp
|
3ee069bddb538ebafff2068e99136cc526fb9fdd |
21-Dec-2012 |
Ted Kremenek <kremenek@apple.com> |
Hoist logic for classifying Objective-C literals into Sema (proper) for use with other diagnostics. No immediate (intended) functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170930 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e63a603c797b1a83c844923fb17dc31b4d96a031 |
21-Dec-2012 |
Ted Kremenek <kremenek@apple.com> |
Use descriptive enum instead of raw integers for checkUnsafeAssignLiteral(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170920 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
b29b30f9631937916786dc2e06c2842acf9c1500 |
21-Dec-2012 |
Ted Kremenek <kremenek@apple.com> |
Sink call to checkUnsafeAssignLiteral() into checkUnsafeAssignObject(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170919 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
87aa2fbc75a897e7c4a4082374aaba3f50db6f0f |
21-Dec-2012 |
Roman Divacky <rdivacky@freebsd.org> |
Remove duplicate includes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170903 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExpr.cpp
emaTemplate.cpp
|
5cf1589db395371975bd3315b9126eb5c9be6701 |
21-Dec-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix regression in r170489: when instantiating a direct initializer which is a CXXScalarValueInitExpr (or an ImplicitValueInitExpr), strip it back down to an empty pair of parentheses so that the initialization code can tell that we're performing value-initialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170867 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
reeTransform.h
|
9d0840141a0922e2d8b1d322f21ef51803ede23d |
21-Dec-2012 |
Ted Kremenek <kremenek@apple.com> |
Extend checkUnsafeAssigns() to also handle assigning an object literal to a weak reference. Thanks to Jordan Rose and John McCall for their sage code review. Fixes <rdar://problem/12569201>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170864 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
b1ea510de0ef4ebfbbe8fa7668ab1635410fc080 |
21-Dec-2012 |
Ted Kremenek <kremenek@apple.com> |
Refactor checkUnsafeAssigns() to avoid code duplication with while loop. This is just a minor bit of refactoring, but it is nice cleanup for the subsequent patch that adds warning support for assigning literals to weak variables. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170863 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
0db661e67f613f49d047cdf53da29b9741234ad8 |
21-Dec-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Don't eagerly emit a global static merged with a local extern. When we are visiting the extern declaration of 'i' in static int i = 99; int foo() { extern int i; return i; } We should not try to handle it as if it was an function static. That is, we must consider the written storage class. Fixing this then exposes that the assert in EmitGlobalVarDeclLValue and the if leading to its call are not completely accurate. They were passing before because the second decl was marked as having external storage. I changed them to check the linkage, which I find easier to understand. Last but not least, there is something strange going on with cuda and opencl. My guess is that the linkage computation for these languages needs to be audited, but I didn't want to change that in this patch so I just updated the storage classes to keep the current behavior. Thanks to Reed Kotler for reporting this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170827 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
904a326e6297ad75aab353c1957fb874b36260c9 |
20-Dec-2012 |
Ted Kremenek <kremenek@apple.com> |
Revert "Warn if a __weak variable is initialized with an Objective-C object literal." Per code feedback, I want to see if there is a more general way to do this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170777 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
7c441069a41e164498047aaed542d0d64bc11962 |
20-Dec-2012 |
Ted Kremenek <kremenek@apple.com> |
Warn if a __weak variable is initialized with an Objective-C object literal. Such variables may immediately become nil or may have unpredictable behavior. Fixes <rdar://problem/12569201>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170763 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
ad017fa7a4df7389d245d02a49b3c79ed70bedb9 |
20-Dec-2012 |
Bill Wendling <isanbard@gmail.com> |
Revert r170500. It over-zealously converted *ALL* things named Attributes, which is wrong here. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170721 91177308-0d34-0410-b5e6-96231b3b80d8
emaAttr.cpp
emaChecking.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaLambda.cpp
emaObjCProperty.cpp
argetAttributesSema.h
|
277076a4cdf684e6ea102197a635d4a352998018 |
19-Dec-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-C: Don't warn of unimplemented property of protocols in category, when those properties will be implemented in category's primary class or one of its super classes. // rdar://12568064 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170573 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
094dbf917127a1228147587076d59ca45b7c258d |
19-Dec-2012 |
Bill Wendling <isanbard@gmail.com> |
Rename the 'Attributes' class to 'Attribute'. It's going to represent a single attribute in the future. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170500 91177308-0d34-0410-b5e6-96231b3b80d8
emaAttr.cpp
emaChecking.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaLambda.cpp
emaObjCProperty.cpp
argetAttributesSema.h
|
cd6d5f43908cb4c2cbd644c35b6f21e9ade9a697 |
19-Dec-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix assertion failure in self-host (and probably bogus template instantiation too). When instantiating a direct-initializer, if we find it has zero arguments, produce an empty ParenListExpr rather than returning a null expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170490 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
c83c2300e1946fea78ecd3c2e93d9c2dd2638a2b |
19-Dec-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR13470: Ensure that copy-list-initialization isntantiates as copy-list-initialization (and doesn't add an additional copy step): Fill in the ListInitialization bit when creating a CXXConstructExpr. Use it when instantiating initializers in order to correctly handle instantiation of copy-list-initialization. Teach TreeTransform that function arguments are initializations, and so need this special treatment too. Finally, remove some hacks which were working around SubstInitializer's shortcomings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170489 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExprCXX.cpp
emaInit.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
3bc93e3124ad5e7191c4a12dc981c8ee53578193 |
19-Dec-2012 |
David Blaikie <dblaikie@gmail.com> |
Change DeclContextLookup(Const)Result to (Mutable)ArrayRef<NamedDecl*>, as per review discussion in r170365 This does limit these typedefs to being sequences, but no current usage requires them to be contiguous (we could expand this to a more general iterator pair range concept at some point). Also, it'd be nice if SmallVector were constructible directly from an ArrayRef but this is a bit tricky since ArrayRef depends on SmallVectorBaseImpl for the inverse conversion. (& generalizing over all range-like things, while nice, would require some nontrivial SFINAE I haven't thought about yet) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170482 91177308-0d34-0410-b5e6-96231b3b80d8
ultiplexExternalSemaSource.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaInit.cpp
emaLambda.cpp
emaLookup.cpp
emaOverload.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
b13621d08e20ac7aa550e05896de8a57ee99c1e8 |
18-Dec-2012 |
Guy Benyei <guy.benyei@intel.com> |
Re-commit r170428 changes with Linux style file endings. Add OpenCL images as clang builtin types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170432 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
emaTemplateVariadic.cpp
emaType.cpp
|
7f92f2d8d9b7a07900c030183bc13a9ff60057cc |
18-Dec-2012 |
Guy Benyei <guy.benyei@intel.com> |
Revert changes from r170428, as I accidentally changed the line endings of these files to Windows style. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170431 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
emaTemplateVariadic.cpp
emaType.cpp
|
736104a7619c53ef92553780273d7357a3cdde81 |
18-Dec-2012 |
Guy Benyei <guy.benyei@intel.com> |
Add OpenCL images as clang builtin types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170428 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
emaTemplateVariadic.cpp
emaType.cpp
|
a7a2f2a96dc9d2e66a5e6ee7ca50cb04931f4c98 |
18-Dec-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Merge storage classes even when contexts don't match. This fixes the storage class of extern decls that are merged with file level statics. The patch also fixes the linkage computation so that they are considered internal. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170406 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
2fcff83aa4f62b96b98cde967c8fbacc74f3ab9f |
18-Dec-2012 |
Eli Friedman <eli.friedman@gmail.com> |
The underlying type for an enum should be an integer type, not another enum. (This change only affects ObjC.) <rdar://problem/12857117>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170402 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
8a0086cfd21e5a89f96715d7a504178c5fc0ca26 |
18-Dec-2012 |
Anders Carlsson <andersca@mac.com> |
When warning about a missing prototype because a function declaration is missing 'void', insert a fixit to add the void. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170399 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
355a1660d6a3c66546dfd2476b60fa7a19b70ee3 |
17-Dec-2012 |
Nico Weber <nicolasweber@gmx.de> |
IdentifierResolver: Remove an unnecessary include and an unused parameter. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170297 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
emaDecl.cpp
|
a9990e80f5d1236277c87aa6fac03e0992c52341 |
14-Dec-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Have Sema::ActOnStartOfFunctionDef return the declaration that was passed it. This fixes the missing warning here: struct S { template <typename T> void meth() { char arr[3]; arr[4] = 0; // warning: array index 4 is past the end of the array } }; template <typename T> void func() { char arr[3]; arr[4] = 0; // no warning } git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170180 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
3abc76856fbd33d9af5a5c9bf8dfee596658df1b |
14-Dec-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Remove code from Sema::ActOnStartOfFunctionTemplateDef that duplicates what Sema::ActOnStartOfFunctionDef is already doing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170179 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
6febf1265b5a5c3025752193caa9714ed523b12d |
13-Dec-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Using CanQualType::getAs<ArrayType> is unsafe; fix the code currently using it, and make sure additional uses don't get introduced. <rdar://problem/12858424>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170081 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
0c252fa8b751be50f8b53ffdc6563dca609870fc |
13-Dec-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objc: DOn't complain if a (SEL) expression is typecast to (SEL). Fixes // rdar://12859590 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170058 91177308-0d34-0410-b5e6-96231b3b80d8
emaCast.cpp
|
206491dcbe1ed01ee8ce86a0ffe272d5d25491d3 |
13-Dec-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Add missing check for error return from DefaultLvalueConversion. Fixes <rdar://problem/12857416>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170056 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
135aa60c613bdcc0e8e237b12bf93cab04284419 |
12-Dec-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[objc] For the ARC error that is emitted when a synthesized property implementation has inconsistent ownership with the backing ivar, point the error location to the ivar. Pointing to the ivar (instead of the @synthesize) is better since this is where a fix is needed. Also provide the location of @synthesize via a note. This also fixes the problem where an auto-synthesized property would emit an error without any location. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170039 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
acaf110ec9f2622f76f32c23fd0c2488952bdd21 |
12-Dec-2012 |
Manuel Klimek <klimek@google.com> |
Speeds up parsing of global declarations in cases where the warning is switched of by about 0.8% (tested with int i<N>). Additionally, this puts computing the diagnostic class into the hot path more when parsing, in preparation for upcoming optimizations in this area. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169976 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
86f6cf6800fa7ea3669e057c56f3487c4da3ef46 |
11-Dec-2012 |
Douglas Gregor <dgregor@apple.com> |
Don't complain about incomplete implementations for methods that are unavailable due to availability attributes. <rdar://problem/12798237> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169903 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
1d28caf3b5254e60d3e3a1d2d37e5df2e5924111 |
11-Dec-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR14558: Compute triviality of special members (etc) at the end of the class definition, rather than at the end of the definition of the set of nested classes. We still defer checking of the user-specified exception specification to the end of the nesting -- we can't check that until we've parsed the in-class initializers for non-static data members. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169805 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
|
fff3248e69c478cfb4d1a1ffdefb808d5885535b |
09-Dec-2012 |
Aaron Ballman <aaron@aaronballman.com> |
Virtual method overrides can no longer have mismatched calling conventions. This fixes PR14339. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169705 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
|
2801d9afa1fabbc99b7c1ad9f2f3df0e0b24adb1 |
09-Dec-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix overload resolution for the initialization of a multi-dimensional array from a braced-init-list. There seems to be a core wording wart here (it suggests we should be testing whether the elements of the init list are implicitly convertible to the array element type, not whether there is an implicit conversion sequence) but our prior behavior appears to be a bug, not a deliberate effort to implement the standard as written. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169690 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
afee0ff915b87f92e8c07c72d31c3165aacf6fa8 |
09-Dec-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR14550: If a system header contains a bogus constexpr function definition, don't mark the function as invalid, since we suppress the error. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169689 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
bc2a35d5ff492107dab5bdb7682f0da2f4a88861 |
08-Dec-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Finish implementing 'selected constructor' rules for triviality in C++11. In the cases where we can't determine whether special members would be trivial while building the class, we eagerly declare those special members. The impact of this is bounded, since it does not trigger implicit declarations of special members in classes which merely *use* those classes. In order to determine whether we need to apply this rule, we also need to eagerly declare move operations and destructors in cases where they might be deleted. If a move operation were supposed to be deleted, it would instead be suppressed, and we could need overload resolution to determine if we fall back to a trivial copy operation. If a destructor were implicitly deleted, it would cause the move constructor of any derived classes to be suppressed. As discussed on cxx-abi-dev, C++11's selected constructor rules are also retroactively applied as a defect resolution in C++03 mode, in order to identify that class B has a non-trivial copy constructor (since it calls A's constructor template, not A's copy constructor): struct A { template<typename T> A(T &); }; struct B { mutable A a; }; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169673 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
55798658f879915992ed0ebe30b0b63fd570ff1b |
08-Dec-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Remove some remnants of the assumption that there is at most one of each flavour of special member. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169670 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
ac71351acdefc9de0c770c1d717e621ac9e684bf |
08-Dec-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Properly compute triviality for explicitly-defaulted or deleted special members. Remove pre-standard restriction on explicitly-defaulted copy constructors with 'incorrect' parameter types, and instead just make those special members non-trivial as the standard requires. This required making CXXRecordDecl correctly handle classes which have both a trivial and a non-trivial special member of the same kind. This also fixes PR13217 by reimplementing DiagnoseNontrivial in terms of the new triviality computation technology. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169667 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
|
d5be2b5483757631cad00511b43ed7003defbfd9 |
08-Dec-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Add a FIXME. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169664 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
d5bc867f6597ee8d4eb31ea217934e436fc7c7e3 |
08-Dec-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Implement C++03 [dcl.init]p5's checking for value-initialization of references properly, rather than faking it up by pretending that a reference member makes the default constructor non-trivial. That leads to rejects-valids when putting such types inside unions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169662 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
12f37e411462b8388eb1309357bd62257debacac |
07-Dec-2012 |
DeLesley Hutchins <delesley@google.com> |
Fix analysis based warnings so that all warnings are emitted when compiling with -Werror. Previously, compiling with -Werror would emit only the first warning in a compilation unit, because clang assumes that once an error occurs, further analysis is unlikely to return valid results. However, warnings that have been upgraded to errors should not be treated as "errors" in this sense. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169649 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
emaDecl.cpp
|
504643934a1cb2f9d0c22b4895c777d8aa4c5139 |
07-Dec-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Per [dcl.fct.def.default]p1, don't allow variadic special members to be defaulted. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169574 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
35f3f36cb9451f347b83a6e7f01e3c702df4732d |
06-Dec-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Add a bit on FunctionDecl/ObjCMethodDecl to indicate if there was a body that was skipped by the parser. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169531 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
42427409fd75a48381071e6da008a3c06897437a |
06-Dec-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Sema: Don't emit a warning when __func__ is used in a lambda outside of a function. Fixes PR14518. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169510 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
030a6644f253818b81b4d8a7fc1770c0a3d35474 |
06-Dec-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix http://stackoverflow.com/questions/13521163 Don't require that, during template deduction, a template specialization type as a function parameter has at least as many template arguments as one used in a function argument (not even if the argument has been resolved to an exact type); the additional parameters might be provided by default template arguments in the template. We don't need this check, since we now implement [temp.deduct.call]p4 with an additional check after deduction. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169475 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
2cd3440369d9241173e994485ddf2589a50a7d80 |
05-Dec-2012 |
Jordan Rose <jordan_rose@apple.com> |
Format strings: offer a cast to 'unichar' for %C in Objective-C contexts. For most cases where a conversion specifier doesn't match an argument, we usually guess that the conversion specifier is wrong. However, if the argument is an integer type and the specifier is %C, it's likely the user really did mean to print the integer as a character. (This is more common than %c because there is no way to specify a unichar literal -- you have to write an integer literal, such as '0x2603', and then cast it to unichar.) This does not change the behavior of %S, since there are fewer cases where printing a literal Unicode *string* is necessary, but this could easily be changed in the future. <rdar://problem/11982013> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169400 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
17ddc54b8b94c58286dec6f99ae1f9e12e30d297 |
05-Dec-2012 |
Jordan Rose <jordan_rose@apple.com> |
Format strings: add more expression types that don't need parens to cast. No functionality change (the test change is a comment only, and the new functionality can't be tested using the current test). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169399 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
448ac3e6d1f10264cea86c89cc14c266ba2da4a2 |
05-Dec-2012 |
Jordan Rose <jordan_rose@apple.com> |
Format strings: a character literal should be printed with %c, not %d. The type of a character literal is 'int' in C, but if the user writes a character /as/ a literal, we should assume they meant it to be a character and not a numeric value, and thus offer %c as a correction rather than %d. There's a special case for multi-character literals (like 'MooV'), which have implementation-defined value and usually cannot be printed with %c. These still use %d as the suggestion. In C++, the type of a character literal is 'char', and so this problem doesn't exist. <rdar://problem/12282316> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169398 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
37ec8d589c5de34d0e260f0599395519bd7498de |
05-Dec-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
In C++, if we hit an error in the class-head, don't try to parse the class body. Our error recovery path may have made the class anonymous, and that has a pretty disastrous impact on any attempt to parse a class body containing constructors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169374 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
fb4afc2fc659faff43a6df4c1d0e07df9c90479d |
05-Dec-2012 |
DeLesley Hutchins <delesley@google.com> |
Thread safety analysis: Add a new "beta" warning flag: -Wthread-safety-beta. As the analysis improves, it will continue to add new warnings that are potentially disruptive to existing users. From now on, such warnings will first be introduced under the "beta" flag. Such warnings are not turned on by default; their purpose is to allow users to test their code against future planned changes, before those changes are actually made. After a suitable migration period, beta warnings will be folded into the standard -Wthread-safety. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169338 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
55fc873017f10f6f566b182b70f6fc22aefa3464 |
04-Dec-2012 |
Chandler Carruth <chandlerc@gmail.com> |
Sort all of Clang's files under 'lib', and fix up the broken headers uncovered. This required manually correcting all of the incorrect main-module headers I could find, and running the new llvm/utils/sort_includes.py script over the files. I also manually added quite a few missing headers that were uncovered by shuffling the order or moving headers up to be main-module-headers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169237 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
ttributeList.cpp
odeCompleteConsumer.cpp
eclSpec.cpp
dentifierResolver.cpp
umpDiagnostics.cpp
ultiplexExternalSemaSource.cpp
ema.cpp
emaAccess.cpp
emaAttr.cpp
emaCXXScopeSpec.cpp
emaCast.cpp
emaChecking.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExceptionSpec.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprMember.cpp
emaExprObjC.cpp
emaInit.cpp
emaLambda.cpp
emaLookup.cpp
emaObjCProperty.cpp
emaOverload.cpp
emaPseudoObject.cpp
emaStmt.cpp
emaStmtAsm.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaTemplateVariadic.cpp
emaType.cpp
argetAttributesSema.cpp
reeTransform.h
ypeLocBuilder.h
|
e5411b7c9af683dab6b035825b71c284bfec364d |
01-Dec-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Consistently use 'needsImplicit<special member>' to determine whether we need an implicit special member, rather than sometimes using '!hasDeclared<special member>'. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169075 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaInit.cpp
emaLookup.cpp
|
464a01a67c2cf7c42c4d15f687f6b9a622468783 |
01-Dec-2012 |
Douglas Gregor <dgregor@apple.com> |
Fix the determination of whether a capture refers to an enclosing scope when dealing with nested blocks. Fixes <rdar://problem/12778708>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169065 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
d87de7bdbc25dd84ae3dbefffda4539c443000d2 |
01-Dec-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Make -Wtautological-constant-out-of-range-compare behave sanely for enums with a signed fixed type. <rdar://problem/12780159>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169051 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
8b8a09e496fbed361d4c8e9e8cc259454a094258 |
29-Nov-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Merge function types in C. Among other differences, GCC accepts typedef int IA[]; typedef int A10[10]; static A10 *f(void); static IA *f(void); void g(void) { (void)sizeof(*f()); } but clang used to reject it with: invalid application of 'sizeof' to an incomplete type 'IA' (aka 'int []') The intention of c99's 6.2.7 seems to be that we should use the composite type and accept as gcc does. Doing the type merging required some extra fixes: * Use the type from the function type in initializations, even if an parameter is available. * Fix the merging of the noreturn attribute in function types. * Make CodeGen handle the fact that an parameter type can be different from the corresponding type in the function type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168895 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
|
84268904947ada7e251932a6f5b0f4364df7a2c7 |
29-Nov-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Reject uses of __int128 on platforms that don't support it. Also move the ugly 'getPointerWidth(0) >= 64' test to be a method on TargetInfo, ready to be properly cleaned up. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168856 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaExpr.cpp
emaType.cpp
|
a70779f6b9a8135c3459bdeb1f0197b82ea0cb2a |
29-Nov-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Fix crash-on-invalid. <rdar://problem/12765391>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168851 91177308-0d34-0410-b5e6-96231b3b80d8
emaPseudoObject.cpp
|
afb49189d6962f3636d6a93d09c0b495e94ac782 |
29-Nov-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
The declaration of a special member can require overload resolution to be performed, to determine whether that special member is deleted or constexpr. That overload resolution process can in turn trigger the instantiation of a template, which can do anything, including triggering the declaration of that very same special member function. When this happens, do not try to recursively declare the special member -- that's impossible. Instead, only try to realise the truth. There is no special member. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168847 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
a70c3f8738cc123ded68c183cedd6e93df670c2f |
28-Nov-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Per C++11 [except.spec]p2, rvalue references are not permitted in exception specifications. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168824 91177308-0d34-0410-b5e6-96231b3b80d8
emaExceptionSpec.cpp
|
21173b1080abaa2738f9e700a9d4b0d04f928930 |
28-Nov-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR14388: An array or function type in an exception specification should be decayed to a pointer type. Patch by WenHan Gu, with a little tweaking and additional testcases by me. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168822 91177308-0d34-0410-b5e6-96231b3b80d8
emaExceptionSpec.cpp
|
f641166066c7053300cada4ca5c9e69ad1cd2358 |
28-Nov-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR13098: If we're instantiating an overloaded binary operator and we could determine which member function would be the callee from within the template definition, don't pass that function as a "non-member function" to CreateOverloadedBinOp. Instead, just rely on it to select the member function for itself. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168818 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
acf796b4797c5b3e9e237148fa622afdc04b3eff |
28-Nov-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Store on the CXXRecordDecl whether the class has, or would have, a copy constructor/assignment operator with a const-qualified parameter type. The prior method for determining this incorrectly used overload resolution. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168775 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
9d29543284e75648ac89c6e9586fc7cf786cf66f |
28-Nov-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Don't return a pointer to an UnresolvedSetImpl in the CXXRecordDecl interface, expose only the iterators instead. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168770 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExprCXX.cpp
emaInit.cpp
emaLookup.cpp
emaOverload.cpp
emaPseudoObject.cpp
|
b8abff66a8d30356c82314c4734c692cdd479e5e |
28-Nov-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
C++ core issue 1344, PR10618: promote "addition of default argument makes this a special member" diagnostic from warning to error, and fix the cases where it produced diagnostics with incorrect wording. We don't support this as an extension, and we ban it even in C++98 mode. This breaks too much (for instance, the ABI-specified calling convention for a type can change if it acquires a copy constructor through the addition of a default argument). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168769 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
84c7519a3865a04f631bc8ddfb8372223d96acfc |
28-Nov-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-C arc: Underline the selector when issuing arc specific diagnostic on the selector. This is objc-arc part of // rdar://11303469 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168756 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
82c458ea76bf8f0981e3d1b5070c0b0e5878d784 |
28-Nov-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-C arc: load of a __weak object happens via call to objc_loadWeak. This retains and autorelease the weakly-refereced object. This hidden autorelease sometimes makes __weak variable alive even after the weak reference is erased, because the object is still referenced by an autorelease pool. This patch overcomes this behavior by loading a weak object via call to objc_loadWeakRetained(), followng it by objc_release at appropriate place, thereby removing the hidden autorelease. // rdar://10849570 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168740 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaInit.cpp
|
d1bac8d46740eb00085ec816af0829fd75fb4d5c |
27-Nov-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Allow an ASTConsumer to selectively skip function bodies while parsing. Patch by Olivier Goffart! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168726 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d0adeb65c743e01ca3436db1d47a97cdcc78df89 |
27-Nov-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Simplify checking for whether we should implicitly declare special members and add some assertions. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168725 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaLookup.cpp
|
73ed67cc36b06a380ddc3658beb7a84328c19ff6 |
26-Nov-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR14428: When instantiating a 'new' expression, if we had a non-dependent initialization, don't rebuild it. Remove a couple of hacks which were trying to work around this. Fix the special case for one-argument CXXConstructExprs to not apply if the one argument is a default argument. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168582 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
reeTransform.h
|
8dbf697cf5e10824659bc5061ebf470fa43716fa |
25-Nov-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Add r168519 back, but with a fix to also merge the used flag in variables. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168564 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
6df81a94fca403c7aa66918404caab19cffbca35 |
25-Nov-2012 |
NAKAMURA Takumi <geek4civic@gmail.com> |
Revert r168519, "Merge used flags so that we don't have to iterate on isUsed. With this change" It brought bunch of (possibly false) warnings. llvm/unittests/VMCore/PassManagerTest.cpp:60:22: warning: variable 'ID' is not needed and will not be emitted [-Wunneeded-internal-declaration] char ModuleNDNM::ID=0; ^ llvm/unittests/VMCore/PassManagerTest.cpp:86:22: warning: variable 'ID' is not needed and will not be emitted [-Wunneeded-internal-declaration] char ModuleNDM2::ID=0; ^ llvm/unittests/VMCore/PassManagerTest.cpp:106:21: warning: variable 'ID' is not needed and will not be emitted [-Wunneeded-internal-declaration] char ModuleDNM::ID=0; ^ llvm/unittests/VMCore/PassManagerTest.cpp:217:16: warning: variable 'initcount' is not needed and will not be emitted [-Wunneeded-internal-declaration] int LPass::initcount=0; ^ llvm/unittests/VMCore/PassManagerTest.cpp:218:16: warning: variable 'fincount' is not needed and will not be emitted [-Wunneeded-internal-declaration] int LPass::fincount=0; ^ llvm/unittests/VMCore/PassManagerTest.cpp:259:16: warning: variable 'inited' is not needed and will not be emitted [-Wunneeded-internal-declaration] int BPass::inited=0; ^ llvm/unittests/VMCore/PassManagerTest.cpp:260:16: warning: variable 'fin' is not needed and will not be emitted [-Wunneeded-internal-declaration] int BPass::fin=0; ^ llvm/unittests/VMCore/PassManagerTest.cpp:283:24: warning: variable 'ID' is not needed and will not be emitted [-Wunneeded-internal-declaration] char OnTheFlyTest::ID=0; ^ 8 warnings generated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168549 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
63b6ebe4e732f20fa24ea0666ed438dd5004cc20 |
23-Nov-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Sema: Provide a valid source location when instantiating templates based on a CXXDefaultArgExpr. Fixes PR13758. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168521 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
919b7e69781daf68766bb9af11ca1b9f246ce935 |
23-Nov-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Merge used flags so that we don't have to iterate on isUsed. With this change "clang -cc1 -fsyntax-only" on the preprocessed output of #define M extern int a; #define M2 M M #define M4 M2 M2 #define M8 M4 M4 #define M16 M8 M8 #define M32 M16 M16 #define M64 M32 M32 #define M128 M64 M64 #define M256 M128 M128 #define M512 M256 M256 #define M1024 M512 M512 #define M2048 M1024 M1024 #define M4096 M2048 M2048 #define M8192 M4096 M4096 #define M16384 M8192 M8192 M16384 goes from 2.994s to 1.416s. GCC is at 0.022s, so we still have a long way to go. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168519 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
746619a5ace6dcbd0970e904b1ebda838064ec03 |
22-Nov-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix regression in r168477. Use canonical decl when looking for base class specified as a qualified name. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168479 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprMember.cpp
|
f62c690c55fb920f3ba0a4f6e6e259e2ae7ce297 |
22-Nov-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix CXXRecordDecl::forallBases to not look through bases which are dependent and defined within the current instantiation, but which are not part of the current instantiation. Previously, it would look at bases which could be specialized separately from the current template. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168477 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
emaExprMember.cpp
|
39ad0f03d53c3aae5ea8c6d0572fd63154d40e99 |
21-Nov-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
SemaCXX: an enumeral type can be of character or boolean type in a C++11 enum class. Make sure we create a literal of the right type. Fixes PR14386. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168441 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
0c5d005cd383e2d8c2bea388419ac26ace12e0f0 |
20-Nov-2012 |
David Blaikie <dblaikie@gmail.com> |
Fix some trailing whitespace (on a blank line) to cycle/test bots. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168340 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
1a5bd5d680726f3d133da27791b228b2c8fe96c6 |
19-Nov-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR14381: Never skip constexpr function bodies when code-completing. We may need them in order to parse the rest of the file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168327 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
728948fba8ce2249db0a6fd228d883f38434289a |
19-Nov-2012 |
Kaelyn Uhrain <rikka@google.com> |
When adding a NamedDecl to a correction, add the underlying Decl (via getUnderlyingDecl()) so that derivatives of CorrectionCandidateCallback::ValidateCandidate(...) don't have to worry about being thrown by UsingDecls and such. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168317 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
898a7a298185c53a36e923f86fe3f938ebfea67f |
18-Nov-2012 |
Dmitri Gribenko <gribozavr@gmail.com> |
Remove redundant (duplicated) check. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168293 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
5fa667612e0466982407ae678cdfeb68b878ed65 |
17-Nov-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-C: Do not issue deprecated warning about implementation of a deprecated method in original class (or category), only in overrides. // rdar://12717705 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168270 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
4a9e60fc7c36e323ae376601cc704fed4beb68ae |
16-Nov-2012 |
Nick Lewycky <nicholas@mxc.ca> |
Store this Decl* as a Decl* instead of a uintptr_t. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168145 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
8f50b24c8b17368f68c2e71240d487dde53f6da8 |
16-Nov-2012 |
Richard Trieu <rtrieu@google.com> |
Take into account the zero sign bit for positive numbers when computing the bit width of an enum with negative values in IntRange. Include a test for -Wtautological-constant-out-of-range-compare where this had manifested. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168126 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
426391cd51af86f9d59eceb0fb1c42153eccbb9a |
16-Nov-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
A step towards sorting out handling of triviality of special members in C++11. Separate out the notions of 'has a trivial special member' and 'has a non-trivial special member', and use them appropriately. These are not opposites of one another (there might be no special member, or in C++11 there might be a trivial one and a non-trivial one). The CXXRecordDecl predicates continue to produce incorrect results, but do so in fewer cases now, and they document the cases where they might be wrong. No functionality changes are intended here (they will come when the predicates start producing the right answers...). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168119 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
|
1b48633d308460049e1132960f3c33c850de5bd2 |
15-Nov-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Do not cache a pointer to ExprEvalContexts.back(). It may become a dangling pointer if the underlying SmallVector reallocates. Sadly the testcase is really large and doesn't reduce well because of SmallVector's reallocation patterns. Fixes PR14336. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168045 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
621ba4f0dba0accdf67fb38e98bbe14db22ddf8e |
15-Nov-2012 |
Nick Lewycky <nicholas@mxc.ca> |
Teach the uninitialized field warning about anonymous structs and union members. Fixes PR14073! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168031 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
5d1cf4f292cb060b1973eb197607fc6d5716bd12 |
15-Nov-2012 |
Richard Trieu <rtrieu@google.com> |
Fix an off-by-one error by switching < to <= in -Wtautological-constant-out-of-range-compare and added test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168023 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
d6537015745128064dc12fcc06af65372dfd5da9 |
15-Nov-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Per [basic.lookup.classref]p3, in an expression of the form p->~type-name, the type-name is looked up in the context of the complete postfix-expression. Don't forget to pass the scope into this lookup when the type-name is a template-id; it might name an alias template which can't be found within the class itself. Bug spotted by Johannes Schaub on #llvm. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168011 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
ebbcd1de4f6b0a88b5c9108529b21306968bd79f |
15-Nov-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Fix DiagnoseBitwisePrecedence so it doesn't cast "-1" to the type BinaryOperator::Opcode. This is bad form, and the behavior of the static_cast in this case is unspecified according to the standard. Fixes a warning that showed up from r167992 on self-host. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168010 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
526e627d2bd7e8cbf630526d315c90864898d9ff |
14-Nov-2012 |
Richard Trieu <rtrieu@google.com> |
Improve -Wtautological-constant-out-of-range-compare by taking into account type conversion between integers. This allows the warning to be more accurate. Also, turned the warning off in an analyzer test. The relavent test cases are covered by the tests in Sema. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167992 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
accaf19bc1129c0273ec50dba52318e60bc29103 |
14-Nov-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
s/tranform/transform/ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167929 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprCXX.cpp
emaTemplateInstantiateDecl.cpp
|
4a030228d1bfa0cab89114a18d6b50b44eb3a1a8 |
14-Nov-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
When we have a MemberExpr referring to an overloaded static member function, and we resolve it to a specific function based on the type which it's used as, don't forget to mark it as referenced. Fixes a regression introduced in r167514. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167918 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
49193c7b0a2deb0f4d1f7e8a44f46bd278f523d6 |
14-Nov-2012 |
NAKAMURA Takumi <geek4civic@gmail.com> |
SemaTemplateDeduction.cpp: Prune two obsolete descriptions. [-Wdocumentation] * getMostSpecialized() /// \param Index if non-NULL and the result of this function is non-nULL, /// receives the index corresponding to the resulting function template /// specialization. * DeduceTemplateArguments() /// \param Name the name of the function being called. This is only significant /// when the function template is a conversion function template, in which /// case this routine will also perform template argument deduction based on /// the function to which git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167909 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
66cff7257698d5528632917d38f9a3037bb1506d |
14-Nov-2012 |
David Blaikie <dblaikie@gmail.com> |
Provide the correct mangling and linkage for certain unnamed nested classes. This corrects the mangling and linkage of classes (& their member functions) in cases like this: struct foo { struct { void func() { ... } } x; }; we were accidentally giving this nested unnamed struct 'no' linkage where it should've had the linkage of the outer class. The mangling was incorrecty too, mangling as TU-wide unnamed type mangling of $_X rather than class-scoped mangling of UtX_. This also fixes -Wunused-member-function which would incorrectly diagnose 'func' as unused due to it having no linkage & thus appearing to be TU-local when in fact it might be correctly used in another TU. Similar mangling should be applied to function local classes in similar cases but I've deferred that for a subsequent patch. Review/discussion by Richard Smith, John McCall, & especially Eli Friedman. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167906 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
8c88953ff0cebd861643ab92309aba71d23c306b |
14-Nov-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Remove another questionable use of hasTrivial*. The relevant thing for this test was whether the /selected/ operator= was trivial, not whether the class had any trivial (or any non-trivial) operator=s. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167897 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
b8a8de316dade43fff95d7bfd2cfaa367f53faea |
14-Nov-2012 |
John McCall <rjmccall@apple.com> |
Accept and pass arguments to __unknown_anytype in argument positions of Objective-C methods. It is possible to recover a lot of type information about Objective-C methods from the reflective metadata for their implementations. This information is not rich when it comes to struct types, however, and it is not possible to produce a type in the debugger's round-tripped AST which will really do anything useful during type-checking. Therefore we allow __unknown_anytype in these positions, which essentially disables type-checking for that argument. We infer the parameter type to be the unqualified type of the argument expression unless that expression is an explicit cast, in which case it becomes the type-as-written of that cast. rdar://problem/12565338 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167896 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprObjC.cpp
|
25f071eedf5d20faf9e1614d5ff5dc39b6de5041 |
14-Nov-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Don't try to save the assigned value in a Objective-C property assignment if the type of the value is a non-trivial class type. Fixes PR14318. (There's a minor ObjC++ language change here: given that we can't save the value, the type of the assignment expression is void in such cases.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167884 91177308-0d34-0410-b5e6-96231b3b80d8
emaPseudoObject.cpp
|
97c81bfaf0b6c90576081c5af7ea22fab6f2b7f9 |
13-Nov-2012 |
Kaelyn Uhrain <rikka@google.com> |
For classes that have the warn_unused_result attribute, don't apply the attribute to the class' methods even when they return an instance of the class (e.g. assignment operators). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167873 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
8682b93b3491facc9a42eb87b78bb9d8c18a0739 |
13-Nov-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Copy the decls returned by DeclContext::lookup_result to a new container so we can safely iterate over them. The container holding the lookup decls can under certain conditions be changed while iterating (e.g. because of deserialization). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167816 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
044c8aa39d582ebc6bca1720c65ddd06fb27780c |
13-Nov-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix some wrong-code bugs in implicitly-defined assignment operators: - In C++11, perform overload resolution over all assignment operators, rather than just looking for copy/move assignment operators. - Clean up after temporaries produced by operator= immediately, rather than accumulating them until the end of the function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167798 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
d449c792d98f58277e02c0ddc8330cd9de5f82f5 |
13-Nov-2012 |
Kaelyn Uhrain <rikka@google.com> |
A couple of small fixes to r167783 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167791 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
d05df512cd6dfa32a696bcdd3dced825efe94bc4 |
13-Nov-2012 |
Nick Lewycky <nicholas@mxc.ca> |
When filtering the list of associated namespaces so that we don't suggest people add functions to namespace 'std', also filter out namespaces with '__' anywhere in the name. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167786 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
51ceb7bab599ea7d39d290ff5e88e4a1f0f5bc5c |
13-Nov-2012 |
Kaelyn Uhrain <rikka@google.com> |
Enable C++11 attribute syntax for warn_unused_result and allow it to be applied to CXXRecordDecls, where functions with that return type will inherit the warn_unused_result attribute. Also includes a tiny fix (with no discernable behavior change for existing code) to re-sync AttributeDeclKind enum and err_attribute_wrong_decl_type with warn_attribute_wrong_decl_type since the enum is used with both diagnostic messages to chose the correct description. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167783 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
|
e7ce7094602ebb341220467c9a1d6643f45b9595 |
13-Nov-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Factor duplicated implicit memcpy call generation code out of copy/move assignment generation. This incidentally avoids reusing the same Expr* across multiple statements in the same object; that was generating slightly broken ASTs, but I couldn't trigger any observable bad behavior, so no test. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167779 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
6ceb377ae4e32eeed2647aacc4a7d5c4564641bf |
13-Nov-2012 |
Eric Christopher <echristo@gmail.com> |
Finish reverting r167761, it's causing test failures. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167777 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
3a9fefed0749f7a293379156c22a24509c24cc3e |
12-Nov-2012 |
David Blaikie <dblaikie@gmail.com> |
Fix more try scoping bugs introduced by r167650. Introduces more clear scoping flags & flag combinations which should hopefully be more understandable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167766 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
|
5ece32e3359ca34fcdab07829f5e9fdbfd157f78 |
12-Nov-2012 |
Bill Wendling <isanbard@gmail.com> |
Don't test for incomplete types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167761 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
3078353fb56772193b9304510048ac075a2c95b5 |
12-Nov-2012 |
Ted Kremenek <kremenek@apple.com> |
Per discussion on cfe-dev, re-enable suppression of -Wimplicit-fallthrough on C, but also include dialects of C++ earlier than C++11. There was enough consensus that we *can* get a good language solution to have an annotation outside of C++11, and without this annotation this warning doesn't quite mean's completeness criteria for this kind of warning. For now, restrict this warning to C++11 (where an annotation exists), and make this the behavior for the LLVM 3.2 release. Afterwards, we will hammer out a language solution that we are all happy with. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167749 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
68fd608c2c0866064e974c3d43778c47c1cbb080 |
12-Nov-2012 |
Bill Wendling <isanbard@gmail.com> |
Check that the input size is correct for the given constraint. The 'a', 'c', and 'd' constraints on i386 mean a 32-bit register. We cannot place a 64-bit value into the 32-bit register. Error out instead of causing the compiler to spew general badness. <rdar://problem/12415959> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167717 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
229d47aef27e6f65fe4dc3beb22f622dd81104ad |
10-Nov-2012 |
Douglas Gregor <dgregor@apple.com> |
Rework my implementation of circular-reference finding to not use CXXRecordDecl::forallBases, which does *not* do what I need. Fixes the failure introduced in r167651. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167668 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
3e7735183b00798efccdee82b9b64b00ef3cd684 |
10-Nov-2012 |
Ted Kremenek <kremenek@apple.com> |
Revert "Disable -Wimplicit-fallthrough when not using C++.", pending further discussion on cfe-dev. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167662 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
6e3ceb54a05eb2442625d25fda0b57a2b805ceba |
10-Nov-2012 |
Ted Kremenek <kremenek@apple.com> |
Disable -Wimplicit-fallthrough when not using C++. The rationale is that there is no good workflow to silence the warning for specific cases, other than using pragmas. This is because the attribute to decorate an explicit fall through is only available in C++11. By that argument, this should probably also be disabled unless one is using C++11, but apparently there is an explicit test case for this warning when using C++98. This will require further discussion on cfe-commits. Fixes: <rdar://problem/12584746> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167655 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
3d512d8a75d4cb4609398ce3c2a3ba4c01a23513 |
10-Nov-2012 |
David Blaikie <dblaikie@gmail.com> |
Handle redeclarations of catch variables in catch blocks. Fix to regression caused by r167650, caught by Richard Smith in code review. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167653 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
|
d777e2845110469182809e4efc577899395805f7 |
10-Nov-2012 |
Douglas Gregor <dgregor@apple.com> |
Diagnostic circular inheritance involving dependent base classes. We would have diagnosed this at instantiation time anyway, if only we didn't hang on all of these test cases. Fixes <rdar://problem/12629723> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167651 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
c4027c82ad4a61f2da1b893ac8fe47bf11e5d50d |
10-Nov-2012 |
David Blaikie <dblaikie@gmail.com> |
PR14296: function parameter name collisions in function try/catch C++11 3.3.3/2 "A parameter name shall not be redeclared in the outermost block of the function definition nor in the outermost block of any handler associated with a function-try-block." It's not totally clear to me whether the "FIXME" case is covered by this, but Richard Smith thinks it probably should be. It's just a bit more involved to fix that case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167650 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
|
87da0b757638011ce84fd57f72e15b20bb523b19 |
10-Nov-2012 |
Jordan Rose <jordan_rose@apple.com> |
-Wobjc-literal-compare: look through implicit casts. This warning was failing to fire under ARC because of the implicit lifetime casts added around the object literal expression. <rdar://problem/11300873>, again. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167648 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
a67d503aa19700ff849fc590039b6bb8ced4ebf0 |
10-Nov-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR13788: Don't perform checks on the initializer of a dependently-typed variable. Previously we didn't notice the type was dependent if the only dependence came from an array bound. Patch by Brian Brooks! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167642 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
1a52a4d36cc518725d8e8ba3b984341a30cd7fdb |
09-Nov-2012 |
Nico Weber <nicolasweber@gmx.de> |
Use isInvalidDecl() instead of isStatic() as suggested by dblaikie. I couldn't think of a way to make an operator() invalid without returning earlier from this function other than making it static, so no new test. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167609 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
e0ff690900ecb28e7d840d7f765f25437eb67c66 |
09-Nov-2012 |
Nico Weber <nicolasweber@gmx.de> |
Don't crash on calling static member overloaded operator, PR14120 Patch from Brian Brooks! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167604 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
45a37da030be06bb7babf5e65a64d62cd0def7e6 |
08-Nov-2012 |
Matt Beaumont-Gay <matthewbg@google.com> |
Fix a bug I found while preparing my devmtg talk: When passing NULL to a function that takes a const Foo&, where Foo is convertible from a large number of pointer types, we print ALL the overloads, no matter the setting of -fshow-overloads. There is potential follow-on work in unifying the "print candidates, but not too many" logic between OverloadCandidateSet::NoteCandidates and ImplicitConversionSequence::DiagnoseAmbiguousConversion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167596 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
88adb9863bf1bbf266b044e58a1dfbdf24fbe105 |
08-Nov-2012 |
Abramo Bagnara <abramo.bagnara@bugseng.com> |
Avoid to write function name in comment. Thanks to Dmitri Gribenko. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167588 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
eae859a61f7cca91200a49192052d8a50e18e1be |
08-Nov-2012 |
Abramo Bagnara <abramo.bagnara@bugseng.com> |
Readded line removed by mistake. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167587 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
4c5750e0d1c1dfc091689e3daa96ed4ccfa36dca |
08-Nov-2012 |
Abramo Bagnara <abramo.bagnara@bugseng.com> |
Fixed converted ConstantArrayTypeLoc range. Added a missing testcase for ConstructorDecl source range. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167583 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
e81b43bc306d361fcf4d411aeb14b43f8464bf4a |
08-Nov-2012 |
David Blaikie <dblaikie@gmail.com> |
PR14284: crash on ext-valid returning NULL from a void function git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167565 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
7b89ab735e6fdfeadd8679cb3cae5cbec3870335 |
07-Nov-2012 |
Nico Weber <nicolasweber@gmx.de> |
Reduce nesting. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167551 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
910515bc02872bd680e422f75079534d00093bc5 |
07-Nov-2012 |
Richard Trieu <rtrieu@google.com> |
When template deduction fails on a derived class, try a template deduction on the base class. If the base class deduction succeeds, use those results. If it fails, keep using the results from the derived class template deduction. This prevents an assertion later where the type of deduction failure doesn't match up with the template deduction info. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167550 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
ce2661f9ccb85de1aacaa7c3ea414a757f5986f6 |
07-Nov-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR11851 (and duplicates): Whenever a constexpr function is referenced, instantiate it if it can be instantiated and implicitly define it if it can be implicitly defined. This matches g++'s approach. Remove some cases from SemaOverload which were marking functions as referenced when just planning how overload resolution would proceed; such cases are not actually references. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167514 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaOverload.cpp
|
b68ec6b7ff4f8d7795b11cd361fec46725d57e4e |
07-Nov-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Add missing check to warning for packed attribute. PR14259. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167510 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
530564196fe7e2e30fbc2b0edae45975447583e0 |
07-Nov-2012 |
David Blaikie <dblaikie@gmail.com> |
PR13552: Fix the end location of a CXXNewExpr. Spent longer than reasonable looking for a nice way to test this & decided to give up for now. Open to suggestions/requests. Richard Smith suggested adding something to ASTMatchers but it wasn't readily apparent how to test this with that. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167507 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
70a01898008a90007866f15c4d9d53ba00b0d203 |
07-Nov-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Fix assertion failure with auto and nested initializer list; PR14272. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167506 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
4b7631bc011ce36dbc8f664c518668f0ba5d18a9 |
04-Nov-2012 |
Nick Lewycky <nicholas@mxc.ca> |
Put the usage-directive inside the nearest namespace or TU decl. We don't want to have UsingDirectiveDecl inside anything other than those two. No user-visible functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167376 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
b57ce4e8918656f5f4070f59d74354fcefbbb6f8 |
03-Nov-2012 |
Dmitri Gribenko <gribozavr@gmail.com> |
Address review comments for r167358: explicitly check for CK_BitCast instead of checking against a blacklist. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167362 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
5a24980d059cd9fbe8375a4c549313101ad20698 |
03-Nov-2012 |
Dmitri Gribenko <gribozavr@gmail.com> |
Handle CK_NullToPointer casts in -Wtype-safety properly. Fixes PR14249. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167358 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
aee56faf90c04a75d9c432a92a8fdd2c875559a7 |
02-Nov-2012 |
Quentin Colombet <qcolombet@apple.com> |
Update the front end to use minsize attribute git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167266 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
889b99e6d5b389c0ed99e7ad8470c28b146a42d3 |
01-Nov-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Correctly reject gotos in function-level try blocks. PR14225. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167184 91177308-0d34-0410-b5e6-96231b3b80d8
umpDiagnostics.cpp
|
e63aedd0cb064fc106636ad856cc0e645e6374ce |
31-Oct-2012 |
Anna Zaks <ganna@apple.com> |
Address Jordan's review: comments, spaces. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167091 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
8e68ef0e4c3892b80d9fec77b5d477cd54e90db9 |
29-Oct-2012 |
Quentin Colombet <qcolombet@apple.com> |
Revert commit r166946 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166957 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
9568f0c13a84695c5cc064e7c32412f84604cb1e |
29-Oct-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Partially roll back r166898; it exposed a bug in the standard. The problem is as follows: C++11 has contexts which are not potentially-evaluated, and yet in which we are required or encouraged to perform constant evaluation. In such contexts, we are not permitted to implicitly define special member functions for literal types, therefore we cannot evalaute those constant expressions. Punt on this in one more context for now by skipping checking constexpr variable initializers if they occur in dependent contexts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166956 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
ba927d9b26ead2ad535c7761b8862d8e82c41b13 |
29-Oct-2012 |
Quentin Colombet <qcolombet@apple.com> |
Make forcesizeopt attribute available to the end user git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166946 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
c0e44454bd78b8b4f3d70f08cf1edd5466b0c798 |
29-Oct-2012 |
Jordan Rose <jordan_rose@apple.com> |
-Warc-repeated-use-of-weak: allow single reads in loops from local variables. Previously, the warning would erroneously fire on this: for (Test *a in someArray) use(a.weakProp); ...because it looks like the same property is being accessed over and over. However, clearly this is not the case. We now ignore loops like this for local variables, but continue to warn if the base object is a parameter, global variable, or instance variable, on the assumption that these are not repeatedly usually assigned to within loops. Additionally, do-while loops where the condition is 'false' are not really loops at all; usually they're just used for semicolon-swallowing macros or using "break" like "goto". <rdar://problem/12578785&12578849> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166942 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
c36e3596be351a557cc81c8db3ea75fa4bd54c7a |
28-Oct-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Revert functional part of r166896 and just suppress -Wunneeded-internal-declaration for reference types for now. This needs more work; the cases we currently miss are a bit random. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166899 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
1432a43e3076eec84967305bd85bace3a6e9102b |
28-Oct-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
When determining whether to try evaluating the initializer of a variable, check whether the initializer is value-dependent rather than whether we are in a dependent context. This allows us to detect some errors sooner, and fixes a crash-on-invalid if a dependent type leaks out to a non-dependent context in error recovery. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166898 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
623ef4bf31bc5ec14ed9b5645921a0a2e0d00ee4 |
28-Oct-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
In -Wunneeded-internal-declaration, suppress the warning for variables which might have been used in constant expressions, rather than suppressing it for variables which are const. The important thing here is that such variables can have their values used without actually being marked as 'used'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166896 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
644e90a17f1bc3dcc2b7b018eb02abb3a1c2022b |
28-Oct-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Fix invalid jump scopes again. This time without trying to find out if an incomplete type has a destructor or not. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166895 91177308-0d34-0410-b5e6-96231b3b80d8
umpDiagnostics.cpp
|
a92afb611c015196541edd53347aa23dba1949ac |
27-Oct-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Revert 166876 while I debug a bootstrap problem. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166878 91177308-0d34-0410-b5e6-96231b3b80d8
umpDiagnostics.cpp
|
ff8f9676c025dd9942521a29bf967505c3bda62a |
27-Oct-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Reapply 166855 with an early exit on null QualTypes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166876 91177308-0d34-0410-b5e6-96231b3b80d8
umpDiagnostics.cpp
|
029d28449c4adb5ce92b58b5a57eeca6e396e404 |
27-Oct-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Revert r166855. I can reproduce the bootstrap failure and have a testcase to reduce. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166863 91177308-0d34-0410-b5e6-96231b3b80d8
umpDiagnostics.cpp
|
76b5d24b748896b5a0be7fff779943e3108e7518 |
27-Oct-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Fix cases where we were not producing an error when a computed goto could jump over destructor calls. Fixes pr13812. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166855 91177308-0d34-0410-b5e6-96231b3b80d8
umpDiagnostics.cpp
|
50d46caf00c743312e0ea1f87a693d504b12ef51 |
26-Oct-2012 |
Bill Wendling <isanbard@gmail.com> |
Recommit Eric's code to validate ASM string's constraints and modifiers. This code checks the ASM string to see if the output size is able to fit within the variable specified as the output. For instance, scalar-to-vector conversions may not really work. It's on by default, but can be turned off with a flag if you think you know what you're doing. This is placed under a flag ('-Wasm-operand-widths') and flag group ('-Wasm'). <rdar://problem/12284092> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166737 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
802f93736a9ae76ffcbd90dbaf1c0b185531bb30 |
25-Oct-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Add support for field lookup in the SemaCallback. Patch by Eli. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166723 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
c6cd9afd15f0f83ee07844e592d2a698416f33ca |
25-Oct-2012 |
Bill Wendling <isanbard@gmail.com> |
Revert r166647 to rethink the patch... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166655 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
a0b9ce03880b7dbab766ec80817eb17a20eba508 |
25-Oct-2012 |
Bill Wendling <isanbard@gmail.com> |
Add some support for diagnosing possibly mismatched constraint, type size and modifiers. (From an idea by Eric...) <rdar://problem/12284092> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166647 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
e925322569cb4aad26cc62036a13e2d3daed862d |
25-Oct-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR14171: Don't crash if we hit one of the paths where GetFullTypeForDeclarator rebuilds a function type, and that function type has parens around its name. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166644 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
39e177692ea2096af2ad0dcead79250b50958fa3 |
24-Oct-2012 |
David Blaikie <dblaikie@gmail.com> |
Fix false positive in -Wunused-variable when a ctor call make involve cleanups. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166625 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
dc7b641574a733624489bd87fc7061771edf2113 |
24-Oct-2012 |
Douglas Gregor <dgregor@apple.com> |
Use a .def file for most of the diagnostic options. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166520 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaOverload.cpp
|
6a6bb2810cc8478730002c950f9261f6cb5f6143 |
24-Oct-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
Objective-C: check that when a category method is being implemented, method type in cateogry matches the implementation. // rdar://12519216 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166518 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
e4851f26eb7be1f71f919bb5890da7e3583f727d |
23-Oct-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Add a new warning -Wmissing-variable-declarations, to warn about variables defined without a previous declaration. This is similar to -Wmissing-prototypes, but for variables instead of functions. Patch by Ed Schouten. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166498 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDecl.cpp
|
713c287caf70922f93cfd9292540bad274c4a82f |
23-Oct-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
When rebuilding a DependentScopeDeclRefExpr, perform a lookup into the scope even if it's dependent, in case it now names a member of the current instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166496 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
4d5dd7c954842bc5043e45734af17db197654ca0 |
23-Oct-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Update for r166433. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166489 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
5f1385b81b0a6c6878ff1e35118a5b0bf52ca930 |
23-Oct-2012 |
Eli Friedman <eli.friedman@gmail.com> |
[ms-inline-asm] Add handling for errors coming out of the backend. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166463 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
b5b37d194dddb960f43f763b3f9c3e17e7be3c2d |
23-Oct-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Ugly ugly hack for libstdc++-4.6 and libstdc++-4.7 compatibility. These libraries have an incorrect definition of std::common_type (inherited from a bug in the standard -- see LWG issue 2141), whereby they produce reference types when they should not. If we instantiate a typedef named std::common_type<...>::type, which is defined in a system header as decltype(... ? ... : ...), and the decltype produces a reference type, convert it to the non-reference type. (This doesn't affect any LWG2141-conforming implementation of common_type, such as libc++'s, because the default implementation of common_type<...>::type isn't supposed to produce a reference type.) This is horrible. I'm really sorry. :( Better ideas appreciated! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166455 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
efeeccfb5efa94b6b4198298a80ad9a699bebcce |
21-Oct-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Unrevert r166268, reverted in r166272, with a fix for the issue which Nick found: if an overloaded operator& is present before a template definition, the expression &T::foo is represented as a CXXOperatorCallExpr, not as a UnaryOperator, so we didn't notice that it's permitted to reference a non-static data member of an unrelated class. While investigating this, I discovered another problem in this area: we are treating template default arguments as unevaluated contexts during substitution, resulting in performing incorrect checks for uses of non-static data members in C++11. That is not fixed by this patch (I'll look into this soon; it's related to the failure to correctly instantiate constexpr function templates), but was resulting in this bug not firing in C++11 mode (except with -Wc++98-compat). Original message: PR14124: When performing template instantiation of a qualified-id outside of a class, diagnose if the qualified-id instantiates to a non-static class member. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166385 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
reeTransform.h
|
c6f84cf73e0bc04faacd1a9b7845e014e7fac21e |
20-Oct-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Move private classes into anonymous namespaces. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166377 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
444d384a969ce05ae534bf8be3174e308dc8c58b |
20-Oct-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Rework implementation of DR1492: Apply the resolution to operator delete too, since it also has an implicit exception specification. Downgrade the error to an extwarn, since at least for operator delete, system headers like to declare it as 'noexcept' whereas the implicit definition does not have an explicit exception specification. Move the exception specification for user-declared 'operator delete' functions from the type-as-written into the type, to reflect reality and to allow us to detect whether there was an implicit exception spec or not. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166372 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaExceptionSpec.cpp
emaType.cpp
|
b687f3ba4cdc3fd6e4fa9a89addc1efa61761eeb |
20-Oct-2012 |
Logan Chien <tzuhsiang.chien@gmail.com> |
Fix __builtin_va_arg assertion failure in ARM AAPCS. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166369 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
5016a70c183a50845a0421802d161093dd0643f6 |
20-Oct-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
DR1472: A reference isn't odr-used if it has preceding initialization, initialized by a reference constant expression. Our odr-use modeling still needs work here: we don't yet implement the 'set of potential results of an expression' DR. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166361 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
793c405c28581f24543f021bd833b8c47af28ed3 |
19-Oct-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Set the SemaCallback in the TargetAsmParser. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166310 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
5f531a489774ce46370fcb005a51d46d511f7914 |
19-Oct-2012 |
David Blaikie <dblaikie@gmail.com> |
Clarify wording of -Wshift-op-parentheses. Suggestion from Matt Beaumont-Gay reviewing r165283. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166296 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
cf81cd270e31f97bb88b51e24708e75cc604980e |
19-Oct-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Set the MCTargetAsmParser as paring MS-style inline asm. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166293 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
535a5d001b2035a7aa68ee368fbe44ec90e33740 |
19-Oct-2012 |
Jordan Rose <jordan_rose@apple.com> |
Allow objc_requires_super to be used to check class methods as well. Also, unify ObjCShouldCallSuperDealloc and ObjCShouldCallSuperFinalize. The two have identical behavior and will never be active at the same time. There's one last simplification now, which is that if we see a call to [super foo] and we are currently in a method named 'foo', we will /unconditionally/ clear the ObjCShouldCallSuper flag, rather than check first to see if we're in a method where calling super is required. There's no reason to pay the extra lookup price here. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166285 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclObjC.cpp
emaExprObjC.cpp
|
79cf161f178e36ce6d8aeea2a247e367b8d0fc34 |
19-Oct-2012 |
Nick Lewycky <nicholas@mxc.ca> |
Revert r166268, this fix for a crash-on-invalid introduced a rejects-valid. Richard has an unreduced testcase to work with. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166272 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
reeTransform.h
|
80ddc31c5379df78a007eaf08d531efdbcd9b161 |
19-Oct-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR14124: When performing template instantiation of a qualified-id outside of a class, diagnose if the qualified-id instantiates to a non-static class member. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166268 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
reeTransform.h
|
5f750680d421328225e597d6429a298027dc6360 |
19-Oct-2012 |
David Blaikie <dblaikie@gmail.com> |
Handle diamond inheritance in -Woverloaded-virtual. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166254 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
c337d1457e4600107a1b3793f62ca96a33f1308b |
18-Oct-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Add a size argument to the LookupInlineAsmIdentifier() callback, which will be used by the asm matcher in the near future. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166221 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
9a14db3fefa73ef8a702dea1928fd0ee0befe59b |
18-Oct-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Fix Objective-C implicit property synthesis for C++ classes so we use valid source locations in places where it is necessary for diagnostics. By itself, this causes assertions, so while I'm here, also fix property synthesis for properties of C++ class type so we use so we properly set up a scope and mark variable declarations. <rdar://problem/12514189>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166219 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaObjCProperty.cpp
|
d052ebf6ca1a9ae3123a8ee22bc37e58ddb61018 |
18-Oct-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Have the LookupInlineAsmIdentifier() callback function return a *NamedDecl. In turn, build the expressions after we're finished parsing the asm. This avoids a crasher if the lookup fails. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166213 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
b36ea375e20f71df19c101fa2399b7ea3a607e04 |
18-Oct-2012 |
Anna Zaks <ganna@apple.com> |
Factor CollectClassPropertyImplementations out of Sema into AST This would make it possible for the analyzer to use the function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166210 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
0ec56b7add7be643f490ea9b430823570f01b4e2 |
18-Oct-2012 |
Axel Naumann <Axel.Naumann@cern.ch> |
From Vassil Vassilev: enable Sema to deal with multiple ExternalSemaSources. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166208 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
ultiplexExternalSemaSource.cpp
ema.cpp
emaCodeComplete.cpp
emaDeclObjC.cpp
emaExprMember.cpp
|
b1502bcd67fb593a95cbf73ec3814f4015666da0 |
18-Oct-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
DR1442: In a range-based for statement, namespace 'std' is not an associated namespace. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166194 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
emaOverload.cpp
|
3d5cf5e0483f538c27016ef3e064536058d5605e |
18-Oct-2012 |
David Blaikie <dblaikie@gmail.com> |
PR14021: Copy lookup results to ensure safe iteration. Within the body of the loop the underlying map may be modified via Sema::AddOverloadCandidate -> Sema::CompareReferenceRelationship -> Sema::RequireCompleteType to avoid the use of invalid iterators the sequence is copied first. A reliable, though large, test case is available - it will be reduced and committed shortly. Patch by Robert Muth. Review by myself, Nico Weber, and Rafael Espindola. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166188 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
7fd00b153c991fbe30f9fa76391d2ad9fa1d349d |
18-Oct-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Move most of the AsmParsing logic in clang back into the MC layer. Use the new ParseMSInlineAsm() API and add an implementation of the MCAsmParserSemaCallback interface. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166184 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
6678a05ba19c40d60ed68b37262942eb887be217 |
18-Oct-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Tests for DR1507. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166162 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
bd2f1f0dd5ea823e929d334130eb214f802489a5 |
18-Oct-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Update comment to match DR1502. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166158 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
76398e5ad39ae719dcc650c7cddeb25379c02c34 |
18-Oct-2012 |
David Blaikie <dblaikie@gmail.com> |
Fix -Woverloaded-virtual when the using statement refers to a base declaration of a virtual function. GCC and Clang both do not warn on: struct a { virtual void func(); }; struct b: a { virtual void func(); void func(int); }; struct c: b { void func(int); using b::func; }; but if the "using" was using a::func GCC would still remain silent where Clang would warn. This change makes Clang consistent with GCC's existing behavior. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166154 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
d654f2d722d4cb6366edcb8f27e99745fcbae486 |
18-Oct-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
DR1528: C++11 doesn't allow repeated cv-qualifiers in declarators after all. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166152 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
|
5708c18904304ed4e39abed8131fcad5e2fc0896 |
17-Oct-2012 |
David Blaikie <dblaikie@gmail.com> |
Implement C++ 10.3p16 - overrides involving deleted functions must match. Only deleted functions may override deleted functions and non-deleted functions may only override non-deleted functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166082 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
708f69bcc1be715efd1e9f46266a9c1ead184be6 |
17-Oct-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
DR1492: In a definition of a destructor, the exception specification must be explicitly specified iff it was specified in the declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166071 91177308-0d34-0410-b5e6-96231b3b80d8
emaExceptionSpec.cpp
|
263366f9241366f29ba65b703120f302490c39ff |
17-Oct-2012 |
Derek Schuff <dschuff@google.com> |
Add pnaclcall convention to Native Client targets. Because PNaCl bitcode must be target-independent, it uses some different bitcode representations from other targets (e.g. byval and sret for structures). This means that without additional type information, it cannot meet some native ABI requirements for some targets (e.g. passing structures containing unions by value on x86-64). To allow generation of code which uses the correct native ABIs, we also support triples such as x86_64-nacl, which uses target-dependent IR (as opposed to le32-nacl, which uses byval and sret). To allow interoperation between the two types of code, this patch adds a calling convention attribute to be used in code compiled with the target-dependent triple, which will generate code using the le32-style bitcode. This calling convention does not need to be explicitly supported in the backend because it determines bitcode representation rather than native conventions (the backend just needs to undersand how to handle byval and sret for the Native Client OS). This patch implements __attribute__((pnaclcall)) to generate calls in bitcode according to the le32 bitcode conventions, an attribute which is accepted by any Native Client target, but issues a warning otherwise. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166065 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaType.cpp
|
e54cba1ec0b0e498ee67d200289035797932e714 |
16-Oct-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Move some logic around to simplify the interface between the front-end and the AsmParser. No functional change intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166063 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
9b29f4fe3d0600edf6ba00d48f2d4f2b1984f247 |
16-Oct-2012 |
David Blaikie <dblaikie@gmail.com> |
Implement GCC's -Wint-to-pointer-cast. This implementation doesn't warn on anything that GCC doesn't warn on with the exception of templates specializations (GCC doesn't warn, Clang does). The specific skipped cases (boolean, constant expressions, enums) are open for debate/adjustment if anyone wants to demonstrate that GCC is being overly conservative here. The only really obvious false positive I found was in the Clang regression suite's MPI test - apparently MPI uses specific flag values in pointer constants. (eg: #define FOO (void*)~0) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166039 91177308-0d34-0410-b5e6-96231b3b80d8
emaCast.cpp
|
1c9a2daf902aacb1a606497a7d09a7c2c29957ed |
16-Oct-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
Minor tweak to last patch along with a test case. // rdar://12491143 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166030 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
9f5933a73b2dde9164f4fed001d987491f277c9a |
16-Oct-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
fixes an objc crash involving objc bool literal on hopelessly poorly written code after spewing several errors. // rdar://12491143 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166025 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
7a0c064770355a4918df69f95de8dea6338a59a2 |
16-Oct-2012 |
Daniel Dunbar <daniel@zuster.org> |
Un-revert r164907 and r164902 (+ follow-ups), 10.6 build fix to follow. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165988 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
6cf7d7d0866b431388001b972762ef6e1ec1664b |
15-Oct-2012 |
Abramo Bagnara <abramo.bagnara@bugseng.com> |
Fixed CXXNamedCast right paren location propagation to instantiations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165977 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
ac7027872b55c43389308b51b36ade04bb50081f |
15-Oct-2012 |
Abramo Bagnara <abramo.bagnara@bugseng.com> |
Fixed LabelDecl source range. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165976 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
dc0d4e251b4c41b75c5d93f1866a8a0952b1c6ae |
15-Oct-2012 |
Nico Weber <nicolasweber@gmx.de> |
Revert r164907 and r164902 (+ follow-ups). They broke building on 10.6. See PR14013. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165962 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
d9b56edcf42232c5331f9ad79aae83ba31e852df |
15-Oct-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Rework the front-end to use the API introduced in r165946. -The front-end now builds a single assembly string and feeds it to the AsmParser. The front-end iterates on a per statement basis by calling the ParseStatement() function. Please note, the calling of ParseStatement() and and any notion of MCAsmParsedOperands will be sunk into the MC layer in the near future. I plan to expose more basic APIs such as getClobbers, etc. -The enumeration of the AsmString expressions have been reworked to use SMLocs rather than assembly Pieces, which were being parsed in the front-end. -The test case, t8(), was modified due to r129223. I'll have to find a way to work around things such as these. Sorry for the large commit, but breaking this in multiple smaller commits proved too irritating. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165957 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
67bd78f1d52da57f9f44092816174ccc1d599c87 |
13-Oct-2012 |
Chad Rosier <mcrosier@apple.com> |
Update for r165858. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165859 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
de31b28eb7d982ed6802986c2ea94b4e955c5366 |
13-Oct-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Remove a bunch of parsing code from the front-end. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165851 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
5f608aedb6c5d32d2f7c51f9354a75b21f1eeaee |
13-Oct-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Make -mms-bitfields behave consistently. Patch by Jeremiah Zanin. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165849 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
106ddc1d320d43928ea1f36174e9d494da751ae6 |
13-Oct-2012 |
Chad Rosier <mcrosier@apple.com> |
Update for r165833. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165834 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
6c500b131521e50c25db10c16bdd4b47e0651cea |
12-Oct-2012 |
DeLesley Hutchins <delesley@google.com> |
Fix warnings introduced by r165826. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165829 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
3ce9fae275ec05cd648d6093b95eb1d05bc14a98 |
12-Oct-2012 |
DeLesley Hutchins <delesley@google.com> |
Thread-safety analysis: support multiple thread-safety attributes on declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165826 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
fba3fb9a14f2d729639e0fdb834e3eeb40a8a12a |
12-Oct-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Remove a bunch of parsing code from the front-end, which will be reimplemented in the AsmParser where it belongs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165825 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
6952c018318a8ce57e336d7ed2a4819a98182fa2 |
12-Oct-2012 |
David Blaikie <dblaikie@gmail.com> |
Fix typo correction of one qualified name to another. When suggesting "foo::bar" as a correction for "fob::bar" we mistakenly replaced only "bar" with "foo::bar" producing "fob::foo::bar" which was broken. This corrects that replacement in as many places as I could find & provides test cases for all those cases I could find a test case for. There are a couple that don't seem to be reachable (one looks entirely dead, the other just doesn't seem to ever get called with a namespace to namespace change). Review by Richard Smith ( http://llvm-reviews.chandlerc.com/D57 ). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165817 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprMember.cpp
emaLookup.cpp
emaTemplate.cpp
|
47fcbba7c8f621535ed7fa632327264c1c0b84f0 |
12-Oct-2012 |
Richard Trieu <rtrieu@google.com> |
Change (!ptr != 0) to (!ptr) to make the code more readable. No functional change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165811 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprMember.cpp
|
ab210055fd33e0b050b37b4c3a248cab9154a4cb |
12-Oct-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Remove unused variable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165793 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
6ec69c3f436babcdb83fd7ecb2ad722d8719bd89 |
12-Oct-2012 |
Chad Rosier <mcrosier@apple.com> |
Remove dead code introduced in r165751. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165772 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
abeadfb11fde148f15c2fd67015e8163609d5b68 |
12-Oct-2012 |
David Blaikie <dblaikie@gmail.com> |
Provide a fixit when taking the address of an unqualified member function. This only applies if the type has a name. (we could potentially do something crazy with decltype in C++11 to qualify members of unnamed types but that seems excessive) It might be nice to also suggest a fixit for "&this->i", "&foo->i", and "&foo.i" but those expressions produce 'bound' member functions that have a different AST representation & make error recovery a little trickier. Left as future work. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165763 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
90a76e54dee814ee395c4c4b40f668b9e150deb1 |
11-Oct-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Remove a bunch of parsing code from the front-end, which will be reimplemented in the AsmParser where it belongs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165752 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
344041574a90fecc98d9412dd28767b2568eb16f |
11-Oct-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Lookup the IdentifierInfo using the Idents table and remove the now unused static helper function. The test case needs to be remove temporarily until I can better filter memory operands that aren't actual variable reference. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165751 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
0234bfa2b03470b8ce379a7485e60ffa35c1d550 |
11-Oct-2012 |
Ted Kremenek <kremenek@apple.com> |
Add null check for malformed code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165733 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
f1c1ba089cd8930c1193fcd20fb38cab834a8f94 |
11-Oct-2012 |
Jordan Rose <jordan_rose@apple.com> |
-Warc-repeated-use-of-weak: fix a use-of-uninitialized and add a test case. Fix-up for r165718, should get the buildbots back online. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165723 91177308-0d34-0410-b5e6-96231b3b80d8
copeInfo.cpp
|
b5cd1220dd650a358622241237aa595c5d675506 |
11-Oct-2012 |
Jordan Rose <jordan_rose@apple.com> |
-Warc-repeated-use-of-weak: Don't warn on a single read followed by writes. This is a "safe" pattern, or at least one that cannot be helped by using a strong local variable. However, if the single read is within a loop, it should /always/ be treated as potentially dangerous. <rdar://problem/12437490> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165719 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
7fffce781e6ecbf4058b24df7e5ae3037569aa56 |
11-Oct-2012 |
Jordan Rose <jordan_rose@apple.com> |
-Warc-repeated-use-of-weak: Check messages to property accessors as well. Previously, [foo weakProp] was not being treated the same as foo.weakProp. Now, for every explicit message send, we check if it's a property access, and if so, if the property is weak. Then for every assignment of a message, we have to do the same thing again. This is a potentially expensive increase because determining whether a method is a property accessor requires searching through the methods it overrides. However, without it -Warc-repeated-use-of-weak will miss cases from people who prefer not to use dot syntax. If this turns out to be too expensive, we can try caching the result somewhere, or even lose precision by not checking superclass methods. The warning is off-by-default, though. <rdar://problem/12407765> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165718 91177308-0d34-0410-b5e6-96231b3b80d8
copeInfo.cpp
emaExprObjC.cpp
|
c5f804636e367ef744fd24cf88f7c956a5af0434 |
11-Oct-2012 |
Nico Weber <nicolasweber@gmx.de> |
Add codegen support for __uuidof(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165710 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
df75b0c74b277c6b46af2f9e90e13160fbc14d6f |
11-Oct-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Minor cleanup for r165678; no functional change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165679 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
2edcde8747a000113b434a5c88b4648beed4197b |
11-Oct-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Make sure we perform the variadic method check correctly for calls to a member operator(). PR14057. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165678 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
c88f8ef9d85a537233b4423d31dbf8bc81be525a |
10-Oct-2012 |
Jordan Rose <jordan_rose@apple.com> |
-Warc-repeated-use-of-weak: look through explicit casts on assigned values. Reading from a weak property, casting the result, and assigning to a strong pointer should still be considered safe. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165629 91177308-0d34-0410-b5e6-96231b3b80d8
copeInfo.cpp
|
04bec39d61f2b392d798882c9141fecf3ca653c5 |
10-Oct-2012 |
Jordan Rose <jordan_rose@apple.com> |
Move Sema::PropertyIfSetterOrGetter to ObjCMethodDecl::findPropertyDecl. Then, switch users of PropertyIfSetterOrGetter and LookupPropertyDecl (the latter by name) over to findPropertyDecl. This actually makes -Wreceiver-is-weak a bit stronger than it was before. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165628 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprObjC.cpp
emaObjCProperty.cpp
|
9a1f7d8c33304f973a59c68d80c2cce280afb1d4 |
10-Oct-2012 |
Jordan Rose <jordan_rose@apple.com> |
Change Sema::PropertyIfSetterOrGetter to make use of isPropertyAccessor. Old algorithm: 1. See if the name looks like a getter or setter. 2. Use the name to look up a property in the current ObjCContainer and all its protocols. 3. If the current container is an interface, also look in all categories and superclasses (and superclass categories, and so on). New algorithm: 1. See if the method is marked as a property accessor. If so, look through all properties in the current container and find one that has a matching selector. 2. Find all overrides of the method using ObjCMethodDecl's getOverriddenMethods. This collects methods in superclasses and protocols (as well as superclass categories, which isn't really necessary), and checks if THEY are accessors. This part is not done recursively, since getOverriddenMethods is already recursive. This lets us handle getters and setters that do not match the property names. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165627 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
1e4691b9d8e1bdcc8ef62b323969d702c51b3c08 |
10-Oct-2012 |
Jordan Rose <jordan_rose@apple.com> |
Rename ObjCMethodDecl::isSynthesized to isPropertyAccessor. This more accurately reflects its use: this flag is set when a method matches the getter or setter name for a property in the same class, and does not actually specify whether or not the definition of the method will be synthesized (either implicitly or explicitly with @synthesize). This renames the setter and backing field as well, and changes the (soon-to-be-obsolete?) XML dump format to use 'property_accessor' instead of 'synthesized'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165626 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
emaExprObjC.cpp
emaObjCProperty.cpp
emaPseudoObject.cpp
|
b5e4ace3161bd2c3f88f39e228ba8f6aaa15e751 |
10-Oct-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Fix stack overflow when trying to create an implicit moving constructor with invalid code. rdar://12240916 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165623 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
3644d970095d9c638c658cfd17f8e19fc333aadc |
09-Oct-2012 |
Douglas Gregor <dgregor@apple.com> |
If a macro has been #undef'd in a precompiled header, we still need to write out the macro history for that macro. Similarly, we need to cope with reading a macro definition that has been #undef'd. Take advantage of this new ability so that global code-completion results can refer to #undef'd macros, rather than losing them entirely. For multiply defined/#undef'd macros, we will still get the wrong result, but it's better than getting no result. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165502 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
f5b132f7b373203eab7cf357b01f935bd88087bd |
09-Oct-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Clearing a SmallPtrSet is still expensive, split it out from OverloadCandidateSet::clear and don't do it on destruction. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165501 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
38eb1e161f602ee810dfb8a5a0d8462572f22689 |
09-Oct-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
When storing the C++ overridden methods, store them once for the canonical method; avoid storing them again for an out-of-line definition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165472 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
6b34c176994aaa781eff6cd8755a48cfb109e809 |
08-Oct-2012 |
David Blaikie <dblaikie@gmail.com> |
Use a single note diagnostic for all the precedent/parentheses warnings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165384 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
0bea86307eb8c16339315a1e261fc490eb505c5b |
08-Oct-2012 |
David Blaikie <dblaikie@gmail.com> |
StringRef-ify Binary/UnaryOperator::getOpcodeStr git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165383 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
emaExpr.cpp
emaOverload.cpp
|
c969e6a7e4260fdb284593ed344b51f51e7225f6 |
05-Oct-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Workaround for libstdc++4.6 <atomic> bug: make comment more explicit about what's going on, per Sean Silva's suggestion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165286 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
b3f55c5728aaf0d28579e67db3dd34c2934e7805 |
05-Oct-2012 |
David Blaikie <dblaikie@gmail.com> |
Implement -Wshift-op-parentheses for: a << b + c This appears to be consistent with GCC's implementation of the same warning under -Wparentheses. Suppressing a << b + c for cases where 'a' is a user defined type for compatibility with C++ stream IO. Otherwise suggest parentheses around the addition or subtraction subexpression. (this came up when MSVC was complaining (incorrectly, so far as I can tell) about a perceived violation of this within the LLVM codebase, PR14001) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165283 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
6a01012e6bffa246810dc5c655a9a30082331fb2 |
05-Oct-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[libclang] Introduce CXCursor_ModuleImportDecl cursor kind, used for a module import declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165277 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
d1a55a6631b11b6c5364772023451c547eafedee |
05-Oct-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Egriegious hack to support libstdc++4.6's broken <atomic> header, which defines a non-inline namespace, then reopens it as inline to try to add its symbols to the surrounding namespace. In this one special case, permit the namespace to be reopened as inline, and patch up the name lookup tables to match. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165263 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
59c0a818a79be850f7ae8fdafd57a1710e5b809a |
04-Oct-2012 |
Abramo Bagnara <abramo.bagnara@bugseng.com> |
Fixed FunctionTypeLoc source range. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165259 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
emaDecl.cpp
emaType.cpp
reeTransform.h
|
635311f94e8fd4ff153130d91046ff78ffe97b06 |
04-Oct-2012 |
Abramo Bagnara <abramo.bagnara@bugseng.com> |
Fixed instantiated operators source range. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165258 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
16467f2102a04e155f7a2f22c83930a7c8908a80 |
04-Oct-2012 |
Abramo Bagnara <abramo.bagnara@bugseng.com> |
Fixed ParamDecl source range for implicit typed k&r parameters. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165256 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
45bed131a1a4219cc0bfb3c9f666dca54ddb59fa |
04-Oct-2012 |
Michael Han <Michael.Han@autodesk.com> |
Fix scope location when parsing GNU attributes. For GNU attributes, instead of reusing attribute source location for the scope location, use SourceLocation() since GNU attributes don not have scope tokens. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165234 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
9595c7e2533c836537dc300e75d059c29feb7094 |
04-Oct-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Permanently end the whole "pragma got handled by the parser too early" mess by handling all pragmas which the parser touches uniformly. <rdar://problem/12248901>, etc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165195 91177308-0d34-0410-b5e6-96231b3b80d8
emaAttr.cpp
|
3f001ff471aec590a65a383a25367a4e1c82f5a3 |
03-Oct-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-C arc: Warn under arc about a use of an ivar inside a block that doesn't have a 'self' as this implicitly captures 'self' and could create retain cycles. Provide fixit. // rdar://11194874 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165133 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
6880f492365cc4fa4c941aa83688635003ee7498 |
03-Oct-2012 |
Michael Han <Michael.Han@autodesk.com> |
Improve C++11 attribute parsing. - General C++11 attributes were previously parsed and ignored. Now they are parsed and stored in AST. - Add support to parse arguments of attributes that in 'gnu' namespace. - Differentiate unknown attributes and known attributes that can't be applied to statements when emitting diagnostic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165082 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAttr.cpp
|
6b2cc42f1504db6577fd67fa55ef023254744e2c |
03-Oct-2012 |
Richard Trieu <rtrieu@google.com> |
Change how the SelfReferenceChecker handles MemberExpr. Instead of treating each one separately, process a stack of MemberExpr's as a single unit so that static calls and member access will not be warned on. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165074 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
3d3f1f7c79c33a2e280dd289056ce68c95aa4cce |
03-Oct-2012 |
Chad Rosier <mcrosier@apple.com> |
Revert 165058, per Jim request. This requires further discussion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165070 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
3329ad1dc678d0f659f5ab4f122af824477ca788 |
02-Oct-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Rewrite the symbol references as wildcard MCParsedAsmOperands. A Sema lookup is used to determine the size of the variable, which is in turn used during wildcard matching. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165058 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
180d9d98fb51c7f6719d56a73bfd09400502986c |
02-Oct-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Enhance the isSimpleMSAsm() function to handle operands with pointer size directives (e.g., dword ptr [eax]). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165031 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
ef3f6ff4ece061dc3e905d656126f09883c7ae2e |
02-Oct-2012 |
Chad Rosier <mcrosier@apple.com> |
No need to call the InitializeAll* functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165025 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
82bfa19fe3be324b13fdbcda46304b52c500f0d4 |
02-Oct-2012 |
Aaron Ballman <aaron@aaronballman.com> |
Allowing individual targets to determine whether a given calling convention is allowed or ignored with warning. This allows for correct name mangling for x64 targets on Windows, which in turn allows for linking against the Win32 APIs. Fixes PR13782 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165015 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaType.cpp
|
3ba17ee280d58bf702eb3836c119bab42dcbb9c8 |
02-Oct-2012 |
Ted Kremenek <kremenek@apple.com> |
Tweak diagnostic text to indicate that __weak on a local variable is only allowed for ARC. Fixes <rdar://problem/12407705> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164990 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
be9af1288881110e406b87914162eaa59f1e5918 |
02-Oct-2012 |
Lang Hames <lhames@gmail.com> |
Add FP_CONTRACT support for clang. Clang will now honor the FP_CONTRACT pragma and emit LLVM fmuladd intrinsics for expressions of the form A * B + C (when they occur in a single statement). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164989 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaOverload.cpp
emaPseudoObject.cpp
reeTransform.h
|
d13eff6f77216a6fb25e18f600b492db4f0492e8 |
02-Oct-2012 |
Ted Kremenek <kremenek@apple.com> |
Check if an IdentifierInfo* is null when the FunctionDecl isn't a simple C function. Fixes <rdar://problem/12355298> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164988 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
66360e224689dc23a0acd8a6705ba50bec13bc97 |
02-Oct-2012 |
Jordan Rose <jordan_rose@apple.com> |
-Wformat: Don't check format strings in uninstantiated templates. Also applies to -Wnonnull, -Wtype-safety, and -Wnon-pod-varargs. All of these can be better checked at instantiation time. This change does not actually affect regular CallExpr function calls, since the checks there only happen after overload resolution. However, it will affect Objective-C method calls. <rdar://problem/12373934> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164984 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
3034d88fd128ddf164f39d4f460ae3c3d70b40ae |
02-Oct-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Use the convertToMapAndConstraints() function in the front-end. Rework the logic to account for the fact that we no longer create a MCInst. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164980 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
c4a839101e883261d038a1d5ea718dd46abd1d2d |
01-Oct-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR13978: A 'decltype' DeclSpec has an expression representation, not a type representation. Fix crash if it appears in the return type of a member function definition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164967 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
bbff82f302a1dd67589f65912351978905f0c5a7 |
01-Oct-2012 |
Anna Zaks <ganna@apple.com> |
Move isObjCSelf into Expr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164966 91177308-0d34-0410-b5e6-96231b3b80d8
copeInfo.cpp
|
568f785a76e0a21de20932abf09ce7653e651f92 |
01-Oct-2012 |
Richard Trieu <rtrieu@google.com> |
Cleaning up the self initialization checker. -Allow Sema to do more processing on the initial Expr before checking it. -Remove the special conditions in HandleExpr() -Move the code so that only one call site is needed. -Removed the function from Sema and only call it locally. -Warn on potentially evaluated reference variables, not just casts to r-values. -Update tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164951 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaInit.cpp
|
1952354bd376062c3ab3d328c0fc6c36530c9309 |
29-Sep-2012 |
Dmitri Gribenko <gribozavr@gmail.com> |
Move the 'find macro by spelling' infrastructure to the Preprocessor class and use it to suggest appropriate macro for __attribute__((deprecated)) in -Wdocumentation-deprecated-sync. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164892 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
emaDecl.cpp
|
20441c59a00afb949e53121c55f8a58da17ba79e |
29-Sep-2012 |
Jordan Rose <jordan_rose@apple.com> |
Fix buildbots by not using a template from another namespace. No need to specialize BeforeThanCompare for a comparator that's only going to be used once. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164859 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
66da0abf7ab7cd449bb1d5134b2ef97d9d34d812 |
29-Sep-2012 |
Alexander Kornienko <alexfh@google.com> |
Compatibility macro detection for the -Wimplicit-fallthrough diagnostic. Summary: When issuing a diagnostic message for the -Wimplicit-fallthrough diagnostics, always try to find the latest macro, defined at the point of fallthrough, which is immediately expanded to "[[clang::fallthrough]]", and use it's name instead of the actual sequence. Known issues: * uses PP.getSpelling() to compare macro definition with a string (anyone can suggest a convenient way to fill a token array, or maybe lex it in runtime?); * this can be generalized and used in other similar cases, any ideas where it should reside then? Reviewers: doug.gregor, rsmith Reviewed By: rsmith CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D50 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164858 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
3437daad71d8694d4ddd25418751f2763c0f8979 |
29-Sep-2012 |
Jordan Rose <jordan_rose@apple.com> |
-Wreceiver-is-weak: rephrase warning text and add a suggestion Note. New output: warning: weak property may be unpredictably set to nil note: property declared here note: assign the value to a strong variable to keep the object alive during use <rdar://problem/12277204> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164857 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
a55d32d1b8f799bf58c02540983976368c42d895 |
29-Sep-2012 |
Jordan Rose <jordan_rose@apple.com> |
Pull ScopeInfo implementation into its own file. The infrastructure for -Warc-repeated-use-of-weak got a little too heavy to leave sitting at the top of Sema.cpp. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164856 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
copeInfo.cpp
ema.cpp
|
7a2704800943fbb69207e125d28186278712af36 |
29-Sep-2012 |
Jordan Rose <jordan_rose@apple.com> |
-Warc-repeated-use-of-weak: check ivars and variables as well. Like properties, loading from a weak ivar twice in the same function can give you inconsistent results if the object is deallocated between the two loads. It is safer to assign to a strong local variable and use that. Second half of <rdar://problem/12280249>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164855 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
ema.cpp
emaChecking.cpp
emaExpr.cpp
emaExprMember.cpp
emaPseudoObject.cpp
|
58b6bdcdeb683a3504f2248a409e1f4e85876cee |
29-Sep-2012 |
Jordan Rose <jordan_rose@apple.com> |
Add a warning (off by default) for repeated use of the same weak property. The motivating example: if (self.weakProp) use(self.weakProp); As with any non-atomic test-then-use, it is possible a weak property to be non-nil at the 'if', but be deallocated by the time it is used. The correct way to write this example is as follows: id tmp = self.weakProp; if (tmp) use(tmp); The warning is controlled by -Warc-repeated-use-of-receiver, and uses the property name and base to determine if the same property on the same object is being accessed multiple times. In cases where the base is more complicated than just a single Decl (e.g. 'foo.bar.weakProp'), it picks a Decl for some degree of uniquing and reports the problem under a subflag, -Warc-maybe-repeated-use-of-receiver. This gives a way to tune the aggressiveness of the warning for a particular project. The warning is not on by default because it is not flow-sensitive and thus may have a higher-than-acceptable rate of false positives, though it is less noisy than -Wreceiver-is-weak. On the other hand, it will not warn about some cases that may be legitimate issues that -Wreceiver-is-weak will catch, and it does not attempt to reason about methods returning weak values. Even though this is not a real "analysis-based" check I've put the bug emission code in AnalysisBasedWarnings for two reasons: (1) to run on every kind of code body (function, method, block, or lambda), and (2) to suggest that it may be enhanced by flow-sensitive analysis in the future. The second (smaller) half of this work is to extend it to weak locals and weak ivars. This should use most of the same infrastructure. Part of <rdar://problem/12280249> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164854 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
ema.cpp
emaDecl.cpp
emaExpr.cpp
emaPseudoObject.cpp
|
72ab27732ea7a42d756a1e79727f86fbe391b42b |
28-Sep-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
When processing an InitListExpr and skipping the initialization of an invalid record, skip at least one element from the InitListExpr to avoid an infinite loop if we're initializing an array of unknown bound. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164851 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
ad0ce53c8219456938405b84c5d13341a47e3d94 |
27-Sep-2012 |
Anna Zaks <ganna@apple.com> |
Make getDefaultSynthIvarName() a member of ObjCPropertyDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164789 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
f3477c13eeaf11b32a41f181398fb5deffd0dd73 |
27-Sep-2012 |
Sylvestre Ledru <sylvestre@debian.org> |
Revert 'Fix a typo 'iff' => 'if''. iff is an abreviation of if and only if. See: http://en.wikipedia.org/wiki/If_and_only_if Commit 164766 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164769 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
emaAccess.cpp
emaChecking.cpp
emaDecl.cpp
|
94ff8e1f57c6382d91d0de981a4f311509d83e37 |
27-Sep-2012 |
Sylvestre Ledru <sylvestre@debian.org> |
Fix a typo 'iff' => 'if' git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164766 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
emaAccess.cpp
emaChecking.cpp
emaDecl.cpp
|
c04bb926ef693c94560da254e87926e93bb9c92f |
27-Sep-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[libclang] Always report a CXCursor_MacroDefinition for code-completion results for a macro name, not CXCursor_NotImplemented. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164740 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
5bf5c2ec54ede5352293e5739e9b44bea2f6b01b |
26-Sep-2012 |
Anna Zaks <ganna@apple.com> |
[analyzer] Add experimental ObjC invalidation method checker. This checker is annotation driven. It checks that the annotated invalidation method accesses all ivars of the enclosing objects that are objects of type, which in turn contains an invalidation method. This is driven by __attribute((annotation("objc_instance_variable_invalidator")). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164716 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
d278dbe43aff06865ae3388ba6b4ac5a9d68e179 |
26-Sep-2012 |
DeLesley Hutchins <delesley@google.com> |
Fix template instantiation of attributes. More specifically, fix the case where an attribute is attached to a forward declaration of a template function, and refers to parameters of that declaration, but is then inherited by the definition of that function. When the definition is instantiated, the parameter references need to be remapped. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164710 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
526d24444c91404dc4165b141e5ec095125c1bc8 |
26-Sep-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[libclang] Remove the ParentKind cursor kind from code-completion results. This is to reduce dependency to cursors for the code-completion results. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164705 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
|
80bfa3d125fa0b9c636977ea37b4a55b2c9b1037 |
26-Sep-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Fix an edge case of mangling involving the combination of a lambda and typeid. typeid (and a couple other non-standard places where we can transform an unevaluated expression into an evaluated expression) is special because it introduces an an expression evaluation context, which conflicts with the mechanism to compute the current lambda mangling context. PR12123. I would appreciate if someone would double-check that we get the mangling correct with this patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164658 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
reeTransform.h
|
d7a6b1640e565487d163023a6a2e83f55476ae96 |
26-Sep-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Fix the AST representation for non-type template arguments to encode enough information so we can mangle them correctly in cases involving dependent parameter types. (This specifically impacts cases involving null pointers and cases involving parameters of reference type.) Fix the mangler to use this information instead of trying to scavenge it out of the parameter declaration. <rdar://problem/12296776>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164656 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
reeTransform.h
|
317d8f339c2ee7b59e0e8cc81646ef664e20532d |
25-Sep-2012 |
Bob Wilson <bob.wilson@apple.com> |
Examine the last, not the first, instruction from the MC matcher. If an MS-style inline asm is matched to multiple instructions, e.g., with a a WAIT-prefix, then we need to examine the operands of the last instruction instruction, not the prefix instruction. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164608 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
ea30e2f8667668173cf7433c3c80cf603bd922a4 |
25-Sep-2012 |
John McCall <rjmccall@apple.com> |
Add the Microsoft __is_interface_class type trait. Patch by Andy Gibbs! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164591 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
e402e72273cde2a64fa6097c1fe93f500038675d |
25-Sep-2012 |
John McCall <rjmccall@apple.com> |
Fix for r163013 regression and further __interface enhancement. Patch by Andy Gibbs! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164590 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
9f357de8d5823f9b13cf33ad1f6af1dd69b7669f |
25-Sep-2012 |
John McCall <rjmccall@apple.com> |
During jump-scope checking, build an ExprWithCleanups immediately into the enclosing scope; this is a more accurate model but is (I believe) unnecessary in my test case due to other flaws. However, one of those flaws is now intentional: blocks which appear in return statements can be trivially observed to not extend in lifetime past the return, and so we can allow a jump past them. Do the necessary magic in IR-generation to make this work. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164589 91177308-0d34-0410-b5e6-96231b3b80d8
umpDiagnostics.cpp
|
e49ff3ef3459e97fa76502bd9eae4ed9170fd048 |
25-Sep-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix crash when a decltype expression in a trailing return type refers to the function being instantiated. An error recovery codepath was recursively performing name lookup (and triggering an unbounded stack of template instantiations which blew out the stack before hitting the depth limit). Patch by Wei Pan! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164586 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaOverload.cpp
|
511e3ae61bc2ff3803195587fe9774cb815726fc |
25-Sep-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Delete some code which is, as far as I can tell, dead. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164580 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
54b3ba8cf2eb4886a88cdb8adedb15f43333ff1d |
25-Sep-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Don't produce diagnostics for missing ctor-initializers during template instantiations if we encountered errors parsing some of the initializers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164578 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
|
7935dde8e4dd8089536e28d51a0864252064ecd3 |
25-Sep-2012 |
Chad Rosier <mcrosier@apple.com> |
Update for r164567. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164568 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
b0f6b9c94077446ceb29167add2e87fb99733a55 |
24-Sep-2012 |
Bob Wilson <bob.wilson@apple.com> |
Replace an assertion with an error for empty __asm statements. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164551 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
40d39e39e46eb36635c9735381ca5c4f916d30cd |
24-Sep-2012 |
Bob Wilson <bob.wilson@apple.com> |
Fix a comment typo and clean up formatting. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164550 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
e3b136bd873508c9ac0ee6eba98c2a810a177eba |
24-Sep-2012 |
Dmitri Gribenko <gribozavr@gmail.com> |
Change the wording of the extension warning from > 'long long' is an extension when C99 mode is not enabled to > 'long long' is a C++11 extension while compiling in C++98 mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164545 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaType.cpp
|
fc97ea29b1afd9e87341bce2b0cbb0c7172b7dd8 |
24-Sep-2012 |
Dmitri Gribenko <gribozavr@gmail.com> |
Small cleanup of literal semantic analysis: hiding 'char *' pointers behind StringRef makes code cleaner. Also, make the temporary buffer smaller: 512 characters is unreasonably large for integer literals. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164484 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
2ad11cd666f8e80463b5fd155072633f8e1283a4 |
22-Sep-2012 |
Abramo Bagnara <abramo.bagnara@bugseng.com> |
Avoid multiple atomic builtin declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164454 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
3d442196134d18ed8ee17576638b758362b60742 |
22-Sep-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Use mnemonicIsValid() in a helpful assert. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164421 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
fd09088880f758c874edc8d3d22fa922baec0483 |
21-Sep-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-C: when diagnosing deprecated/unavailable usage of setter or getter backing a deprecated/unavailable property, also not location of the property. // rdar://12324295 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164412 91177308-0d34-0410-b5e6-96231b3b80d8
elayedDiagnostic.cpp
emaDeclAttr.cpp
emaExpr.cpp
emaObjCProperty.cpp
|
7821e0756744018a34c533f30cdabe62a72d4e4a |
21-Sep-2012 |
Hans Wennborg <hans@hanshq.net> |
Make warnings about uninitialized fields include the field name. This makes the wording more informative, and consistent with the other warnings about uninitialized variables. Also, me and David who reviewed this couldn't figure out why we would need to do a lookup to get the name of the variable; so just print the name directly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164366 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
1a6eac865260b2795e3555e569e6a2e990ee73bd |
21-Sep-2012 |
Craig Topper <craig.topper@gmail.com> |
Doxygen-ify a comment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164360 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
b6b5b97c517cc651285f620a70b1ca52fa808c5a |
21-Sep-2012 |
David Blaikie <dblaikie@gmail.com> |
PR13890: Warn on abstract final classes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164359 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
8b533d97e0683a0c87096b95927a2e9ce02243d4 |
20-Sep-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
If the range in a for range statement doesn't have a viable begin/end function, but can be dereferenced to form an expression which does have viable begin/end functions, then typo-correct the range, even if something else goes wrong with the statement (such as inaccessible begin/end or the wrong type of loop variable). In order to ensure we recover correctly and produce any followup diagnostics in this case, redo semantic analysis on the for-range statement outside of the diagnostic trap, after issuing the typo-correction. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164323 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
reeTransform.h
|
a193f20916f0e0e5a3b0f76ca69e2b3870c1a325 |
20-Sep-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
Improvements to my patch in r164143 per Richard's comments. // rdar://12202422 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164316 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
a405b2523b8857e0ba7e6374648b14f618879f33 |
20-Sep-2012 |
David Blaikie <dblaikie@gmail.com> |
Include types when a definition's type differs from a prior declaration. This is some really old code (took me a while to find the test cases) & the diagnostic text is slightly incorrect (it should really only apply to re/declarations/, redefinitions are an error regardless of whether the types match). Not sure if anyone cares about it, though. For now this just makes the diagnostic more clear in less obvious cases where the type of a declaration might not be explicitly written (eg: because it uses decltype) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164313 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
7c3c6bca2662704fbe038137d8ef2e4112359586 |
20-Sep-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Handle lambdas where the lambda-declarator is an explicit "(void)". PR13854. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164274 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaLambda.cpp
|
d6f80daa84164ceeb8900da07f43b6a150edf713 |
20-Sep-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Per C++11 [class.friend]p3, the 'friend' keyword must appear first in a non-function friend declaration. Patch by Josh Magee! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164273 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
|
407c8470d50be8edaae7ed39a3139adf35af2921 |
20-Sep-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Fix a small FIXME involving template partial ordering and member function templates with an rvalue ref qualifier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164267 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
9cef0064da0fe93cf60cc351d28ddf2e95fba0b3 |
20-Sep-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Fix function template partial ordering rules for static vs. non-static functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164263 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
5b280f28351bbdc103cc50d3b0f52f92d286fa0a |
19-Sep-2012 |
DeLesley Hutchins <delesley@google.com> |
Thread-safety analysis: fix ICE when EXCLUSIVE_LOCKS_REQUIRED or LOCKS_EXCLUDED is used on a method with a name that is is not a simple identifier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164242 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
93e4599196654907dad3bd476013ad05d36ce604 |
19-Sep-2012 |
Craig Topper <craig.topper@gmail.com> |
Remove Context argument from TemplateDeductionInfo constructor. It was no longer needed after the unused Context member was removed in r164104. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164196 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaLookup.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
|
8da8a660128180a31479216111ff9b19b11c95b4 |
19-Sep-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Add the TypeSourceInfo for the lambda call operator to the lambda's definition info; it needs to be there because the mangler needs to access it before we're finished defining the lambda class. PR12808. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164186 91177308-0d34-0410-b5e6-96231b3b80d8
emaLambda.cpp
reeTransform.h
|
97c6739a1e74a3131261081054ff4a75e4e3b64c |
18-Sep-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Fix a small bug in the way we handle builtin candidates for relational operators of enumeration type. From the gcc testsuite. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164171 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
9cd5b24315aea4bc58bac03cfb4874e076b013b8 |
18-Sep-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Add an extra check for invalid decls in the lambda semantic analysis to avoid a crash. PR13860. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164168 91177308-0d34-0410-b5e6-96231b3b80d8
emaLambda.cpp
|
ab4702febef82409773f7c80ec02d53ddbb4d80e |
18-Sep-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
minor refactoring of my last check-in. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164145 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
15a9356464f0809e1cb24aa3a7cc2577914ff5bb |
18-Sep-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
c: warn when an integer value comparison with an integral expression have the obvious result. Patch reviewed by John McCall off line. // rdar://12202422 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164143 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
471f985ae04817e0e8198a925fc7d74eaacaf962 |
18-Sep-2012 |
Hans Wennborg <hans@hanshq.net> |
Warn about self references in in-class initializers. This makes Clang warn about self references in in-class initializers, for example: struct S { int a = a + 42; }; This basically just moves UninitializedFieldVisitor up a bit in SemaDeclCXX.cpp, and adds a call to it from ActOnCXXInClassMemberInitializer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164131 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
43f8c40b05482894d94a8779a5ccd0f9a35420f3 |
18-Sep-2012 |
Ted Kremenek <kremenek@apple.com> |
Per discussion on cfe-dev, remove -Wunique-enums entirely. There is no compelling argument that this is a generally useful warning, and imposes a strong stylistic argument on code beyond what it was intended to find warnings in. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164083 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f224fb5de15e10cecd2d87fee73b0e39b503d924 |
18-Sep-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-C: don't warn about class extension property's missing 'assign' attribute as it is determined by its overridden property in primary class. // rdar://12214070 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164080 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
6defd9f31eec51278d056f1bff885018e2321373 |
17-Sep-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-C: peroform property attribute consistency checking on property declared in class extension. // rdar://12214070 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164053 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
1fac58a2ff3c56a18765b2c7395ed91ac7b80544 |
17-Sep-2012 |
Jordan Rose <jordan_rose@apple.com> |
-Warc-retain-cycles: look through [^{...} copy] and Block_copy(^{...}) Retain cycles happen in the case where a block is persisted past its life on the stack, and the way that occurs is by copying the block. We should thus look through any explicit copies we see. Note that Block_copy is actually a type-safe wrapper for _Block_copy, which does all the real work. <rdar://problem/12219663> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164039 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
8f411c39283caf2a403739b0c5dd398a6df511dc |
17-Sep-2012 |
Axel Naumann <Axel.Naumann@cern.ch> |
Don't write uninitialized values even if nobody ever asks for it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164033 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
bc57b108b2253e26b83768dba196c28564952f18 |
15-Sep-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
const _Atomic(T) is not an atomic type, so do not allow it as the type 'A' in C11 7.17's atomic operations. GNU's __atomic_* builtins do allow const-qualified atomics, though (!!) so don't restrict those. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163964 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
e10f4d384f5ae113d72a5193a1332c1930635ccc |
15-Sep-2012 |
Jordan Rose <jordan_rose@apple.com> |
-Warc-retain-cycles: warn at variable initialization as well as assignment. Specifically, this should warn: __block block_t a = ^{ a(); }; Furthermore, this case which previously warned now does not, since the value of 'b' is captured before the assignment occurs: block_t b; // not __block b = ^{ b(); }; (This will of course warn under -Wuninitialized, as before.) <rdar://problem/11015883> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163962 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDecl.cpp
emaExpr.cpp
|
b3cd3c0c8a234803dcb9b9c0dfe10106674141cd |
14-Sep-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix some dead stores which the static analyzer warned about. No functionality change (the problematic cases in ParseDecl.cpp are currently impossible). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163920 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
a6ddea6adbef22d4e2673dbb7236186ac5b14e09 |
14-Sep-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
When diagnosing multiple mem-initializers in a delegating ctor, point to the delegating initializer, not to the first initializer. For good measure, also highlight the other initializer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163919 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
6f5a2ec123ffebfb27f74a024ec3dccd65be5e83 |
14-Sep-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-C arc: remove -Warc-abi in its entirety. // rdar://10554025 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163917 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExprCXX.cpp
|
2c8e81e0d7ccf5880bc24fb8e2b1abcd7ea4f9a4 |
14-Sep-2012 |
Douglas Gregor <dgregor@apple.com> |
Fix warning on qualified typedef with 'unused' attribute, from Jason Haslam! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163874 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
6db351abf27e907b4a01570a6aa8e7b898522449 |
14-Sep-2012 |
Douglas Gregor <dgregor@apple.com> |
In debugger mode, allow comparisons between pointers and integers without a cast. Fixes <rdar://problem/11830912>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163873 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
dd084276526db1d53edf2b6fc8c4c8187e6ab540 |
14-Sep-2012 |
Douglas Gregor <dgregor@apple.com> |
As we do with base and member initializers in a dependent class, delay type checking for non-static data member initializers in a dependent class, because our ASTs lose too much information to when type-checking an initializer. Fixes <rdar://problem/11974632>, although the result is still rather unsatisfactory. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163871 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
84dd82e2088b1ea629f54f62a816f1155c78bb94 |
14-Sep-2012 |
Douglas Gregor <dgregor@apple.com> |
When computing the decltype of an expression, consider Objective-C ivar and property references as member accesses and produce the actual type of the declaration. Fixes <rdar://problem/12031582>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163858 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
bed51fef5773f043db2ad13aa2b6d2f8a8bdbdba |
14-Sep-2012 |
Douglas Gregor <dgregor@apple.com> |
Actually rebuild function types properly when adjusting the function type of an instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163848 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
2bcb984df975c75130f2320c935fae1143c2a5cc |
14-Sep-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Revert r163829. The world (or libstdc++, at least) is not ready. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163846 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
71074fdf40a8f5b53810712102b58c27efc30759 |
13-Sep-2012 |
Douglas Gregor <dgregor@apple.com> |
When we substitute into the type of a function based on the TypeSourceInfo, we may have lost some adjustments made to the type of that function due to declaration merging. Adjust the resulting type correspondingly. Fixes PR12948 / <rdar://problem/11552434>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163845 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
e7ff9191f39fa5a0f48168f51f55f1f7556d5993 |
13-Sep-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Implement C++11 [conv.prom]p4: an enumeration with a fixed underlying type has integral promotions to both its underlying type and to its underlying type's promoted type. This matters now that boolean conversions aren't permitted in converted constant expressions (a la DR1407): an enumerator with a fixed underlying type of bool still can be. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163841 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaOverload.cpp
|
ae19fbba559d8199d1f2b7154863180b0ae22ac7 |
13-Sep-2012 |
Douglas Gregor <dgregor@apple.com> |
Don't perform template argument deduction against invalid templates; it's likely to lead to a crash later on. Fixes PR12933 / <rdar://problem/11525335>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163838 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaTemplateDeduction.cpp
|
9fb6f7939c4b76b444b7f7b2761b130e7709ac08 |
13-Sep-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
remove duplicate code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163833 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
75379455fc88ca1f021e55ffe1cab3a9c2b2a37a |
13-Sep-2012 |
Douglas Gregor <dgregor@apple.com> |
Promote the warning about extra qualification on a declaration from a warning to an error. C++ bans it, and both GCC and EDG diagnose it as an error. Microsoft allows it, so we still warn in Microsoft mode. Fixes <rdar://problem/11135644>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163831 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
ceb07622bacde3184b19caf0957f5eeba5cb6784 |
13-Sep-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Remove speculative fix for C++ core issue 1407, since it was resolved as NAD. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163829 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
a1a32f7f5966edf47c1e22bcbeb2a09bc462ff0b |
13-Sep-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
Move back the stuff about missing ownership attribute warning to SemaDeclObjC and apply some simplification per John's comment. // rdar://12280826 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163824 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
emaType.cpp
|
ca5c4c9bfeb4b1ac645b04723c0319b0fc96073e |
13-Sep-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
Move no explicit ownership warning to SemaType.cpp. // rdar://12280826 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163813 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
emaType.cpp
|
127ff2ea6440c3da4b47f9c8b3b190254a97e7b5 |
13-Sep-2012 |
Ted Kremenek <kremenek@apple.com> |
Conditionally parse documentation comments in system headers by passing -fretain-comments-from-system-headers. By default, the compiler no longer parses such documentation comments, as they can result in a noticeable compile time/PCH slowdown. Fixes <rdar://problem/11860820>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163778 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
670941c28c0683ecc251dafdf093a71629625dc9 |
13-Sep-2012 |
Jordan Rose <jordan_rose@apple.com> |
Format strings: offer a fixit for Darwin's %D/%U/%O to ISO %d/%u/%o. <rdar://problem/12061922> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163772 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
275b6f52c7bcafc1f3cf291813b5c60ee776965a |
13-Sep-2012 |
Jordan Rose <jordan_rose@apple.com> |
Format strings: %D, %U, and %O are valid on Darwin (same as %d, %u, %o). These will warn under -Wformat-non-iso, and will still be rejected outright on other platforms. <rdar://problem/12061922> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163771 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
3ef95a55769278858ad586bd2b592fd50288a1ac |
13-Sep-2012 |
Chad Rosier <mcrosier@apple.com> |
Add a few FIXMEs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163758 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
b55e602e1dc7952edc7545fab7bb7b15047378f3 |
13-Sep-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Handle the enumeration of input and output expressions in a more robust way to address a few FIXMEs. The initial implementation, r163342, built the IR asm string and then tried to patch things on the fly without enough context. Specifically, it didn't skip mnemonics nor did it track with assembly instruction an expression was related to. The new implementation patches the operands and then builds the final IR string. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163756 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
00024796eaa29055e76fc99ffdc668c702e6fe9d |
12-Sep-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-C arc: don't issue no explicit ownership warning when __autoreleasing is explicitely added to param type. // rdar://12280826 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163738 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
7f9678b513f926dae27234858ed2586a6eb03b7b |
12-Sep-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] If we have a single asm operand that maps to multiple MCOperands then iterate over all of then when computing clobbers, inputs and outputs. On x86 the 1-to-many mapping is a memory operand that includes a BaseReg(reg), MemScale(imm), MemIndexReg(reg), an Expr(MCExpr or imm) and a MemSegReg(reg). Invalid register (Op.getReg() == 0) are not considered when computing clobber. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163728 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
e23fb90712233bdfa04387e48b54a7168e23cb3e |
12-Sep-2012 |
Dmitri Gribenko <gribozavr@gmail.com> |
Fix a couple of Doxygen issues pointed out by -Wdocumentation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163722 91177308-0d34-0410-b5e6-96231b3b80d8
emaPseudoObject.cpp
emaTemplateInstantiate.cpp
|
9a4db032ecd991626d236a502e770126db32bd31 |
12-Sep-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR13811: Add a FunctionParmPackExpr node to handle references to function parameter packs where the reference is not being expanded but the pack has been. Previously, Clang would segfault in such cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163672 91177308-0d34-0410-b5e6-96231b3b80d8
emaExceptionSpec.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
80da77edee263ce7afb1e1320496fc3619fe12c4 |
12-Sep-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] isDef/NumDefs in this context only refer to register definitions, not memory definitions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163666 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
8742d7c84a45988b9d6e1f6ad38b2242b800c2bd |
12-Sep-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] As of r163657 this check is unnecessary. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163665 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
fb700265b6e452a3cfd3abc73102fef11d103d4a |
12-Sep-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Don't consider tokens or immediates when computing clobbers, inputs and outputs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163657 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
c9e418c21c7a05ac90fd8013a19c6d1a86b052ee |
11-Sep-2012 |
DeLesley Hutchins <delesley@google.com> |
Fix warning from r163642 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163643 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
24a6c9459a50248e502884f129c789d452f70acc |
11-Sep-2012 |
DeLesley Hutchins <delesley@google.com> |
Thread safety analysis: fix bug related to lock_returned attribute on templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163642 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
4de971651ba09009d4a7cc6d2fbc978dd7092263 |
11-Sep-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Add $$ before numeric constants in the IR. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163581 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
9f0b1324a5352713337c75ef4a5acffd96609c6c |
11-Sep-2012 |
Stephen Hines <srhines@google.com> |
Merge branch 'upstream' into merge-2012_09_10
|
654f1d508cbc9553f4931b340dfa19b453f72ebd |
11-Sep-2012 |
David Blaikie <dblaikie@gmail.com> |
Fix PR13784: instantiation of an abstract class in a conditional operator. A couple of missing "RequireNonAbstractType" calls in conditional operator handling. I looked for opportunities to tie this check in to all relevant callers of PerformCopyInitialization (couldn't be all callers since this is called for base subobject copying too, where it's acceptable to copy abstract types) but the callers varied too much & in many cases had substantial code or conditionals on the RequireNonAbstractType call, the PerformCopyInitialization call, or the code between the two calls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163555 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
b22b0a53849dbb79da221fcc4671125ad49cb848 |
11-Sep-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Move the null check outside of the loop, no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163553 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
1ad23d62007162df82b58bca31b4aa277a5f6586 |
10-Sep-2012 |
Dmitri Gribenko <gribozavr@gmail.com> |
Remove redundant semicolons which are null statements. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163546 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExprCXX.cpp
emaTemplate.cpp
reeTransform.h
|
3f0ec5209726641782468bd4c7597e79dda78b15 |
10-Sep-2012 |
DeLesley Hutchins <delesley@google.com> |
Thread-safety analysis: differentiate between two forms of analysis; a precise analysis that may give false positives because it is confused by aliasing, and a less precise analysis that has fewer false positives, but may have false negatives. The more precise warnings are enabled by -Wthread-safety-precise. An additional note clarify the warnings in the precise case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163537 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
6f9386049c6dee2df33a4b7a6dfeda2733acce7d |
10-Sep-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
More tweaking and test cases for call to super annotations. // rdar://6386358 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163525 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
9f55983d966bbf3e6916b5cf5b35acfab2944887 |
10-Sep-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-C: Improving diagnostocs for missing call to super's annotated methods. // rdar://6386358 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163517 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
0cb8939851364eb37a0f8bf8bb47874b7d966915 |
10-Sep-2012 |
Douglas Gregor <dgregor@apple.com> |
Allow vector types in pseudo-destructor expressions. Fixes PR13798. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163514 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
8be066e6733364cd34f25c4f7b7344f72aa23369 |
08-Sep-2012 |
Jordan Rose <jordan_rose@apple.com> |
Format strings: suggest %lld instead of %qd and %Ld with -Wformat-non-iso. As a corollary to the previous commit, even when an extension is available, we can still offer a fixit to the standard modifier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163453 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
bbb6bb4952b77e57b842b4d3096848123ae690e7 |
08-Sep-2012 |
Jordan Rose <jordan_rose@apple.com> |
Format strings: %Ld isn't available on Darwin or Windows. This seems to be a GNU libc extension; we offer a fixit to %lld on these platforms. <rdar://problem/11518237> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163452 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
841011373b345cf79d0da4b7242dcf2869a43502 |
08-Sep-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-C: introduce __attribute((objc_requires_super)) on method in classes. Use it to flag those method implementations which don't contain call to 'super' if they have 'super' class and it has the method with this attribute set. This is wip. // rdar://6386358 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163434 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
emaDeclObjC.cpp
emaExprObjC.cpp
|
0b4db3e08a201c35f0011489bd5cd5d39bbe54fb |
07-Sep-2012 |
DeLesley Hutchins <delesley@google.com> |
Thread-safety analysis: Add support for selectively turning off warnings within part of a particular method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163397 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
6964b3f80ce1ba489e7e25e7cd58062699af9b0c |
07-Sep-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR9023: A template template parameter whose template parameter list contains an unexpanded parameter pack is a pack expansion. Thus, as with a non-type template parameter which is a pack expansion, it needs to be expanded early into a fixed list of template parameters. Since the expanded list of template parameters is not itself a parameter pack, it is permitted to appear before the end of the template parameter list, so also remove that restriction (for both template template parameter pack expansions and non-type template parameter pack expansions). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163369 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiateDecl.cpp
|
8123b6e7838216a53ba050f07e36fee28e1bbdaf |
06-Sep-2012 |
Sam Panzer <espanz@gmail.com> |
Clarified diagnostics for range-based for loops with invalid ranges git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163350 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
c69164917460ff717fd0b02649a3d7b0c5096088 |
06-Sep-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Output empty asm statements for the directives we don't handle. Otherwise, the AsmParser will explode if we try to generate an object files. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163345 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
acc22b6b5a8ba501f896fb0d00afdff5c5a3f090 |
06-Sep-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] The IR representation of inline assembly enumerates the input and output expressions much like that in GNU-style inline assembly. Output expressions are first. Do this for MS-style inline asms. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163342 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
3359fa306836ffb64401aad4b561e7647b20d6ef |
06-Sep-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
refactoring + objective-C specific test for my last patch. // rdar://12233989 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163338 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
|
cddbc1d5872c96cd8c3ad3ddededa304757270d7 |
06-Sep-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Don't try to check override control for invalid member functions. Fixes a crash in a corner case. Patch by Olivier Goffart! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163337 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
2d40d9e3bd6638399260332d8c7a98ac715f7b0d |
06-Sep-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
c: make __attribute__((unused)) transitive. Don't warn if annotated decl is used inside another unused. // rdar://12233989 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163329 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
1014ecfb76ffa8cd66d907a1f328510364ec0584 |
06-Sep-2012 |
Roman Divacky <rdivacky@freebsd.org> |
Remove unused typedefs. Found by gcc48. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163327 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
31ba6135375433b617a8587ea6cc836a014ebd86 |
06-Sep-2012 |
Roman Divacky <rdivacky@freebsd.org> |
Dont cast away const needlessly. Found by gcc48 -Wcast-qual. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163325 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDecl.cpp
emaDeclObjC.cpp
emaType.cpp
|
69e4826edc1858d9e2cdef508b469af750ec2b09 |
06-Sep-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR13775: When checking for a tag type being shadowed by some other declaration, don't trample over the caller's LookupResult in the case where the check fails. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163281 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
faadf48443f8c2fc53d267485d7e0e1bd382fc75 |
06-Sep-2012 |
Jordan Rose <jordan_rose@apple.com> |
Continue including temporary destructors in the CFG used for warnings. ...and hopefully unbreak buildbots. My apologies! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163267 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
ec08735e1b6a51c11533311b774bf6336c0a5d63 |
06-Sep-2012 |
Jordan Rose <jordan_rose@apple.com> |
Format strings: suggest casts for NS(U)Integer and [SU]Int32 on Darwin. These types are defined differently on 32-bit and 64-bit platforms, and trying to offer a fixit for one platform would only mess up the format string for the other. The Apple-recommended solution is to cast to a type that is known to be large enough and always use that to print the value. This should only have an impact on compile time if the format string is incorrect; in cases where the format string matches the definition on the current platform, no warning will be emitted. <rdar://problem/9135072&12164284> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163266 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
614a8656279b6549750e83143635cec63ac0e8b7 |
06-Sep-2012 |
Jordan Rose <jordan_rose@apple.com> |
Format string checking: change long if-statement to early returns. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163265 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
37c765a5ccf69fb9a467c8499675ae568811afe3 |
05-Sep-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
c error recovery. treat an invalid redeclaration of a c-function for what it is. Otherwise, this func is treated as an overloadable c-function resulting in a crash much later. // rdar://11743706 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163224 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
536afbeb5609db87d98da8402ed0fd58f61f5d3a |
05-Sep-2012 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Do not add using directives to a function decl context when instantiating. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163208 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
4f216d38201d8fcb0ffd76f8984f4da052b12f5f |
05-Sep-2012 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Fixed lexical decl context of out of line class template instantiations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163206 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
8cdd8a9f19146582aeadae3fe38ae21ffbe3deeb |
05-Sep-2012 |
Chad Rosier <mcrosier@apple.com> |
Update for r163187. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163188 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
568ba871bbac959029671b81f8e531edb7e0d7d6 |
04-Sep-2012 |
Joao Matos <ripzonetriton@gmail.com> |
Revert r163083 per chandlerc's request. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163149 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
reeTransform.h
|
679fc9314c2bde5eb6bea33c790d1a035461e618 |
04-Sep-2012 |
Joao Matos <ripzonetriton@gmail.com> |
Revert r163078 per chandlerc's request. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163145 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaType.cpp
|
21a37047e56d717c7979fa653c9f30aae468608d |
04-Sep-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] The MCInstrDesc only tracks register definitions. For now, assume that if the 1st operands is an expression and the instruction mayStore, then it is a memory definition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163144 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
d5eb585a02d6905b5e6f83fd03a90d583a39ac82 |
04-Sep-2012 |
Chad Rosier <mcrosier@apple.com> |
Fix 80-column violation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163142 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
1b497f26ab7861b22383b22f35cf799c0b312c9b |
03-Sep-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Use the new GetMCInstOperandNum() interface in the front-end. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163126 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
7065c52fc53ec3106a97b7c8d373df431f3bd4f3 |
03-Sep-2012 |
Chad Rosier <mcrosier@apple.com> |
Removed unused argument. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163105 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
be5c3fbec3a430bab2524e9315f58f64815bfeaf |
03-Sep-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Update for the MatchInstruction API change in r163101. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163102 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
5be92de217a1940d0e109abd0f401df4480c1a4b |
02-Sep-2012 |
Joao Matos <ripzonetriton@gmail.com> |
Implemented parsing and AST support for the MS __leave exception statement. Also a minor fix to __except printing in StmtPrinter.cpp. Thanks to Aaron Ballman for review. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163083 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
reeTransform.h
|
f712c48ce80763f3c0bbc2e1b0afe6ed3b5b88cb |
02-Sep-2012 |
Joao Matos <ripzonetriton@gmail.com> |
Added a diagnostic for mismatched MS inheritance attributes. Also fixed the incomplete type member pointer size calculation under the MS ABI. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163078 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaType.cpp
|
f143ae9b68cdd40dfb120094baaa702b810eb52c |
01-Sep-2012 |
Joao Matos <ripzonetriton@gmail.com> |
Changed the remaining dead asserts to llvm_unreachable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163039 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaType.cpp
|
06b3a06007e02aebe497f34651a4e50b00adb051 |
01-Sep-2012 |
Chris Lattner <sabre@nondot.org> |
don't warn about unused values when the unused value is a statement expression expanded from a macro. This is of dubious utility in general, but is specifically a major issue for the linux kernel. This resolves PR13747. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163034 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
17d35c36fbae764fcd68fa8b31624078a033aabc |
01-Sep-2012 |
Joao Matos <ripzonetriton@gmail.com> |
Normalize line endings of r163013 (part 2). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163032 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
4e4c15765d5f097e21dcaa30f1a94481924340f7 |
31-Aug-2012 |
DeLesley Hutchins <delesley@google.com> |
Thread-safety analysis: fix handling of string constants in mutex expressions, which should be ignored right now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163026 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
7e2e4c33cdd347d0f3faac3e391245d06fa42811 |
31-Aug-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-C ARC; detect and warn on retain cycle when property-dot syntax is used on an object whose capture causes retain cycle. // rdar://11702054 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163017 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
6666ed4ed2e2bc13da5ac5d0a4947019137d45be |
31-Aug-2012 |
Joao Matos <ripzonetriton@gmail.com> |
Improved MSVC __interface support by adding first class support for it, instead of aliasing to "struct" which had some incorrect behaviour. Patch by David Robins. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163013 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaTemplateVariadic.cpp
emaType.cpp
|
376c43223ee29334685250c59fdb11e4b3c594fb |
31-Aug-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-C: underline name of the missing method in the diagnbostic. // rdar://11303469 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163003 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
a6c66cedc022c9e5d45a937d6b8cff491a6bf81b |
31-Aug-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Change the representation of builtin functions in the AST (__builtin_* etc.) so that it isn't possible to take their address. Specifically, introduce a new type to represent a reference to a builtin function, and a new cast kind to convert it to a function pointer in the operand of a call. Fixes PR13195. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162962 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDeclCXX.cpp
emaExpr.cpp
reeTransform.h
|
918546c584c91ee917c919c967d7d73cecd295dc |
31-Aug-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-C ARC: under -Wexplicit-ownership-type diagnose those method parameter types which are reference to an objective-C pointer to object with no explicit ownership. // rdar://10907090 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162959 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
ccc4f283cf0e892e19a097a2aa4ec4491682b15f |
30-Aug-2012 |
Douglas Gregor <dgregor@apple.com> |
The presence of a user-*declared* constructor makes the default constructor not user provided (and, therefore, non-trivial). Fixes <rdar://problem/11736429>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162947 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
9f6419f96d6cad3f7bd39f444cfc784ccbbdcd65 |
30-Aug-2012 |
Richard Trieu <rtrieu@google.com> |
Add -Wduplicate-enum warning. Clang will emit this warning when an implicitly initiated enum constant has the same value as another enum constant. For instance: enum test { A, B, C = -1, D, E = 1 }; Clang will warn that: A and D both have value 0 B and E both have value 1 A few exceptions are made to keep the noise down. Enum constants which are initialized to another enum constant, or an enum constant plus or minus 1 will not trigger this warning. Also, anonymous enums are not checked. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162938 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
961713055e636170da59d7006a878cb4ba518a5d |
30-Aug-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-C: clang must implicitly convert __objc_yes/__objc_no to (BOOL)1/(BOOL)0 when BOOL is declared; otherwise it resorts to default of 'signed char'. This is important to selecting the correct Numeric API numberWithBool: Can't have a clang test for this. Will checkin and executable llvm test. // rdar://12156616 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162922 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
3bc22262af7b09a459b400976cfce3d9318b8ea9 |
30-Aug-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR13652: Don't assume the parameter array on a FunctionTypeLoc for a lambda will be filled in; they won't if the lambda's declarator has an invalid type. Instead take the parameters from the declarator directly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162904 91177308-0d34-0410-b5e6-96231b3b80d8
emaLambda.cpp
|
9af9122067f1334806a5f22ce907a3209490d506 |
30-Aug-2012 |
Ted Kremenek <kremenek@apple.com> |
Fix serious regression introduced in r157780 where __attribute__((NSObject)) could not be attached to a CFTypeRef. Fixes <rdar://problem/12197822> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162872 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
a414a2f3ae818953c88443bd617aa89a2b7712e5 |
29-Aug-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-C: make -Widiomatic-parentheses work when assignment expression in conditional invloves property reference. // rdar://11066598 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162846 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
a14f400e4c4239b92137fc8aab1ac4700a209591 |
29-Aug-2012 |
Aaron Ballman <aaron@aaronballman.com> |
Reversing the logic since C99 mode is actually not an extension. Also, changing the group to the singular to match the diagnostic better. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162838 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
|
8a64bb58c3b24d7d97895e435bbc0965c99bd3be |
29-Aug-2012 |
Alexander Kornienko <alexfh@google.com> |
Keep history of macro definitions and #undefs Summary: Summary: Keep history of macro definitions and #undefs with corresponding source locations, so that we can later find out all macros active in a specified source location. We don't save the history in PCH (no need currently). Memory overhead is about sizeof(void*)*3*<number of macro definitions and #undefs>+<in-memory size of all #undef'd macros> I've run a test on a file composed of 109 .h files from boost 1.49 on x86-64 linux. Stats before this patch: *** Preprocessor Stats: 73222 directives found: 19171 #define. 4345 #undef. #include/#include_next/#import: 5233 source files entered. 27 max include stack depth 19210 #if/#ifndef/#ifdef. 2384 #else/#elif. 6891 #endif. 408 #pragma. 14466 #if/#ifndef#ifdef regions skipped 80023/451669/1270 obj/fn/builtin macros expanded, 85724 on the fast path. 127145 token paste (##) operations performed, 11008 on the fast path. Preprocessor Memory: 5874615B total BumpPtr: 4399104 Macro Expanded Tokens: 417768 Predefines Buffer: 8135 Macros: 1048576 #pragma push_macro Info: 0 Poison Reasons: 1024 Comment Handlers: 8 Stats with this patch: ... Preprocessor Memory: 7541687B total BumpPtr: 6066176 Macro Expanded Tokens: 417768 Predefines Buffer: 8135 Macros: 1048576 #pragma push_macro Info: 0 Poison Reasons: 1024 Comment Handlers: 8 In my test increase in memory usage is about 1.7Mb, which is ~28% of initial preprocessor's memory usage and about 0.8% of clang's total VMM allocation. As for CPU overhead, it should only be noticeable when iterating over all macros, and should mostly consist of couple extra dereferences and one comparison per macro + skipping of #undef'd macros. It's less trivial to measure, though, as the preprocessor consumes a very small fraction of compilation time. Reviewers: doug.gregor, klimek, rsmith, djasper Reviewed By: doug.gregor CC: cfe-commits, chandlerc Differential Revision: http://llvm-reviews.chandlerc.com/D28 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162810 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
a23bd4cec36d7f29065418f84ef48395fcbe6254 |
29-Aug-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-C arc: ns_returns_retained is a type attribute in ARC, and when used in property type declaration, is handled as type attribute. Do not issue the warning when declaraing the property. // rdar://12173491 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162801 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
b706d9027cd8bbbaffa8b359a501cba52ace4c09 |
29-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
Revert r162424 now that the scoping issue has been fixed in r162444. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162797 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
c828620a03b20835a376f6f456a72e44599f4f87 |
28-Aug-2012 |
Aaron Ballman <aaron@aaronballman.com> |
Splitting the duplicated decl spec extension warning into two: one is an ExtWarn and the other a vanilla warning. This addresses PR13705, where const char const * wouldn't warn unless -pedantic was specified under the right conditions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162793 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
|
c0c00664887f5d99780c9b3e33e2f204712823b7 |
28-Aug-2012 |
Peter Collingbourne <peter@pcc.me.uk> |
CUDA: give static storage class to __shared__ and __constant__ variables without a storage class within a function, to implement CUDA B.2.5: "__shared__ and __constant__ variables have implied static storage [duration]." git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162788 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
4112a4c001c0ffe83962e5c6755c8b3e0d74b74c |
28-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
Tidy up. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162786 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
89fb6d7eba51c7864ec544e07accd23b24057122 |
28-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Add constraints to MSAsmStmt. We don't currently compute the constraints, so in the interim we speculatively assume a 'r' constraint. This is expected to work for most cases on x86. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162784 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
88617a24adafed42e33d196972f97c72d9a5e0a0 |
28-Aug-2012 |
Hans Wennborg <hans@hanshq.net> |
Warn about suspicious implicit conversions from floating point to bool This warns in two specific situations: 1) For potentially swapped function arguments, e.g. void foo(bool, float); foo(1.7, false); 2) Misplaced brackets around function call arguments, e.g. bool InRange = fabs(a - b < delta); Where the last argument in a function call is implicitly converted from bool to float, and the function returns a float which gets implicitly converted to bool. Patch by Andreas Eckleder! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162763 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
02e221bad95aada3190fa6189e38023cba27bc72 |
28-Aug-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Fix for assertion when solving unresolved templates. Patch by Magee, Josh. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162737 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
5c7f59445ae68109c7ffee731aca2ce32db587c7 |
28-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Rename getClobber to getClobberStringLiteral. No functional change intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162710 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
be22cb84f32cfa6cf0b6bdaf523288b747bb0f18 |
27-Aug-2012 |
Simon Atanasyan <satanasyan@mips.com> |
Support MIPS DSP Rev2 intrinsics. The patch reviewed by Akira Hatanaka. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162669 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
fb609141376e0d53646a71948861ebae18aba06e |
25-Aug-2012 |
John McCall <rjmccall@apple.com> |
Fix the CC-matching logic for instance methods in the MS ABI. Patch by Timur Iskhodzhanov! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162639 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
df5faf5e7ae6823d0af0b801c4ac26d47f2cee97 |
25-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] As part of a larger refactoring, rename AsmStmt to GCCAsmStmt. No functional change intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162632 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
reeTransform.h
|
e91a4978d31f2c94c815b09e2abf2e53879b0412 |
25-Aug-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Remove RequireCompleteType call which was made redundant by r162586. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162630 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
129a60b35a8a06a3b245f87bee56458979b32ba2 |
25-Aug-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-C: Do not warn if align attribute on method declaration is not provided. It is only necessary on the method implementation. // rdar://11593375 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162628 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
8bddeb57d134c0e5f14e319271aa9015886a8ac7 |
25-Aug-2012 |
John McCall <rjmccall@apple.com> |
When computing the effective context for access control, make sure we walk up the DC chain for the current context, rather than allowing ourselves to get switched over to the canonical DC chain. Fixes PR13642. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162616 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
56d7f2348a182002563700db2158da0c6fc115a5 |
24-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Change the -fenable-experimental-ms-inline-asm option from a CodeGen option to a LangOpt option. In turn, hoist the guard into the parser so that we avoid the new (and fairly unstable) Sema/AST/CodeGen logic. This should restore the behavior of clang to that prior to r158325. <rdar://problem/12163681> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162602 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
32f3acc0103055b1ef171fa94d1ee6d1deb0223e |
24-Aug-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Remove unnecessary calls to c_str. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162590 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
42f48fbdf31a7e8c516ba5eed486ff53966459fc |
24-Aug-2012 |
John McCall <rjmccall@apple.com> |
Instantiate class template specializations during ADL. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162586 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
emaOverload.cpp
|
a6e28f27c668775e3927b9c0be0a17636fed16fc |
24-Aug-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-C: When checking for valid overriden property in class extension, assume default is rewdwrite and don't issue any diagnostics, privided other ownership models are ok. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162583 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
1016bdf939fd4a7b65793904610a7e647ec9d89f |
24-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Generate the Input/Output expressions using Sema::ActOnIdExpression(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162564 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
8a30e7735a5c2b8b105734fc9b131cc43c56d765 |
24-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
Fix 80-column violation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162560 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
3b6bef9a213249c6ab6d67c07b1ac6380961be3e |
24-Aug-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Push ArrayRef through the Expr hierarchy. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162552 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaInit.cpp
emaOverload.cpp
emaPseudoObject.cpp
reeTransform.h
|
8eba6f194484c38ed724375aeab27de556113a84 |
23-Aug-2012 |
Stephen Hines <srhines@google.com> |
Add new files for merge to upstream r162325. Change-Id: I44af8265445bd67d7985164e2e3117b8c3d8d3c1
ndroid.mk
|
80ea4bc944eb01c220eeaa004b21ad709ba928e1 |
24-Aug-2012 |
Stephen Hines <srhines@google.com> |
Merge branch 'upstream' into merge_2 Conflicts: lib/Sema/SemaDeclAttr.cpp Change-Id: If47d0d39459760017258502b4d9e859ac36a273b
|
633abb0ea01d37ab9c8e4ce1ee9e48894a12dfca |
24-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Add the basic APIs for Exprs to the MSAsmStmt AST. Next we need generate the Input/Output expressions using Sema::ActOnIdExpression(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162509 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
1ddbd89bb397988dd1a4e96d8d8c2c7705a2af75 |
24-Aug-2012 |
Dmitri Gribenko <gribozavr@gmail.com> |
Fix a few -Wdocumentation warnings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162506 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
5354e77e60e82828c7c2361f5c688c2667ab59cc |
24-Aug-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Now that ASTMultiPtr is nothing more than a array reference, make it a MutableArrayRef. This required changing all get() calls to data() and using the simpler constructors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162501 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaCast.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaInit.cpp
emaStmt.cpp
emaStmtAsm.cpp
emaTemplate.cpp
reeTransform.h
|
4e28d9e2ba9ce237549b45cfd4136ec6536d1325 |
24-Aug-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Remove ASTOwningVector, it doesn't own anything and provides no value over SmallVector. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162492 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExprCXX.cpp
emaInit.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
3fe198bf0d6118c7b080c17c3bb28d7c84e458b9 |
23-Aug-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Rip out remnants of move semantic emulation and smart pointers in Sema. These were nops for quite a while and only lead to confusion. ASTMultiPtr now behaves like a proper dumb array reference. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162475 91177308-0d34-0410-b5e6-96231b3b80d8
emaCast.cpp
emaChecking.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprMember.cpp
emaExprObjC.cpp
emaInit.cpp
emaOverload.cpp
emaStmt.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
70517ca5c07c4b41ff8662b94ee22047b0299f8c |
23-Aug-2012 |
Dmitri Gribenko <gribozavr@gmail.com> |
Fix a bunch of -Wdocumentation warnings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162452 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaCodeComplete.cpp
emaInit.cpp
emaPseudoObject.cpp
emaTemplateDeduction.cpp
|
25bd2986db1c7b8ced84fe835f5465007de47892 |
23-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Rename a few induction variables to avoid confusion and silence a gcc warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162444 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
a8eaf008e92759142982f7b40720b2b2674bd663 |
23-Aug-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix undefined behavior: member function calls where 'this' is a null pointer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162430 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExprObjC.cpp
emaObjCProperty.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
|
4e90bc39f052ea0046d40aebbb42732ad1f21f50 |
23-Aug-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix undefined behavior: don't call ObjCInterfaceDecl::isArcWeakrefUnavailable on a null pointer. (This function happens to work for a null 'this' pointer, so no test.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162427 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
2d5a1de741c94f15461b06cd09a65081c7ce3d70 |
23-Aug-2012 |
Matt Beaumont-Gay <matthewbg@google.com> |
Don't recycle loop variables (to keep GCC happy). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162424 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
60ce584e35503af623e14eeab8fd81df9f215dcd |
23-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
Fix 80-column violation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162416 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
6e97be719edb4e3b9ac15353e79c60406b3dc429 |
23-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Compute the inputs and outputs. No test case (yet) as this requires codegen support. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162410 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
fd5e56e35404cb44130b17546b6b5c1b33709d23 |
23-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Refactor code so that we can begin computing the Inputs/Outputs. No functional change intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162403 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
682ad162f144ff8e8e5303d30bc48b6a6a41d0d6 |
22-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Add comments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162396 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
358ab765f36f70d0744ede7dc35ce74c0911e77d |
22-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Add comments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162394 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
f0fbd776df77bc4b8b3e6ff3542b2e9117b2b905 |
22-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Add helper function. No functional change intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162393 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
e78460f4335766b55c3da6a43fcd072671076458 |
22-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Simplify logic. No functional change intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162392 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
9072a026a111726022b4f1c7f0a925d642ae8991 |
22-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Compute the token range for each instruction within the asm. Eventually, we'll need a way of mapping tokens (and their IdentifierInfo*) to the operands computed by buildMSAsmPieces(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162388 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
153f8ecb5169347e41a0734ee1698498d88b96c5 |
22-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Simplify logic. No functional change intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162385 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
2735df2eb16acfb92b8cd24e163e3a74a7a4d950 |
22-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Start sending non-simple inline asms to the AsmParser. The parser still can't handle all cases, so fall back to emitting a simple MSAsmStmt if we get into trouble. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162382 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
d48bcb2f4dedf8e7b654cb017968b3d7b6663a57 |
22-Aug-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Reduce duplicated hash map lookups. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162361 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
4bda1d8cfe7d42b2798a06d16a5b776d980aad5f |
22-Aug-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Merge existing attributes before processing pragmas in friend template declarations. Fixes pr13662. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162360 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
98ac608c79fb46e73715121018f0659fb3bbe3e8 |
22-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Remove the patchMSAsmStrings function. After some discussion between Bob, Jim, Eric and I, we've decided to take a slightly different approach. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162327 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
38c71d38e1b2a5f71c086b9c2efa9e8e69fa1bb5 |
21-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Have buildMSAsmString build a vector of unmodified AsmStrings. Add a new static function, buildMSAsmPieces, that will break these strings down into mnemonic and operands. Upon a match failure, the idea is to use the ErrorInfo from MatchInstructionImpl to inspect the mnemonic/operand and decide a course of action. Unfortunately, there's no easy way to test this at the moment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162321 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
d9f95b35dc4fc168a167a9b9b61a5f9e1d0462ba |
21-Aug-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
change function name in my last patch. // rdar://12103400 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162320 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
dad633b0a0955ceb4579e9508224562ad41b6a8d |
21-Aug-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-C: Change rules for overriding properties in class extensions a little. clang now allows readonly property with no ownership rule (assign, unsafe_unretained, weak, retain, strong, or copy) with a readwrite property with an ownership rule. // rdar://12103400 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162319 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
51a6b3f58b0dbbc51a77b8f4a509720954406ceb |
21-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Do not report a Parser error when matching inline assembly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162307 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
83591b6d3f20ee84f4abe1c2574e90736aa84b11 |
21-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Expose the ErrorInfo from the MatchInstructionImpl. In general, this is the index of the operand that failed to match. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162296 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
33a71f31af401100c8f267627ec40465029acff9 |
21-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Append identifier for better debugging. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162289 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
7fcde17284f5b18b18d858bbbc81898f58f3c296 |
21-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Remove this test case and the associated special case code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162288 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
0a7dd788dbef975f35f273c7ab913f480f7edd60 |
21-Aug-2012 |
John McCall <rjmccall@apple.com> |
Screw around with ObjCRuntime some more, changing the diagnostics for bad deployment targets and adding a few more predicates. Includes a patch by Jonathan Schleifer to enable ARC for ObjFW. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162252 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
emaObjCProperty.cpp
emaType.cpp
|
e1715b66a878bcab315513351e5df68bfc010d2e |
21-Aug-2012 |
Sam Panzer <espanz@gmail.com> |
Better diagnostics for range-based for loops with bad range types. The old error message stating that 'begin' was an undeclared identifier is replaced with a new message explaining that the error is in the range expression, along with which of the begin() and end() functions was problematic if relevant. Additionally, if the range was a pointer type or defines operator*, attempt to dereference the range, and offer a FixIt if the modified range works. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162248 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaStmt.cpp
reeTransform.h
|
d64c2eb83d7ec86faa4f2554935a977a19573f59 |
21-Aug-2012 |
John McCall <rjmccall@apple.com> |
Fix a pair of bugs relating to properties in ARC. First, when synthesizing an explicitly strong/retain/copy property of Class type, don't pretend during compatibility checking that the property is actually assign. Instead, resolve incompatibilities by secretly changing the type of *implicitly* __unsafe_unretained Class ivars to be strong. This is moderately evil but better than what we were doing. Second, when synthesizing the setter for a strong property of non-retainable type, be sure to use objc_setProperty. This is possible when the property is decorated with the NSObject attribute. This is an ugly, ugly corner of the language, and we probably ought to deprecate it. The first is rdar://problem/12039404; the second was noticed by inspection while fixing the first. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162244 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
d7403a70176a50b8f71cb4e2e18ac6ed49fe357e |
20-Aug-2012 |
Jordan Rose <jordan_rose@apple.com> |
Code-complete 'weak' for properties under ARC-with-weak-references (or GC) Also, suggest 'readonly' even if the property has been given an ownership attribute ('strong', 'weak', etc). This is used when properties are declared readonly in the public interface but readwrite in a class extension. <rdar://problem/11500004&11932285> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162220 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
df4ee102aa909e2f40c294701bfeffac63e8d29b |
20-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Remove old cruft now that MS-style asms their own code path. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162210 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
emaStmtAsm.cpp
reeTransform.h
|
5965b7c7ddf8d9635426943a05441c71cb59fef6 |
20-Aug-2012 |
Hans Wennborg <hans@hanshq.net> |
Better wording for reference self-initialization warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162198 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
0576681bac125be07f77f66b02a3dba2c3a24557 |
18-Aug-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR41111, PR5925, PR13210: Teach tentative parsing to annotate identifiers and nested names as id-expressions, using the annot_primary_expr annotation, where possible. This removes some redundant lookups, and also allows us to typo-correct within tentative parsing, and to carry on disambiguating past an identifier which we can determine will fail lookup as both a type and as a non-type, allowing us to disambiguate more declarations (and thus offer improved error recovery for such cases). This also introduces to the parser the notion of a tentatively-declared name, which is an identifier which we *might* have seen a declaration for in a tentative parse (but only if we end up disambiguating the tokens as a declaration). This is necessary to correctly disambiguate cases where a variable is used within its own initializer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162159 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d82f5eb1f98825ad888fb0ab45e5d8ef2e0ec6a2 |
18-Aug-2012 |
Douglas Gregor <dgregor@apple.com> |
When code completion is enabled, don't do any work in Sema::ActOnEndOfTranslationUnit(). This is a (minor) optimization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162144 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
767a1a2391e60e358ed7d793e091cc1731a5e186 |
17-Aug-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
c: privide deprecated warning when __private_extern__ storage specifier is unsed in a declaration; as it may not make the symbol local to linkage unit as intended. Suggest using "hidden" visibility attribute instead. // rdar://7703982 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162138 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
3d45a7739bae1e9c53c94ebb38c4339bd8ec0ca6 |
17-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Update comment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162134 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmtAsm.cpp
|
4b5e48d39eb94ee12f3d89df60525053d8b0275e |
17-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Extract AsmStmt handling into a separate file, so as to not pollute SemaStmt with extraneous asm handling logic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162132 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
emaStmt.cpp
emaStmtAsm.cpp
|
bbb8afd7f0bdac635583e07c72a9fcf905aa7c4c |
17-Aug-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
c: implement gcc's -Wbad-function-cast which warns on unsafe cast of a c-function call. This is a C-only option. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162109 91177308-0d34-0410-b5e6-96231b3b80d8
emaCast.cpp
|
64b8578d9c359f86c073105382625248f66c038b |
17-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Instantiate the MCStreamer as a NullStream. We're parsing instruction, not emitting them, so a NullStream is fine. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162105 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
8be9e77f7e532866fa0ef2bc8c3cd549f0cc8da2 |
17-Aug-2012 |
Hans Wennborg <hans@hanshq.net> |
Warn about self-initialization of references. Initializing a reference with itself, e.g. "int &a = a;" seems like a very bad idea. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162093 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
66a3d4754977cf0e98e510af9d68d00cbc14b7a8 |
17-Aug-2012 |
Douglas Gregor <dgregor@apple.com> |
Make the spacing of the code completion result for NSDictionary literals match the spacing introduced by the ObjC modernizer. Fixes the rest of <rdar://problem/11889572>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162084 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
27bec77f5eb0920b401497be32713cb42339edef |
17-Aug-2012 |
Douglas Gregor <dgregor@apple.com> |
Don't do jump-scope checking when code completion is enabled. It's both a waste of time, and prone to crash due to the use of the error-recovery path in parser. Fixes <rdar://problem/12103608>, which has been driving me nuts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162081 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
|
0652c35a303a6186142eea566c88714c59bdc664 |
17-Aug-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Don't forget to apply #pragma pack to partial and explicit specializations of class templates. This fixes misalignment issues in llvm/Support/Endian.h when built by Clang. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162074 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
cbf97c5a12c4fe8528a8365087e1d81005589288 |
17-Aug-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Don't form a null reference when checking for validity of an anonymous elaborated type specifier in template instantiation: such a specifier is always valid because it must be specified within the definition of the type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162068 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
0d5a069f66df09b3308ccfdce84a88170034c657 |
17-Aug-2012 |
Dmitri Gribenko <gribozavr@gmail.com> |
Add support for "type safety" attributes that allow checking that 'void *' function arguments and arguments for variadic functions are of a particular type which is determined by some other argument to the same function call. Usecases include: * MPI library implementations, where these attributes enable checking that buffer type matches the passed MPI_Datatype; * for HDF5 library there is a similar usecase as MPI; * checking types of variadic functions' arguments for functions like fcntl() and ioctl(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162067 91177308-0d34-0410-b5e6-96231b3b80d8
ttributeList.cpp
emaChecking.cpp
emaDecl.cpp
emaDeclAttr.cpp
|
2502ec84432fc38db63b7f80d90fabf6ebd83039 |
17-Aug-2012 |
Eric Christopher <echristo@apple.com> |
Random string removal. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162063 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprMember.cpp
|
2f648515c8bf964c87eb3b6ce37bb816d7d9b2bc |
17-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Comment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162055 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
7e1fb9abfc8d67fe4e7203ef6830a893df704d7b |
17-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Extract a helper function, getSpelling(). Also use this on tokens we don't know how to handle; this should aid when debugging. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162053 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
7f90b531818ad772f6e407f88101dc618c738fa4 |
17-Aug-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-C++: issue diagnostic when ivar type is an abstract c++ class. // rdar://12095239 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162052 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
eeff8ce11d687429d545cb6ce9bdaa44319ca72f |
17-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] If we don't know how to handle a token then assume this is not a simple asm. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162051 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
700ce64db453624d2a3f2d34d25207c97b2b064f |
17-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Add a helper function, isMSAsmKeyword(). These require special handling, which we don't currently handle. This is being put in place to ensure we don't do invalid symbol table lookups or try to parse invalid assembly. The test cases just makes sure the latter isn't happening. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162050 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
bc20bbb0bf90446a469848c658ca376832f43dc8 |
16-Aug-2012 |
Sam Panzer <espanz@gmail.com> |
Removed unused LParenLoc parameter to ActOnCXXForRangeStmt git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162048 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
reeTransform.h
|
2863c0e0f6cd7c0b9d8b999905b1688d3f2f2377 |
16-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Perform symbol table lookup on variables. The idea is to use this information to determine valid MC operands. This will also be used for semantic analysis. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162043 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
91dd9df4435f8b14e599d15f14c4bad77bc4e71f |
16-Aug-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-C: deprecate casts of ObjC's SEL expressions except to void, void * and their qualified versions. // rdar://12107381 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162036 91177308-0d34-0410-b5e6-96231b3b80d8
emaCast.cpp
|
f64c11815e68f025737dc41d8d94e31e1426274d |
16-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Start tracking which tokens are registers and which are variables, function or label references. The former is a potential clobber. The latter is either an input or an output. Unfortunately, it's difficult to test this patch at the moment, but the added test case will eventually do so. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162026 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
d1420c6fa788669e49f21e184927c7833881e399 |
16-Aug-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Store SourceManager pointer on PrintingPolicy in the case where we're dumping, and remove ASTContext reference (which was frequently bound to a dereferenced null pointer) from the recursive lump of printPretty functions. In so doing, fix (at least) one case where we intended to use the 'dump' mode, but that failed because a null ASTContext reference had been passed in. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162011 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDeclCXX.cpp
emaExceptionSpec.cpp
|
d01258641a0695ed9112d18b0f79632579c1bbca |
16-Aug-2012 |
Sam Panzer <espanz@gmail.com> |
Test commit: deleted whitespace on blank line git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162006 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
058ab170a5b8597f32c3f343a1e9de2cd7b05848 |
16-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Add inputs and outputs to AST. No functional change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162000 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
b5f9eb8a0709082bba8e8de3a6c643928570aaa0 |
15-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Use a set container to remove redundant clobbers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161991 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
bec224b33b383c993d127ef7f618ce27df7105e6 |
15-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Address a FIXME by computing the number of asm statements when building the AsmString. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161988 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
f37e4218bb40ed956f0ef1d2e5eee2b2c3aa20d2 |
15-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] MSVC parses multiple __asm statements on a single line as one statement. For example, if (x) __asm out dx, ax __asm out dx, ax results in a single inline asm statement (i.e., both "out dx, ax" statements are predicated on if(x)). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161986 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
99570a58b09fca5d0b328733ab8b6717a1a04f4a |
15-Aug-2012 |
Matt Beaumont-Gay <matthewbg@google.com> |
Allow 'static' and type qualifiers in K&R parameter type lists. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161980 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
a8ac203967adaa18c5cbf869e368f7103060be1a |
15-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Don't emit newlines as these are ignored by the AsmParser anyways. Also, simplify some conditional logic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161977 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
4cc83c2b0aed5ab06081ea3250426c3a7e58df93 |
15-Aug-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to warn about __private_extern__ on tentative definitions as it does something unexpected (but gcc compatible). Suggest use of __attribute__((visibility("hidden"))) on declaration instead. // rdar://7703982 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161972 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
89c57a2198145564ab6d0b2ad10fee5a1131bd15 |
15-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Capturing loop-scoped (std::string)Reg with a StringRef is bad. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161966 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
7bd092b054444e9800e8de1d8d71c408dbdc8ead |
15-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Add the left brace source location and improve the pretty printer. Patch by Enea Zaffanella <zaffanella@cs.unipr.it>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161958 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
reeTransform.h
|
7f397c5d97fc0c11333d939f2c07bc3b230956e2 |
15-Aug-2012 |
Hans Wennborg <hans@hanshq.net> |
Check for improper use of 'static' and type qualifiers in array declarators. They are only allowed for function parameters, and then only on the outermost array type derivation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161934 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
4fda501bd5cf99311ce068b335c08b2e39b794d0 |
15-Aug-2012 |
NAKAMURA Takumi <geek4civic@gmail.com> |
clang/lib/Sema/SemaStmt.cpp: Include MCAsmLexer.h to appease msvc to define llvm::AsmToken. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161927 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
1ac64aa0edf3d847ee0f162dcab33d0f69dc72ff |
15-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Have MC start parsing the asms. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161913 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
1b4b1461da093bfcb85edfb67710d21f79c7f16c |
15-Aug-2012 |
Richard Trieu <rtrieu@google.com> |
Check local static variables for self reference on initialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161909 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
92570bd1597f355d5673a94960323f81d99c4921 |
15-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Remove the last bits of LineEnds. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161904 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
reeTransform.h
|
9fbf327cfdd27ddb5d845042c95f2299ac95b143 |
15-Aug-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Remove trailing return flag from FunctionTypeLoc, since we now carry that information on FunctionProtoType. (This also fixes one of *many* misalignment problems in the TypeLoc hierarchy...) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161901 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
reeTransform.h
|
13a178fb530204d9e852ead599d69cef6b874003 |
15-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Simplify more logic by using the Token::hasLeadingSpace() and Token::isAtStartOfLine() APIs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161898 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
5dfc44131128abc354fb6936caed01b71c83be70 |
14-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Address a potential buffer overflow. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161896 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
fdbd3c5705a7183809c5f49d1e50fbfd93641ceb |
14-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Simplify the logic in patchMSAsmString. We no longer need to track the LineEnds now that single line asm statments aren't merged. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161893 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
c41ace950dcf2254c9aa48e73647b89c35109f80 |
14-Aug-2012 |
Dmitri Gribenko <gribozavr@gmail.com> |
Attaching comments to redeclarations: fix wrong assumptions The reason for the recent fallout for "attaching comments to any redeclaration" change are two false assumptions: (1) a RawComment is attached to a single decl (not true for 'typedef struct X *Y' where we want the comment to be attached to both X and Y); (2) the whole redeclaration chain has only a single comment (obviously false, the user can put a separate comment for each redeclaration). To fix (1) I revert the part of the recent change where a 'Decl*' member was introduced to RawComment. Now ASTContext has a separate DenseMap for mapping 'Decl*' to 'FullComment*'. To fix (2) I just removed the test with this assumption. We might not parse every comment in redecl chain if we already parsed at least one. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161878 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
9071defafbcfb5d21bb6d49bb9c0f0366db39e08 |
14-Aug-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Remove and simplify unused checking code. This is already handled by CheckCallingConvAttr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161865 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
fac8e43390fad67a5d02c9876e860496fee01868 |
14-Aug-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Fix horribly broken sema of __attribute__((pcs())). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161863 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
2217f853e1909b80f87ce0dcec5543e894d11bc9 |
14-Aug-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Make __is_convertible_to handle abstract types correctly. PR13591. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161828 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExprCXX.cpp
|
f8ee6bc1ef0eec8e22b413dfc2baa3cfa4f19f91 |
14-Aug-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix undefined behavior (and wrong code, as far as I can tell) in NEON builtin tablegen code, found by -fcatch-undefined-behavior. I would appreciate if someone more familiar with the NEON code could point me in the direction of how to write a test for this. We appear to have essentially no test coverage whatsoever for these builtins. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161827 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
58d33ad9c83f1195a7db544e4b41daa019aaa767 |
14-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Add a helpful assert. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161796 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
d8238a4e9cc7f77b50a8f02aa4710b3b4fbdf7ad |
13-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Address a potential buffer overflow. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161793 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
265f538b2c8b9e19196ce8a78a3da78671eb6f2b |
13-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Have patchMSAsmStrings() return a vector or AsmStrings. The AsmParser expects a single asm instruction, but valid ms-style inline asm statements may contain multiple instructions. This happens with asm blocks __asm { mov ebx, eax mov ecx, ebx } or when multiple asm statements are adjacent to one another __asm mov ebx, eax __asm mov ecx, ebx and __asm mov ebx, eax __asm mov ecx, ebx Currently, asm blocks are not properly handled. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161780 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
0d729105ecb50a7e3cbe6e57c29149edfa5cf05a |
13-Aug-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Factor out computation of whether a typeid's expression is potentially evaluated into a CXXTypeid member function. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161779 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
f50555eedef33fd5a67d369aa0ae8a6f1d201543 |
11-Aug-2012 |
Dmitri Gribenko <gribozavr@gmail.com> |
Attaching comments to declarations: find comment attached to any redeclaration Not only look for the comment near the declaration itself, but also walk the redeclaration chain: the previous declaration might have had a documentation comment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161722 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
5e8d300a38fefc021da263d87998b0024aa3b7e0 |
10-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] PatchMSAsmString() doesn't correctly patch non-simple asm statements. Therefore, we can't pass the PatchedAsmString to the AsmParser and expect things to work. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161701 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
e790bc32ca3eb7cc396b45071d7987776e965ed7 |
10-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Fix a memory leak introduced in r161686. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161698 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
4399ea9d473365224d9e4db0cd94aab849eb59b7 |
10-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Add clobbers to AST representation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161686 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
f9a6a411e603370dd201ca1f5379fdf1ef3ecced |
10-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Use asserts as these calls are now guarded by identical checks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161676 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
1093f4928a4263d08b44d96e468a42515d8a28f3 |
10-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
Whitespace. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161673 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
1f2e1a96bec2ba6418ae7f2d2b525a3575203b6a |
10-Aug-2012 |
John McCall <rjmccall@apple.com> |
Check access to friend declarations. There's a number of different things going on here that were problematic: - We were missing the actual access check, or rather, it was suppressed on account of being a redeclaration lookup. - The access check would naturally happen during delay, which isn't appropriate in this case. - We weren't actually emitting dependent diagnostics associated with class templates, which was unfortunate. - Access was being propagated incorrectly for friend method declarations that couldn't be matched at parse-time. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161652 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaDeclCXX.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
4ef832ffc1147ce2f9777f9fad650cb3139a1d00 |
10-Aug-2012 |
David Blaikie <dblaikie@gmail.com> |
Provide isConst/Volatile on CXXMethodDecl. This also provides isConst/Volatile/Restrict on FunctionTypes to coalesce the implementation with other callers (& update those other callers). Patch contributed by Sam Panzer (panzer@google.com). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161647 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
emaDecl.cpp
emaLambda.cpp
|
7bac4b2f3e5b89644af410b28496dd4fbfc740a7 |
10-Aug-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
CMake: Add the new dependency from libSema to LLVM's libs. Should fix the failures seen on some linux builders. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161629 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
|
613f44418b55c39c1d3f30c5e8f52f3e3248384c |
09-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Fix comment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161622 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
cace2103efe3449c406bcdfd4874dfb1e94c811a |
09-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Use StringRef here, per Jordan's suggestion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161619 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
4144f9079e685408cef414e29970b7b7960eddf0 |
09-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Simplify logic for empty asm statements. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161615 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
47f49892fb229488ff11653e1dec373873dfcffb |
09-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Instantiate the various parts to the AsmParser. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161614 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
be3d0dbf2e8d2f93191ff4c023dd3bbf8f859d5a |
09-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Initialize targets and assembly printers/parsers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161595 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
8c6cb462946b8be19167fad7ff21d4f9fbaebfef |
09-Aug-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-C: refactor/simplify parsing of delayed method/c-funcs defined in objc class implementation. No intended functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161540 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
de01b7a6b4df27555ff7b25e51c0d3df29e3a0cf |
09-Aug-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR13558: Fix typo 'compatiblity'. Thinking of the children. Apparently. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161537 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
c3b2308f66fe8abd2c1a911b500c0b989c295819 |
08-Aug-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Unify the codepaths for emitting deprecation warnings. The test changes are just to account for us emitting notes more consistently. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161528 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
0f38acee92014cb15af980808f87144e5564031d |
08-Aug-2012 |
Anna Zaks <ganna@apple.com> |
Address code review comments for Wstrncat-size warning (r161440). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161527 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
77c7b0a7d04bf28b6fe15d21dc9a5b5d366347cc |
08-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Use more idiomatic logic. Thanks, Bill. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161526 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
8a64f88aa9c97f031727ce145be1a76fd52470a6 |
08-Aug-2012 |
Jordan Rose <jordan_rose@apple.com> |
Implicitly annotate __CFStringMakeConstantString with format_arg(1). We handled the builtin version of this function in r157968, but the builtin isn't used when compiling as -fno-constant-cfstrings. This should complete <rdar://problem/6157200>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161525 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
2016c8c4a2ebf528c54c42045bc6a30ae590147c |
08-Aug-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Don't add attributes for "#pragma pack" and friends to tag declarations which are not definitions. This follows the behavior of both gcc and earlier versions of clang. Regression from r156531. <rdar://problem/12048621>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161523 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplate.cpp
|
871ee56e8003b8ce6f0658351ca051db504d9dc4 |
08-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Make sure IsSimple is correctly handled. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161522 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
d854c63dca5ef01c505fbd43684d8bf3f3691cc7 |
08-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
Remove extraneous comment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161521 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
b64f3101e65e6931a1b3b3479ca6357624b37667 |
08-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Add a very simple test case. Basically, we're only testing for crashers at the moment (and coincidentally this case was causing a crash). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161520 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
62f22b87801882646418bae85111e565f7a53ddb |
08-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Refactor the logic to generate the AsmString into Sema. No functional change intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161518 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
reeTransform.h
|
4a9d795502f8e001cdc6465ea7a0739ca48dd483 |
08-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
Whitespace. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161516 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
e696b6924d14b0e0590b5d923ca1646e6f67ac40 |
08-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Add support for detecting simple ms-style inline asm. Simple asm statements are those that don't reference variable names, function names, and labels. Add logic to generate a patched AsmString that will eventually be consumed by the AsmParser. No functional change at this point, so unfortunately no test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161508 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
3a32c9c565f970fd319b97a6056a4725cfa4f0f5 |
08-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
Add the IsSimple/IsVolatile parameters to the MSAsmStmt constructor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161503 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
50800fc551ac6b8a95cca662223e7f061bbd169a |
08-Aug-2012 |
David Blaikie <dblaikie@gmail.com> |
Implement warning for integral null pointer constants other than the literal 0. This is effectively a warning for code that violates core issue 903 & thus will become standard error in the future, hopefully. It catches strange null pointers such as: '\0', 1 - 1, const int null = 0; etc... There's currently a flaw in this warning (& the warning for 'false' as a null pointer literal as well) where it doesn't trigger on comparisons (ptr == '\0' for example). Fix to come in a future patch. Also, due to this only being a warning, not an error, it triggers quite frequently on gtest code which tests expressions for null-pointer-ness in a SFINAE context (so it wouldn't be a problem if this was an error as in an actual implementation of core issue 903). To workaround this for now, the diagnostic does not fire in unevaluated contexts. Review by Sean Silva and Richard Smith. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161501 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaOverload.cpp
|
ed6662dcd95a3349b6c94bb0df2ff4378a029df8 |
08-Aug-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objc: Include all types when issuing warning under -Wdirect-ivar-access. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161500 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprMember.cpp
|
fbffb5f91e34c4c455cdeb9d4331b128f9511a48 |
08-Aug-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Remove unused variables. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161483 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
50d61c8ccfc633b13cdf594ea3cd3a217076debe |
08-Aug-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Implement final piece of DR963 and also DR587: A conditional operator between glvalues of types cv1 T and cv2 T produces a glvalue if the expressions are of the same value kind and one of cv1 and cv2 is a subset of the other. A conditional operator between two null pointer constants is permitted if one of them is of type std::nullptr_t. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161476 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
06808f1b880f461c396450db4c6a9c6d6c6c2efc |
08-Aug-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Get rid of an early return in Sema::ActOnFields which doesn't make sense anymore. Fixes a crash (<rdar://problem/11067144>), and generally seems to improve recovery in other cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161474 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
b25466e8b33285a13d0303461db37e903ec505c1 |
08-Aug-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objc-arc: Make -Wdirect-ivar-access accessible to all memory models, except when arc is accessing a weak ivar (which is an error). // rdar://6505197 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161458 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprMember.cpp
|
604fb38cd943649bee579103d17ca6cda4aad144 |
08-Aug-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
When building a conditional operator where one operand is a throw-expression and the other is a glvalue of class type, don't forget to copy-initialize a temporary when performing the lvalue-to-rvalue conversion on the glvalue. Strangely, DefaultLvalueConversions misses this part of the lvalue-to-rvalue conversions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161450 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
0b8220ae342f71fb50e763668f92d038eb54fb3f |
07-Aug-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
-Wunused-private-fields: Don't try to check unresolved initializer expressions for side-effects. Instead, check for side-effects after performing initialization. Doing so also removes some strange corner cases and differences between in-class initialization and constructor initialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161449 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
cff863fd803874d251ef8725d5c08dec90924627 |
07-Aug-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c: Exclude -Wdirect-ivar-access for arc. Allow direct ivar access in init and dealloc methods in mrr. // rdar://650197 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161426 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprMember.cpp
|
58e1e54476d610d6c33ef483f216ed8a1282d35c |
07-Aug-2012 |
Hans Wennborg <hans@hanshq.net> |
Remove ScanfArgType and bake that logic into ArgType. This is useful for example for %n in printf, which expects a pointer to int with the same logic for checking as %d would have in scanf. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161407 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
f3749f4168c5cee59627a681ca4ca6e4116d0761 |
07-Aug-2012 |
Hans Wennborg <hans@hanshq.net> |
Rename analyze_format_string::ArgTypeResult to ArgType Also remove redundant constructors and unused member functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161403 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
b38b49140990ae123b5290a54c500013bf614b8b |
07-Aug-2012 |
Douglas Gregor <dgregor@apple.com> |
Objective-C pointer types don't have C-linkage, even though they are non-POD. Fixes <rdar://problem/12031870>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161395 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
79efe24e125553b7fd4a35ffb3b7a45c4f1e661a |
07-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Stmt destructors are never called, so allocate the AsmToks using the ASTContext BumpPtr. Also use the preferred llvm::ArrayRef interface. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161373 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
reeTransform.h
|
c69d7356caa9dd08cd957f1a4a263da62eae5bc1 |
07-Aug-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c: Implement gcc's -Wdirect-ivar-access option. // rdar://6505197 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161362 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprMember.cpp
|
71f55f771794674a410171dbf3cb5dbedf95d033 |
07-Aug-2012 |
David Blaikie <dblaikie@gmail.com> |
Refactor checks for unevaluated contexts into a common utility function. The one caller that's surrounded by nearby code manipulating the underlying evaluation context list is left unmodified for readability. Review by Sean Silva and Richard Smith. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161355 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExpr.cpp
emaType.cpp
|
e27a08aa814cb2fe9367163edd612c90aad57789 |
06-Aug-2012 |
Richard Trieu <rtrieu@google.com> |
For global record types, the self reference checker was called twice, resulting in duplicate -Wuninitialized warnings. Change so that only the check in TryConstructorInitialization() will be used and a single warning be emitted. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161345 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
8f726de55412870ef70e788b852c6cc50873e15b |
06-Aug-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-inline asm] Pass Tokens to Sema and store them in the AST. No functional change intended. No test case as there's no real way to test at this time. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161342 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
reeTransform.h
|
a4b39658673954fb9f75673594b50028685fc665 |
06-Aug-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR13499: Don't try to check whether 'override' has been validly applied until we know whether the function is virtual. But check it as soon as we do know; in some cases we don't need to wait for an instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161316 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
eef00293897a73cc47f4d42e2653ff47c59d6030 |
06-Aug-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR13527: don't assert if a function is explicitly defaulted when it's already been defined. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161315 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
65263b4ec184212155c92740ab0bd363bb85c49e |
04-Aug-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Simplify code, no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161303 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
5295b97d6a0117414a24d319d9a018191ec1d8e3 |
03-Aug-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix crash if a literal operator template's template parameter pack is not a non-type template parameter pack. Patch by Andy Gibbs! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161260 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
f1aae3bc4e43fca03324150d7089856b7cfdc023 |
03-Aug-2012 |
Michael Han <Michael.Han@autodesk.com> |
Fix line endings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161245 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
e559b0dc6de871f73eb4db6378c65552e95e83e7 |
03-Aug-2012 |
Shih-wei Liao <sliao@google.com> |
Fix build. Change-Id: I167278dc782cbcbd7b0eb520a3f0dde4df1c7dac
emaDeclAttr.cpp
|
ee959355b93c0648fea88dc986d196e3705407dc |
03-Aug-2012 |
Shih-wei Liao <sliao@google.com> |
Apply changes to migrate to CLANG-160673-20120724. Change-Id: I00d23ac9b893c62dca281ec771eeb5f911854bae
ndroid.mk
|
08fc8eb5a1cc9c01af67e016ab21c9b905711eb1 |
03-Aug-2012 |
Shih-wei Liao <sliao@google.com> |
Merge with Clang upstream r160673 (Jul 24th 2012) Conflicts: lib/Sema/SemaDeclAttr.cpp Change-Id: I37f02f20642a037b9da8d35fefa01986cd250b14
|
3b5c316aaca67e942eeb6a81353dbdbae060378d |
03-Aug-2012 |
Jason Sams <jsams@google.com> |
Revert "Add an RS-specific check forbidding array parameters." This reverts commit 8874381c4f012f87d92e67488c6a9ec5aa35ae77 Change-Id: Ia634afbacd4875b29a985d8b075b67dce80084ed
emaDecl.cpp
|
c27bc80a98b9558513b50956c930eedc9e461ae0 |
02-Aug-2012 |
Dmitri Gribenko <gribozavr@gmail.com> |
Attaching comments to declarations: handle using-declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161211 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
dc48305e319c56f6f305c12b9faecdc378dfebdc |
02-Aug-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c arc: Patch to suggest bridge casting of CF objects used as dictionary subscript objects. // rdar://11913153 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161187 91177308-0d34-0410-b5e6-96231b3b80d8
emaPseudoObject.cpp
|
8874381c4f012f87d92e67488c6a9ec5aa35ae77 |
02-Aug-2012 |
Stephen Hines <srhines@google.com> |
Add an RS-specific check forbidding array parameters. BUG=6902660 Change-Id: I048fa10955ef124d09dbb50eb618f15210d5c635
emaDecl.cpp
|
95aac15936e8362aeb4813f95bc255dee6473592 |
01-Aug-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Fix an assertion failure instantiating a constexpr function from within a -dealloc method. PR13401. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161135 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDecl.cpp
emaDeclObjC.cpp
emaExprObjC.cpp
|
5121781d756e7814168b4255a57545d5ca497ec3 |
01-Aug-2012 |
Aaron Ballman <aaron@aaronballman.com> |
Explicitly defaulted constructors cannot be used for default initialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161088 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
96b098674908eaa59a9128f3305cda6fbbdad563 |
01-Aug-2012 |
Dmitri Gribenko <gribozavr@gmail.com> |
Comment parsing: add support for \tparam command on all levels. The only caveat is renumbering CXCommentKind enum for aesthetic reasons -- this breaks libclang binary compatibility, but should not be a problem since API is so new. This also fixes PR13372 as a side-effect. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161087 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplate.cpp
|
3c394c54511b27be0ff6968f159bba3521ab3c3e |
01-Aug-2012 |
Douglas Gregor <dgregor@apple.com> |
When testing whether we can perform copy or move initialization, be sure to supply an initialization location. Fixes <rdar://problem/11951661>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161084 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
43e3deeabf3ca02da427b63df8604e2daf86e8a3 |
31-Jul-2012 |
Sylvestre Ledru <sylvestre@debian.org> |
Fix some minor typos git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161036 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
1503f0ddab0057e33efa21393fc0577580d6287a |
31-Jul-2012 |
John McCall <rjmccall@apple.com> |
Introduce new queries on ObjCRuntime for how to interpret subscripts on object pointers and whether pointer arithmetic on object pointers is supported. Make ObjFW interpret subscripts as pseudo-objects. Based on a patch by Jonathan Schleifer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161028 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprObjC.cpp
|
a78a640c5f59720f2c2b8034eca4fbf8525d9026 |
31-Jul-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Attributes preceding a function declaration are first applied to the return type and then propagated to the function. This was failing for destructors, constructors and constructors templates since they don't have a return type. Fix that by directly calling processTypeAttrs on the dummy type we use as the return type in these cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161020 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
2f71622dc8888e6da7ce786e42e8e9fbab075de6 |
31-Jul-2012 |
Jordan Rose <jordan_rose@apple.com> |
Explain why ACC_bottom should never occur in diagnosing ARC casts. This is just a clarification on Fariborz's original patch, per e-mail discussion. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161016 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
dd25e80a6d67485173fe295f54418e05764cc8cb |
31-Jul-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR13479: If we see the definition of an out-of-line destructor in C++11, be sure to update the exception specification on the declaration as well as the definition. If we're building in -fno-exceptions mode, nothing else will trigger it to be updated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161008 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
d64effc4e31044c05d6e4400150edb26e914983a |
30-Jul-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Extend the ',' versus ';' diagnostic for -Wvexing-parse to cover the with-arguments case as well as the no-arguments case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160999 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
b9c6261d02f688d0a9a36b736ad5956fbc737854 |
30-Jul-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Improvements to vexing-parse warnings. Make the no-parameters case more accurate by asking the parser whether there was an ambiguity rather than trying to reverse-engineer it from the DeclSpec. Make the with-parameters case have better diagnostics by using semantic information to drive the warning, improving the diagnostics and adding a fixit. Patch by Nikola Smiljanic. Some minor changes by me to suppress diagnostics for declarations of the form 'T (*x)(...)', which seem to have a very high false positive rate, and to reduce indentation in 'warnAboutAmbiguousFunction'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160998 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
emaDecl.cpp
emaType.cpp
|
1b0a13e91088f6818016464ffb23616ced820cbc |
30-Jul-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c arc: ARC IRGen correctly assumes result type of generated call to super dealloc is 'void' and asserts if user's dealloc is not of 'void type. This rule must be enforced in clang front-end (with a fixit) if this is not the case, instead of asserting in CodeGen. // rdar://11987838 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160993 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
78a1b196cc6854a29c0ff2d6ea5f5643be6040c6 |
30-Jul-2012 |
Matt Beaumont-Gay <matthewbg@google.com> |
Do not warn on correct use of the '%n' format specifier. While '%n' can be used for evil in an attacker-controlled format string, there isn't any acute danger in using it in a literal format string with an argument of the appropriate type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160984 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
cec9ce49dcf4b4b768043f96c8ef8c1d4cdbb6b9 |
30-Jul-2012 |
Hans Wennborg <hans@hanshq.net> |
Make -Wformat check the argument type for %n. This makes Clang check that the corresponding argument for "%n" in a format string is a pointer to int. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160966 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
e5e8f4d2db48ec21f537fd6452276c1fe26bc726 |
30-Jul-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Use the location of the copy assignment when diagnosing classes that are nontrivial because of it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160962 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d22f0847a95938203fe12ab50bfc33d79c664a77 |
28-Jul-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR13433: In Microsoft mode, don't require function calls within decltype expressions to have complete return types (or accessible destructors). If the return type is required to be complete for some other reason (for instance, if it is needed by overload resolution), then it will still be required to be complete. This is apparently required in order to parse a MSVC11 header. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160924 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
74cb390d238b55cede882ef5f598215c3537ae95 |
28-Jul-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
assert on ACC_bottom when checking for invalid CF to ARC conversions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160923 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
d9c729e67916cd8b1638ff72270dad98d1a02a58 |
28-Jul-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
more objc-arc: With ACC_bottom, we just provide __bride fixit, as it doesn't matter which cast to use. // rdar://11923822 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160906 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
24b2ab7b5939a7298b040216dcd93c838f42d8d0 |
28-Jul-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objc-arc: change per Jordy's comments. // rdar://11923822 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160902 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
533b34fa7bce6aee7a76f962f02afdf022df6d08 |
28-Jul-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c arc: When function calls with known CFCreate naming convention are cast to retainable types, only suggest CFBridgingRelease/ CFBridgingRetain and not the __bridge casts. // rdar://11923822 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160900 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
607f587a8cdf590f947a0248df8f18082eac8229 |
27-Jul-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
revert r160839 for now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160895 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
e61354b274ec5aa6acf3d15271896ce7596bb123 |
27-Jul-2012 |
Anna Zaks <ganna@apple.com> |
Consolidate ObjC lookupPrivateMethod methods from Sema and DeclObjC. Also, fix a subtle bug, which occurred due to lookupPrivateMethod defined in DeclObjC.h not looking up the method inside parent's categories. Note, the code assumes that Class's parent object has the same methods as what's in the Root class of a the hierarchy, which is a heuristic that might not hold for hierarchies which do not descend from NSObject. Would be great to fix this in the future. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160885 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprMember.cpp
emaExprObjC.cpp
emaStmt.cpp
|
b399696572b5c610e8b88574084f7982c715dc94 |
27-Jul-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Fix PR13394: Erasing from a vector changes the end of the vector, so make sure we always have the right end. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160855 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
11abf2ad01f64ede7c0555167f41a1c5852f80c6 |
27-Jul-2012 |
NAKAMURA Takumi <geek4civic@gmail.com> |
clang/lib: [CMake] Update tblgen'd dependencies. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160851 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
|
866abce3b93ab01bac00e0383a753819893b868a |
27-Jul-2012 |
NAKAMURA Takumi <geek4civic@gmail.com> |
clang/lib: [CMake] Reformat, alphabetize lists. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160850 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
|
b9d0b76e42fd2d4cdfd135220302458d03ad09fe |
27-Jul-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Final piece of core issue 1330: delay computing the exception specification of a defaulted special member function until the exception specification is needed (using the same criteria used for the delayed instantiation of exception specifications for function temploids). EST_Delayed is now EST_Unevaluated (using 1330's terminology), and, like EST_Uninstantiated, carries a pointer to the FunctionDecl which will be used to resolve the exception specification. This is enabled for all C++ modes: it's a little faster in the case where the exception specification isn't used, allows our C++11-in-C++98 extensions to work, and is still correct for C++98, since in that mode the computation of the exception specification can't fail. The diagnostics here aren't great (in particular, we should include implicit evaluation of exception specifications for defaulted special members in the template instantiation backtraces), but they're not much worse than before. Our approach to the problem of cycles between in-class initializers and the exception specification for a defaulted default constructor is modified a little by this change -- we now reject any odr-use of a defaulted default constructor if that constructor uses an in-class initializer and the use is in an in-class initialzer which is declared lexically earlier. This is a closer approximation to the current draft solution in core issue 1351, but isn't an exact match (but the current draft wording isn't reasonable, so that's to be expected). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160847 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaExceptionSpec.cpp
emaExpr.cpp
emaExprCXX.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
304efd5962eaca7179f43846fff1880a5e5e873c |
27-Jul-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objc-arc: When objects with known CF semantics are assigned to retainable types in arc, only suggest CFBridgingRelease/ CFBridgingRetain and not the confusing __bridge casts. // rdar://11923822 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160839 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
a95b4f73c4a2c7ab31f0dc4c8c74d041d1504939 |
26-Jul-2012 |
Tanya Lattner <tonic@nondot.org> |
Disable the warning for missing prototypes for OpenCL kernels. Includes testcase. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160766 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
612409ece080e814f79e06772c690d603f45fbd6 |
25-Jul-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR12057: Allow variadic template pack expansions to cross lambda boundaries. Rather than adding a ContainsUnexpandedParameterPack bit to essentially every AST node, we tunnel the bit directly up to the surrounding lambda expression when we reach a context where an unexpanded pack can not normally appear. Thus any statement or declaration within a lambda can now potentially contain an unexpanded parameter pack. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160705 91177308-0d34-0410-b5e6-96231b3b80d8
emaLambda.cpp
emaTemplateInstantiate.cpp
emaTemplateVariadic.cpp
reeTransform.h
|
42926a065572a63610f651bb1589fe1217e2e0a7 |
24-Jul-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Pedantic -pedantic correction. Duplicate cv-qualifiers are permitted in C++11 unless they appear in a decl-specifier-seq. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160688 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
|
168c07b93510aabd2a19af323d1132fffe498ee4 |
24-Jul-2012 |
Hans Wennborg <hans@hanshq.net> |
Tweak warning text for returning incomplete type from extern "C" functions. A warning was added in r150128 for returning non-C compatible user-defined types from functions with C linkage. This makes the text more clear for the case when the type isn't decidedly non-C compatible, but incomplete. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160681 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
78d1a10e13a1abfd4830bccf2a97b2993da1ed5c |
24-Jul-2012 |
Nick Lewycky <nicholas@mxc.ca> |
Emit debug info for dynamic initializers. Permit __attribute__((nodebug)) on variables that have static storage duration, it removes debug info on the emitted initializer function but not all debug info about this variable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160659 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
f50b6fe092091a700cee7a708d509ae7c49709f6 |
24-Jul-2012 |
Nick Lewycky <nicholas@mxc.ca> |
Fix whitespace, whoops missed a spot! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160658 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
4ae89bc757f16baeb74ebeea81c43dc5201cb4f2 |
24-Jul-2012 |
Nick Lewycky <nicholas@mxc.ca> |
Fix whitespace, tabs to spaces. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160657 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
e1ecdc168175719d74e112bcacd4aae5e12d4631 |
23-Jul-2012 |
Richard Trieu <rtrieu@google.com> |
Change APInt to APSInt in one instance. Also change a call to operator==() to APSInt::isSameValue() when comparing different sized APSInt's. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160641 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
dc69157f9bfa538e2bf62a01fa46df22ce45ce3c |
23-Jul-2012 |
Michael Han <Michael.Han@autodesk.com> |
Refactor handler functions for thread safety attributes. Make handler functions for thread safety attributes consistent with other attributes handler functions by removing the bool parameter from some of the thread safety attributes handler functions and extracting common checks out of different handler functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160635 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
bed28ac1d1463adca3ecf24fca5c30646fa9dbb2 |
23-Jul-2012 |
Sylvestre Ledru <sylvestre@debian.org> |
Fix a typo (the the => the) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160622 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDeclCXX.cpp
emaLookup.cpp
emaOverload.cpp
|
3fe52ff7df93f7a928a15cc2cbf5134fdc0cec15 |
23-Jul-2012 |
Douglas Gregor <dgregor@apple.com> |
When we have an Objective-C object with non-trivial lifetime in a structor class under ARC, that struct/class does not have a trivial move constructor or move assignment operator. Fixes the rest of <rdar://problem/11738725>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160615 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
adb1d4c18ee83249d4cffc99ef902f98e846092a |
23-Jul-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR12917: Remove incorrect assumption that lambda mangling information cannot change once it's been assigned. It can change in two ways: 1) In a template instantiation, the context declaration should be the instantiated declaration, not the declaration in the template. 2) If a lambda appears in the pattern of a variadic pack expansion, the mangling number will depend on the pack length. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160614 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaLambda.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
4914c2897bb8beb5e15b2a0bf3e72d78da0706ae |
20-Jul-2012 |
Aaron Ballman <aaron@aaronballman.com> |
No longer assuming the number of prototype arguments is always less than the number of formal parameters for a variadic function call. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160570 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
6dba4a1bc3c257bee0812a130c468917ea210e05 |
20-Jul-2012 |
Eric Christopher <echristo@apple.com> |
Reset the layout of an ObjC class if we see an ivar in a category or implementation since we've now got a different layout. Fixes rdar://11842763 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160526 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
9d9cf5097e5f7907c1d2b042cc5d0e4377a4f156 |
19-Jul-2012 |
Aaron Ballman <aaron@aaronballman.com> |
Removing a spurious comment, no functionality changes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160522 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
ddcfbc9ad1817f545610999d655ac6c28d4c0c12 |
19-Jul-2012 |
Jordan Rose <jordan_rose@apple.com> |
For varargs, diagnose passing ObjC objects by value like other non-POD types. While we still want to consider this a hard error (non-POD variadic args are normally a DefaultError warning), delaying the diagnostic allows us to give better error messages, which also match the usual non-POD errors more closely. In addition, this change improves the diagnostic messages for format string argument type mismatches by passing down the type of the callee, so we can say "variadic method" or "variadic function" appropriately. <rdar://problem/11825593> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160517 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExpr.cpp
|
48716663e421472cbd590af160a372bc490205e8 |
19-Jul-2012 |
Jordan Rose <jordan_rose@apple.com> |
Don't crash checking a format string if one of the arguments is invalid. Previously, we would ask for the SourceLocation of an argument even if it were NULL (i.e. if Sema resulted in an ExprError trying to build it). <rdar://problem/11890818> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160515 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
f81678707e936cf04a2a9f7c21d51a77ffc1f6c9 |
19-Jul-2012 |
Aaron Ballman <aaron@aaronballman.com> |
Relaxed enumeration constant naming rules for scoped enumerators so they no longer emit a diagnostic when the enumeration's name matches that of the class. Fixes PR13128. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160490 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
e3898ac6cca333f9a781eb6df4be5f3ba8258559 |
19-Jul-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix OverloadCandidateSet::clear to not leak PartialDiagnostics, found by Samuel Panzer. I've not been able to trigger a failure caused by this, so no test yet. Also included is a small change from Paul Robinson to only consider the FailureKind if the overload candidate did actually fail. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160470 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
517bb844016064f303416f09f1aeb123e32c0f66 |
18-Jul-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR13381, part 2: when determining if a defaulted special member function should be defined as deleted, take cv-qualifiers on class members into account when looking up the copy or move constructor or assignment operator which will be used for them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160418 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
6a06e5ff3b680dcf7234d200309fd2400c478095 |
18-Jul-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR13381: consider cv-qualifiers on a class member's type when determining which constructor will be used for moving that object, in the computation of its exception specification. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160417 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaLookup.cpp
|
500d729e85028944355a119f9823ac99fa5ddcab |
18-Jul-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR13386: When matching up parameters between a function template declaration and a function template instantiation, if there's a parameter pack in the declaration and one at the same place in the instantiation, don't assume that the pack wasn't expanded -- it may have expanded to nothing. Instead, go ahead and check whether the parameter pack was expandable. We can do this as a side-effect of the work we'd need to do anyway, to find how many parameters were produced. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160416 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
emaTemplateVariadic.cpp
|
b251302dd52249c49ba6527fcd013396deef22cf |
18-Jul-2012 |
Douglas Gregor <dgregor@apple.com> |
When performing the deduced/actual argument type check for C++ [temp.deduct.call]p4 under Objective-C++ ARC, make sure to adjust the qualifiers to introduce the implicit strong lifetime when needed. Fixes <rdar://problem/11825671>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160412 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
796158971bda18cf4af237c46769914cfa7276b7 |
18-Jul-2012 |
Douglas Gregor <dgregor@apple.com> |
Remove unnecessary spacing around Objective-C object literal code completions. Fixes <rdar://problem/11889572>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160407 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
251c449b280eb845017a6c022ed7189d17c63d49 |
17-Jul-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Handle the case where the base type is not dependent, but the derived one is. Fixes pr13353.cpp. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160393 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
379b28183a7dcb715c3f3eb2da4b0157d6d8ffbe |
17-Jul-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
Issue warning when assigning out-of-range integer values to enums. Due to performance cost, this is an opt-in option placed under -Wassign-enum. // rdar://11824807 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160382 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaStmt.cpp
|
d5209ae13a7c42e2b7fa641f75a66e545959cbed |
17-Jul-2012 |
Jordan Rose <jordan_rose@apple.com> |
-Wobjc-literal-compare: don't warn when comparing against nil. Checks against nil often appear as guards in macros, and comparing Objective-C literals to nil has well-defined behavior (if tautological). On OS X, 'nil' has not been typed as 'id' since 10.6 (possibly earlier), so the warning was already not firing, but other runtimes continue to use ((id)0) or some variant. This change accepts comparisons to any null pointer; to keep it simple, it looks through all casts (not just casts to 'id'). PR13276 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160379 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
eec207f02a0208814bb8b4ca90099a2fed016244 |
17-Jul-2012 |
Jordan Rose <jordan_rose@apple.com> |
Add -Wobjc-string-compare under -Wobjc-literal-compare. Suggested by Ted, since string literal comparison is at least slightly more sensible than comparison of runtime literals. (Ambiguous language on developer.apple.com implies that strings are guaranteed to be uniqued within a translation unit and possibly across a linked binary.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160378 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
8d872ca7f10bb70d0757b894af79641679262bba |
17-Jul-2012 |
Jordan Rose <jordan_rose@apple.com> |
Now that -Wobjc-literal-compare is a warning, put the fixit on a note. Recovering as if the user had actually called -isEqual: is a bit too far from the semantics of the program as written, /even though/ it's probably what they intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160377 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
71adc5b587e4612e23d5ba234967b77a5f74b773 |
17-Jul-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Merge visibility from previous decls before looking at visibility pragma. This is a bit fuzzy, but matches gcc behavior and existing code bases seem to depend on it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160364 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
becfc2325c9b645d2208b2a5389b709fd3d75576 |
17-Jul-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Record visibility pragmas when we see a tag declaration. We might use it to build a type before seeing the definition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160339 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
6cfa78f6bd4e7d5e23366a0907f8f8792366bc4c |
17-Jul-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Uninitialized variables: two little changes: * Treat compound assignment as a use, at Jordy's request. * Always add compound assignments into the CFG, so we can correctly diagnose the use in 'return x += 1;' git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160334 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
980343b9a1d0e85f960fa289c2c9a727004964f2 |
16-Jul-2012 |
David Blaikie <dblaikie@gmail.com> |
Simplify float comparison checks by using early return. Found while investigating PR13330 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160318 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
85f485a70fbec54c9b4562dfc4d95188ea6c9b48 |
16-Jul-2012 |
David Blaikie <dblaikie@gmail.com> |
Fix rejects-valid: explicit specialization of redeclared deleted function template. Review by Richard Smith. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160306 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
a770a4daf77037b5526dba1c447d61acf0aba01a |
16-Jul-2012 |
Daniel Jasper <djasper@google.com> |
Add correct parenthesis range to CXXConstructExprs inside CXXFunctionalCastExprs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160252 91177308-0d34-0410-b5e6-96231b3b80d8
emaCast.cpp
|
7e54fb5fcc7d7b8e843501652cf7c19cea6c4c57 |
16-Jul-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR13365: Fix code which was trying to treat an array of DeducedTemplateArgument as an array of its base class TemplateArgument. Switch the const TemplateArgument* parameters of InstantiatingTemplate's constructors to ArrayRef<TemplateArgument> to prevent this from happening again in the future. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160245 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
|
d320ffc0f58df23eb0e698c79105a68de9c0e37a |
15-Jul-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Without this patch clang warns on struct __attribute__((visibility("hidden"))) zed { }; struct __attribute__((visibility("hidden"))) zed; Which is a bit silly and got a lot noisier now that we correctly handle visibility pragmas. This patch fixes that and also has some extra quality improvements: * We now produce an error instead of a warning for struct __attribute__((visibility("hidden"))) zed { }; struct __attribute__((visibility("default"))) zed; * The "after definition" warning now points to the new attribute that is ignored instead of pointing to the declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160227 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
4b044c6bc71d1fdce8998af09cf08b026fdd2189 |
15-Jul-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Make const the argument of getDefinition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160226 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
2b884a873afac6b766dc7fff26a645b77b97dfcd |
15-Jul-2012 |
Eric Christopher <echristo@apple.com> |
Use llvm::APSInt::isSameValue to compare for the same value. Finishes rdar://11875995 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160225 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
6b60370ddb5b63e93f25dfbed920be0f335ddad3 |
13-Jul-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Apply visibility pragmas to class template declarations. This is needed because we might use the declaration to build a type before seeing the definition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160176 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
838925dc841f0968ac5daf941aed5d2331775a59 |
13-Jul-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Provide a special-case diagnostic when two class member functions instantiate to the same signature. Fix a bug in the type printer which would cause this diagnostic to print wonderful types like 'const const int *'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160161 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d3d02dd0ae17eabc8e0b8972ac6a3863534b39d2 |
13-Jul-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Fix a bug in my previous commit. The problem is not that we were not using the canonical decl for the template, but that we were not merging attributes for templates at all! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160157 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
abd56c816e9164b17bb3e7154a511b0c9896ffdb |
13-Jul-2012 |
Dmitri Gribenko <gribozavr@gmail.com> |
Attaching comments to declarations during parsing: handle more Objective-C declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160156 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclObjC.cpp
emaObjCProperty.cpp
|
5e06529f3bbb4459be21b57dd918880a02f95cb2 |
12-Jul-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Process #pragma visibility early in the parsing of class definitions. Fixes pr13338. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160105 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f729ce0b231e045b8e7db61e85e87186c09db238 |
12-Jul-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Ignore visibility attributes after definitions. This matches newer (4.7) gcc's behavior and is the first step in fixing pr13338. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160104 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
8951067a2bc35fb2a535bc18432cb2d02a762b73 |
12-Jul-2012 |
Nico Weber <nicolasweber@gmx.de> |
Don't try to do RVO on block variables that refer to an enclosing local. Fixes PR13314, clang crashing on blocks refering to an enclosing local when the enclosing function returns void. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160089 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
e3f470a718ec00eb8b546e405fa59bc2df2d7c46 |
12-Jul-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Stop instantiating a class if we hit a static_assert failure. Also, if the static_assert fails when parsing the template, don't diagnose it again on every instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160088 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
a5ef44ff5d93a3be6ca67782828157a71894cf0c |
11-Jul-2012 |
Dmitri Gribenko <gribozavr@gmail.com> |
Enable comment parsing and semantic analysis to emit diagnostics. A few diagnostics implemented -- see testcases. I created a new TableGen file for comment diagnostics, DiagnosticCommentKinds.td, because comment diagnostics don't logically fit into AST diagnostics file. But I don't feel strongly about it. This also implements support for self-closing HTML tags in comment lexer and parser (for example, <br />). In order to issue precise diagnostics CommentSema needs to know the declaration the comment is attached to. There is no easy way to find a decl by comment, so we match comments and decls in lockstep: after parsing one declgroup we check if we have any new, not yet attached comments. If we do -- then we do the usual comment-finding process. It is interesting that this automatically handles trailing comments. We pick up not only comments that precede the declaration, but also comments that *follow* the declaration -- thanks to the lookahead in the lexer: after parsing the declgroup we've consumed the semicolon and looked ahead through comments. Added -Wdocumentation-html flag for semantic HTML errors to allow the user to disable only HTML warnings (but not HTML parse errors, which we emit as warnings in -Wdocumentation). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160078 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
|
8d71918ec9899b07a649ba3a3de2fb6a2e07ec4a |
11-Jul-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Handle #pragma visibility in explicit specializations and enums. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160057 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f2f15b3bc6820469024db170c87ffe885ec53cf9 |
11-Jul-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Don't process #pragma visibility during instantiation. The visibility of the instantiation depends on the template, its arguments and parameters, but not where it is instantiated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160034 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
0df579ec000ffe52e0cddf1e7ee5e50a55256835 |
10-Jul-2012 |
Tanya Lattner <tonic@nondot.org> |
Patch by Anton Lokhmotov to add OpenCL work group size attributes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159965 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
34f60a4a7fb87e9f4dfd08f8751ce76db9981215 |
09-Jul-2012 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
The delete argument should not be converted to void*. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159961 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
6deae7cc8de2fb7578ed244d064cd34af744aac5 |
09-Jul-2012 |
Jordan Rose <jordan_rose@apple.com> |
Downgrade the "direct comparison" error for ObjC literals to a warning. Chris pointed out that while the comparison is certainly problematic and does not have well-defined behavior, it isn't any worse than some of the other abuses that we merely warn about and doesn't need to make the compilation fail. Revert the release notes change (r159766) now that this is just a new warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159939 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
4990890fc9428f98bef90ba349203a648c592778 |
09-Jul-2012 |
Alexander Kornienko <alexfh@google.com> |
Inline storage of attributes in AttributedStmt. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159925 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
emaStmtAttr.cpp
reeTransform.h
|
6098381c29c2693832aa81ef046cf21a49729436 |
09-Jul-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR13136: * When substituting a reference to a non-type template parameter pack where the corresponding argument is a pack expansion, transform into an expression which contains an unexpanded parameter pack rather than into an expression which contains a pack expansion. This causes the SubstNonTypeTemplateParmExpr to be inside the PackExpansionExpr, rather than outside, so the expression still looks like a pack expansion and can be deduced. * Teach MarkUsedTemplateParameters that we can deduce a reference to a template parameter if it's wrapped in a SubstNonTypeTemplateParmExpr (such nodes are added during alias template substitution). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159922 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
|
fad0a32da8ea34a58aa0a0dd3fd67cd30959b080 |
08-Jul-2012 |
Simon Atanasyan <satanasyan@mips.com> |
MIPS: Range check __builtin_mips_wrdsp / __builtin_mips_rddsp arguments against the upper/lower values. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159911 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
5a343d7856e5de04fd92b6192e94becddf541e3e |
08-Jul-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR13243: When deducing a non-type template parameter which is specified as an expression, skip over any SubstNonTypeTemplateParmExprs which alias templates may have inserted before checking for a DeclRefExpr referring to a non-type template parameter declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159909 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
8ad6c8696a23f410398fc126929b107404c59a95 |
08-Jul-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR13293: Defer deduction of an auto type with a dependent declarator, such as "auto (*f)(T t)". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159908 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExprCXX.cpp
emaTemplateDeduction.cpp
|
ab91ef1dbe524bba3c0147b11dfdd394153c783d |
08-Jul-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR9793: Treat substitution as an instantiation step for the purpose of the -ftemplate-depth limit. There are various ways to get an infinite (or merely huge) stack of substitutions with no intervening instantiations. This is also consistent with gcc's behavior. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159907 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
bb35151a166db2b4fee043bc90e60858ac2b7a89 |
08-Jul-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Reject 'int a[1][];' in Sema rather than crashing in IR generation. Found by a misreduction of PR13290. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159905 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
20599392a99956eaac4cf351a0935574090cb6c3 |
07-Jul-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR12670: Support for initializing an array of non-aggregate class type from an initializer list. Patch by Olivier Goffart, with extra testcases by Meador Inge and Daniel Lunow. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159896 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
ff817f7070c0308e9d4486432b774005d4f8e420 |
07-Jul-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
When marking virtual functions as used for a class' vtable, mark all functions which will appear in the vtable as used, not just those ones which were declared within the class itself. Fixes an issue reported as comment#3 in PR12763 -- we sometimes assert in codegen if we try to emit a reference to a function declaration which we've not marked as referenced. This also matches gcc's observed behavior. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159895 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
bd2e27e8484c1d378c9c9d089f61ff496627f391 |
06-Jul-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objc-arc: warn when assigning retained object to a 'weak' property just as we do the same for 'weak' variables. // rdar://11814185 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159859 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
4d3db4eb6caa49a7cdbfe1798728ce4b23cd0b53 |
06-Jul-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c++11: extend c++11 range-based loop to iterate over objective-c container collection. // rdar://9293227 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159847 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
8d3ba23f2d9e6c87794d059412a0808c9cbacb25 |
06-Jul-2012 |
Dmitri Gribenko <gribozavr@gmail.com> |
Implement AST classes for comments, a real parser for Doxygen comments and a very simple semantic analysis that just builds the AST; minor changes for lexer to pick up source locations I didn't think about before. Comments AST is modelled along the ideas of HTML AST: block and inline content. * Block content is a paragraph or a command that has a paragraph as an argument or verbatim command. * Inline content is placed within some block. Inline content includes plain text, inline commands and HTML as tag soup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159790 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
|
c4133a477389dacb4479a96ee2227b92aea0a237 |
06-Jul-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c: don't involve properties when checking under -Wsuper-class-method-mismatch for method mismatches in current and suprt class. // rdar://11793793 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159784 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
f4bb8d06c4f1665f89a9e9ddd61f2a2d26904da0 |
05-Jul-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR13273: When performing list-initialization with an empty initializer list, actually perform value initialization rather than trying to fake it with a call to the default constructor. Fixes various bugs related to the previously-missing zero-initialization in this case. I've also moved this and the other list initialization 'special case' from TryConstructorInitialization into TryListInitialization where they belong. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159733 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
478851c3ed6bd784e7377dffd8e57b200c1b9ba9 |
04-Jul-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Drop the ASTContext.h include from Stmt.h and fix up transitive users. This required moving the ctors for IntegerLiteral and FloatingLiteral out of line which shouldn't change anything as they are usually called through Create methods that are already out of line. ASTContext::Deallocate has been a nop for a long time, drop it from ASTVector and make it independent from ASTContext.h Pass the StorageAllocator directly to AccessedEntity so it doesn't need to have a definition of ASTContext around. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159718 91177308-0d34-0410-b5e6-96231b3b80d8
ttributeList.cpp
emaAccess.cpp
emaFixItUtils.cpp
|
3a2d0fb726aca3096b5c1ea9be734417060f34d7 |
04-Jul-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Split out the "empty" case for compound statement into a separate ctor. Move the ASTContext-dependent version out of line. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159717 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaLambda.cpp
|
c50a0e3900f1b44503be48457508af372f4dd05a |
04-Jul-2012 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Renamed RawComment kinds to avoid name clash. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159706 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
a1eec4bd198b96ef40a7c15cd0e131ca94511ad8 |
04-Jul-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c: Refactor parse/sema portion of objective-c's fast enumeration statement, for more work to come. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159689 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
reeTransform.h
|
7c81b43bef441960e921e0eb72d249369b7dd96c |
03-Jul-2012 |
Nico Weber <nicolasweber@gmx.de> |
Rename -Wself-assign-memvar to -Wself-assign-field to improve local consistency a bit. (cf -Wunused-private-field and several other existing -field diagnostics.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159633 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
2e2c7a40b7164e8499b2551c363550d6da68dc97 |
03-Jul-2012 |
Chandler Carruth <chandlerc@gmail.com> |
Remove a redundant assignment to the FDecl variable from *inside* it's initializer. I really feel like Clang should warn about this, but I can't describe a good reason. GCC will warn on this in some cases under -Wsequence-point, but it actually seems like a false positive for that warning.... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159631 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
6c89eafc90f5c51a0bf185a993961170aee530c2 |
03-Jul-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c: just as we have done for method definitions, c-functions declared in implementation should have their parsing delayed until the end so, they can access forward declared private methods. // rdar://10387088 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159626 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
879a4334e4c4cab0c22ba91492ffc2838bbc21fc |
03-Jul-2012 |
DeLesley Hutchins <delesley@google.com> |
Thread safety analysis: fixed incorrect error message at the end of a locks_required function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159607 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
7dd900ed308506f9cf1cb72c70db1652f94cab37 |
02-Jul-2012 |
Jordan Rose <jordan_rose@apple.com> |
In blocks, only pretend that enum constants have enum type if necessary. In C, enum constants have the type of the enum's underlying integer type, rather than the type of the enum. (This is not true in C++.) Thus, when a block's return type is inferred from an enum constant, it is incompatible with expressions that return the enum type. In r158899, I told block returns to pretend that enum constants have enum type, like in C++. Doug Gregor pointed out that this can break existing code. Now, we don't check the types of return statements until the end of the block. This lets us go back and add implicit casts in blocks with mixed enum constants and enum-typed expressions. <rdar://problem/11662489> (again) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159591 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
emaLambda.cpp
emaStmt.cpp
|
8a50fe0d76b0f245b4cdd599230f2ee023be82cd |
02-Jul-2012 |
Douglas Gregor <dgregor@apple.com> |
Be more eager about setting the 'Invalid' bit on an invalid class template instantiation. I wasn't able to reproduce this down to anything small enough to put in our test suite, but it's "obviously" okay to set the invalid bit earlier and precludes a known-broken-but-not-marked-broken class from being used elsewhere. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159584 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplateInstantiate.cpp
|
d99ef536b241071b6f4c01db6525dc03242ac30b |
02-Jul-2012 |
Dmitri Gribenko <gribozavr@gmail.com> |
Add a new libclang completion API to get brief documentation comment that is attached to a declaration in the completion string. Since extracting comments isn't free, a new code completion option is introduced. A new code completion option that enables including brief comments into CodeCompletionString should be a, err, code completion option. But because ASTUnit caches global declarations during parsing before even completion consumer is created, the option is duplicated as a translation unit option (in both libclang and ASTUnit, like the option to cache code completion results). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159539 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
|
f70a88612a4bc2de2872a518267b9b4891ab6431 |
30-Jun-2012 |
Jordan Rose <jordan_rose@apple.com> |
Add support for the C11 _Alignof keyword. This behaves like the existing GNU __alignof and C++11 alignof keywords; most of the patch is simply adding the third token spelling to various places. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159494 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
emaLookup.cpp
|
4ac5751efb9de1065c71b0db587185d552803e2f |
29-Jun-2012 |
Kaelyn Uhrain <rikka@google.com> |
In Sema::ClassifyName, try to avoid nonsensical corrections to keywords when doing type correction. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159464 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
04ca19b97e85381920df7214f2c31b6833b314ce |
29-Jun-2012 |
Richard Trieu <rtrieu@google.com> |
Add a fix-it hint note to -Wunique-enum to suggest that the last element gets initialized with the next to last element to silence the warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159458 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
2578532c7323efdd68ec42a31b7bdf72e5218867 |
29-Jun-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
fix a typo in my last commit. I thought I recompiled, but apparently I did not. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159452 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
20e7d992140cc6bc94f2e65f3638346527150756 |
29-Jun-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objc diagnostic: pass IdentifierInfo* to the diagnostic system to produce quotes instead of adding qoute to the test. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159450 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
619ee6acdd43b95b20c5aa96b22c3f238ce1a021 |
29-Jun-2012 |
David Blaikie <dblaikie@gmail.com> |
Avoid redundant error when redefining a function as deleted. Reviewed by Doug Gregor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159442 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
d68615f46da579fff14cc5ad028e5df79e97d03d |
29-Jun-2012 |
Nico Weber <nicolasweber@gmx.de> |
Change condition to be the same as in SemaTemplateInstantiate. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159436 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
592a4230c6e91fead00d605f6155080544cdf8c9 |
29-Jun-2012 |
Douglas Gregor <dgregor@apple.com> |
When a builtin that requires a constant is given a type- or value-dependent expression, don't complain that it wasn't the constant we wanted. Fixes <rdar://problem/11688587> and PR11074. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159404 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
14b23277db34fd33292dd9ec23abb13e7cb72613 |
29-Jun-2012 |
Douglas Gregor <dgregor@apple.com> |
Teach the __is_trivially_assignable and __is_trivially_constructible type traits that assignment to/construction of a lifetime-qualified object under ARC is *not* trivial. Fixes <rdar://problem/11738725>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159401 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
43bb1793c523f714bca1c49d804ba7c0cb62aca2 |
29-Jun-2012 |
Nico Weber <nicolasweber@gmx.de> |
Warn on self-assignment to member variables. PR13104. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159394 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
0239df868e2e09f4963bc310c56ea129f51a2288 |
28-Jun-2012 |
Jordan Rose <jordan_rose@apple.com> |
Warn on weak properties declared in protocols as well. Previously this caused a crash, since protocols are not interfaces. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159357 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
7c16d58f8546365d1f56468e9ae1ecfa182afca0 |
27-Jun-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c mrc: Issue warning for mrc, as is done for arc, when property retains a block object as it could be on the stack. // rdar://11761511 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159293 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
e1971a136a75e6722059d759d9700e411f63f344 |
27-Jun-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Refactoring after r159290: don't hold onto and check a misleading QualType. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159292 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
83ea530f9da1b8ca57773bf53418ce9fc98f46ac |
27-Jun-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Check for non-POD vararg argument type after default argument promotion, not before, so we don't incorrectly think arguments of function type are non-POD. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159290 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
12d2cc71bfeb1e7be9ce00fc52feab50941cac24 |
27-Jun-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
patch to suggest 'static' function should be 'static inline' when it appears to be unused and occurs in a header. // rdar://11202617 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159282 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
8d852e35adb46e0799538dfc9c80d44f27cd3597 |
27-Jun-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Implement John McCall's review of r159212 other than the this pointer not being updated. Will fix that in a second. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159280 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
0713d993cd0b4eb6a1b642c7d51d0f1845c1e986 |
27-Jun-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Fix a crash I introduced in r159212. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159279 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
91cbbbf506c892a26d4301e2b3ccd377b0938817 |
26-Jun-2012 |
Chad Rosier <mcrosier@apple.com> |
Whitespace. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159229 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
0b4fe503ef00d9f8ea330850d3e3b303e9c7c876 |
26-Jun-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
During codegen of a virtual call we would extract any casts in the expression to see if we had an underlying final class or method, but we would then use the cast type to do the call, resulting in a direct call to the wrong method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159212 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b4e8008d5e65443cb28f7ff5c2a8b3b04f03657b |
26-Jun-2012 |
Nico Weber <nicolasweber@gmx.de> |
Give L__FUNCTION__ the right type in templates. PR13206. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159171 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
d9cf8268dcd3f4d393b7a38fef7eb40c7e7f4d10 |
25-Jun-2012 |
David Blaikie <dblaikie@gmail.com> |
PR12937: Explicitly deleting an explicit template specialization. This works around a quirk in the way that explicit template specializations are handled in Clang. We generate an implicit declaration from the original template which the explicit specialization is considered to redeclare. This trips up the explicit delete logic. This change only works around that strange representation. At some point it'd be nice to remove those extra declarations to make the AST more accurately reflect the C++ semantics. Review by Doug Gregor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159167 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
831421f24057b93ea28bc92d8bd6290631a43caf |
25-Jun-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Unrevert r158887, reverted in r158949, along with a fix for the bug which resulted in it being reverted. A test for that bug was added in r158950. Original comment: If an object (such as a std::string) with an appropriate c_str() member function is passed to a variadic function in a position where a format string indicates that c_str()'s return type is desired, provide a note suggesting that the user may have intended to call the c_str() member. Factor the non-POD-vararg checking out of DefaultVariadicArgumentPromotion and move it to SemaChecking in order to facilitate this. Factor the call checking out of function call checking and block call checking, and extend it to cover constructor calls too. Patch by Sam Panzer! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159159 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaOverload.cpp
|
6b02009359a462ffe633696a4441313b462e6566 |
25-Jun-2012 |
Nico Weber <nicolasweber@gmx.de> |
Make explicit specializations at class scope work for non-type template parameters in microsoft mode. PR12709. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159147 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplateInstantiateDecl.cpp
|
33e6c2da2f72720ee6a34c6acd2a3e5ad37feca9 |
23-Jun-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c: issue deprecation/unavailability warnings for methods called on id <Protocol>. // rdar://11618852 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159084 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
5e2d5dec7736f6f9292d4212dec67295909f1328 |
23-Jun-2012 |
Hans Wennborg <hans@hanshq.net> |
Support the tls_model attribute (PR9788) This adds support for the tls_model attribute. This allows the user to choose a TLS model that is better than what LLVM would select by default. For example, a variable might be declared as: __thread int x __attribute__((tls_model("initial-exec"))); if it will not be used in a shared library that is dlopen'ed. This depends on LLVM r159077. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159078 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
28ad063b279378b19cb0704f977429df366a151e |
23-Jun-2012 |
Nico Weber <nicolasweber@gmx.de> |
Support L__FUNCTION__ in microsoft mode, PR11789 Heavily based on a patch from Aaron Wishnick <aaron.s.wishnick@gmail.com>. I'll clean up the duplicated function in CodeGen as a follow-up, later today or tomorrow. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159060 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
c1fb54265614845ee1e09856af6e46961c6209f4 |
23-Jun-2012 |
Kaelyn Uhrain <rikka@google.com> |
Perform typo correction for base class specifiers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159046 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
94c4d61625122e7a7ac9a45418e88ad742fcc661 |
22-Jun-2012 |
Nico Weber <nicolasweber@gmx.de> |
Show fixit for unqualified calls to methods of dependent bases when the calling site is a member function template. Effectively reverts r111675. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159004 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
9dda4746867a747c1c3421d8a04a1b666aeb5809 |
22-Jun-2012 |
Dmitri Gribenko <gribozavr@gmail.com> |
Add a warning about almost-Doxygen trailing comments: //< and /*< ... */ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159001 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
8da16874f48d2c5c8f1275c7fd77caf8a8af3f81 |
22-Jun-2012 |
James Dennett <jdennett@google.com> |
Documentation cleanup: making \param and \returns docs match the code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158985 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
emaOverload.cpp
|
16ae9de07730832945204877d752db7f1c070962 |
22-Jun-2012 |
James Dennett <jdennett@google.com> |
Documentation cleanup: making \param docs match the code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158982 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaLookup.cpp
emaTemplateDeduction.cpp
|
40ae6666dd7a458f2d213370922a38be13f003c4 |
22-Jun-2012 |
James Dennett <jdennett@google.com> |
Diagnostics cleanup: Fixing \params to match the code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158981 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaOverload.cpp
emaTemplateDeduction.cpp
|
efce31f51d6e7e31e125f96c20f6cdab3ead0a47 |
22-Jun-2012 |
James Dennett <jdennett@google.com> |
Documentation cleanup: * Primarily fixed \param commands with names not matching any actual parameters of the documented functions. In many cases this consists just of fixing up the parameter name in the \param to match the code, in some it means deleting obsolete documentation and occasionally it means documenting the parameter that has replaced the older one that was documented, which sometimes means some simple reverse-engineering of the docs from the implementation; * Fixed \param ParamName [out] to the correct format with [out] before the parameter name; * Fixed some \brief summaries. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158980 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExprObjC.cpp
emaOverload.cpp
emaType.cpp
|
306f1791d002e84c0a58de5868d8bca0f48e37e4 |
22-Jun-2012 |
James Dennett <jdennett@google.com> |
Documentation cleanup: turn "//" into "///" for a Doxygen comment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158965 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
4e294eea2c8a8965e24682ed9da8944969830813 |
22-Jun-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Revert r158887. This fixes pr13168. Revert "If an object (such as a std::string) with an appropriate c_str() member function" This reverts commit 7d96f6106bfbd85b1af06f34fdbf2834aad0e47e. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158949 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaOverload.cpp
|
091005954a2e42e6f699dfef25369b3654397536 |
21-Jun-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c: If an ivar is (1) the first ivar in a root class and (2) named `isa`, then it should get the same warnings that id->isa gets. // rdar://11702488 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158938 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprMember.cpp
|
28a5f0cdfcc927a94c1bda6a225200762df22411 |
21-Jun-2012 |
David Blaikie <dblaikie@gmail.com> |
PR13165: False positive when initializing member data pointers with NULL. This now correctly covers, I believe, all the pointer types: * 'any' pointers (both function and data normal pointers and ObjC object pointers) * member pointers (both function and data) * block pointers git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158931 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
81a5641e5f446d0e879595d3659e76845c7a9410 |
21-Jun-2012 |
Jordan Rose <jordan_rose@apple.com> |
Pretend that enum constants have enum type when inferring a block return type. In C, enum constants have the type of the enum's underlying integer type, rather than the type of the enum. (This is not true in C++.) This leads to odd warnings when returning enum constants directly in blocks with inferred return types. The easiest way out of this is to pretend that, like C++, enum constants have enum type when being returned from a block. <rdar://problem/11662489> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158899 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
05233276b5b0d76e9ebd75eaa2709dff9b316590 |
21-Jun-2012 |
Jordan Rose <jordan_rose@apple.com> |
Don't warn for -Wstatic-in-inline if the used function is also inline. Also, don't warn if the used function is __attribute__((const)), in which case it's not supposed to use global variables anyway. The inline-in-inline thing is a heuristic, and one that's possibly incorrect fairly often because the function being inlined could definitely use global variables. However, even some C standard library functions are written using other (trivial) static-inline functions in the headers, and we definitely don't want to be warning on that (or on anything that /uses/ these trivial inline functions). So we're using "inlined" as a marker for "fairly trivial". (Note that __attribute__((pure)) does /not/ guarantee safety like ((const), because ((const)) does not guarantee that global variables are not being used, and the warning is about globals not being shared across TUs.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158898 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b0d8671f95fe08a220118bca29063ba4d11a9dac |
21-Jun-2012 |
Chandler Carruth <chandlerc@gmail.com> |
Remove a goofy CMake hack and use the standard CMake facilities to express library-level dependencies within Clang. This is no more verbose really, and plays nicer with the rest of the CMake facilities. It should also have no change in functionality. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158888 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
|
7d96f6106bfbd85b1af06f34fdbf2834aad0e47e |
21-Jun-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
If an object (such as a std::string) with an appropriate c_str() member function is passed to a variadic function in a position where a format string indicates that c_str()'s return type is desired, provide a note suggesting that the user may have intended to call the c_str() member. Factor the non-POD-vararg checking out of DefaultVariadicArgumentPromotion and move it to SemaChecking in order to facilitate this. Factor the call checking out of function call checking and block call checking, and extend it to cover constructor calls too. Patch by Sam Panzer! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158887 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaOverload.cpp
|
c78ff27813288b30ee566477705353ae660fd577 |
21-Jun-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objc: tweak my last patch to warn if class extension has not overridden the property. // rdar://11656982 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158871 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
cea06d26b8f3a2599bba79f7e072b7550de949a7 |
21-Jun-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c: Normally, a property cannot be both 'readonly' and having a "write" attribute (copy/retain/etc.). But, property declaration in primary class and protcols are tentative as they may be overridden into a 'readwrite' property in class extensions. Postpone diagnosing such warnings until the class implementation is seen. // rdar://11656982 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158869 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
4b554f4756cefdce6e0109e96d2f13d594b30b8c |
20-Jun-2012 |
Nico Weber <nicolasweber@gmx.de> |
Allow unqualified lookup of non-dependent member functions in microsoft mode. Fixes PR12701. The code for this was already in 2 of the 3 branches of a conditional and missing in the 3rd branch, so lift it above the conditional. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158842 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
8e1e0543cc3b63e0bc116bae0d2f1e8fc530b436 |
20-Jun-2012 |
Chad Rosier <mcrosier@apple.com> |
Whitespace. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158837 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
33c0f3703de3ab6d8f3a41d7fb9d2b3489617b21 |
20-Jun-2012 |
Jordan Rose <jordan_rose@apple.com> |
Remove -Winternal-linkage-in-inline in C++. It's very easy for anonymous external linkage to propagate in C++ through return types and parameter types. Likewise, it's possible that a template containing an inline function is only used with parameters that have internal linkage. Actually diagnosing where the internal linkage comes from is fairly difficult (both to locate and then to print nicely). Finally, since we only have one translation unit available, we can't even prove that any of this violates the ODR. This warning needs better-defined behavior in C++ before it can really go in. Rewording of the C warning (which /is/ specified by C99) coming shortly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158836 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
52e4ed949ba52958db1e938860e3b49944ce8680 |
20-Jun-2012 |
Chad Rosier <mcrosier@apple.com> |
[ms-style asm] Change the fatal error to an extension warning. Apparently, this error was asserting on anything that included Windows.h. MS-style inline asm is still dropped, but at least now we're not completely silent about it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158833 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
e95f8ef6563bdf26de5294873733a3425c09db42 |
20-Jun-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objc: improved diagnostic when property autosynthesis may cause change in behavior. // rdar://11671080 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158828 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
f95d4125c01fa7b98722ae8cfbceac4a87d037b4 |
20-Jun-2012 |
Chandler Carruth <chandlerc@gmail.com> |
Fix a big layering violation introduced by r158771. That commit added a new library just to hold the RawCommentList. I've started a discussion on the commit thread about whether that is really meritted -- it certainly doesn't seem necessary at this stage. However, the immediate problem is that the AST library has a hard dependency on the Comment library, but the dependencies were set up completely backward. In addition to the layering violation, this had an unfortunate effect if scattering the Comments library dependency throughout the build system, but inconsistently so -- several parts of the CMake dependencies were missing and only showed up due to transitive deps or the fact that the target wasn't being built by tho bots. It turns out that the Comments library can't (currently) be a well formed layer *below* the AST library either, as it has an API that accepts an ASTContext. That parameter is currently unused, so maybe that was a mistake? Anyways, it really seems like this is logically part of the AST -- that's the whole point of the ASTContext providing access to it as far as I can tell -- so I've merged it into the AST library to solve the immediate layering violation problems and remove some of the churn from our library dependencies. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158807 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
|
260611a32535c851237926bfcf78869b13c07d5b |
20-Jun-2012 |
John McCall <rjmccall@apple.com> |
Restructure how the driver communicates information about the target Objective-C runtime down to the frontend: break this down into a single target runtime kind and version, and compute all the relevant information from that. This makes it relatively painless to add support for new runtimes to the compiler. Make the new -cc1 flag, -fobjc-runtime=blah-x.y.z, available at the driver level as a better and more general alternative to -fgnu-runtime and -fnext-runtime. This new concept of an Objective-C runtime also encompasses what we were previously separating out as the "Objective-C ABI", so fragile vs. non-fragile runtimes are now really modelled as different kinds of runtime, paving the way for better overall differentiation. As a sort of special case, continue to accept the -cc1 flag -fobjc-runtime-has-weak, as a sop to PLCompatibilityWeak. I won't go so far as to say "no functionality change", even ignoring the new driver flag, but subtle changes in driver semantics are almost certainly not intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158793 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprObjC.cpp
emaObjCProperty.cpp
|
e3bbfcae61c861145be62d9739f0ffdd6fabe3f3 |
20-Jun-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Fix cmake build. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158782 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
|
aa0cd85838f2a024e589ea4e8c2094130065af21 |
20-Jun-2012 |
Dmitri Gribenko <gribozavr@gmail.com> |
Structured comment parsing, first step. * Retain comments in the AST * Serialize/deserialize comments * Find comments attached to a certain Decl * Expose raw comment text and SourceRange via libclang git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158771 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaType.cpp
|
ed36b2a80878c29603bdc89a7969253fb6446174 |
20-Jun-2012 |
Nico Weber <nicolasweber@gmx.de> |
Do a second lookup for type_info in the global namespace in microsoft mode. PR13153. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158768 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
8e083e71d48f7f4d6ef40c00531c2e14df745486 |
20-Jun-2012 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Reapply r158700 and fixup patches, minus one hunk that slipped through and caused a crash in an obscure case. On the plus side, it caused me to catch another bug by inspection. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158767 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
emaDeclAttr.cpp
emaStmtAttr.cpp
emaType.cpp
argetAttributesSema.cpp
|
0aa52aa11e04d957f1c93c7d911e4c3dd7d5d54f |
20-Jun-2012 |
DeLesley Hutchins <delesley@google.com> |
Thread Safety Analysis: Move some warnings on thread safety attributes into the ThreadSafetyAttributes group, where the other warnings currently live. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158761 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
5e94d6fa2e1d5ca606e060406adee13b96849f2a |
20-Jun-2012 |
Tanya Lattner <tonic@nondot.org> |
Extend the support for cl-std to include 1.2. Add error checking for the static qualifier which is now allowed in certain situations for OpenCL 1.2. Use the CL version to turn on this feature. Added test case for 1.2 static storage class feature. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158759 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
emaDecl.cpp
|
dd3284b17829adfd542ecf4a7b4423dce1d7502b |
20-Jun-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c: warn when autosynthesizing a property which has same name as an existing ivar since this is common source of error when people remove @synthesize to take advantage of autosynthesis. // rdar://11671080 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158756 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
fc685ace387734599c475426b1a8efdb491054b8 |
20-Jun-2012 |
Aaron Ballman <aaron@aaronballman.com> |
Reapplying the changes from r158717 as they were rolled back to avoid merge conflicts from a separate problematic patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158750 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaTemplateInstantiateDecl.cpp
|
3532936f4f50c15fcec4d00f4cbb81a7a9dd9b7e |
19-Jun-2012 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Revert r158700 and dependent patches r158716, r158717, and r158731. The original r158700 caused crashes in the gcc test suite, g++.abi/vtable3a.C among others. It also caused failures in the libc++ test suite. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158749 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
emaDeclAttr.cpp
emaStmtAttr.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
argetAttributesSema.cpp
|
5d7700ed7645698f3e5bea8f983e61a1ec2f423b |
19-Jun-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix -Wc++11-narrowing warnings for narrowing negative values to larger unsigned types to actually includes the value, rather than saying <uninitialized>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158745 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
b26331b4ff419b22861b0823daf83bc8f22a6803 |
19-Jun-2012 |
David Blaikie <dblaikie@gmail.com> |
Enable -Wnull-conversion for non-integral target types (eg: double). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158744 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
7ba759237afee52f4d53ed1fe07dbfdcfdbabdc6 |
19-Jun-2012 |
James Dennett <jdennett@google.com> |
Documentation cleanup: escape "::", and other minor reformatting git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158741 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
ce0db05bc9cb597462791492ff525042d5e03f5d |
19-Jun-2012 |
Kaelyn Uhrain <rikka@google.com> |
Remove some debugging code that snuck into r158691. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158733 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
ed35fd1c6db1680b4526ba64c94e5da6ec203be7 |
19-Jun-2012 |
Aaron Ballman <aaron@aaronballman.com> |
Improves parsing and semantic analysis for MS __declspec attributes. This includes support for the align (which fixes PR12631). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158717 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaTemplateInstantiateDecl.cpp
|
bfcb037a3479de4a453a8275c64ae441c22d43f9 |
19-Jun-2012 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Improve the specification of spellings in Attr.td. Note that this is mostly a structural patch that handles the change from the old spelling style to the new one. One consequence of this is that all AT_foo_bar enum values have changed to not be based off of the first spelling, but rather off of the class name, so they are now AT_FooBar and the like (a straw poll on IRC showed support for this). Apologies for code churn. Most attributes have GNU spellings as a temporary solution until everything else is sorted out (such as a Keyword spelling, which I intend to add if someone else doesn't beat me to it). This is definitely a WIP. I've also killed BaseCheckAttr since it was unused, and I had to go through every attribute anyway. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158700 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
emaDeclAttr.cpp
emaStmtAttr.cpp
emaType.cpp
argetAttributesSema.cpp
|
0d3317e0a2e0adb57ce8d075ebdcb41a3f939805 |
19-Jun-2012 |
Kaelyn Uhrain <rikka@google.com> |
Improve the error message when a function overload candidate is rejected because it expects a reference and receives a non-l-value. For example, given: int foo(int &); template<int x> void b() { foo(x); } clang will now print "expects an l-value for 1st argument" instead of "no known conversion from 'int' to 'int &' for 1st argument". The change in wording (and associated code to detect the case) was prompted by comment #5 in PR3104, and should be the last bit of work needed for the bug. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158691 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
c4429b9ee5045525f532d00e820a81b7eeac28f8 |
19-Jun-2012 |
Jordan Rose <jordan_rose@apple.com> |
Change -Winternal-linkage-in-inline from ExtWarn to Warning in C++. Per post-commit review, it's not appropriate to use ExtWarn in C++, because we can't prove that the inline function will actually be defined in more than one place (and thus we can't prove that this violates the ODR). This removes the warning entirely from uses in the main source file in C++. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158689 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
0eb3f45a92f706d50de55aefb19d66febfba78aa |
19-Jun-2012 |
Jordan Rose <jordan_rose@apple.com> |
Support -Winternal-linkage-in-inline in C++ code. This includes treating anonymous namespaces like internal linkage, and allowing const variables to be used even if internal. The whole thing's been broken out into a separate function to avoid nested ifs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158683 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
11b46a0a49075f338eb4849c2b7d680945be9250 |
18-Jun-2012 |
Jordan Rose <jordan_rose@apple.com> |
Allow internal decls in inline functions if the function is in the main file. This handles the very common case of people writing inline functions in their main source files and not tagging them as inline. These cases should still behave as the user intended. (The diagnostic is still emitted as an extension.) I'm reworking this code anyway to account for C++'s equivalent restriction in [basic.def.odr]p6, but this should get some bots back to green. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158666 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
174930db339bb7213353db9e7b5aa94ecf4c12ea |
18-Jun-2012 |
Nuno Lopes <nunoplopes@sapo.pt> |
fix PR13071 / rdar://problem/11634669 : crash on invalid function decl with alloc_size attribute git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158663 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
96c67d1c2aff532729c9edb297617094d1e77cc1 |
18-Jun-2012 |
Nuno Lopes <nunoplopes@sapo.pt> |
alloc_size attribute: there's nothing wrong with alloc_size(1,1). It just means the function allocates x^2 bytes. GCC also accepts this syntax git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158662 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
93f95f2a2cbb6bb3d17bfb5fc74ce1cccea751b6 |
18-Jun-2012 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Handle C++11 attribute namespaces automatically. Now, as long as the 'Namespaces' variable is correct inside Attr.td, the generated code will correctly admit a C++11 attribute only when it has the appropriate namespace(s). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158661 91177308-0d34-0410-b5e6-96231b3b80d8
ttributeList.cpp
emaStmtAttr.cpp
emaType.cpp
|
adc6cbf5b502f1b58078455ab4fca66c7daac239 |
18-Jun-2012 |
Michael J. Spencer <bigcheesegs@gmail.com> |
[MSExtensions] Add support for __forceinline. __forceinline is a combination of the inline keyword and __attribute__((always_inline)) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158653 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
7e58ad5a6756f31b48a0d54d5f5c367328150a46 |
18-Jun-2012 |
Joerg Sonnenberger <joerg@bec.de> |
Don't warn about address-to-member used as part of initialisation, if the member expression is in parentheses. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158651 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
de23c7e9069b2ea2cd2633efd9566546e2c68926 |
17-Jun-2012 |
James Dennett <jdennett@google.com> |
Documentation cleanup: fix two typos, rief -> brief and Descripts -> Describes git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158630 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
f198d126ecec1e07a474c419de1bf4dadf92a490 |
17-Jun-2012 |
James Dennett <jdennett@google.com> |
Documentation cleanup: fixing a typo from my previous 'fix'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158617 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
c5613b26a24a33d7450e3d0bf315c6ccc920ce7b |
16-Jun-2012 |
Meador Inge <meadori@codesourcery.com> |
Explicitly build __builtin_va_list. The target specific __builtin_va_list types are now explicitly built instead of injecting strings into the preprocessor input. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158592 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDecl.cpp
|
860a319e62b0e256817a458396d191aa91c0787a |
16-Jun-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Fix Sema and IRGen for atomic compound assignment so it has the right semantics when promotions are involved. (As far as I can tell, this only affects some edge cases.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158591 91177308-0d34-0410-b5e6-96231b3b80d8
emaCast.cpp
emaChecking.cpp
emaExpr.cpp
|
a0cff720d40f239fee0e5ecc8378122b456c1991 |
16-Jun-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[AST/libclang] Fix the selector locations that are reported for a method definition that has its '{' attached to the method name without a space. With a method like: -(id)meth{ ..... } the logic in ObjCMethodDecl that determined the selector locations got confused because it was initialized based on an end location for '{' but that end location changed to '}' after the method was finished. Fix this by having an immutable end location for the declarator and for getLocEnd() get the end location from the body itself. Fixes rdar://11659739. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158583 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
50dc12ad05d4a3a57e83852756498afce4307a77 |
16-Jun-2012 |
Kaelyn Uhrain <rikka@google.com> |
Recover when correcting an unknown type name to a keyword like "struct". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158573 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
7bf33401acf506b0039222834d7259acb80f6311 |
16-Jun-2012 |
Kaelyn Uhrain <rikka@google.com> |
Move isCXXSimpleTypeSpecifier from Parser to Sema and tweak it for wider use. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158572 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
ef2b5b327b524f9ea3243c07e04fb24706e63120 |
16-Jun-2012 |
James Dennett <jdennett@google.com> |
Documentation cleanup: * Escaped "::" and "<" as needed in Doxygen comments; * Marked up code examples with \code...\endcode; * Documented a \param that is current, instead of a few that aren't; * Fixed up some \file and \brief comments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158562 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExprCXX.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
c2f51cfefd77e9b25f201ecf879343d6d9a45158 |
15-Jun-2012 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Stop referring to functions as methods in per-function fallthrough-checking. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158545 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
1f6e22d14419db7162202854190f690f393daf2d |
15-Jun-2012 |
Jordan Rose <jordan_rose@apple.com> |
[completion] Add completions for @"..." and @(...), and tidy up @[] and @{}. Specifically, @[] and @{} didn't have a type associated with them; we now use "NSArray *" and "NSDictionary *", respectively. @"" has the type "NSString *". @(), unfortunately, has type "id", since it (currently) may be either an NSNumber or an NSString. Add a test for all the Objective-C at-expression completions. <rdar://problem/11507708&11507668&11507711> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158533 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
106af9e86adbbb3a05f2c339d509fcd3b4274504 |
15-Jun-2012 |
Jordan Rose <jordan_rose@apple.com> |
Warn when a static variable is referenced in a non-static inline function. This is explicitly forbidden in C99 6.7.4p3. This is /not/ forbidden in C++, probably because by default file-scope const/constexpr variables have internal linkage, while functions have external linkage. There's also the issue of anonymous namespaces to consider. Nevertheless, there should probably be a similar warning, since the semantics of inlining a function that references a variable with internal linkage do not seem well-defined. <rdar://problem/11577619> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158531 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
03f1eb031b84e93415b792c4b45d8da71c88e92d |
15-Jun-2012 |
Douglas Gregor <dgregor@apple.com> |
Check the parameter lists and return type of both blocks and lambdas for unexpanded parameter packs. Fixes the crash-on-invalid in PR13117. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158525 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaLambda.cpp
|
699c9044c7d53a2774d0dd261a6901dd2c4a545f |
15-Jun-2012 |
James Dennett <jdennett@google.com> |
Documentation cleanup: * Removed \param comments for parameters that no longer exist; * Fixed a "\para" typo to "\param"; * Escaped @, # and \ symbols as needed in Doxygen comments; * Added use of \brief to output short summaries. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158498 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprMember.cpp
emaObjCProperty.cpp
emaOverload.cpp
emaTemplate.cpp
emaType.cpp
reeTransform.h
|
0557d08ce20c3568b1d8bda298fa47b5488f0d26 |
15-Jun-2012 |
Stephen Hines <srhines@google.com> |
Add support for LangOptions.Renderscript + "kernel" attribute. Change-Id: I75596363b8519ad0a1372a316826050c6be4e922
emaDeclAttr.cpp
|
e099125e58bd9a4c5c9ad486fa86683d1745fbb7 |
15-Jun-2012 |
Richard Trieu <rtrieu@google.com> |
Fix T* p to T *p git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158478 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
de5e75caac71d4cfeb9d04cd10281176f43579d6 |
15-Jun-2012 |
Richard Trieu <rtrieu@google.com> |
Use a proper visitor to recursively check for uninitialized use in constructors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158477 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
1dfbd92c83699820bfaa352e83083124e34fc9dc |
14-Jun-2012 |
James Dennett <jdennett@google.com> |
Still more Doxygen documentation fixes: * Escape #, < and @ symbols where Doxygen would try to interpret them; * Fix several function param documentation where names had got out of sync; * Delete param documentation referring to parameters that no longer exist. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158472 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
emaDeclAttr.cpp
emaDeclObjC.cpp
emaInit.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
|
0e9e9f8d17e38b3c44f6e1323be3a812a793bdd1 |
14-Jun-2012 |
Daniel Jasper <djasper@google.com> |
Look at incomplete FunctionTemplateDecls in order to determine whether a CXXRecordDecl is complete. Fixes Bug 13086. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158469 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
a40f792c685c3ad94fc5a0ef538d0661374c7825 |
14-Jun-2012 |
James Dennett <jdennett@google.com> |
This makes SemaCodeComplete.cpp more Doxygen-friendly by changing the OBJC_AT_KEYWORD_NAME take a string literal argument where previously its second argument was an unquoted token; macro invocations such as OBJC_AT_KEYWORD_NAME(NeedAt,{) confuse Doxygen's parser. While I'm wary of changing code (rather than just comments) to work around Doxygen's limitations, in this case the change makes the code more readable for human beings as well, and the macro derived no benefit from using the preprocessor's stringification operator, as it never has need of the unquoted token. I've also included a couple of trivial drive-by fixes to doc comments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158440 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
568eae48a4e19c0359cdcd2a33b8ec9812e4abbc |
13-Jun-2012 |
Daniel Jasper <djasper@google.com> |
Allow __attribute__((unused)) for fields and make it silence -Wunused-private-field. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158411 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaDeclCXX.cpp
|
df9ef1bc8c3780307ab2ed81bf5e31c23310b936 |
13-Jun-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR13099: Teach -Wformat about raw string literals, UTF-8 strings and Unicode escape sequences. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158390 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
cd65f4903dc737d92655a0cf72755c16831ae668 |
13-Jun-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Add missing narrowing check: converting from a signed integral type to a wider unsigned type is narrowing if the source is non-constant or negative. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158377 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
b92a4089db33ae9d44e015cf2dfd1e82fea88747 |
12-Jun-2012 |
Douglas Gregor <dgregor@apple.com> |
When code completion walks the members of a protocol or interface, make sure that we walk the definition. Fixes <rdar://problem/11427742>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158357 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
54655be65585ed6618fdd7a19fa6c70efc321d3a |
12-Jun-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
If parsing a trailing-return-type fails, don't pretend we didn't have one at all. Suppresses follow-on errors mentioned in PR13074. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158348 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
emaDecl.cpp
emaType.cpp
|
8cd64b4c5553fa6284d248336cb7c82dc960a394 |
11-Jun-2012 |
Chad Rosier <mcrosier@apple.com> |
Etch out the code path for MS-style inline assembly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158325 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
emaStmt.cpp
reeTransform.h
|
3c2fcf8705023e1d91d1c85dc7c8a4aa2248050b |
10-Jun-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR12964: __int128 and unsigned __int128 are promoted integral types, be sure to consider them when enumerating builtin operator candidates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158293 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
d3861ce75a308c65b58c0159e2cee58aea2dff1c |
10-Jun-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Remove CXXRecordDecl flags which are unused after r158289. We need an efficient mechanism to determine whether a defaulted default constructor is constexpr, in order to determine whether a class is a literal type, so keep the incrementally-built form on CXXRecordDecl. Remove the on-demand computation of same, so that we only have one method for determining whether a default constructor is constexpr. This doesn't affect correctness, since default constructor lookup is much simpler than selecting a constructor for copying or moving. We don't need a corresponding mechanism for defaulted copy or move constructors, since they can't affect whether a type is a literal type. Conversely, checking whether such functions are constexpr can require non-trivial effort, so we defer such checks until the copy or move constructor is required. Thus we now only compute whether a copy or move constructor is constexpr on demand, and only compute whether a default constructor is constexpr in advance. This is unfortunate, but seems like the best solution. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158290 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
7756afa6273cf708b5e3fbd6a6478eb2cada27e2 |
10-Jun-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix PR13052 properly, by performing special member lookup to determine whether an explicitly-defaulted default constructor would be constexpr. This is necessary in weird (but well-formed) cases where a class has more than one copy or move constructor. Cleanup of now-unused parts of CXXRecordDecl to follow. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158289 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
ca5233044ef679840d1ad1c46a36b16e2ee8a6e1 |
10-Jun-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR13064: Store whether an in-class initializer uses direct or copy initialization, and use that information to produce the right kind of initialization during template instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158288 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
49fdccb4595862828aa5cadc1497d466a8031dda |
09-Jun-2012 |
Dmitri Gribenko <gribozavr@gmail.com> |
Convert comments to proper Doxygen comments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158241 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
0abbdfe561377b7af8eba6fc87757a46342f7a10 |
09-Jun-2012 |
Jordan Rose <jordan_rose@apple.com> |
Warn in ObjC++ when an 'auto' variable deduces type 'id'. This could happen for cases like this: - (NSArray *)getAllNames:(NSArray *)images { NSMutableArray *results = [NSMutableArray array]; for (auto img in images) { [results addObject:img.name]; } return results; } Here the property access will fail because 'img' has type 'id', rather than, say, NSImage. This warning will not fire in templated code, since the 'id' could have come from a template parameter. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158239 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
0f4b5be4a3b3e1c18e611e5a5c262ef028e8320a |
08-Jun-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR13051: Only suggest the 'template' and 'operator' keywords when performing typo-correction after a scope specifier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158231 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
9f63a451b1b3e36c0c82fcfe78828182bb9a6fa0 |
08-Jun-2012 |
Jordan Rose <jordan_rose@apple.com> |
Disallow using ObjC literals in direct comparisons (== and friends). Objective-C literals conceptually always create new objects, but may be optimized by the compiler or runtime (constant folding, singletons, etc). Comparing addresses of these objects is relying on this optimization behavior, which is really an implementation detail. In the case of == and !=, offer a fixit to a call to -isEqual:, if the method is available. This fixit is directly on the error so that it is automatically applied. Most of the time, this is really a newbie mistake, hence the fixit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158230 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
a248e9c1dd56af68aba419e9717d369c5e61210a |
08-Jun-2012 |
Richard Trieu <rtrieu@google.com> |
Remove a commented out variable declaration. This was originally a debugging variable which wasn't removed when the original patch was committed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158225 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
390fff8e8b480fa146ffc14cbc63a1c2f9e2d206 |
08-Jun-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[libclang/AST] AST: For auto-synthesized ivars give them the location of the related property (previously they had no source location). This allows them to be indexed by libclang. libclang: Make sure synthesized ivars are indexed before the methods that may reference them. Fixes rdar://11607001. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158189 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
f4fe843aac730e2202b3c9c6c52649ee186ba788 |
08-Jun-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Allow friend declarations of defaulted special member functions. Only definitions of such members are prohibited, not mere declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158186 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
8c14de83188640bab9cae658e92a655e6d4fd484 |
08-Jun-2012 |
Kaelyn Uhrain <rikka@google.com> |
Fix up the 'typename' suggestion logic introduced in r157085, based on feedback from Doug Gregor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158185 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
b7fe579968a2fad25d95514f96c6649aae519c81 |
08-Jun-2012 |
Kaelyn Uhrain <rikka@google.com> |
Teach the FixIt in DiagnoseInvalidRedeclaration how to replace the written nested name specifiers in addition to the function's identifier when the correction has a different nested name specifier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158178 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
ef094a1ab79c57269b627cb19748384d9a26fb31 |
08-Jun-2012 |
Kaelyn Uhrain <rikka@google.com> |
Ignore corrections to functions with bodies when deciding which correction to use for an invalid function redeclaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158177 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
855243789cb44799c03f4c7216d3d6308805f549 |
07-Jun-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Plug a long standing memory leak in TemplateArgument. The integral APSInt value is now stored in a decomposed form and the backing store for large values is allocated via the ASTContext. This way its not leaked as TemplateArguments are never destructed when they are allocated in the ASTContext. Since the integral data is immutable it is now shared between instances, making copying TemplateArguments a trivial operation. Currently getting the integral data out of a TemplateArgument requires creating a new APSInt object. This is cheap when the value is small but can be expensive if it's not. If this turns out to be an issue a more efficient accessor could be added. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158150 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
|
826eac59e4b107973ed1c5a761ad8785aa1bcde4 |
07-Jun-2012 |
Jordan Rose <jordan_rose@apple.com> |
Attach fixits for CFBridgingRetain/Release outside any casts. Before, the note showed the location where you could insert __bridge variants, but the actual fixit edit came after the cast. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158131 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
d880b3aa6d594d1a7f2d307c29378c6f59b216ff |
07-Jun-2012 |
Jordan Rose <jordan_rose@apple.com> |
Insert a space if necessary when suggesting CFBridgingRetain/Release. This was a problem for people who write 'return(result);' Also fix ARCMT's corresponding code, though there's no test case for this because implicit casts like this are rejected by the migrator for being ambiguous, and explicit casts have no problem. <rdar://problem/11577346> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158130 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
8d3607bf22a6a70acce3722a758f02d4ea84fc3a |
06-Jun-2012 |
Kaelyn Uhrain <rikka@google.com> |
Allow CorrectTypo to add/modify nested name qualifiers to typos that are otherwise too short to try to correct. The TODOs added to two of the tests are for existing deficiencies in the typo correction code that could be exposed by using longer identifiers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158109 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
581deb3da481053c4993c7600f97acf7768caac5 |
06-Jun-2012 |
David Blaikie <dblaikie@gmail.com> |
Revert Decl's iterators back to pointer value_type rather than reference value_type In addition, I've made the pointer and reference typedef 'void' rather than T* just so they can't get misused. I would've omitted them entirely but std::distance likes them to be there even if it doesn't use them. This rolls back r155808 and r155869. Review by Doug Gregor incorporating feedback from Chandler Carruth. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158104 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaInit.cpp
emaLambda.cpp
emaLookup.cpp
emaObjCProperty.cpp
emaStmt.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
|
facde171ae4b8926622a1bffa833732a06f1875b |
06-Jun-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Remove unused private member variables found by clang's new -Wunused-private-field. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158086 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
f8cc02e50553b5c3bc6570bff0c47ac7db85fe8d |
06-Jun-2012 |
Daniel Jasper <djasper@google.com> |
Introduce -Wunused-private-field. If enabled, this warning detects unused private fields of classes that are fully defined in the current translation unit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158054 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDeclCXX.cpp
emaExprMember.cpp
|
1ea6744b3da4b052acb7ed67e717cd70df5b5977 |
05-Jun-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c: merge deprecated/unavailable attributes to the overriding deprecated/unavailable method. // rdar://11475360 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158022 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
50687314f87b67073c202fe46d84d12fb55e25cf |
05-Jun-2012 |
Jordan Rose <jordan_rose@apple.com> |
Teach format string checking about compile-time CFString constants. Within the guts of CheckFormatHandler, the IsObjCLiteral flag was being used in two ways: to see if null bytes were allowed, and to see if the '%@' specifier is allowed.* The former usage has been changed to an explicit test and the latter pushed down to CheckPrintfHandler and renamed ObjCContext, since it applies to CFStrings as well. * This also changes how wide chars are interpreted; in OS X Foundation, the wide character type is 'unichar', a typedef for short, rather than wchar_t. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157968 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
ee0259d308e72141982a85b40863e760a8447edf |
05-Jun-2012 |
Jordan Rose <jordan_rose@apple.com> |
Teach printf/scanf about enums with fixed underlying types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157961 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
36d02af300a207242f0486b4255420d8be796b21 |
05-Jun-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Add a warning for when an array-to-pointer decay is performed on an array temporary or an array subobject of a class temporary, and the resulting value is used to initialize a pointer which outlives the temporary. Such a pointer is always left dangling after the initialization completes and the array's lifetime ends. In order to detect this situation, this change also adds an LValueClassification of LV_ArrayTemporary for temporaries of array type which aren't subobjects of class temporaries. These occur in C++11 T{...} and GNU C++ (T){...} expressions, when T is an array type. Previously we treated the former as a generic prvalue and the latter as a class temporary. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157955 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaInit.cpp
|
31170398278ff9ef08f6b6427ee596e2ca82a790 |
04-Jun-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c: Handle more warning cases for when message receiver is 'weak' property. // rdar://10225276 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157946 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
44f5b1d95a3e4edf12c9b395d9f47767e75037b6 |
04-Jun-2012 |
Aaron Ballman <aaron@aaronballman.com> |
Removing the lambda extension warning concerning single return statements, as it no longer applies. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157943 91177308-0d34-0410-b5e6-96231b3b80d8
emaLambda.cpp
|
b1c6f5fa23015fb5ee063fa5eb9717ea5d78cf12 |
04-Jun-2012 |
Douglas Gregor <dgregor@apple.com> |
When adding built-in operator candidates for overload resolution involving 'restrict', place restrict on the pointer type rather than on the pointee type. Also make sure that we gather restrict from the pointer type. Fixes PR12854 and the major part of PR11093. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157910 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
40e29999daa20646decd3fe4aeb88a487874049c |
03-Jun-2012 |
Nico Weber <nicolasweber@gmx.de> |
Improve fixit for comparison operator on lhs of bitwise operator. Before: test.cc:2:18: note: place parentheses around the == expression to silence this warning if (0 == flags & 0xdd) ^ ( ) Now: test.cc:2:18: note: place parentheses around the == expression to silence this warning if (0 == flags & 0xdd) ^ ( ) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157897 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
48d798ce32447607144db70a484cdb99c1180663 |
02-Jun-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Fix typos found by http://github.com/lyda/misspell-check git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157886 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaLookup.cpp
emaType.cpp
|
1973634e445d4f1abdeedc2809f2d281929253b6 |
02-Jun-2012 |
Alexander Kornienko <alexfh@google.com> |
Implementation of a "soft opt-in" option for -Wimplicit-fallthrough diagnostics: -Wimplicit-fallthrough-per-method git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157871 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
784ae8e5c6b557e2395991c6008293660f5afe66 |
01-Jun-2012 |
Kaelyn Uhrain <rikka@google.com> |
Don't allow multiple correction candidates that have the same identifier but different nested name specifiers to quietly clobber each other so only one remains if they do not refer to the same NamedDecl. Fixes PR12951. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157823 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
684190b8dbe5258f4708ffbd816b8c5ee5b3502d |
01-Jun-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[arcmt] Use CFBridgingRetain/CFBridgingRelease instead of __bridge_retained/__bridge_transfer when migrating. rdar://11569198 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157785 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
1dfc4ba88714d8ac9a85dba051cf94e57f7b3e04 |
01-Jun-2012 |
Aaron Ballman <aaron@aaronballman.com> |
Anonymous union members within a struct are now properly handled as an unevaluated field in C++11 mode. This fixes PR12866. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157784 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprMember.cpp
|
396e0a8cfa3fbdd5fde83a19cc87b7af62cc1ddd |
01-Jun-2012 |
Kaelyn Uhrain <rikka@google.com> |
In TypoCorrectionConsumer, BestResults to CorrectionResults to lessen the confusion among all of the uses of Best* in relation to the set of possible typo correction results. Also add a method to return the set of typo corrections that have the single best edit distance--it returns the second half of the first pair in TypoEditDistanceMap (with getBestEditDistance already returning the first half). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157781 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
3427682d365174f5d69d55e2c6deef49ace0668b |
01-Jun-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objc: properties of NSObject attribute must have correct pointer type or issue error, instead of crashing in IRGen. // rdar:// 11569860 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157780 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
90c78328e70cb376754edf87708505a84c044271 |
31-May-2012 |
Anna Zaks <ganna@apple.com> |
Change wording of 'memcpy' type mismatch warning and remove fixit. As per comments following r157659. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157722 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
abe21e36d789cfe800562a1e889738addfd2ac5b |
30-May-2012 |
David Blaikie <dblaikie@gmail.com> |
Disable -Wunique-enum for anonymous enums. This is a large class of false positives where anonymous enums are used to declare constants (see Clang's Diagnostics.h for example). A small number of true positives could probably be found in this bucket by still warning if the anonymous enum is used in a declarator (enum { ... } x;) but so far we don't believe this to be a source of significant benefit so I haven't bothered to preserve those cases. General offline review/acknowledgment by rtrieu. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157713 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
59a9881ab252c80735d6440bd9ca0fbac252e6a8 |
30-May-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c: revert r157407. It broke a project and reported as PR12959. // rdar://11499742 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157697 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
a27cb253877ac2aa971b2be0623845cf45ebb286 |
30-May-2012 |
Eric Christopher <echristo@apple.com> |
Remove some extra braces. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157667 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
7af7de7d6b121132dfe8c3b9b5febe2b37aafd62 |
30-May-2012 |
Richard Trieu <rtrieu@google.com> |
Add new -Wunique-enum which will warn on enums which all elements have the same value and were initialized with literals. Clang will warn on code like this: enum A { FIRST = 1, SECOND = 1 }; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157666 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
6fcb3727e31280ba816dc86d024586b8c5933c13 |
30-May-2012 |
Anna Zaks <ganna@apple.com> |
Add fixits for memory access warnings. Also, do not display the builtin name and macro expansion when the function is a builtin. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157659 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
490a52b4947381879a47b4251db5fb81cdf5d02b |
29-May-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c: fix a sema and IRGen crash when property getter result type is safe but does not match with property type resulting in spurious warning followed by crash in IRGen. // rdar://11515196 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157641 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
4872e1014844632083690cc1d021b95218a5023b |
28-May-2012 |
David Blaikie <dblaikie@gmail.com> |
Fix PR12960 by not attempting to correct cases when we're not actually instantiatiating a template. This comes up in the begin/end calls of a range-for (see the included test case). Other suggestions are welcome, though this seems to do the trick without regressing anything. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157553 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
350e956532d99ce2e804a478df5b6f1f5e096d88 |
27-May-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
-Wdeprecated warning to include reference (as a note) to the declaration in this patch. // rdar://10893232 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157537 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
811bfcd823d51db6a06b3fd5a5943ff910b79d68 |
27-May-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Use the SelectorSet typedef more widely throughout Sema. While there make it a SmallPtrSet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157532 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
emaObjCProperty.cpp
|
cba0ebce65667f76e291346d377f402579743cea |
26-May-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
Change warning to error when property setter names conflict. // rdar://11528439 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157517 91177308-0d34-0410-b5e6-96231b3b80d8
emaPseudoObject.cpp
|
bdb97ff687ce85e45cc728b87612ed546f48c1e7 |
26-May-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
In response to some discussions on IRC, tweak the wording of the new -Wsometimes-uninitialized diagnostics to make it clearer that the cause of the issue may be a condition which must always evaluate to true or false, rather than an uninitialized variable. To emphasize this, add a new note with a fixit which removes the impossible condition or replaces it with a constant. Also, downgrade the diagnostic from -Wsometimes-uninitialized to -Wconditional-uninitialized when it applies to a range-based for loop, since the condition is not written explicitly in the code in that case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157511 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
7f7c42b12ecb1560055a2c087d9ca5187ad357c3 |
26-May-2012 |
David Blaikie <dblaikie@gmail.com> |
Fix indentation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157510 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
a189d8976f1193b788508a1a29b2e9d0aca06aca |
26-May-2012 |
Alexander Kornienko <alexfh@gmail.com> |
Don't offer '[[clang::fallthrough]];' fix-it when a fall-through occurs to a switch label immediately followed by a 'break;'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157508 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
2815e1a075c74143a0b60a632090ece1dffa5c7c |
25-May-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Split a chunk of -Wconditional-uninitialized warnings out into a separate flag, -Wsometimes-uninitialized. This detects cases where an explicitly-written branch inevitably leads to an uninitialized variable use (so either the branch is dead code or there is an uninitialized use bug). This chunk of warnings tentatively lives within -Wuninitialized, in order to give it more visibility to existing Clang users. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157458 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
818918855d84e3db1af5a0807070d4995ca2cf75 |
25-May-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Some cleanups around the uninitialized variables warning, and a FIXME. No functional change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157440 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
b5b155cb8bd2460693572bab5ce14dabf1a27d2f |
25-May-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c: warn on use of property setters backing two propeties because proprty names match except for first letter being of different case. // rdar://11528439, [PR12936]. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157435 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
emaPseudoObject.cpp
|
0218068cbbb2e98164431653d76587e5b8bb9c38 |
25-May-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Get rid of some non-ASCII en-dashes that crept in. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157434 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
e26073c85259be1c2f397797cc59286ac85fb3b8 |
25-May-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Implement the C++11 discarded value expression rules for volatile lvalues. <rdar://problem/10790820>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157420 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
d5f1bd247630a19d2882fe9cf5777bd0da5edb67 |
24-May-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c: Fixes a corner case and interesting bug. Where diagnostic about unfound property is not issued in the context where a setter is looked up in situation in which name and property name differ in their first letter case. // rdar://11363363 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157407 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
8ab10aa6bef39dffde2207dd2257c521bb2e731f |
24-May-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
DR1152 / PR12931 / PR6177: A candidate function which requires binding a const volatile reference to a temporary is not viable. My interpretation is that DR1152 was a bugfix, not a rule change for C++11, so this is not conditional on the language mode. This matches g++'s behavior. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157370 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
a6115068cde719142eb394db88612c185cabd05b |
24-May-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Add a warning to diagnose statements in C++ like "*(volatile int*)x;". Conceptually, this is part of -Wunused-value, but I added a separate flag -Wunused-volatile-lvalue so it doesn't get turned off by accident with -Wno-unused-value. I also made a few minor improvements to existing unused value warnings in the process. <rdar://problem/11516811>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157362 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaStmt.cpp
|
587de5be6bc8b9d046015b20079d45ac4b98bc14 |
24-May-2012 |
Nuno Lopes <nunoplopes@sapo.pt> |
implement Sema support for the alloc_size attribute Portions of this patch by Xi Wang. Reviewed by Jordy Rose. Thank you both. Codegen support will follow soon. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157360 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
703b6015176550eefc91f3e2f19cd19beacbc592 |
23-May-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Correct the starting location for instantiations of field declarations which start with a cv-qualifier. DeclaratorDecl::getTypeSpecStartLoc() does not produce the location of the first type-specifier (the cv-qualifier) in this case, because we don't track source locations for cv-qualifiers. No test here: I've not found a way to test this with a lit-style test, and introducing a gtest test for this seems unwarranted. Suggestions welcome! Patch by Daniel Jasper! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157311 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
c052dbb2d8fe0e23e90d81236aab0f864f712b45 |
22-May-2012 |
John McCall <rjmccall@apple.com> |
Recognize the MS inheritance attributes and turn them into attributes on the RecordDecl. Persist the MS portability type attributes and ignore them in Sema rather than the parser. Patch by João Matos! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157288 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaType.cpp
|
5bf0e3522fac400cf7bf49a775554f0fc942b336 |
21-May-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
Remove unused argument in my last patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157194 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
edcc27f6171fd8cc736d057d87b128252fcb7344 |
21-May-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c: When default synthesizing readonly IBOutlet properties provide a 'fixit' to change 'readonly' to 'readwrite'. // rdar://11448209 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157193 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
e5f8372b5dccf5894f0263d018599c14d8f31273 |
20-May-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Bitpack CodeCompletionResults. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157158 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
|
11d1a697dcf677c42394dfa9506ace4935f3b00d |
20-May-2012 |
Nico Weber <nicolasweber@gmx.de> |
Error when using typeid() with -fno-rtti. PR 12888. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157139 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
d21016f0b6d9dfcce9cd9f2d1451286e75d9de48 |
20-May-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Make delegating initializers use a similar codepath to base initializers in dependent contexts. PR12890. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157136 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
2b309fb125906b1fb10efb1890860cd042fbfab3 |
19-May-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c: Warn if default synthesizing readonly IBOutlet properties and provide a 'fixit' to change 'readonly' to 'readwrite'. 'fixit' part needs little more work. // rdar://11448209 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157121 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
c1aa40cdc8f42c3a5505ebb54aa54f3e5086b7ef |
19-May-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Apparently empty names are allowed here. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157117 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExprObjC.cpp
|
c470442fe144b93c2877134559d0067b3215289d |
19-May-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Simplify some users of DeclarationName::getNameKind. Fold getFETokenInfoAsVoid into its only caller. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157116 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExprObjC.cpp
|
e2010ee042f3a370b15fda7872b86c914ffad4d2 |
19-May-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Inline a trivial clear() method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157114 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
|
ab7ad72f432810011041c5628b377f77cb1c81e6 |
19-May-2012 |
Kaelyn Uhrain <rikka@google.com> |
Suggest adding 'typename' when it would make the compiler accept the template argument expression as a type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157085 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
3f664061e58aabd01996f01b96eb9f5c9e45c3e2 |
18-May-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Centralize the handling of the "attribute declaration must precede definition" warning. This also makes us warn on tags, which, ironically, is the only case gcc warns on. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157039 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
0a4a23a6afd6db4bdcedd4e9f39d8baf4a446f15 |
18-May-2012 |
Douglas Gregor <dgregor@apple.com> |
A selector match between two Objective-C methods does *not* guarantee that the methods have the same number of parameters, although we certainly assumed this in many places. Objective-C can be insane sometimes. Fixes <rdar://problem/11460990>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157025 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclObjC.cpp
|
dd87224ad67b79e9c48dd4a06779b353aa633cbb |
18-May-2012 |
Douglas Gregor <dgregor@apple.com> |
In the override search for Objective-C methods, protect against ASTs that have NULL interfaces behind a category, which can happen in invalid code. Fixes <rdar://problem/11478173>, a recent regression git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157021 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
268efba18e171d47e847ccdf313498905c32acfa |
17-May-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
CXXThisScopeRAII objects aren't free, don't compute one if it's unused. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156987 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
abf145ab57fc56bfb9c48333fcc65b49a564dc60 |
17-May-2012 |
Matt Beaumont-Gay <matthewbg@google.com> |
Use the argument location instead of the format string location when warning about argument type mismatch. This gives a nicer diagnostic in cases like printf(fmt, i); where previously the snippet just pointed at 'fmt' (with a note at the definition of fmt). It's a wash for cases like printf("%f", i); where previously we snippeted the offending portion of the format string, but didn't indicate which argument was at fault. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156968 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
d57f52ca4d0e9d5d42dd6947d1e66d693625cf2c |
16-May-2012 |
Douglas Gregor <dgregor@apple.com> |
Clean up r156925, so that we only mark the capturing DeclRefExpr of a lambda as referring to a local in an enclosing scope if we're in the enclosing scope of the lambda (not it's function call operator). Also, turn the test into an IR generation test, since that's where the crashes occurred. Really fixes PR12746 / <rdar://problem/11465120>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156926 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
29a93f810ae5277446f610e8b6cdf0985febb989 |
16-May-2012 |
Douglas Gregor <dgregor@apple.com> |
Fix code generation of variables reference expressions when mixing blocks and lambdas, based heavily on a patch from Meador Inge. Fixes PR12746 / <rdar://problem/11465120>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156925 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
50de5e3247a20e0e548dc47022a011250e6e4e8f |
16-May-2012 |
Douglas Gregor <dgregor@apple.com> |
Use a llvm::SmallString rather than std::string for duplicate-case errors git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156922 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
c51bb99ef9daa17084dea688400b40322289aefe |
16-May-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
StringSwitchify. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156916 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
bc3260d20bd075566fa87a4182e0760126f79c1e |
16-May-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Factor sema for attributes unavailable and deprecated into a common function. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156914 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
3940ce83438e2332ba541f4e65e700fbefe0c7a8 |
16-May-2012 |
Douglas Gregor <dgregor@apple.com> |
Produce more useful 'duplicate case' diagnostics. Fixes PR9243, from Terry Long! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156904 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
def07624ecc535431e0c814b4b5b842de8a06997 |
16-May-2012 |
David Blaikie <dblaikie@gmail.com> |
Include the correct conversion context locations for condition expressions. This improves the conversion diagnostics (by correctly pointing to the loop construct for conversions that may've been caused by the contextual conversion to bool caused by a condition expression) and also causes the NULL conversion warnings to be correctly suppressed when crossing a macro boundary in such a context. (previously, since the conversion context location was incorrect, the suppression could not be performed) Reported by Nico Weber as feedback to r156826. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156901 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
7d24e289bea2accaaed79c6ca3e5cdd0c204ddc1 |
16-May-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[libclang/AST] Index references of protocols in "@protocol(...)" syntax. To do that, keep track of the location of the protocol id in the ObjCProtocolExpr AST node. rdar://11190837 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156890 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
9abf88c9286d7465ce18285f87bb302f588b59fc |
16-May-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c: perform strict type checking on property type and its accessor type and issue error if types are incompatible, instead of crashing in IRgen. // rdar://1105153 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156871 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
9fb1ac520d1806ba2b069f6087f40fc9c704b067 |
15-May-2012 |
David Blaikie <dblaikie@gmail.com> |
Don't warn when NULL is used within a macro but its conversion is outside a macro. This fixes the included test case & was reported by Nico Weber. It's a little bit nasty using the difference in the conversion context, but seems to me like a not unreasonable solution. I did have to fix up the conversion context for conditional operators (it seems correct to me to include the context for which we're actually doing the comparison - across all the nested conditionals, rather than the innermost conditional which might not actually have the problematic implicit conversion at all) and template default arguments (this is a bit of a hack, since we don't have the source location of the '=' anymore, so I just used the start of the parameter - open to suggestions there) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156861 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExpr.cpp
|
f5343ff93a9549c49469dee366733e1e31ab836e |
15-May-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Allow objc @() syntax for enum types. Previously we would reject it as illegal using a value of enum type and on ObjC++ it was illegal to use an enumerator as well. rdar://11454917 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156843 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
744147138cd2a77320c431578da130cc3d81a1d5 |
15-May-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objc: avoid duplicate diagnostics on certain type mismatches between property and its backing ivar. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156832 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
dc3eb6abb0f5d4c97a2bc141231cd759b701ab8a |
15-May-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
Remove word 'block' from option and diagnostic I added in r156825. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156831 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
de7e7b857c8c6f9dc7fecb18fcb947b003748d16 |
15-May-2012 |
David Blaikie <dblaikie@gmail.com> |
Changing std::string to SmallString for r156826. Based on code review feedback by Jordan Rose. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156827 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
be0ee875d8a91c031a085cbbd73ad9e8dc1aa8ff |
15-May-2012 |
David Blaikie <dblaikie@gmail.com> |
Improve some of the conversion warnings to fire on conversion to bool. Moves the bool bail-out down a little in SemaChecking - so now -Wnull-conversion and -Wliteral-conversion can fire when the target type is bool. Also improve the wording/details in the -Wliteral-conversion warning to match the -Wconstant-conversion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156826 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
8f674a80529b327a88be665defcc0163089916e4 |
15-May-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c nonfragile abi: discourage ivar declarations in @interface by issuing warning (off by default) under opt'ed in flag -Winterface-block-ivar. // rdar://10763173 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156825 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
31c195ac0f3869e742d42f9d02b6cd33442fb630 |
15-May-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Fix our handling of visibility in explicit template instantiations. * Don't copy the visibility attribute during instantiations. We have to be able to distinguish struct HIDDEN foo {}; template<class T> DEFAULT void bar() {} template DEFAULT void bar<foo>(); from struct HIDDEN foo {}; template<class T> DEFAULT void bar() {} template void bar<foo>(); * If an instantiation has an attribute, it takes precedence over an attribute in the template. * With instantiation attributes handled with the above logic, we can now select the minimum visibility when looking at template arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156821 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
c608c3c0781e15b74fbbda03f8708cc85a3dd488 |
15-May-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Further improvement to wording of overload resolution diagnostics, and including the sole parameter name in the diagnostic in more cases. Patch by Terry Long! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156807 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
6314db9d5918939ad8ec88cd9c3f42a33a67c2b6 |
15-May-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR12798: Don't drop part of the nested name specifier when instantiating a pseudo-destructor expression. This can affect whether virtual dispatch for the destructor call is bypassed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156806 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
dbbecccb8431bb4545fc01c6401abc4253667360 |
15-May-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR12826: Converting an lvalue to an xvalue is a no-op conversion, not an lvalue-to-rvalue conversion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156803 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
3003e1d6626d07e8fc4af95fad95b3a5d4c4af98 |
15-May-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fold the six functions checking explicitly-defaulted special member functions into one. These were all performing almost identical checks, with different bugs in each of them. This fixes PR12806 (we weren't setting the exception specification for an explicitly-defaulted, non-user-provided default constructor) and enforces 8.4.2/2's rule that an in-class defaulted member must exactly match the implicit parameter type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156802 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
0cd00be2813db976d62fb88fa26ccca8d6791823 |
15-May-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objc: allow typedef'ing an id to a pointer to a c-struct only. // rdar://11356439 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156788 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
599f1b7100745efacb7ded6c176cb7feade114a5 |
13-May-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Refactor all the if (Inherited) Attr->setInherited(true); To a central location. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156728 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
argetAttributesSema.cpp
|
420efd83934ee78f04d73880e2ed1b7fdef3328c |
13-May-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Produce a warning for mismatched section attributes. Completest pr9356. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156727 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
|
ee409a916e9b97ed6bc2f48d8d6aac6b8b773d7b |
12-May-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Add support for __attribute__((hot)) and __attribute__((cold)). Currently cold functions are marked with the "optsize" attribute in CodeGen so they are always optimized for size. The hot attribute is just ignored, LLVM doesn't have a way to express hotness at the moment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156723 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
3eda6fa901b462f0b5f72d0651f46d804aac1844 |
12-May-2012 |
Jordy Rose <jediknil@belkadan.com> |
Only check NSArray/NSDictionary boxing method params once. Once we've found a "good" method, we don't need to check its argument types again. (Even if we might have later found a "bad" method, we were already caching the method we first looked up.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156719 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
d2d065545ba7b4349ae02afe07f799047443f1a0 |
12-May-2012 |
Jordy Rose <jediknil@belkadan.com> |
80-col violations and minor reformatting. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156718 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
c8521fae12432f0dcf174988832c1db88a6b6449 |
12-May-2012 |
Jordy Rose <jediknil@belkadan.com> |
Clean up ObjC boxing method checks by reducing duplicated code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156717 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
342dd43954958729b08ec74827bf3584b2731076 |
12-May-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Remove unused variable. Thanks to Dmitri Gribenko for noticing it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156715 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
99446d934c85e8b705cc6b8624e65b8eb8c22985 |
12-May-2012 |
Jordy Rose <jediknil@belkadan.com> |
Don't crash on boxed strings when +stringWithUTF8String: is missing. Also, unify some diagnostics for boxed expressions that have the same form. Fixes PR12804. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156713 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
703d412d192397b6fa17c5d99a4c1389aa2be2f3 |
12-May-2012 |
Douglas Gregor <dgregor@apple.com> |
Teach the parser to deal with multiple spellings for the same attribute, rather than requiring multiple cases in consumers of this information. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156666 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
b2749b134a190c3b60cf22c11686afd8fcc7c6d0 |
12-May-2012 |
Douglas Gregor <dgregor@apple.com> |
Make sure that we recognize __attribute__((align)) as a synonym for __attribute__((aligned)). Fixes <rdar://problem/11435441>, a regression I introduced in r156003. This is the narrow fix; a more comprehensive fix is coming. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156657 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
2f68ca09ca8b5944fcab14578a161511afde406f |
12-May-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
When diagnosing inaccessible temporary destructors in decltype expressions, use the correct type and the correct source location in the diagnostic. Spotted by Johannes Schaub! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156654 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
e2c60667d1bc29b7e148f9c9828dcbdbfc5b82b0 |
12-May-2012 |
Matt Beaumont-Gay <matthewbg@google.com> |
Merge branch 'format-string-braced-init' git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156653 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
f7b8056f1ff0c0409a9523a34f78b69ab8314bec |
11-May-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR11857: When the wrong number of arguments are provided for a function which expects exactly one argument, include the name of the argument in the diagnostic text. Patch by Terry Long! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156607 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaOverload.cpp
|
bf9da1f8292bb66720ada94a050ede9dca17f60a |
11-May-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Fix a recent regression with the merging of format attributes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156597 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
|
dd44f34301316b814277d6a8c146d86c7115330b |
10-May-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Warn about visibility attributes in typedefs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156534 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
98ae834a3e289f84f0765d0d0ca7ff22ccaba458 |
10-May-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Fix an old (2009) FIXME: // FIXME: This needs to happen before we merge declarations. Then, // let attribute merging cope with attribute conflicts. This was already being done for variables, but for functions we were merging then first and then applying the attributes. To avoid duplicating merging logic, some of the helpers in SemaDeclAttr.cpp become methods that can handle merging two attributes in one decl or inheriting attributes from one decl to another. With this change we are now able to produce errors for variables with incompatible visibility attributes or warn about unused dllimports in variables. This changes the attribute list iteration back to being in reverse source code order, as that matches what decl merging does and avoids differentiating the two cases is the merge*Attr methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156531 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
argetAttributesSema.cpp
|
1de6a6cb485fb58b4fb100282bb3cf298eedacd9 |
09-May-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c. Fixes a 'fixit' where location of '*' on objective-c class name was misplaced. // rdar://11311333 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156517 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaType.cpp
|
f6278e545d9bc09fb5d7579d1123f0a455352627 |
09-May-2012 |
Richard Trieu <rtrieu@google.com> |
Pull some cases of initialization with self-reference warnings out of -Wconditional-uninitialized into -Wuninitialized. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156512 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
e15db6f0d226a3bc88d244512d1004c7c1c07391 |
09-May-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[AST/libclang] Speed up clang_getOverriddenCursors() considerably by reserving a bit in ObjCMethodDecl to indicate whether the method does not override any other method, which is the majority of cases. That way we can avoid unnecessary work doing lookups, especially when PCH is involved. rdar://11360082 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156476 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
emaObjCProperty.cpp
|
00e1f6f5fed4f33f67181578be0232accd342282 |
09-May-2012 |
Ted Kremenek <kremenek@apple.com> |
Teach IsTailPaddedMemberArray() (used by -Warray-bounds) that a FieldDecl may have a Typedef type, and not always a ConstantArrayType. Fixes <rdar://problem/11387038>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156464 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
4493c0aa8add05b2fc534b0d8970c4b5480fad3b |
09-May-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
A little tweak to the SFINAE condition reporting. Don't say: candidate template ignored: substitution failed [with T = int]: no type named 'type' in 'std::enable_if<false, void>' Instead, just say: candidate template ignored: disabled by 'enable_if' [with T = int] ... and point at the enable_if condition which (we assume) failed. This is applied to all cases where the user writes 'typename enable_if<...>::type' (optionally prefixed with a nested name specifier), and 'enable_if<...>' names a complete class type which does not have a member named 'type', and this results in a candidate function being ignored in a SFINAE context. Thus it catches 'std::enable_if', 'std::__1::enable_if', 'boost::enable_if' and 'llvm::enable_if'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156463 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaTemplate.cpp
|
7e9f8af453598292cb57ba8e4dd63b9a5814b9ac |
09-May-2012 |
Richard Trieu <rtrieu@google.com> |
Update the SelfReferenceChecker. Refactored some of the visitor methods. Added support for conditional operators and tightened the exclusion of the unary operator from all operators to only the address of operator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156450 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d1376ee0945a4eba0590ae33d14bade860b08a7d |
08-May-2012 |
John McCall <rjmccall@apple.com> |
Bind cleanups after doing l2r conversion on the operand of a @throw expression; l2r conversion can introduce new cleanups in certain cases, like when the expression is an ObjC property reference of retainable type in ARC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156425 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
5ea66619a3108e2985e952b9a60a84316d464b25 |
08-May-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
Fixes a typo. note_xxx not not_xxx. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156391 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
fad5de9d674521017460f8445e2f81e2a1086290 |
08-May-2012 |
Jordy Rose <jediknil@belkadan.com> |
Clean up SemaDeclAttr for high-warnings build. Includes a real potential initialization problem. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156363 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
258796e3c7311a23528b45ca601439ebd7746ea4 |
08-May-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Add missing 'y'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156348 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
9b79fc9c57dc9d541c2a5737c3e2c24cc68d485d |
08-May-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Process attributes in the order they appear in the source code. This make clang match gcc behavior for two conflicting visibilities in the same decl. It also makes handling of dllimport/dllexport more natural. As a bonus we now warn on the dllimport in void __attribute__((dllimport)) foo13(); void __attribute__((dllexport)) foo13(); as does gcc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156343 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
argetAttributesSema.cpp
|
b8590f3572158bde97f14037c4cc8f4a57c8d810 |
07-May-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
When we suppress an error due to SFINAE, stash the diagnostic away with the overload candidate, and include its message in any subsequent 'candidate not viable due to substitution failure' note we may produce. To keep the note small (since the 'overload resolution failed' diagnostics are often already very verbose), the text of the SFINAE diagnostic is included as part of the text of the note, and any notes which were attached to it are discarded. There happened to be spare space in OverloadCandidate into which a PartialDiagnosticAt could be squeezed, and this patch goes to lengths to avoid unnecessary PartialDiagnostic copies, resulting in no slowdown that I could measure. (Removal in passing of some PartialDiagnostic copies has resulted in a slightly smaller clang binary overall.) Even on a torture test, I was unable to measure a memory increase of above 0.2%. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156297 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaOverload.cpp
|
13489673b84fafaaf49cf5ae4e3bb9a945524dcb |
07-May-2012 |
John McCall <rjmccall@apple.com> |
Change how we suppress access control in explicit instantiations so that we actually accumulate all the delayed diagnostics. Do this so that we can restore those diagnostics to good standing if it turns out that we were wrong to suppress, e.g. if the tag specifier is actually an elaborated type specifier and not a declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156291 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaAccess.cpp
emaDeclAttr.cpp
|
3f152e65074b70e8c13c876ed8b552cb1e6194d7 |
07-May-2012 |
John McCall <rjmccall@apple.com> |
There is no reason for these methods to be out-of-line. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156290 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
9257664568bf375b7790131a84d9a4fa30a5b7e3 |
07-May-2012 |
John McCall <rjmccall@apple.com> |
Refactor DelayedDiagnostics so that it keeps diagnostics in separate pools owned by the RAII objects that keep pushing decl state. This gives us quite a bit more flexibility. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156289 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDeclAttr.cpp
|
d079abfb5eefaf7da232e39a6564f561402cf4fe |
07-May-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
A union can have a constexpr defaulted default constructor, if it has an in-class initializer for one of its fields. Value-initialization of such a type should use the in-class initializer! The former was just a bug, the latter is a (reported) standard defect. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156274 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
21eb6d4961abf710de3864a537655e9c57903803 |
07-May-2012 |
Aaron Ballman <aaron@aaronballman.com> |
Detecting illegal instantiations of abstract types when using a function-style cast. Fixed PR12658. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156271 91177308-0d34-0410-b5e6-96231b3b80d8
emaCast.cpp
|
3b294360febd89e3383143af086efe2014571afa |
06-May-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Split mergeAvailabilityAttr out of handleAvailabilityAttr. This is important for having a uniform logic for adding attributes to a decl. This in turn is needed to fix the FIXME: // FIXME: This needs to happen before we merge declarations. Then, // let attribute merging cope with attribute conflicts. ProcessDeclAttributes(S, NewFD, D, /*NonInheritable=*/false, /*Inheritable=*/true); The idea is that mergeAvailabilityAttr will become a method. Once attributes are processed before merging, it will be called from handleAvailabilityAttr to handle multiple attributes in one decl: void f(int) __attribute__((availability(ios,deprecated=3.0), availability(ios,introduced=2.0))); and from SemaDecl.cpp to handle multiple decls: void f(int) __attribute__((availability(ios,deprecated=3.0))); void f(int) __attribute__((availability(ios,introduced=2.0))); As a bonus, use the new structure to diagnose incompatible availability attributes added to different decls (see included testcases). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156269 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
|
27a00970bf4ababdc115e54383e6252cc3276dfa |
05-May-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Make BuiltinType::getName return a StringRef and introduce BuiltinType::getNameAsCString to get a const char* if necessary. This avoids unnecessary conversions when we want to use the result of getName as a StringRef. Part of rdar://10796159 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156227 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
ab41fe914f63bb470dfa7e400876ada72f57a931 |
05-May-2012 |
Douglas Gregor <dgregor@apple.com> |
Move Sema::VerifyIntegerConstantExpression() and Sema::ConvertToIntegralOrEnumerationType() from PartialDiagnostics to abstract "diagnoser" classes. Not much of a win here, but we're -several PartialDiagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156217 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaOverload.cpp
emaStmt.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
|
dc1702001964c3314f7090e6a4af889b5771d884 |
04-May-2012 |
Jean-Daniel Dupas <devlists@shadowlab.org> |
Inhibit ObjC format warning only in system headers (NSLocalizedString). Add a test case for the related NSAssert workaround. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156205 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
d2cf348f0df76bf1745f131db2ceeb59f23a7305 |
04-May-2012 |
Sean Callanan <scallanan@apple.com> |
IsTailPaddedMemberArray uses a FieldDecl's getTypeSourceInfo() without checking for NULL. FieldDecls may have NULL TypeSourceInfo, and in fact some FieldDecls generated by Clang -- and all FieldDecls generated by LLDB -- have no TypeSourceInfo. This patch makes IsTailPaddedMemberArray check for NULL. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156186 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
6a26e2e54aa2a8cc6c977081befd8e80e7573ca4 |
04-May-2012 |
Douglas Gregor <dgregor@apple.com> |
Move Sema::RequireNonAbstractType() off of PartialDiagnostic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156180 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
|
f502d8ec9b43b259db9e37e9622279df46070fed |
04-May-2012 |
Douglas Gregor <dgregor@apple.com> |
Switch RequireLiteralType() off of PartialDiagnostic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156178 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaOverload.cpp
emaType.cpp
|
d10099e5c8238fa0327f03921cf2e3c8975c881e |
04-May-2012 |
Douglas Gregor <dgregor@apple.com> |
Move Sema::RequireCompleteType() and Sema::RequireCompleteExprType() off PartialDiagnostic. PartialDiagnostic is rather heavyweight for something that is in the critical path and is rarely used. So, switch over to an abstract-class-based callback mechanism that delays most of the work until a diagnostic is actually produced. Good for ~11k code size reduction in the compiler and 1% speedup in -fsyntax-only on the code in <rdar://problem/11004361>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156176 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
emaCast.cpp
emaChecking.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExceptionSpec.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprMember.cpp
emaExprObjC.cpp
emaInit.cpp
emaObjCProperty.cpp
emaOverload.cpp
emaPseudoObject.cpp
emaStmt.cpp
emaTemplateDeduction.cpp
emaType.cpp
|
bbba25fa8e388e82e04f66784c2fc9f89b901abe |
04-May-2012 |
DeLesley Hutchins <delesley@google.com> |
Thread safety analysis: check for LOCKABLE attribute on base classes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156175 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
392da48160bd92ceb486792780467cbfdb2d0e8c |
04-May-2012 |
James Molloy <james.molloy@arm.com> |
Fix handling of wint_t - we can't assume wint_t is purely an integer promotion of wchar_t - they may differ in signedness. Teach ASTContext about WIntType, and have it taken from TargetInfo like WCharType. Should fix test/Sema/format-strings.c for ARM, with the exception of one subtest which will fail if wint_t and wchar_t are the same size and wint_t is signed, wchar_t is unsigned. There'll be a followup commit to fix that. Reviewed by Chandler and Hans at http://llvm.org/reviews/r/8 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156165 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
9087599e5ee64ecd30194b3d89f8748ac95c62f7 |
04-May-2012 |
Richard Trieu <rtrieu@google.com> |
Skip checking for infinite for-loops if there are global or static variables in the conditional. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156148 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
b9e05f1b326996f3a46b6e2c66050e77bed0e223 |
04-May-2012 |
Stephen Canon <scanon@apple.com> |
Add support for full-width 128-bit integer literals. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156123 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
c968334510b0193ae8977c83d3ee66cbd6867639 |
03-May-2012 |
Douglas Gregor <dgregor@apple.com> |
Do not keep track of the set of visited Objective-C containers when performing the search for overridden methods. We very rarely see the same container twice, and in those rare cases we still have the fallback of the second SmallPtrSet to eliminate duplicates. Good for ~1.5% -fsyntax-only speedup on the code in <rdar://problem/11004361>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156103 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
c03f2df2a2b097bf2686bf32411d5022323988b2 |
03-May-2012 |
Bob Wilson <bob.wilson@apple.com> |
Disable -Wformat-extra-args for arguments defined in system headers. Some of the NSAssert macros in OS X 10.7 are implemented in a way that adds extra arguments that trigger the -Wformat-extra-args warning. Earlier versions of clang failed to detect those -Wformat issues, but now that clang is reporting those problems, we need to quiet them since there's nothing to be done to fix them. <rdar://problem/11317765> I don't know how to write a testcase for this. Suggestions welcome. Patch by Ted Kremenek! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156092 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
3bb2994a7de3679fb825f3a36f3dc11ea1daf6a6 |
03-May-2012 |
Kaelyn Uhrain <rikka@google.com> |
Silence unused-variable warning when assertions are disabled. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156091 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
e0d3b4cd2b66f1cef26cacbed5820ab7c22ad5b3 |
03-May-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Add -Wimplicit-fallthrough warning flag, which warns on fallthrough between cases in switch statements. Also add a [[clang::fallthrough]] attribute, which can be used to suppress the warning in the case of intentional fallthrough. Patch by Alexander Kornienko! The handling of C++11 attribute namespaces in this patch is temporary, and will be replaced with a cleaner mechanism in a subsequent patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156086 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
ttributeList.cpp
emaStmtAttr.cpp
|
975eef64182a78d1afc0f3da8cba4cb961cda5e4 |
03-May-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c: warn for properties being default synthesized under -Wobjc-missing-property-synthesis which must be opted-in. // rdar://11295716 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156078 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
7b0a3e378c441cec60f929d13bd48846c267a008 |
03-May-2012 |
Richard Trieu <rtrieu@google.com> |
Fix a note without a SourceLocation. #define TEST int y; int x = y; void foo() { TEST } -Wuninitialized gives this warning: invalid-loc.cc:4:3: warning: variable 'y' is uninitialized when used here [-Wuninitialized] TEST ^~~~ invalid-loc.cc:2:29: note: expanded from macro 'TEST' #define TEST int y; int x = y; ^ note: initialize the variable 'y' to silence this warning 1 warning generated. The second note lacks filename, line number, and code snippet. This change will remove the fixit and only point to variable declaration. invalid-loc.cc:4:3: warning: variable 'y' is uninitialized when used here [-Wuninitialized] TEST ^~~~ invalid-loc.cc:2:29: note: expanded from macro 'TEST' #define TEST int y; int x = y; ^ invalid-loc.cc:4:3: note: variable 'y' is declared here TEST ^ invalid-loc.cc:2:14: note: expanded from macro 'TEST' #define TEST int y; int x = y; ^ 1 warning generated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156045 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
a058fd4f0a944174295f77169b438510dad389f8 |
03-May-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Revert most of r154844, which was disabled in r155975. Keep around the refactorings in that revision, and some of the subsequent bugfixes, which seem to be relevant even without delayed exception specification parsing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156031 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaType.cpp
|
60f2024b7df091fb0d8b7e37334bc83ac66a5c39 |
03-May-2012 |
DeLesley Hutchins <delesley@google.com> |
Thread safety analysis: additional support for smart pointers in lock expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156030 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
548d17c977959a5ed395ea1a407901f1314e575c |
02-May-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Walk the decls looking for the last one that has an attribute. We do have to walk them, otherwise we cannot produce an error for both struct HIDDEN test4; // canonical struct test4; struct DEFAULT test4; and struct test5; // canonical struct HIDDEN test5; struct DEFAULT test5; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156016 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
f26efd79d1bd139641d0bb40842f908c67f041c2 |
02-May-2012 |
DeLesley Hutchins <delesley@google.com> |
Thread Safety Analysis: fixed attribute handling for lock_returned attribute. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156005 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
0c19b3c38e356058aeb2424d175eae232bf014d9 |
02-May-2012 |
Douglas Gregor <dgregor@apple.com> |
Replace the StringSwitch in AttributeList::getKind() with a TableGen-generated StringMatcher, for a 1.2% speedup in -fparse-only time in <rdar://problem/11004361>. Thanks to Benjamin for pointing me at StringMatcher! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156003 91177308-0d34-0410-b5e6-96231b3b80d8
ttributeList.cpp
|
331d2ec7cd4c6b5e29cc61fcdc617bf708223cd4 |
02-May-2012 |
Douglas Gregor <dgregor@apple.com> |
Introduce the notion of 'ignored' attributes, so that all attributes we accept are not modeled somehow via Attr.td. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155998 91177308-0d34-0410-b5e6-96231b3b80d8
ttributeList.cpp
|
3e7d31aa6050a2fb6cb35912793eb3f1b3a22030 |
02-May-2012 |
Douglas Gregor <dgregor@apple.com> |
Introduce the notion of an attribute that has no direct representation as an AST node, and fold a number of such attributes into Attr.td. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155995 91177308-0d34-0410-b5e6-96231b3b80d8
ttributeList.cpp
|
184be849fc5d9da9f353fed4b0d5202b003d16d6 |
02-May-2012 |
Douglas Gregor <dgregor@apple.com> |
Implement the alternate spellings of attributes aligned (as "align") and const (as "__const") using tblgen, rather than explicitly hacking them in. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155991 91177308-0d34-0410-b5e6-96231b3b80d8
ttributeList.cpp
|
d6268ffe94e5159ef41c61fe7f750c22546d3ef3 |
02-May-2012 |
Douglas Gregor <dgregor@apple.com> |
Revert my optimization to AttributeList::getKind() in r155987; Benjamin has suggested a better approach. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155989 91177308-0d34-0410-b5e6-96231b3b80d8
ttributeList.cpp
|
b6dd6055a4fb8646805ba8f385aa7c99acd47817 |
02-May-2012 |
Douglas Gregor <dgregor@apple.com> |
Replace the StringSwitch in AttributeList::getKind(const IdentifierInfo *) with a static StringMap, improving -fsyntax-only performance by 1% for the example in <rdar://problem/11004361>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155987 91177308-0d34-0410-b5e6-96231b3b80d8
ttributeList.cpp
|
12f3297fbef1673b32c8987da9933687996c65b3 |
02-May-2012 |
Kaelyn Uhrain <rikka@google.com> |
Try harder to recognize hidden tag type names in potential declarations instead of giving unhelpful errors about undeclared identifers and missing semicolons. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155965 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
ff310c763eeb41a7aaa3b928cd0bc0a6e493d5dd |
02-May-2012 |
Douglas Gregor <dgregor@apple.com> |
Eliminate Sema::CompareMethodParamsInBaseAndSuper() entirely, by folding its one check into the normal path for checking overridden Objective-C methods. Good for another 3.6% speedup on the test case in <rdar://problem/11004361>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155961 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
8722ae8f6083cc27bef430e2815ceea77ffa0b28 |
02-May-2012 |
Douglas Gregor <dgregor@apple.com> |
The semantic checking that verifies whether an Objective-C method declared in a subclass has consistent parameter types with a method having the same selector in a superclass performs a significant number of lookups into the class hierarchy. In the example in <rdar://problem/11004361>, we spend 4.7% of -fsyntax-only time in these lookups. Optimize away most of the calls to this routine (Sema::CompareMethodParamsInBaseAndSuper) by first checking whether we have ever seen *any* method with that selector (using the global selector table). Since most selectors are unique, we can avoid the cost of this name lookup in many cases, for a 3.3% speedup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155958 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
e4c043d3fdd0f98ab724aa4f1419cec9985ea2c4 |
02-May-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Add a missing RequireCompleteType call when synthesizing properties. <rdar://problem/11333367>. While I'm here, fix source locations for other diagnostics related to property synthesis. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155953 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
e0fdadfd5103fa5f824920e813216615807c74ba |
01-May-2012 |
Patrick Beard <pcbeard@mac.com> |
Clean up changes suggested by Douglas Gregor: BuildObjCNumericLiteral() and BuildObjCBoxedExpr() now both using PerformCopyInitialization() rather than PerformImplicitConversion(), which suppresses errors. In BuildObjCBoxedExpr(): no longer calling .getCanonicalType(), ValueType->getAs() will remove the minimal amount of sugar. Using ValueType->isBuiltinType() instead of isa<BuiltinType>(ValueType). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155949 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
4e31b4d6cf25029aa280d691e9023359c0ef4204 |
01-May-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Extend the error about incompatible visibility attributes in different decls to work on function templates specializations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155943 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
ca2e1b7990230c5088eb2f280cea9db5f516ad69 |
01-May-2012 |
David Blaikie <dblaikie@gmail.com> |
Workaround a miscompile in 483.xalancbmk while we figure it out. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155938 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
05e6076f0a02dbb73d20a3928976bcd242a13279 |
01-May-2012 |
Douglas Gregor <dgregor@apple.com> |
In C++11 mode, implement the C++11 semantics for [basic.lookup.classref]p1 and p4, which concerns name lookup for nested-name-specifiers and template names, respectively, in a member access expression. C++98/03 forces us to look both in the scope of the object and in the current scope, then compare the results. C++11 just takes the result from the scope of the object, if something is found. Fixes <rdar://problem/11328502>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155935 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
emaTemplate.cpp
|
8165605dfb926561bcbc64310bec4106a70dd1e1 |
01-May-2012 |
David Blaikie <dblaikie@gmail.com> |
Implement simplify_type traits for redecl_iterator. Based on Chandler Carruth's feedback on r155869. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155929 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
5729672524865f212cbadb51170dca0694e79a71 |
01-May-2012 |
David Blaikie <dblaikie@gmail.com> |
PR12710 - broken default argument handling for templates. I broke this in r155838 by not actually instantiating non-dependent default arg expressions. The motivation for that change was to avoid producing duplicate conversion warnings for such default args (we produce them once when we parse the template - there's no need to produce them at each instantiation) but without actually instantiating the default arg, things break in weird ways. Technically, I think we could still get the right diagnostic experience without the bugs if we instantiated the non-dependent args (for non-dependent params only) immediately, rather than lazily. But I'm not sure if such a refactoring/ change would be desirable so here's the conservative fix for now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155893 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
6d3b93d631640125f912339df19b0d2a15af5c9b |
01-May-2012 |
Douglas Gregor <dgregor@apple.com> |
Turn the mixed-sign-comparison diagnostic into a runtime behavior diagnostic, from Eitan Adler! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155876 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
111263cf8d829f5a3d0a3c9164f65c1c8223ac7e |
01-May-2012 |
Kaelyn Uhrain <rikka@google.com> |
Let's use the correct bool this time. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155871 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprMember.cpp
|
1a200a87c1bacee11b7c4283ae5f3f3f74a3c1b2 |
01-May-2012 |
Kaelyn Uhrain <rikka@google.com> |
A couple of very small tweaks suggested by Doug in reply to r155580 and r155163. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155870 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprMember.cpp
|
bd4fa45e7cf6a2f0adcb0ab66d5b3d338ec56c3c |
01-May-2012 |
David Blaikie <dblaikie@gmail.com> |
Remove ref/value inconsistency in redecl_iterator. Similar to r155808 - this mistake has been made in a few iterators. Based on Chandler Carruth's feedback to r155808 I added an implicit conversion to Decl* to ease adoption/usage. Useful for the pointer comparison, but not the dyn_cast (due to template argument deduction causing the conversion not to be used) - there for future convenience, though. This idiom (op T* for iterators) seems to be fairly idiomatic within the LLVM codebase & I'll likely add it as I fix up the other iterators here. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155869 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
emaLookup.cpp
|
8e5900c8e9bd32bcc385124f564f3d38a11d0e28 |
01-May-2012 |
Douglas Gregor <dgregor@apple.com> |
clang_getCursorLexicalParent should return a translation unit cursor for declarations at the global scope, from Evan P. Fixes PR9083. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155858 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
aa5498649c7ad1b61e5da2497e8c60c924ac5e55 |
01-May-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Remove -Wc++98-compat warning for an outrageously-rare circumstance of 'this' being used in an exception specification in a way which isn't otherwise ill-formed in C++98: this warning also incorrectly triggered on uses of 'this' inside thread-safety attributes, and the mechanism required to tell these cases apart is more complex than can be justified by the (minimal) value of this part of -Wc++98-compat. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155857 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
e720ce7a3b1c1bfa5f7482183caa6e31fca9a3fb |
01-May-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
When going through references to check if the function returns the address of a local variable, make sure we don't infinitely recurse when the reference binds to itself. e.g: int* func() { int& i = i; // assign non-exist variable to a reference which has same name. return &i; // return pointer } rdar://11345441 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155856 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
2c0abf4ae33ab2ba690ccae724b8d6f196e7cfda |
30-Apr-2012 |
David Blaikie <dblaikie@gmail.com> |
Add FixItHint for -Wnull-conversion to initialize with an appropriate literal. Reviewed by Doug Gregor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155839 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
emaChecking.cpp
emaDecl.cpp
emaFixItUtils.cpp
|
c1c0725978ed31253af5ef4849a124e8fc13ebbb |
30-Apr-2012 |
David Blaikie <dblaikie@gmail.com> |
Fix PR12378: provide conversion warnings on default args of function templates Apparently we weren't checking default arguments when they were instantiated. This adds the check, fixes the lack of instantiation caching (which seems like it was mostly implemented but just missed the last step), and avoids implementing non-dependent default args (for non-dependent parameter types) as uninstantiated default arguments (so that we don't warn once for every instantiation when it's not instantiation dependent). Reviewed by Richard Smith. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155838 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaTemplateInstantiate.cpp
|
e7be1090e8cc8bfcda4f73fcad35d29e9e58b1c4 |
30-Apr-2012 |
Douglas Gregor <dgregor@apple.com> |
HandleDeclarator() returns NULL for semantic disasters. Deal with it when we're in an Objective-C container context. Fixes <rdar://problem/11286701>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155836 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
694e796f462748ab4dc7ecdf4be5da44dd2c8c94 |
30-Apr-2012 |
Richard Trieu <rtrieu@google.com> |
Add -Wloop-analysis. This warning will fire on for loops which the variables in the loop conditional do not change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155835 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
262bc18e32500558af7cb0afa205b34bd37bafed |
30-Apr-2012 |
David Blaikie <dblaikie@gmail.com> |
Remove the ref/value inconsistency in filter_decl_iterator. filter_decl_iterator had a weird mismatch where both op* and op-> returned T* making it difficult to generalize this filtering behavior into a reusable library of any kind. This change errs on the side of value, making op-> return T* and op* return T&. (reviewed by Richard Smith) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155808 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaInit.cpp
emaLambda.cpp
emaObjCProperty.cpp
emaStmt.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
|
6850fafd27ba804d4d4ca8af404beed5574e3749 |
29-Apr-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR9546, DR1268: A prvalue cannot be reinterpret_cast to an rvalue reference type. But a glvalue can be reinterpret_cast to either flavor of reference. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155789 91177308-0d34-0410-b5e6-96231b3b80d8
emaCast.cpp
|
a2e76f56c60dbd4de3dc0fed02bb01bea4dcff81 |
29-Apr-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
[class.copy]p23: Fix an assertion caused by incorrect argument numbering in a diagnostic, add a test for this paragraph, and tighten up the diagnostic wording a little. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155784 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
e59392176c2369df2bdd11b7786cb38abac00198 |
28-Apr-2012 |
Julien Lerouge <jlerouge@apple.com> |
Currently __builtin_annotation() only annotates an i32. i32 __builtin_annotation(i32, string); Applying it to i64 (e.g., long long) generates the following IR. trunc i64 {{.*}} to i32 call i32 @llvm.annotation.i32 zext i32 {{.*}} to i64 The redundant truncation and extension make the result difficult to use. This patch makes __builtin_annotation() generic. type __builtin_annotation(type, string); For the i64 example, it simplifies the generated IR to: call i64 @llvm.annotation.i64 Patch by Xi Wang! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155764 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
98f71aae339e00bfc7b556a78e2538931198ec9c |
28-Apr-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
C++11 weakens the requirement for types used with offsetof from POD to standard layout type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155757 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
152f6b7be508fbc61543f3736ebd390d7ac84bd1 |
28-Apr-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Rename isPODType (using the C++98 rules) into isCXX98PODType and make isPODType decide which one to use based on LangOptions. - -Wc++98-compat depends on the c++98 definition - Now __is_pod returns the right thing in c++11 and c++98 mode - All changes to the type traits test are validated against g++ 4.7 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155756 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
470360d8035ce4213a963d281c3b542edfea9fda |
28-Apr-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Revert "Use the C++11 definition of PODness for __is_pod in C++11 mode." This is just papering over a major bug in isPODType, real fix coming up soon. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155755 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
046e8691ff467541ef7c32c9fc6bf41b1dcbd03a |
28-Apr-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Use the C++11 definition of PODness for __is_pod in C++11 mode. Keep the old definition for C++98 so we don't break tr1::is_pod. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155754 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
d200187bd27f9ad68699693a6e57f9ee3ff260fa |
28-Apr-2012 |
Jordy Rose <jediknil@belkadan.com> |
[analyzer] Remove references to idx::TranslationUnit. Index is dead, cross-TU inlining never panned out. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155751 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
a1366cbab89ec6d4f630dca91e85d03d9e5d1d7d |
27-Apr-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR12224 (sort of): Diagnose inheriting constructor declarations in C++11 mode. We do not support IRGen for these, and get some parts of the semantic analysis wrong. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155728 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
392b3f5798a62fe038082df0a5e2244b08b917d8 |
27-Apr-2012 |
Kaelyn Uhrain <rikka@google.com> |
Imrpove the note text for when a non-type decl hides a tag type git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155723 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
aec2ac67e7190bdb88abb1d427b82ae3284ea756 |
27-Apr-2012 |
Kaelyn Uhrain <rikka@google.com> |
Add note to help explain why a tag such as 'struct' is needed to refer to a given type, when the reason is that there is a non-type decl with the same name. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155677 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
9b94cd1b2527c8dc9ec19a8608f2313010e721b5 |
27-Apr-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Add a missing ExpressionEvaluationContext for template default arguments. Fixes PR12581. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155670 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
a43ea64602a4cd4a18ed193bfc94a1f2aa4d3475 |
26-Apr-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR12647: An alias template instantiation which occurs in a SFINAE context is itself a SFINAE context. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155621 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
86e6fdcf1a04edc4c24f53f9dbacf7e1b52f306d |
26-Apr-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Two missing -Wc++98-compat warnings, for null pointers as non-type template arguments, and 'this' in exception-specifications. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155606 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaTemplate.cpp
|
45a0b264512ee0e9ba874bb3bfeb7f5b96789117 |
26-Apr-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Reject cases like struct __attribute__((visibility("hidden"))) a; struct __attribute__((visibility("default"))) b; which gcc already rejects. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155603 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
c799a6a5c884831c3c3ea57d30fbe4ab35709d49 |
26-Apr-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
If a type is non-literal by virtue of being incomplete produce notes explaining that. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155598 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
2b90f7637e846ea555dedac14e7f5065d85c5d3b |
25-Apr-2012 |
Kaelyn Uhrain <rikka@google.com> |
Add an error message with fixit hint for changing '.' to '->'. This is mainly for attempting to recover in cases where a class provides a custom operator-> and a '.' was accidentally used instead of '->' when accessing a member of the object returned by the current object's operator->. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155580 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprMember.cpp
|
ad579916bc402cf617793e94770bab78e9bdaec8 |
25-Apr-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
When resolving default template arguments, it should be done in the declaration context of the template what we are going to instantiate. Fixes various crashes of rdar://11242625 & http://llvm.org/PR11421. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155576 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
5d59b79c2fd8783900e52cf2dd6add5d3627b2fc |
25-Apr-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR12625: Cope with classes which have incomplete base or member types: Don't try to query whether an incomplete type has a trivial copy constructor when determining whether a move constructor should be declared. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155575 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
28c9e5720dea5f7b9a4d154ee49886c69de8ae29 |
24-Apr-2012 |
Shih-wei Liao <sliao@google.com> |
Migrate external/clang to CLANG-155088-20120419. Change-Id: I7e31d8b22ef405f54838a8582c78291fa45ca344
ndroid.mk
|
fa784da5b9039ead42323bfe9ae6d33ab3c5c6b3 |
24-Apr-2012 |
Shih-wei Liao <sliao@google.com> |
Merge with CLANG upstream r155088. Conflicts: lib/Basic/Targets.cpp Change-Id: Id80f069ae25e623967b705e9fa11cfd94dd2461c
|
8c614e4f2b07741130e6c99a971a7093358fb9e4 |
24-Apr-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR12629: Cope with parenthesized function types when attaching a delayed exception specification to a function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155424 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
d6724367519b4f98dcce091854549282c11d70a0 |
23-Apr-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
with -Wdeprecated, include a note to its deprecated declaration location. // rdar://10893232 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155385 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
aed9ea398a3fd8d488120728e2df4ac81c3b0c4b |
23-Apr-2012 |
DeLesley Hutchins <delesley@google.com> |
Thread safety analysis: support the use of pt_guarded_by attributes on smart pointers. Also adds test case for previous commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155379 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
79747e00e9f6b13b56e91462982d2456d0d9128f |
23-Apr-2012 |
DeLesley Hutchins <delesley@google.com> |
Thread-safety analysis: support new "pointer to member" syntax for existentially quantified lock expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155357 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
e656b8397f05fd1b7c4a735372f79a52f4e32be5 |
23-Apr-2012 |
Douglas Gregor <dgregor@apple.com> |
Teach RequireCompleteType about multi-dimensional arrays. Fixes <rdar://problem/11284902>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155356 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
471131a05d4f9dca7f9f4f5109f2a9a4ce80bf65 |
22-Apr-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Sema: Initialize NSString method cache members. Found by valgrind. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155324 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
6e21b16ab226959341b85e16060fd81f71cee628 |
22-Apr-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR12585: When processing a friend template inside a class template, don't pretend there was no previous declaration -- that can lead us to injecting a class template (with no access specifier) into a class scope. Instead, just avoid the problematic checks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155303 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
a4156b8574666aa69a2b0ad35dc9e9603433e4ae |
21-Apr-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix regression in r154844. If necessary, defer computing adjusted destructor exception specifications in C++11 until after we've parsed the exception specifications for nested classes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155293 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
94d55d7ecdd693788a8f3910a0da1b5ecdaa8a86 |
21-Apr-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
Remove unneeded code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155290 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
79e244f49a60a90167d23daf387dc600d603641d |
21-Apr-2012 |
Nuno Lopes <nunoplopes@sapo.pt> |
move some stuff to .rodata git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155282 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
c86d1fdb7b785c34d14fd83a470b395466c69e5d |
21-Apr-2012 |
NAKAMURA Takumi <geek4civic@gmail.com> |
SemaDeclCXX.cpp: Fix utf8 in comment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155279 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
73664a4e5aee9216c37bd123aa002430ccb5431d |
21-Apr-2012 |
Matt Beaumont-Gay <matthewbg@google.com> |
Also highlight the member name. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155274 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprMember.cpp
|
71c598fc0515f7a95f2e0051ca056b6114970fe5 |
21-Apr-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
When declaring a template, check that the context doesn't already contain a declaration of the same name. r155187 caused us to miss this if the prior declaration did not declare a type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155269 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
7d90fe5a941efc106237d23badec816ed65e267f |
21-Apr-2012 |
Matt Beaumont-Gay <matthewbg@google.com> |
Fix a QoI bug reported by a user. Set the source location for the "member reference base type ... is not a structure or union" diag to point at the operator rather than the member name. If we're giving this diagnostic because of a typo'd '.' in place of a ';' at the end of a line, the caret previously pointed at the identifier on the following line, which isn't as helpful as it could be. Pointing the caret at the '.' makes it more obvious what the problem is. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155267 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprMember.cpp
|
0e78afbb15c6f51932e562e620f714c37cf914e6 |
21-Apr-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c arc: With currnt documentation, objc_returns_inner_pointer attribute can be applied to methods only. Diagnsose otherwise, instead of crashing. // rdar://11253688 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155245 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
704c8f76bbe2de68375f7f146e75bd74de6dd518 |
20-Apr-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix bug where a class's (deleted) copy constructor would be implicitly given a non-const reference parameter type if the class had any subobjects with deleted copy constructors. This causes a rejects-valid if the class's copy constructor is explicitly defaulted (as happens for some implementations of std::pair etc). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155218 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaLookup.cpp
|
c93e014cd43b08812370cfc8ef7bb7b92305f8fb |
20-Apr-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Replace r155185 with a better fix, which also addresses PR12557. When looking up an elaborated type specifier in a friend declaration, only look for type declarations, per [basic.lookup.elab]p2. If we know that the redeclaration lookup for a friend class template in a dependent context finds a non-template, don't delay the diagnostic to instantiation time. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155187 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
b2f245e77de13c6619923d6569a947e6dcdd0666 |
20-Apr-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix a bug which creduce found reducing PR12585. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155185 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
9879556f250c7b692228e834d7fca8f1cb118bf6 |
20-Apr-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-arc: Retune my previous patch so warning is issued on weak property as receiver and not on any other use of a weak property. // rdar://10225276 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155169 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
emaPseudoObject.cpp
|
289677da2d3ef2f015af8b7e41150053891589f7 |
19-Apr-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c arc: Issue warning under -Wreceiver-is-weak if receiver is a 'weak' property, by type or by attribute. // rdar://10225276 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155159 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
emaPseudoObject.cpp
|
ae519c42a1e0a023be6c07ba1dc10f28e29d6bc3 |
19-Apr-2012 |
DeLesley Hutchins <delesley@google.com> |
Thread safety analysis: split warnings into two groups: attribute warnings which are checked in the parser, and analysis warnings that require the full analysis. This allows attribute syntax to be checked independently of the full thread safety analysis. Also introduces a new warning for the case where a string is used as a lock expression; this allows the analysis to gracefully handle expressions that would otherwise cause a parse error. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155129 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
b4143472c7763b84536328dee13f281df2d9040b |
19-Apr-2012 |
Francois Pichet <pichet2000@gmail.com> |
Fix a comment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155107 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
03544fccd1782418c1bf2528111683e18f43b913 |
19-Apr-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Add missing -Wc++98-compat warnings for initializer list initializations which initialize references, create std::initializer_list objects, or call constructors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155105 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
eb382ec1507cf2c8c12d7443d0b67c076223aec6 |
19-Apr-2012 |
Patrick Beard <pcbeard@mac.com> |
Implements boxed expressions for Objective-C. <rdar://problem/10194391> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155082 91177308-0d34-0410-b5e6-96231b3b80d8
emaExceptionSpec.cpp
emaExprCXX.cpp
emaExprObjC.cpp
reeTransform.h
|
13bffc532bafd45d4a77867993c1afb83c7661be |
19-Apr-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR 12586: Fix assert while running libc++ testsuite: deal with exception specifications on member function templates of class templates and other such nested beasties. Store the function template from which we are to instantiate an exception specification rather than trying to deduce it. Plus some additional test cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155076 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaTemplateInstantiateDecl.cpp
|
a2c91e75c944e3599fb108db600f91c47c8b4342 |
18-Apr-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c: Issue diagnostic when an implicit property accessor (getter) missing, instead of crashing. // rdar://11273060 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155036 91177308-0d34-0410-b5e6-96231b3b80d8
emaPseudoObject.cpp
|
d448ce0932708038adb93456b817722a314b647f |
18-Apr-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
VerifyICE: Pass PartialDiagnostics by reference. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155005 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
2d01f2c414b8ef2ae23620ce6c9d3763c8bf73bf |
18-Apr-2012 |
Francois Pichet <pichet2000@gmail.com> |
As per John McCall comment: Follow up to r154924: check that we are in a static CMethodDecl to enable the Microsoft bug emulation regarding access to protected member during PTM creation. Not just any static function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154982 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
87162c2e528921aabb84e96fe7272348a4b3354e |
18-Apr-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR12569: Instantiate exception specifications of explicit instantiations and explicit specializations of function templates appropriately. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154956 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplateInstantiateDecl.cpp
|
b2d899e9ae8a48c4057a48664213948934b877fa |
17-Apr-2012 |
Francois Pichet <pichet2000@gmail.com> |
Emulate a MSVC bug where the creation of pointer-to-member to protected member of base class is allowed but only from a static function. This fixes a regression when parsing MFC code with clang. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154924 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
e6975e9b0985ad7f7ff9187e38d95bfe9ac4181b |
17-Apr-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Implement DR1330 in C++11 mode, to support libstdc++4.7 which uses it. We have a new flavor of exception specification, EST_Uninstantiated. A function type with this exception specification carries a pointer to a FunctionDecl, and the exception specification for that FunctionDecl is instantiated (if needed) and used in the place of the function type's exception specification. When a function template declaration with a non-trivial exception specification is instantiated, the specialization's exception specification is set to this new 'uninstantiated' kind rather than being instantiated immediately. Expr::CanThrow has migrated onto Sema, so it can instantiate exception specs on-demand. Also, any odr-use of a function triggers the instantiation of its exception specification (the exception specification could be needed by IRGen). In passing, fix two places where a DeclRefExpr was created but the corresponding function was not actually marked odr-used. We used to get away with this, but don't any more. Also fix a bug where instantiating an exception specification which refers to function parameters resulted in a crash. We still have the same bug in default arguments, which I'll be looking into next. This, plus a tiny patch to fix libstdc++'s common_type, is enough for clang to parse (and, in very limited testing, support) all of libstdc++4.7's standard headers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154886 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExceptionSpec.cpp
emaExpr.cpp
emaExprCXX.cpp
emaOverload.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
93a49944e0e68e32bc22d45d44ee136b34beffb3 |
16-Apr-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c modern translator: buildit objc bool type for rewriter project will be BoolTy. // rdar://11231426. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154861 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
74e2fc332e07c76d4e69ccbd0e9e47a0bafd3908 |
16-Apr-2012 |
Douglas Gregor <dgregor@apple.com> |
Implement the last part of C++ [class.mem]p2, delaying the parsing of exception specifications on member functions until after the closing '}' for the containing class. This allows, for example, a member function to throw an instance of its own class. Fixes PR12564 and a fairly embarassing oversight in our C++98/03 support. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154844 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaType.cpp
|
cefc3afac14d29de5aba7810cc8fe6c858949e9d |
16-Apr-2012 |
Douglas Gregor <dgregor@apple.com> |
Implement C++11 [expr.prim.general]p3, which permits the use of 'this' in the declaration of a non-static member function after the (optional) cv-qualifier-seq, which in practice means in the exception specification and late-specified return type. The new scheme here used to manage 'this' outside of a member function scope is more general than the Scope-based mechanism previously used for non-static data member initializers and late-parsesd attributes, because it can also handle the cv-qualifiers on the member function. Note, however, that a separate pass is required for static member functions to determine whether 'this' was used, because we might not know that we have a static function until after declaration matching. Finally, this introduces name mangling for 'this' and for the implicit 'this', which is intended to match GCC's mangling. Independent verification for the new mangling test case would be appreciated. Fixes PR10036 and PR12450. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154799 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaExprMember.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
34f9dc46d3207f3d6e649082e61f7ec0226632da |
14-Apr-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Directly store TypoResultsMaps in the TypoEditDistanceMap, getting rid of manual deletion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154736 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
534986f2b21e6050bf00163cd6423fd92155a6ed |
14-Apr-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Add an AttributedStmt type to represent a statement with C++11 attributes attached. Since we do not support any attributes which appertain to a statement (yet), testing of this is necessarily quite minimal. Patch by Alexander Kornienko! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154723 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
emaStmt.cpp
emaStmtAttr.cpp
reeTransform.h
|
9cdd1e3450a07c1bafc32c96f1db88084497f282 |
14-Apr-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Delete the TypoResultsMap when erasing the pointer to it. This manual deleting is error-prone, but we can't just put an OwningPtr in a std::map :( git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154707 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
88507ddf6f83b929454c04470924cf56b4b8147a |
13-Apr-2012 |
Douglas Gregor <dgregor@apple.com> |
Make control flow more explicit for rebuilding property reference expressions without their OpaqueValueExprs git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154669 91177308-0d34-0410-b5e6-96231b3b80d8
emaPseudoObject.cpp
|
f53bc3126bb9919050fb5db746f1e5bd52ccf5f6 |
13-Apr-2012 |
Douglas Gregor <dgregor@apple.com> |
super and class property reference expressions don't need to be rebuilt. Fixes <rdar://problem/11052352>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154667 91177308-0d34-0410-b5e6-96231b3b80d8
emaPseudoObject.cpp
|
51b92401c9f95023a2ef27064fd5a60fd99175f5 |
13-Apr-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Implement __atomic_fetch_nand and __atomic_nand_fetch to complete our set of GNU __atomic builtins. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154659 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
a1c4f7c833093f87d5187c4449a3d4534cfa40a4 |
13-Apr-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR12500: Improve the wording of the diagnostic for a redefinition of a name in the wrong namespace scope. Patch by Jonathan Sauer! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154656 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
97b57a2170c2138fb71d336d77c6db7728938108 |
13-Apr-2012 |
John McCall <rjmccall@apple.com> |
When we're flagging a protected scope to prevent jumps into the shadow of a block expression with non-trivial destructed cleanups, we should flag that in the enclosing function, not in the block that we're about to pop. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154646 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
37050841d7b852497b85d5275d9ea92c07ddf059 |
13-Apr-2012 |
David Blaikie <dblaikie@gmail.com> |
Warn on 64-to-32 for source value of x bits where 64 >= x > 32. The codepath already only works for source bits > target bits, it's just that it was testing for the source expr bits to be exactly 64. This meant simple cases (int i = x_long / 2) were missed & ended up under the general -Wconversion warning, which a user might not have enabled. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154626 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
262acdab8ba128857a6e5323f767f5e154ce75e6 |
12-Apr-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c literals: Issue warning and ignore when BOOL is not of an intergal type when boolean literals are used. // rdar://11231426 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154619 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
7d000652ccf5b370006d4f80d39041d2ff0d9106 |
12-Apr-2012 |
Douglas Gregor <dgregor@apple.com> |
s/isAtomicConversion/tryAtomicConversion/g, per Jordy's suggestion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154613 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
47bfcca2d6972d98a1b25239cd1aa658b60680e2 |
12-Apr-2012 |
Douglas Gregor <dgregor@apple.com> |
Fix some i1/i8 confusion within _Atomic(bool) in IR generation, both in general (such an atomic has boolean representation) and specifically for IR generation of __c11_atomic_init. The latter also means actually using initialization semantics for this initialization, rather than just creating a store. On a related note, make sure we actually put in non-atomic-to-atomic conversions when performing an implicit conversion sequence. IR generation is far too kind here, but we still want the ASTs to make sense. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154612 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
f7ecc3016e6309a092493070d071489516b273c0 |
12-Apr-2012 |
Douglas Gregor <dgregor@apple.com> |
Compute standard conversion sequences for conversions to atomic types. The second and third conversions in the sequence are based on the conversion for the underlying type, so that we get sensible overloading behavior for, e.g., _Atomic(int) vs. _Atomic(float). As part of this, actually implement the lvalue-to-rvalue conversion for atomic types. There is probably a pile of code in SemaExpr that can now be deleted, but I haven't tracked it down yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154596 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaOverload.cpp
|
99850388609234e01901e316bca6ca6ffbd09337 |
12-Apr-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c numeric literal: type of boolean is that of typedef BOOL if found. // rdar://11231426 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154595 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ff34d401ff385ef7173ca612432b4ea717fff690 |
12-Apr-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Implement support for 18 of the GNU-compatible __atomic builtins. This is not quite sufficient for libstdc++'s <atomic>: we still need __atomic_test_and_set and __atomic_clear, and may need a more complete __atomic_is_lock_free implementation. We are also missing an implementation of __atomic_always_lock_free, __atomic_nand_fetch, and __atomic_fetch_nand, but those aren't needed for libstdc++. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154579 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
fafbf06732746f3ceca21d452d77b144ba8652ae |
11-Apr-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Provide, and document, a set of __c11_atomic_* intrinsics to implement C11's <stdatomic.h> header. In passing, fix LanguageExtensions to note that C11 and C++11 are no longer "upcoming standards" but are now actually standardized. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154513 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
adf7c854380cecb649e64a6ea1b5dbaf166a4365 |
11-Apr-2012 |
David Chisnall <csdavec@swan.ac.uk> |
Clean up last commit as per dgregor's comments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154501 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
3a3c9b26ded46cb9055564adb2f48911eef84ace |
11-Apr-2012 |
David Chisnall <csdavec@swan.ac.uk> |
Allow c++ initialisers to initialise _Atomic fields. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154499 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
69a30b838c723cb1850de55cfa48a402cfeeb6e0 |
10-Apr-2012 |
Douglas Gregor <dgregor@apple.com> |
When we determine that an initialization sequence failed due to an incomplete type, keep track of the actual type that was incomplete. Otherwise, we might fail to produce a diagnostic. Fixes PR12498. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154432 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
50fadd19497f5fa6d8737786ba74af8354d28349 |
10-Apr-2012 |
Douglas Gregor <dgregor@apple.com> |
Improve diagnostics in C++11 when a non-type template argument for a non-type template parameter of pointer type is not a constant expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154424 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
90f5f47348b6581eab5d42eaeacf7f2b28b8118f |
10-Apr-2012 |
Douglas Gregor <dgregor@apple.com> |
Include the Objective-C parameter- and return-passing qualifiers when providing code completions for Objective-C method declarations. Fixes <rdar://problem/11164498>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154421 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
10ccf12a06cc1ef5b778c20565945f313a9a2c26 |
10-Apr-2012 |
Douglas Gregor <dgregor@apple.com> |
Don't include the ':' following code-completion suggestions for 'public', 'private', or 'protected', unless code completion patterns are enabled. Fixes <rdar://problem/11189132>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154413 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
e7ea28a5855beaa828e11f5b1ffe6cf0d6209861 |
10-Apr-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c: remove IsConstProperty as it does not seem to get called any more. Also add an assert in isModifiableLvalue. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154410 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
28a83f57003469fb615ad27dd34bcf5b0a10da8c |
10-Apr-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[code-complete] Introduce CodeCompletionTUInfo which will be used for caching code-completion related strings specific to a translation unit (ASTContext and related data) CodeCompletionAllocator does such limited caching, by caching the name assigned to a DeclContext*, but that is not the appropriate place since that object has a lifetime that can extend beyond that of an ASTContext. Introduce CodeCompletionTUInfo which will be always tied to a translation unit to do this kind of caching and move the caching of CodeCompletionAllocator into this object, and propagate it to all the places where it will be needed. The plan is to extend the caching where appropriate, using CodeCompletionTUInfo, to avoid re-calculating code-completion strings. Part of rdar://10796159. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154408 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
|
42963612a4187b55685b7f75489c11abd3fa100e |
10-Apr-2012 |
Douglas Gregor <dgregor@apple.com> |
Rework implementation of null non-type template arguments based on Richard's feedback, to properly catch non-constant expressions and type mismatches. Finishes <rdar://problem/11193097>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154407 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
5915561b32212af1179a2cabd894f49b4b0dc016 |
10-Apr-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c: add an assertion for property expression enterring IsConstProperty function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154406 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
63f557804b76bf765aea58e5a46503e47e21f7c1 |
09-Apr-2012 |
John McCall <rjmccall@apple.com> |
My original patch missed the virtual-base case for destroying base-class subojects. Incidentally, thinking about virtual bases makes it clear to me that we're not appropriately computing the access to the virtual base's member because we're not computing the best possible access to the virtual base at all; in fact, we're basically assuming it's public. I'll file a separate PR about that. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154346 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
12d8d80fb0f8d9cddecb34da0f37b0dc9fcaf5e6 |
09-Apr-2012 |
John McCall <rjmccall@apple.com> |
Fix the access check performed as part of the determination of whether to define a special member function as deleted so that it properly establishes an object context for the accesses to the base subobject members. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154343 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaDeclCXX.cpp
|
eb52f86a62db523e3c993686b3ed92c55d59d53c |
09-Apr-2012 |
David Blaikie <dblaikie@gmail.com> |
Fix bugs found by -Wconstant-conversion improvements currently under review. Specifically, using a an integer outside [0, 1] as a boolean constant seems to be an easy mistake to make with things like "x == a || b" where the author intended "x == a || x == b". The bug caused by calling SkipUntil with three token kinds was also identified by a VC diagnostic & reported by Francois Pichet as review feedback for my commit r154163. I've included test cases to verify the error recovery that was broken/poorly implemented due to this bug. The other fix (lib/Sema/SemaExpr.cpp) seems like that code was never actually reached in any of Clang's tests & is related to Objective C features I'm not familiar with, so I've not been able to construct a test case for it. Perhaps someone else can. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154325 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b9abd87283ac6e929b7e12a577663bc99e61d020 |
07-Apr-2012 |
John McCall <rjmccall@apple.com> |
Fix several problems with protected access control: - The [class.protected] restriction is non-trivial for any instance member, even if the access lacks an object (for example, if it's a pointer-to-member constant). In this case, it is equivalent to requiring the naming class to equal the context class. - The [class.protected] restriction applies to accesses to constructors and destructors. A protected constructor or destructor can only be used to create or destroy a base subobject, as a direct result. - Several places were dropping or misapplying object information. The standard could really be much clearer about what the object type is supposed to be in some of these accesses. Usually it's easy enough to find a reasonable answer, but still, the standard makes a very confident statement about accesses to instance members only being possible in either pointer-to-member literals or member access expressions, which just completely ignores concepts like constructor and destructor calls, using declarations, unevaluated field references, etc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154248 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaInit.cpp
|
d2008e2c80d6c9282044ec873a937a17a0f33579 |
07-Apr-2012 |
Douglas Gregor <dgregor@apple.com> |
Implement support for null non-type template arguments for non-type template parameters of pointer, pointer-to-member, or nullptr_t type in C++11. Fixes PR9700 / <rdar://problem/11193097>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154219 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
|
83cad4544f8a89fb6a611f330d71d027c238375e |
06-Apr-2012 |
DeLesley Hutchins <delesley@google.com> |
Thread safety analysis: downgraded requirement that mutex expressions refer to a lockable type from error to warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154198 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
7f39d51d9c8f551fd09c1feee3d8033f5702b2cb |
06-Apr-2012 |
John McCall <rjmccall@apple.com> |
Fix a Sema invariant bug that I recently introduced involving the template instantiation of statement-expressions. I think it was jyasskin who had a crashing testcase in this area; hopefully this fixes it and he can find his testcase and check it in. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154189 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
reeTransform.h
|
b2f6820773aabff3c5c9e0dbb1cbbbda0d80c41f |
06-Apr-2012 |
Patrick Beard <pcbeard@mac.com> |
Added a new attribute, objc_root_class, which informs the compiler when a root class is intentionally declared. The warning this inhibits, -Wobjc-root-class, is opt-in for now. However, all clang unit tests that would trigger the warning have been updated to use -Wno-objc-root-class. <rdar://problem/7446698> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154187 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaDeclObjC.cpp
|
cf2fa2f0c9d67adb98b282ec0eaa88f08df29804 |
06-Apr-2012 |
DeLesley Hutchins <delesley@google.com> |
Fixed scoping error for late parsed attributes in nested classes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154173 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
bf9658c3c200ee19bf0b6b157149f2376e39d270 |
06-Apr-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Point the caret at the error for the 'expected namespace name' diagnostic in a namespace alias declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154138 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
bc1029b4a47282cb4ce27c7014acb864b10a4043 |
06-Apr-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Implement C90 pedantic warning for duplicate declaration specifiers which are duplicated via a typedef. Patch by Tim Northover. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154136 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
ae916a14cf727b4ce3ac316f4fd780d1c83c5baf |
06-Apr-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Properly implement the C rules for composite types for qualified pointers in conditionals. Patch by Tim Northover. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154134 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
bf393be8a0b8b573ceb23ed19ac953832a2a69e4 |
06-Apr-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c: Don't warn when a category does not implement a method declared in its adopted protocol when another category declares it because that category will implement it. // rdar://11186449 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154132 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
a85cf39786fffd6860a940523be01eb02a4935c0 |
05-Apr-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Improve diagnostics for invalid use of non-static members / this: * s/nonstatic/non-static/ in the diagnostics, since the latter form outvoted the former by 28-2 in our diagnostics. * Fix the "use of member in static member function" diagnostic to correctly detect this situation inside a block or lambda. * Produce a more specific "invalid use of non-static member" diagnostic for the case where a nested class member refers to a member of a lexically-surrounding class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154073 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprMember.cpp
|
5b4bf13761303978c22f67984b4548379a189166 |
05-Apr-2012 |
Douglas Gregor <dgregor@apple.com> |
Allow a conversion from the empty initializer list {} to an std::initializer_list<T> so long as <T> is known. This conversion has identity rank. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154065 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
b4051e7047a0085f0679257386ff183aed3e5162 |
04-Apr-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Implement C++11 [temp.arg.nontype]'s permission to use the address of an object or function with internal linkage as a non-type template argument. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154053 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
878f8502ebea491b818b48e342f9ad9de2feaff6 |
04-Apr-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objc-arc: provide a warning when 'receiver' of a message is 'weak' in arc mode and opted-in with -Wreceiver-is-weak flag. // rdar://10225276 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154042 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
f54486acc1cadf2791c3916ece66fded1e57ba0b |
04-Apr-2012 |
Douglas Gregor <dgregor@apple.com> |
Move the computation of the lambda mangling information (mangling number + context) to the point where we initially start defining the lambda, so that the linkage won't change when that information is made available. Fixes the assertion in <rdar://problem/11182962>. Plus, actually mangle the context of lambdas properly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154029 91177308-0d34-0410-b5e6-96231b3b80d8
emaLambda.cpp
reeTransform.h
|
5a5a971908a1fd064454db44c42333a3aecf3d5b |
04-Apr-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
For PR11916: Add support for g++'s __int128 keyword. Unlike __int128_t, this is a type specifier and can be combined with unsigned. This allows libstdc++4.7 to be used with clang in c++98 mode. Several other changes are still required for libstdc++4.7 to work with clang in c++11 mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153999 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
emaTemplateVariadic.cpp
emaType.cpp
|
d280389b42bb55cd8969eae181dc3ff9f05e9aaf |
04-Apr-2012 |
Douglas Gregor <dgregor@apple.com> |
When performing template argument deduction for an initializer list, be sure to perform the argument type adjustments in [temp.deduct.call]p2, e.g., array decay. And, when performing these deductions in the context of 'auto', make sure that we're deducing the P' in std::initializer_list<P'> rather than the whole initializer list. Together, this makes code like for( auto s : {"Deferred", "New", "Open", "Review"}) { } work properly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153998 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
a9b55a499a8b5ae0c4b373f751ef62af74ec494e |
04-Apr-2012 |
Douglas Gregor <dgregor@apple.com> |
Dependent-sequence initialization of a single element can be direct list-initialization. Loosen an over-eager assertion to fix PR12453. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153995 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
e14ba2cec3807df892917171b590bac25b779b46 |
04-Apr-2012 |
John McCall <rjmccall@apple.com> |
When computing the conversion sequence in overload resolution for converting an empty list to a scalar, be sure to initialize the source and destination types so that comparison of conversion sequences will work in case there are multiple viable candidates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153993 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
95e3872918557b55b62121a7df5f1ee76d45881a |
04-Apr-2012 |
Nick Lewycky <nicholas@mxc.ca> |
If something already instantiated is reinstantiated as an explicit definition, keep the latter. No test. This was noticed when poking around something else with GDB. I'm not able to figure out a testcase that would break due to this bug. Sorry. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153992 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
73f428cf2c5a0847014a3125b7bb8d271aaa7c65 |
04-Apr-2012 |
John McCall <rjmccall@apple.com> |
Enter an expression evaluation context when parsing statement-expressions. Prevents cleanups and such from being claimed by the first full-expression in the block. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153989 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
6c656c3d89523d8ddd143f96e11f6bc16c10c60b |
04-Apr-2012 |
Ted Kremenek <kremenek@apple.com> |
Remove dead assignment to local variable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153985 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDeclCXX.cpp
emaExpr.cpp
|
173a37a57b79bd8f94b85c2273039e760b159922 |
03-Apr-2012 |
Nick Lewycky <nicholas@mxc.ca> |
Remove more redundant lookups. Add a new "all_lookups_iterator" which provides a view over the contents of a DeclContext without exposing the implementation details of the StoredDeclsMap. Use this in LookupVisibleDecls to find the visible declarations. Fixes PR12339! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153970 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
emaLookup.cpp
|
893a6eaf52930701950b7fc01a2478bb86899b77 |
03-Apr-2012 |
Nick Lewycky <nicholas@mxc.ca> |
Don't treat synthesized ivars as being in the base class for the purpose of looking up visible decls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153967 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
6d858d96ea294baecdf3e7ad3f3c5395c00dec8e |
03-Apr-2012 |
Kaelyn Uhrain <rikka@google.com> |
Replace the workaround from r153445 with a proper fix. Infinite recursion was happening when DiagnoseInvalidRedeclaration called ActOnFunctionDeclarator to check if a typo correction works when the correction was just to the nested-name-specifier because the wrong DeclContext was being passed in. Unlike a number of functions surrounding typo correction, the DeclContext passed in for a function is the context of the function name after applying any nested name specifiers, not the lexical DeclContext where the function+nested-name-specifier appears. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153962 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaLookup.cpp
|
e6af6604b905435456f49cd4a37da0ce6e505c38 |
02-Apr-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR10217 diagnostic fix: don't say 'copy constructor' when we mean 'copy assignment operator'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153897 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
5bdaac5454d93d1dcdc2319818497b685be56fcf |
02-Apr-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Finish PR10217: Ensure we say that a special member was implicitly, not explicitly, deleted in all relevant cases, and explain why. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153894 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExpr.cpp
emaOverload.cpp
|
e7d0bbfa101d0f0b955c04c417b5e3283497a7ed |
02-Apr-2012 |
Matt Beaumont-Gay <matthewbg@google.com> |
Silence -Wunused-variable in -Asserts build git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153885 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
1c931be1873f8c20cdcb5060c84570cd3359aa02 |
02-Apr-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Implement DR1402: if a field or base class is not movable, the derived class's move constructor/move assignment operator are not declared, rather than being defined as deleted, so move operations on the derived class fall back to copying rather than moving. If a move operation on the derived class is explicitly defaulted, the unmovable subobject will be copied instead of being moved. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153883 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
c5a89a1cc2f168ad0a115c560b8de5f1c952d8c5 |
02-Apr-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Basic semantic analysis support for inheriting constructor declarations in dependent contexts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153858 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
|
70e24fccc8ef4aa8be03a778e9655bfcfa79dd14 |
01-Apr-2012 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Properly handle explicit constructors in list-initialization. Fixes PR12120. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153849 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
6c4c36c4ed1007143f5b8655eb68b313a7e12e76 |
30-Mar-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR10217: Provide diagnostics explaining why an implicitly-deleted special member function is deleted. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153773 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaLookup.cpp
|
8b0fa5241a0416fc50dfbb7e38f20e777f191848 |
30-Mar-2012 |
Douglas Gregor <dgregor@apple.com> |
If we encounter a friend class template for which we cannot resolve the nested-name-specifier (e.g., because it is dependent), do not error even though we can't represent it in the AST at this point. This is a horrible, horrible hack. The actual feature we still need to implement (for C++98!) is covered by PR12292. However, we used to silently accept this code, so when we recently started rejecting it we caused some regressions (e.g., <rdar://problem/11147355>). This hack brings us back to the passable-but-not-good state we had previously. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153752 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
29bbd1a33edfd3c81c35d5076530c2867a05bddc |
30-Mar-2012 |
John McCall <rjmccall@apple.com> |
Handle placeholder expressions in an ObjC for-collection loop. The way we handle this implicitly removes the ability to use property l-values in this position, but that's really okay. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153729 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
100c6491c99e92f6b6e9551d0b0cfe3d65eb306b |
30-Mar-2012 |
John McCall <rjmccall@apple.com> |
Forbid the block and lambda copy-capture of __autoreleasing variables in ARC, under the usual reasoning limiting the use of __autoreleasing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153725 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
38ac243e300798e8cd9fe05888cd97beabfb94e6 |
30-Mar-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Make sure we perform the relevant implied conversions correctly for ObjC methods with related result types. PR12384. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153716 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
b085d898bdfe35097eba45f4072b0f6865f561dc |
30-Mar-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Add info to ObjCPropertyRefExpr to indicate whether the dot syntax property reference is going to message the setter, the getter, or both. Having this info on the ObjCPropertyRefExpr node makes it easier for AST clients (like libclang) to reason about the meaning of the property reference. [AST/Sema] -Use 2 bits (with a PointerIntPair) in ObjCPropertyRefExpr to record the above info -Have ObjCPropertyOpBuilder set the info appropriately. [libclang] -When there is an implicit property reference (property syntax using methods) have clang_getCursorReferenced return a cursor for the method. If the property reference is going to result in messaging both the getter and the setter choose to return a cursor for the setter because it is less obvious from source inspection that the setter is getting called. The general idea has the seal of approval by John. rdar://11151621 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153709 91177308-0d34-0410-b5e6-96231b3b80d8
emaPseudoObject.cpp
|
1ef28dbcf1a8b72f590f2d73bc204e85605ab605 |
30-Mar-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Extend -Wc++11-narrowing to cover converted constant expressions as well as braced-initializers. <rdar://problem/11121178>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153703 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
df8dc86148a209792dfcbe7b05a00294ed3bcff4 |
29-Mar-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Refactor special member function deletion. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153673 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
2ebb98a78471f2039af4321bae657e7daacc2a62 |
29-Mar-2012 |
David Chisnall <csdavec@swan.ac.uk> |
Pass parameters in the correct order when assembling an AtomicExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153665 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
a78eca20429e55b041bffcea1938cd0df07a6ebd |
28-Mar-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c: Improve diagnostics and provide 'fixit' hint when dictionary index is not of proper type. // rdar://11062080 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153584 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaPseudoObject.cpp
|
6960587df0bd1b421c11715807a4d2302a3aae3c |
28-Mar-2012 |
Douglas Gregor <dgregor@apple.com> |
Unify and fix our checking of C++ [dcl.meaning]p1's requirements concerning qualified declarator-ids. We now diagnose extraneous qualification at namespace scope (which we had previously missed) and diagnose these qualification errors for all kinds of declarations; it was rather uneven before. Fixes <rdar://problem/11135644>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153577 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaTemplate.cpp
|
1e1e9722cb4ea6027e2c4885c7a8f26d3726ca7d |
28-Mar-2012 |
Douglas Gregor <dgregor@apple.com> |
When we form a new function/class template specialization, we first search for the specialization (in a folding set) and, if not found form a *Decl that is then inserted into that folding set. In rare cases, the folding set may be reallocated between the search and the insertion, causing a crash. No test case, because triggering rehashing consistently in a small test case is not feasible. Fixes <rdar://problem/11115071>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153575 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
ba1030698dbc276db86b11c5329a1edee8a1805e |
28-Mar-2012 |
Douglas Gregor <dgregor@apple.com> |
Introduce a new libclang API to determine the parent context of a code completion item. For example, if the code completion itself represents a declaration in a namespace (say, std::vector), then this API retrieves the cursor kind and name of the namespace (std). Implements <rdar://problem/11121951>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153545 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
|
f78c0f9aaabf32f5b5f8633b0066e611b24640ee |
27-Mar-2012 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Even more careful consideration of C++11 13.3.3.1p4. Fixes PR12241. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153523 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
0724b7c43007d978c46f890dcd2ab3c8d3c22920 |
26-Mar-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Add a special-case diagnostic for one of the more obnoxious special cases of unscoped enumeration members: an enumerator name which is visible in the out-of-class definition of a member of a templated class might not actually exist in the instantiation of that class, if the enumeration is also lexically defined outside the class definition and is explicitly specialized. Depending on the result of a CWG discussion, we may have a different resolution for a class of problems in this area, but this fixes the immediate issue of a crash-on-invalid / accepts-invalid (depending on +Asserts). Thanks to Johannes Schaub for digging into the standard wording to find how this case is currently specified to behave. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153461 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
1eb18afd931f626713c066ede0707ceb522fa061 |
26-Mar-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Move CodeCompletionBuilder's chunk adding methods out of line. This makes sense because chunk's ctor is also out of line and simplifies considerably when inlined with a constant parameter. Shrinks clang on i386-linux-Release+Asserts by 65k. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153446 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
|
0179868cce096101236261ff64eca30224b1f233 |
26-Mar-2012 |
Douglas Gregor <dgregor@apple.com> |
When diagnosing an invalid out-of-line redeclaration, don't permit typo correction to introduce a nested-name-specifier; we aren't prepared to handle it here. Fixes PR12297 / <rdar://problem/11075219>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153445 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaLookup.cpp
|
ecafd309b3ed2ffc6f8ae7eecd1e7eae84b26f81 |
26-Mar-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
ThreadSafetyReporter: Manage diagnostics in a std::list. std::list is expensive, but so is std::sorting a SmallVector of SmallVectors of heavyweight PartialDiagnostics. Saves ~30k in a i386-linux-Release+Asserts clang build. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153437 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
38f0df352fadc546c5666079fb22de5ec1819d92 |
26-Mar-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Handle instantiations of redeclarations of forward-declared enumerations within templated functions. Build a redeclaration chain, and only instantiate the definition of the enum when visiting the defining declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153427 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
4ca93d9978aac02b01814b4f749d6903a1f87ee5 |
26-Mar-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Delay checking of dependent underlying types for redeclarations of member enumerations in templates until the template is instantiated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153426 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplateInstantiateDecl.cpp
|
560ad31c413724fafd13d6fd723e403f28daa132 |
22-Mar-2012 |
Shih-wei Liao <sliao@google.com> |
Migrate external/clang to CLANG-153220-20120321. Change-Id: I3b469a42a5048f05f06d14aba34419119047e1a9
ndroid.mk
|
d316862f4fb281ec08a2e45cd3e5580574adb889 |
24-Mar-2012 |
Shih-wei Liao <sliao@google.com> |
Merge branch 'upstream' into sliao_d
|
f602806965531ee06fd8664b9d7a8912c4af2870 |
24-Mar-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Teach APValue printer to print boolean 0 and 1 as 'false' and 'true'. Fix up some calling code to actually pass in a non-null type, to avoid a crash. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153358 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
emaOverload.cpp
|
fce79ebc6c16676b106ade71356b3adfc11493e7 |
24-Mar-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Make sure we don't accept an @interface inside another objc container just because there was an attribute in front of it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153355 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
3343fad1f1ec81af43674b76eddbe9ab10e344eb |
24-Mar-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
When defining a forward-declared enum, don't try to attach the definition to a previous declaration if the redeclaration is invalid. That way lies madness. Fixes a crash-on-invalid reported by Abramo. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153349 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplateInstantiate.cpp
|
1af83c444e5a2f6f50a6e1c15e6ebc618ae18a5f |
23-Mar-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Support for definitions of member enumerations of class templates outside the class template's definition, and for explicit specializations of such enum members. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153304 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
emaDecl.cpp
emaLookup.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
564f4c5664f552becbd05407611a92754c40e641 |
22-Mar-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
During the instantiation of a class template specialization, that specialization is known to be incomplete. If we're asked to try to complete it, don't attempt to instantiate it again -- that can lead to stack overflow, and to rejects-valids if the class being incomplete is not an error. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153236 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
54faba4f7f3f0e8f1376da1c459312596ad5486d |
21-Mar-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
For enums with no tag name, display its location in the diagnostic instead of displaying ''. // rdar://11082110 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153219 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
9354f6aaa70e1543d122644fee0c3f834324d2fc |
21-Mar-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
fixes the diagnostic issued in // rdar://11069896 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153217 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
4e648e4770d85febaf15ad8b7bad458bd7338ae2 |
21-Mar-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
Allow void blocks to return witn a void expression in c-mode to match behavior with void functions in c. Issue warning with -pedantic. // rdar://11069896 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153200 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
3ef963bab9916ff4d2def248db1ce38a55bfce18 |
21-Mar-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
Undo previous patch as I checked more than I intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153193 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
7e725bc7a099fefa5e0f03e2208838d3cdf064e3 |
21-Mar-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
modern objective-c rewriter: remove 'const' from pointer field declarations in several meta-data. // rdar://11079898 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153192 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
1cd89c4d60d7a458de733a4ea81d5580df82a652 |
20-Mar-2012 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
More careful consideration of C++11 13.3.3.1p4. Fixes PR12257. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153130 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
07b49a88df1bad9305696f360f46cbe3b722ba40 |
18-Mar-2012 |
David Blaikie <dblaikie@gmail.com> |
Use character literals for vexing initialization fixit hints. Instead of suggesting " = 0" for "char c();", suggest " = '\0'", and similarly for other char types (wide, 16, and 32). Add tests for all these, and since this means testing such hints under C++0x, add tests for some untested C++0x hint cases in the existing code, including suggesting nullptr for pointer initialization. This sets up the initialization helper to provide better type fidelity that will be especially helpful for non-assignment cases (such as fixit-correcting NULL usage in function calls (eg: foo(char) + foo(NULL) => foo('\0') instead of the less informative foo(0))) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153008 91177308-0d34-0410-b5e6-96231b3b80d8
emaFixItUtils.cpp
|
957ff27311d444fb87b5b3acb6f44d5de4533b23 |
18-Mar-2012 |
Douglas Gregor <dgregor@apple.com> |
Replace a FIXME with a diagnostic when we can't resolve the nested-name-specifier for a class template declaration. Fixes PR12291. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153006 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
42aceadbc3806868cee8ac576347d258ac99e1f6 |
18-Mar-2012 |
Douglas Gregor <dgregor@apple.com> |
Diagnose tag and class template declarations with qualified declarator-ids that occur at class scope. Fixes PR8019. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153002 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplate.cpp
|
8e42f2782338666ec67eab2e709e18b92060eeba |
17-Mar-2012 |
Douglas Gregor <dgregor@apple.com> |
When determining the availability of an enum constant, also consider the availability of the enumeration type itself. Fixes <rdar://problem/10996386>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152977 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
|
2c085ede8d0186b6b91d553fdb0d95798501c20f |
17-Mar-2012 |
Ted Kremenek <kremenek@apple.com> |
Fix crash on invalid code. I've tried to produce a reduced test case, but when I do the specific crash is hidden. Fixes <rdar://problem/11063594>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152968 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprMember.cpp
|
b1360498b0c0794fd7925f4bdac68ae91ff7493b |
16-Mar-2012 |
David Blaikie <dblaikie@gmail.com> |
Suppress macro expansion of NULL in NULL warnings. For "int i = NULL;" we would produce: null.cpp:5:11: warning: implicit conversion of NULL constant to integer [-Wconversion] int i = NULL; ~ ^~~~ null.cpp:1:14: note: expanded from macro 'NULL' \#define NULL __null ^~~~~~ But we really shouldn't trace that macro expansion back into the header, yet we still want macro back traces for code like this: \#define FOO NULL int i = FOO; or \#define FOO int i = NULL; FOO While providing appropriate tagging at different levels of the expansion, etc. The included test case exercises these cases & does some basic validation (to ensure we don't have macro expansion notes where we shouldn't, and do where we should) - but doesn't go as far as to validate the source location/ranges used in those notes and warnings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152940 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
9c6fde5ac9c4a696baaa637a7fb6d83fe91e1e09 |
16-Mar-2012 |
Nick Lewycky <nicholas@mxc.ca> |
Skip through transparent contexts when deciding where to add a friend function. This fixes g++.dg/parse/friend5.C. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152938 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
0961a01ebec0e31664bfe464bf4a0ac7b0891a1f |
16-Mar-2012 |
David Chisnall <csdavec@swan.ac.uk> |
Warn on flexible array members when in C89 mode, with -pedantic. This fixes PR 4307. Patch by Eitan Adler! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152918 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
4b911e6536ed77524c3cef572cb0f6c8d9079e2e |
15-Mar-2012 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Support deducing template arguments from nested initializer lists. PR12119. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152848 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
2b2bbee3071cee1b03520d9bf0c80c4f0bbe60eb |
15-Mar-2012 |
David Blaikie <dblaikie@gmail.com> |
Provide the specific target type in the -Wnull-conversion warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152835 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
878416d37b5cc82444b4f96d1b58f044a181fc16 |
15-Mar-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Remove a variable rendered unused by r152750. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152758 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f1c66b40213784a1c4612f04c14cafa2b0e89988 |
15-Mar-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Instantiating a class template should not instantiate the definition of any scoped enumeration members. Later uses of an enumeration temploid as a nested name specifier should cause its instantiation. Plus some groundwork for explicit specialization of member enumerations of class templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152750 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
emaDecl.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
5a7120cf82b5f0110cb70aacad850c594a55b378 |
14-Mar-2012 |
Nick Lewycky <nicholas@mxc.ca> |
When emitting a diagnostic about two-phase name lookup, don't do useless qualified name lookups into transparent contexts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152739 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
f6b8b585596f6cf7924fecc5b7a741d4b45809dc |
14-Mar-2012 |
Douglas Gregor <dgregor@apple.com> |
Minor cleanup in attribute-related diagnostics, from Alexander Kornienko! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152725 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
393eed7fb901e49085c8583ff0439d1273b6f2fe |
14-Mar-2012 |
Daniel Dunbar <daniel@zuster.org> |
[Sema] Fix SemaDiagnosticBuilder to be inline. - As with DiagnosticBuilder, it is very important that SemaDiagnosticBuilder be completely inline to ensure that the compiler can rip it apart and sink it to registers. This is good for another 30k reduction in code size. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152708 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
00b43848e4a320b0845c1004694fa50920096c75 |
13-Mar-2012 |
Daniel Dunbar <daniel@zuster.org> |
Spelling. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152644 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
9cda03ff7fc40b727d0cc44b1702dbae09d63f42 |
13-Mar-2012 |
James Molloy <james.molloy@arm.com> |
Ensure that default arguments are handled correctly in sub scopes. For example: void f () { int g (int a, int b=4); { int g(int a, int b=5); } } should compile. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152621 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
e37f484ab9a65ce4e5f90adcfa20add4215e0783 |
13-Mar-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Implement [temp.param]p5: the top-level cv-qualifiers on a non-type template parameter's declaration are ignored when determining the parameter's type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152619 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
7c5d28b6342229fb648aea59dc063f67ff16bc81 |
13-Mar-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR11850 + duplicates: don't assume that a function parameter pack expansion is at the end of the parameter list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152618 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
b03a9df68140a393cbef73a23115a0818aff6010 |
13-Mar-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR11925: A function can't have a variably-modified return type. Not even in C++. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152615 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
65daef179790a02eab1b5a989f53984375a06483 |
13-Mar-2012 |
Nick Lewycky <nicholas@mxc.ca> |
It never makes sense to do a lookup into a LinkageSpecDecl, so assert that we don't, and clean up the places that do it. The change to ASTWriter is surprising, but the deleted code is a no-op as of r152608. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152609 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
1b7f9cbed1b96b58a6e5f7808ebc9345a76a0936 |
13-Mar-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix PR10447: lazily building name lookup tables for DeclContexts was broken. The deferred lookup table building step couldn't accurately tell which Decls should be included in the lookup table, and consequently built different tables in some cases. Fix this by removing lazy building of DeclContext name lookup tables. In practice, the laziness was frequently not worthwhile in C++, because we performed lookup into most DeclContexts. In C, it had a bit more value, since there is no qualified lookup. In the place of lazy lookup table building, we simply don't build lookup tables for function DeclContexts at all. Such name lookup tables are not useful, since they don't capture the scoping information required to correctly perform name lookup in a function scope. The resulting performance delta is within the noise on my testing, but appears to be a very slight win for C++ and a very slight loss for C. The C performance can probably be recovered (if it is a measurable problem) by avoiding building the lookup table for the translation unit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152608 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaLookup.cpp
emaObjCProperty.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
a5f4441de7890953460d95f4e88b9fa432b48dc2 |
13-Mar-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[Sema] Prefer to use ObjCInterfaceDecl's protocol_begin()/protocol_end() iterators instead of ObjCInterfaceDecl::getReferencedProtocols(), because the iterators are safe to use even if the caller did not check that the interface is a definition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152597 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
cd707abbc758149d9f7d37bd0b25298455c678b2 |
13-Mar-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Fix crash at @implementation with a forward reference as base class. rdar://11020003 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152596 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
78dae24600a877f52dbb6e58bfd5778754a00974 |
13-Mar-2012 |
John McCall <rjmccall@apple.com> |
Alternate fix to PR12248: put Sema in charge of special-casing the diagnostic for assigning to a copied block capture. This has the pleasant side-effect of letting us special-case the diagnostic for assigning to a copied lambda capture as well, without introducing a new non-modifiable enumerator for it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152593 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
860d9b780b54f56cd27e16620196d213385d31f7 |
12-Mar-2012 |
Douglas Gregor <dgregor@apple.com> |
C++11 [temp.deduct.call]p6 tweak: when given a set of overlaoded functions that includes an explicit template argument list, perform an inner deduction against each of the function templates in that list and, if successful, use the result of that deduction for the outer template argument deduction. Fixes PR11713. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152575 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
9a0b6b4e2bf6a9ef41d32b4e83f2911981d2d44d |
12-Mar-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[Sema] -Add an invalid objc category to the DeclContext so that it can be serialized -Don't add methods of invalid objc containers to the global method pool. This protects us from trying to serialize a method whose container was not serialized. Part of rdar://11007039. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152566 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
d8b5ca14277e142506daed181ecff9151dfae32c |
12-Mar-2012 |
Jordy Rose <jediknil@belkadan.com> |
ObjCBoolLiterals (__objc_yes/__objc_no) behave like C++ booleans (true/false). They are NOT objects. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152564 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
7796eb5643244f3134834253ce5ea89107ac21c1 |
12-Mar-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix parsing of trailing-return-type. Types are syntactically prohibited from being defined here: [] () -> struct S {} does not define struct S. In passing, implement DR1318 (syntactic disambiguation of 'final'). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152551 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
4e4d08403ca5cfd4d558fa2936215d3a4e5a528d |
11-Mar-2012 |
David Blaikie <dblaikie@gmail.com> |
Unify naming of LangOptions variable/get function across the Clang stack (Lex to AST). The member variable is always "LangOpts" and the member function is always "getLangOpts". Reviewed by Chris Lattner git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152536 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
dentifierResolver.cpp
umpDiagnostics.cpp
ema.cpp
emaAccess.cpp
emaAttr.cpp
emaCXXScopeSpec.cpp
emaCast.cpp
emaChecking.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExceptionSpec.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprMember.cpp
emaExprObjC.cpp
emaInit.cpp
emaLambda.cpp
emaLookup.cpp
emaObjCProperty.cpp
emaOverload.cpp
emaPseudoObject.cpp
emaStmt.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaTemplateVariadic.cpp
emaType.cpp
argetAttributesSema.cpp
reeTransform.h
|
fc55a8290a3e81111c0a373e1a04b09dd7da0b98 |
11-Mar-2012 |
Douglas Gregor <dgregor@apple.com> |
When template argument deduction is ignoring qualifiers, perform deep structural comparison of non-dependent types. Otherwise, we end up rejecting cases where the non-dependent types don't match due to qualifiers in, e.g., a pointee type. Fixes PR12132. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152529 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
5a7a5bb20904a1d34255b772c87b930e798f59a8 |
11-Mar-2012 |
Douglas Gregor <dgregor@apple.com> |
When determining whether an identifier followed by a '<' in a member access expression is the start of a template-id, ignore function templates found in the context of the entire postfix-expression. Fixes PR11856. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152520 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
426d6ca163e20187761aa55a67797dac51508d0d |
11-Mar-2012 |
David Blaikie <dblaikie@gmail.com> |
Fix crash & accepts-invalid for array of arrays of user defined type. Test case/other help by Richard Smith. Code review by John McCall. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152519 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
e5658f0ab2a6f8fea258adb64edbb8485bb21dee |
10-Mar-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR12225: The requirement that literal operators be namespace-scope functions does not imply that such functions can't be declared at block scope. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152509 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
f4b88a45902af1802a1cb42ba48b1c474474f228 |
10-Mar-2012 |
John McCall <rjmccall@apple.com> |
Remove BlockDeclRefExpr and introduce a bit on DeclRefExpr to track whether the referenced declaration comes from an enclosing local context. I'm amenable to suggestions about the exact meaning of this bit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152491 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaObjCProperty.cpp
emaOverload.cpp
emaTemplateVariadic.cpp
reeTransform.h
|
1659c3758b4b2dbd618aed9ff8d1863f11b1bd9b |
10-Mar-2012 |
Nick Lewycky <nicholas@mxc.ca> |
Slightly tweak this condition. "isTransparentContext()" was checking whether an enum is scoped or not, which is not relevant here. Instead, phrase the loop in the same terms that the standard uses, instead of this awkward set of conditions that is *nearly* equal. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152489 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
8d17681906209923fad4a02d829a857a447f137b |
10-Mar-2012 |
Nick Lewycky <nicholas@mxc.ca> |
Could not find this in C99. Perhaps this rule comes from a DR, but in any case please annotate it with a note explaining why this wrong-seeming behaviour is correct. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152488 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f52757d63f90e0d03eba20318f6036db944ba50c |
10-Mar-2012 |
Douglas Gregor <dgregor@apple.com> |
Only make a call to a copy constructor elidable if in fact we are doing a copy. Fixes PR12139. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152485 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
a346efaaad5cd779cdfd5be73c2b258748ad1f06 |
10-Mar-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[Sema] A tag decl that is marked as invalid and is used in a decl-spec, should not impede creating a proper TypeLoc info for the decl-spec. This improves our semantic error recovery. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152481 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
db762ef262987403b4e2a3bb8d5762277306a224 |
10-Mar-2012 |
Douglas Gregor <dgregor@apple.com> |
Qualifiers on a canonical array type go on the outermost type, not the innermost type. Fixes PR12142. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152456 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
e7d6ca079a68ed9ea7fa6e5d6bfc9f625a37df76 |
09-Mar-2012 |
Daniel Dunbar <daniel@zuster.org> |
[Sema] Fix a diag change to include a range that appeared intended, but never actually happened. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152442 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
216f78b7333dbc89f58fa69066396ae3237da6da |
09-Mar-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Improve our semantic error recovery. When an error made a record member invalid, the record would stay as "isBeingDefined" and not "completeDefinition". Even easily recoverable errors ended up propagating records in such "beingDefined" state, for example: struct A { ~A() const; // expected-error {{'const' qualifier is not allowed on a destructor}} }; struct B : A {}; // A & B would stay as "not complete definition" and "being defined". This weird state was impending lookups in the records and hitting assertion in the ASTWriter. Part of rdar://11007039 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152432 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaLookup.cpp
|
780249b1a3107302f053f3ddc047ab3c14b87b30 |
09-Mar-2012 |
Daniel Dunbar <daniel@zuster.org> |
[Sema] Remove dead getSourceRange() call, caught by Clang after marking LLVM_READONLY. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152428 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
509fb3e2cdf31a0be375eb74bedfddeb648f7d36 |
09-Mar-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
lldb support: under debugger support flag, when sending message to forward class, and assigning to an 'id' type var, message sends default to 'id'. // rdar"//10988847 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152420 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
96a0014f9b963d8a987f1cccd48808a47f9c6331 |
09-Mar-2012 |
Daniel Dunbar <daniel@zuster.org> |
[AST/Sema/libclang] Replace getSourceRange().getBegin() with getLocStart(). - getSourceRange().getBegin() is about as awesome a pattern as .copy().size(). I already killed the hot paths so this doesn't seem to impact performance on my tests-of-the-day, but it is a much more sensible (and shorter) pattern. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152419 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
emaTemplate.cpp
emaType.cpp
|
f85626453123f9691bcef13cff963f556e209c27 |
09-Mar-2012 |
Hans Wennborg <hans@hanshq.net> |
-Wformat-non-iso: warn about positional arguments (pr12017) This renames the -Wformat-non-standard flag to -Wformat-non-iso, rewords the current warnings a bit (pointing out that a format string is not supported by ISO C rather than being "non standard"), and adds a warning about positional arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152403 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
a9e88b2549add9766382c70d270dfd89fa33f7cf |
09-Mar-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Literal operators can't have default arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152394 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaOverload.cpp
|
36f5cfe4df32af6c5fe01228102512996f566f9d |
09-Mar-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Support for raw and template forms of numeric user-defined literals, and lots of tidying up. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152392 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExpr.cpp
emaLookup.cpp
emaOverload.cpp
|
5aba3eb1be234336767f86c7252ed307255f4d4d |
09-Mar-2012 |
John McCall <rjmccall@apple.com> |
Perform l2r conversions on delete operands before doing type-analysis; otherwise, we just completely do the wrong thing for placeholders. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152375 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
3d13c5a1e72ed8f8be9c083791d30643d1b1ec43 |
09-Mar-2012 |
Daniel Dunbar <daniel@zuster.org> |
[AST] Reduce Decl::getASTContext() calls. - This function is not at all free; pass it around along some hot paths instead of recomputing it deep inside various VarDecl methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152363 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
|
1e5bc4ffb2db5b575fb28d7ebffb6bb36b034162 |
08-Mar-2012 |
John McCall <rjmccall@apple.com> |
Don't crash when a statement in a block is ill-formed but introduces cleanups anyway. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152345 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
188158db29f50443b6e412f2a40c800b2669c957 |
08-Mar-2012 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Turn explicit construction of temporaries using initializer list syntax into CXXTemporaryObjectExprs, not just CXXConstructExprs, which have a worrying tendency to vanish. Fixes PR12167. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152340 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
025039377d7247620750205dbd61ca1ba336f7e0 |
08-Mar-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Replace MarkVarRequired with a more generic HandleCXXStaticMemberVarInstantiation. Suggested by Argyrios. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152320 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
b453ad3214d00acc51c9aa702c76c58354d84b84 |
08-Mar-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Add support for cooked forms of user-defined-integer-literal and user-defined-floating-literal. Support for raw forms of these literals to follow. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152302 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
2fb4ae36825ca3a0cbe7e845c5747062870066be |
08-Mar-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Implement C++11 [lex.ext]p10 for string and character literals: a ud-suffix not starting with an underscore is ill-formed. Since this rule rejects programs that were using <inttypes.h>'s macros, recover from this error by treating the ud-suffix as a separate preprocessing-token, with a DefaultError ExtWarn. The approach of treating such cases as two tokens is under discussion for standardization, but is in any case a conforming extension and allows existing codebases to keep building while the committee makes up its mind. Reword the warning on the definition of literal operators not starting with underscores (which are, strangely, legal) to more explicitly state that such operators can't be called by literals. Remove the special-case diagnostic for hexfloats, since it was both triggering in the wrong cases and incorrect. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152287 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
c2bd73bba5316aa294187995e8c37b4f0f224179 |
08-Mar-2012 |
Daniel Dunbar <daniel@zuster.org> |
Sema: Don't emit a gajillion calls to sanity() -- an empty function -- in NDEBUG builds. Sheesh. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152279 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
dd66be718f23c8149d74ae8b011b002e11e8d5ba |
08-Mar-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
User-defined literal support for character literals. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152277 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ffea6b4560cee39bd2a26f478e57da19fc3b47b2 |
08-Mar-2012 |
Richard Trieu <rtrieu@google.com> |
Fix -Wuninitialized to catch the case of a class being initialized with a call to its own member function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152276 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
a34194f035096dd8dce10574e3a186da968aa211 |
08-Mar-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
improve on diagnostic and provide a fixit hint when an uninitialized block variable is being called inside the block literal. // rdar://10817031 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152271 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
cbf82092cdb9e3a2e8528384c878f2084a14981c |
07-Mar-2012 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Be smarter in discovering list-initialization of temporaries. Fixes PR12182. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152231 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
9fcce65e7e1307b5b8da9be13e4092d6bb94dc1d |
07-Mar-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
AST representation for user-defined literals, plus just enough of semantic analysis to make the AST representation testable. They are represented by a new UserDefinedLiteral AST node, which is a sugared CallExpr. All semantic properties, including full CodeGen support, are achieved for free by this representation. UserDefinedLiterals can never be dependent, so no custom instantiation behavior is required. They are mangled as if they were direct calls to the underlying literal operator. This matches g++'s apparent behavior (but not its actual mangling, which is broken for literal-operator-ids). User-defined *string* literals are now fully-operational, but the semantic analysis is quite hacky and needs more work. No other forms of user-defined literal are created yet, but the AST support for them is present. This patch committed after midnight because we had already hit the quota for new kinds of literal yesterday. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152211 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaOverload.cpp
reeTransform.h
|
458a7fbe7349c7906fa4ca96c09e6ceb02aa8ea7 |
07-Mar-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c lldb support: don't perform ivar access control check when debugging. // rdar://10997647 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152187 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprMember.cpp
|
e53ac8aea2d9e8bbb11191398ea3cc2edb2d171a |
07-Mar-2012 |
Michael Han <Michael.Han@autodesk.com> |
Refactor Clang sema attribute handling. This submission improves Clang sema handling by using Clang tablegen to generate common boilerplate code. As a start, it implements AttributeList enumerator generation and case statements for AttributeList::getKind. A new field "SemaHandler" is introduced in Attr.td and by default set to 1 as most of attributes in Attr.td have semantic checking in Sema. For a small number of attributes that don't appear in Sema, the value is set to 0. Also there are a small number of attributes that only appear in Sema but not in Attr.td. Currently these attributes are still hardcoded in Sema AttributeList. Reviewed by Delesley Hutchins. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152169 91177308-0d34-0410-b5e6-96231b3b80d8
ttributeList.cpp
MakeLists.txt
emaDeclAttr.cpp
|
ba66c6c5eb9b8023b985960dff5b92d7aa7c8ad7 |
07-Mar-2012 |
Sean Callanan <scallanan@apple.com> |
Cleanup (style). Thanks to Argyrios for catching this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152158 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
00fd5ddc26843c26fde0f146fe4791361123692c |
06-Mar-2012 |
NAKAMURA Takumi <geek4civic@gmail.com> |
CMake: Fix build to add clangEdit to USED_LIBS. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152154 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
|
ce9c8319f43556d9c3fe2771665483d310d86fd8 |
06-Mar-2012 |
Sean Callanan <scallanan@apple.com> |
Extended the UnknownAnyTy resolver to handle blocks with unknown return types. This allows LLDB to call blocks even when their return types aren't provided in the debug information. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152147 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ebcb57a8d298862c65043e88b2429591ab3c58d3 |
06-Mar-2012 |
Ted Kremenek <kremenek@apple.com> |
Add clang support for new Objective-C literal syntax for NSDictionary, NSArray, NSNumber, and boolean literals. This includes both Sema and Codegen support. Included is also support for new Objective-C container subscripting. My apologies for the large patch. It was very difficult to break apart. The patch introduces changes to the driver as well to cause clang to link in additional runtime support when needed to support the new language features. Docs are forthcoming to document the implementation and behavior of these features. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152137 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaCast.cpp
emaCodeComplete.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaPseudoObject.cpp
emaStmt.cpp
emaTemplateVariadic.cpp
reeTransform.h
|
27949f65b089fec7902b2a15d718b3d1b0ccf988 |
06-Mar-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
Undo patch for // rdar://10735698 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152128 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
0cc323c6bed7206f9743a9775ec8d9cb90655f9c |
06-Mar-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
static_assert: Allow any string-literal as the message, not just a character string literal, and adjust the diagnostic code to match. This also causes us to escape any control characters in the message. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152069 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
361035524dc26094825134f30c07311f38f4f8b1 |
06-Mar-2012 |
Stephen Hines <srhines@google.com> |
Merge with upstream Clang @152062. Added include/clang/Config/config.h (note the ANDROID_CONFIG_H header guard because CONFIG_H is already taken) Added support for AttrTemplateInstantiate TableGen rules. Added libLLVMVectorize dependency. Build -HostInfo.cpp -CallGraph.cpp +GlobalCallGraph.cpp -MultiInitializer.cpp +PPCallbacks.cpp +SemaConsumer.cpp +ChainedDiagnosticConsumer.cpp +DependencyGraph.cpp +DiagnosticRenderer.cpp +LayoutOverrideSource.cpp +WindowsToolChain.cpp +SemaLambda.cpp +BoolAssignmentChecker.cpp +LambdaMangleContext.cpp +CStringSyntaxChecker.cpp +ObjCContainersASTChecker.cpp +ObjCContainersChecker.cpp +VirtualCallChecker.cpp +Dominators.cpp +SubEngine.cpp +RewriteModernObjC.cpp Change-Id: Ifda805ce87ae132f055131f4f83692b5c3d63d17
ndroid.mk
|
91932089c31e1233f0c478b03412e90a65e07ad2 |
05-Mar-2012 |
Stephen Hines <srhines@google.com> |
Merge branch 'upstream' into merge-20120305 Conflicts: lib/Basic/Targets.cpp Change-Id: Ib76c138030a701355ce39a6eda1a89a79f401667
|
2835745a451002798fed9800aeb19277f6a8fcb3 |
05-Mar-2012 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
If the element type of an initializer list has a destructor, make sure we check it. Fixes PR12178. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152048 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaInit.cpp
|
abf9d908cce6ffe2ee7b739d98fc7344a4f9fe3b |
05-Mar-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
patch to optionally warn for block implementations without explicit return types that return non-void values. // rdar://10735698 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152047 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
52c16682068850abee4a53495bdf69588d165acd |
05-Mar-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Avoid double lookup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152033 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
234fe654a3dd2888be42ae5db34db96c5c2c4ba3 |
05-Mar-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Fix a small difference in sema and codegen views of what needs to be output. In the included testcase, soma thinks that we already have a definition after we see the out of line decl. Codegen puts it in a deferred list, to be output if a use is seen. This would break when we saw an explicit template instantiation definition, since codegen would not be notified. This patch adds a method to the consumer interface so that soma can notify codegen that this decl is now required. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152024 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
b4a7b1e587a232c95d02a8ca10eeba60164fbba1 |
04-Mar-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Add tests for [over.literal]. Fix a few bugs which were exposed by the tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151997 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
1cb2d742eb6635aeab6132ee5f0b5781d39487d7 |
02-Mar-2012 |
Nico Weber <nicolasweber@gmx.de> |
Add -Wstring-plus-int, which warns on "str" + int and int + "str". It doesn't warn if the integer is known at compile time and within the bounds of the string. Discussion: http://comments.gmane.org/gmane.comp.compilers.clang.scm/47203 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151943 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b0a6615cb9f5e881b81b117017b484fe91112967 |
02-Mar-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objc: When issue diagnostic about deprecated method, also issue the note if it is because message is sent to a forward class declaration in delayed diagnostic. // rdar://10290322 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151942 91177308-0d34-0410-b5e6-96231b3b80d8
elayedDiagnostic.cpp
emaDeclAttr.cpp
|
5a61e0c4229dc82617a37a68ac2fc08d46e00488 |
02-Mar-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[Sema] Fix crash-on-invalid-code issue: @class I; @implementation I(cat) // crashes here @end rdar://10968158 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151931 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
a0e005b06b271f6dd1fdbbeed03d9e14f7f3e6a3 |
02-Mar-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
Change diagnostic test for my last patch. // rdar://10961370 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151923 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
16581335fc32abcbc6ab14eda7af38cf759664b7 |
02-Mar-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Ensure that we instantiate static reference data members of class templates early, since their values can be used in constant expressions in C++11. For odr-use checking, the opposite change is required, since references are odr-used whether or not they satisfy the requirements for appearing in a constant expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151881 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e853bb34ec1f86e12dcdaa9b5e782fac2117b08f |
02-Mar-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
c/objc: problem originally reported as an objective-c bug. But it is in the underlying c part of clang. clang crashes in IRGen when passing an incomplete type argument to variadic function (instead of diagnosing the bug). // rdar://10961370 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151862 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
88530d5e138f36ea80a7d70c14f37095b8eba85b |
01-Mar-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Fix the isReferenced bit on parameters in a couple of edge cases. PR12153. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151837 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaTemplateVariadic.cpp
|
23f0267e2d56c0407f12e62df3561ecf75d74e6e |
01-Mar-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Implement "optimization" for lambda-to-block conversion which inlines the generated block literal for lambdas which are immediately converted to block pointer type. This simplifies the AST, avoids an unnecessary copy of the lambda and makes it much easier to avoid copying the result onto the heap. Note that this transformation has a substantial semantic effect outside of ARC: it gives the converted lambda lifetime semantics similar to a block literal. With ARC, the effect is much less obvious because the lifetime of blocks is already managed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151797 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExprCXX.cpp
emaLambda.cpp
|
f6e88d7592a5b5ab19890a41ff71f5bf8ca2a9fa |
01-Mar-2012 |
Ted Kremenek <kremenek@apple.com> |
Fix regression from llvm-gcc where we should NOT emit a warning about __attribute__((NSObject)) on a property declaration. This is needed to have retain properties for non-object pointers. Fixes <rdar://problem/10930507>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151786 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
3f01c8a58b7b2d78303675182a8de6b7fbe45ae1 |
01-Mar-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Tighten type-checking a bit to make it clearer how BuildCXXMemberCallExpr is used. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151783 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
77bfb8b43ec3f7dee3a71f6e854b03ad29dab84f |
29-Feb-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c: provide fixit hint when atomic property does not have matching user defined setter/getter and a warning is issued. In this case, a fixit note is displayed. // rdar://10267155 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151766 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
fd819783aafa39b3bfdfcc095270352074ef4734 |
29-Feb-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Fix a couple -Wuninitialized warnings from gcc. Reported by David Greene. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151754 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
51ad9cd0644c9acf442f049aed98b66f7b1041a2 |
29-Feb-2012 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Tentatively fix PR12117. The test case from the bug now passes, and all existing tests still pass, but there may still be corner cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151716 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
16f1f717af196b1448258857b2e6dcfe144b39d0 |
29-Feb-2012 |
James Molloy <james.molloy@arm.com> |
Reapply r151638 and r151641. The bug that was caught by Apple's internal buildbots was valid and also showed another bug in my implementation. These are now fixed, with regression tests added to catch them both (not Darwin-specific). Original log: ==================== Revert r151638 because it causes assertion hit on PCH creation for Cocoa.h Original log: --------------------- Correctly track tags and enum members defined in the prototype of a function, and ensure they are properly scoped. This fixes code such as: enum e {x, y}; int f(enum {y, x} n) { return 0; } This finally fixes PR5464 and PR5477. --------------------- I also reverted r151641 which was enhancement on top of r151638. ==================== git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151712 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
cope.cpp
ema.cpp
emaDecl.cpp
|
72b8b1ef9f7fb4f66fefcbd8d82fce2301b851d4 |
29-Feb-2012 |
Eli Friedman <eli.friedman@gmail.com> |
A couple minor bug-fixes for template instantiation for expressions which are sometimes potentially evaluated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151707 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
reeTransform.h
|
ac6260187b6b2f26faa9264d170d649a501f58a9 |
29-Feb-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Make the odr-use logic work correctly for constant-expressions. PR12006. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151699 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
reeTransform.h
|
b732fcebcf2ce5c24a29d660e9400d7dc9f86b69 |
29-Feb-2012 |
Daniel Dunbar <daniel@zuster.org> |
Sema/ObjC: Override search can generate a large search list, bump the base size of the SmallPtrSet way up to avoid commonly reallocating the buffer size. - I didn't see a good argument against it, so I bumped the limit to cover the max size we see during parsing Cocoa.h. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151698 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
c60ccf5b4fb657ca40da3019c2bbe15dd8ab9732 |
29-Feb-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Make sure list-initialization of arrays works correctly in explicit type conversions. PR12121. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151674 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
32a9a7543f0296b0ae141899005f788bbe4262ca |
29-Feb-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Revert r151638 because it causes assertion hit on PCH creation for Cocoa.h Original log: --------------------- Correctly track tags and enum members defined in the prototype of a function, and ensure they are properly scoped. This fixes code such as: enum e {x, y}; int f(enum {y, x} n) { return 0; } This finally fixes PR5464 and PR5477. --------------------- I also reverted r151641 which was enhancement on top of r151638. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151667 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
cope.cpp
ema.cpp
emaDecl.cpp
|
2422e82b54aa115bba23da3a44998477720ef6a4 |
29-Feb-2012 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Single- and zero-element initializer lists to scalars are list-initializations. Fixes PR12118. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151666 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
bf359c9683fd56260d6860c7d1a8abc26a190a2b |
28-Feb-2012 |
James Molloy <james.molloy@arm.com> |
Un-break clang based on r151638 - What was meant to be a trivial variable name change went horribly wrong and I forgot to retest afterwards. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151641 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
fbcf0405b7da1c8606e4223b4f91835643ecd5b4 |
28-Feb-2012 |
James Molloy <james.molloy@arm.com> |
Correctly track tags and enum members defined in the prototype of a function, and ensure they are properly scoped. This fixes code such as: enum e {x, y}; int f(enum {y, x} n) { return 0; } This finally fixes PR5464 and PR5477. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151638 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
cope.cpp
ema.cpp
emaDecl.cpp
|
f911242f43ae1b0a85c323631fe817df95c9cbe9 |
28-Feb-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[AST] When we @synthesize a property with a user-defined ivar name, make sure to record the source location of the ivar name. [libclang] When indexing @synthesized objc methods, report the @implementation as the lexical container. Fixes rdar://10905472 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151635 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
d7c15a64ba8ebdca0dd48dd1d2f233107d34494e |
28-Feb-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[AST] Associate the getter/setter methods to a property of a objc class extension. [libclang] Index the getter/setter methods of a property of a objc class extension. Fixes rdar://10907597 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151633 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
3306ec1923973d7b5767b23ba95915af2fec87d7 |
27-Feb-2012 |
Ted Kremenek <kremenek@apple.com> |
After numerous requests, have Objective-C 'method declared here' notes mention the actual method. This looks better within an IDE, where text isn't always regurgitated in the presentation of a warning. Fixes radar 10914035. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151579 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
emaExprObjC.cpp
|
adfb535905a7ca4226d06a29ebc665085503afd5 |
27-Feb-2012 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implement a FIXME for conversion sequence distinction. Should fix PR12092. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151577 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
92b670e1ee0b11d7e558ec659795ddf452e583ed |
27-Feb-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Fix a couple bugs in the way we handle array indexes in array bounds checking. Specifically, make sure we don't ignore explicit casts in indexes, and make sure we use unsigned extension/comparisons on indexes. Fixes <rdar://problem/10916006>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151569 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
0d8ab2ed4b7555b6fde965238222e5099614d7bb |
27-Feb-2012 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Convert initializer lists to temporaries in CreateBuiltinBinOp. Allows assignment of init lists to built-in types and resolves PR12088. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151551 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
79363f5e612c17cd05e1fa888632ee7860ced1ab |
27-Feb-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Ensure that we delete default constructors in the right cases. Don't delete the default constructor of a union if it has a const member with no user-provided default constructor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151516 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
ea7c1e24f33c554aeac07dc4f6dc7493dd98e272 |
26-Feb-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Don't assert when trying to diagnose why a class with a constructor template is non-trivial. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151486 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
9a561d539158a30b68fc258b81a994f3fac10212 |
26-Feb-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Ensure that we delete destructors in the right cases. Specifically: - variant members with nontrivial destructors make the containing class's destructor deleted - check for a virtual destructor after checking for overridden methods in the base class(es) - check for an inaccessible operator delete for a class with a virtual destructor. Do not try to call an anonymous union field's destructor from the destructor of the containing class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151483 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExprCXX.cpp
|
03f68788036803c0bad3fe6ea9a4ea31ba195a2b |
26-Feb-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Make sure we don't try to produce a definition of an implicitly-deleted function git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151478 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExpr.cpp
|
e653ba2f3b6d993b5d410554c12416c03ec7775b |
26-Feb-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Special members which are defaulted or deleted on their first declaration are trivial if the implicit declaration would be. Don't forget to set the Trivial flag on the special member as well as on the class. It doesn't seem ideal that we have two separate mechanisms for storing this information, but this patch does not attempt to address that. This leaves us in an interesting position where the has_trivial_X trait for a class says 'yes' for a deleted but trivial X, but is_trivially_Xable says 'no'. This seems to be what the standard requires. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151465 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
13a140caba448a66ffcc5ff0d32a87d6e4f4ad3f |
25-Feb-2012 |
Ahmed Charles <ace2001ac@gmail.com> |
ArrayRef'ize various functions in the AST/Parser/Sema. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151447 91177308-0d34-0410-b5e6-96231b3b80d8
emaCast.cpp
emaCodeComplete.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaLookup.cpp
emaOverload.cpp
emaTemplateDeduction.cpp
|
5297d71e8c85f9b04dc31c690e91c6a2f7eddb90 |
25-Feb-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Accept __has_feature(__feature__) as a synonym for __has_feature(feature) (and likewise for __has_extension). Patch by Jonathan Sauer! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151445 91177308-0d34-0410-b5e6-96231b3b80d8
ttributeList.cpp
|
d390de9c6312684c5e5b333f434199e193c7467a |
25-Feb-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix r151443 to only apply C++11's exception for non-static data member access in cases where we would otherwise disallow the access, and add a -Wc++98-compat diagnostic for this C++11 feature. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151444 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprMember.cpp
|
2c8aee454dac03e4918f0bb6e7fb849953056aba |
25-Feb-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR11956: C++11's special exception for accessing non-static data members from unevaluated operands applies within member functions, too. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151443 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprMember.cpp
|
7a9f49296a6454b7a6f0edce89dc99d413a7e14e |
25-Feb-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix assertion (too few Diag arguments) when diagnosing a deleted operator delete git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151442 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
f5cd5cc9a7ec114ef1a4c08491a37d2327697c4a |
25-Feb-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix a regression from r151117: ADL requires that we attempt to complete any associated classes, since it can find friend functions declared within them, but overload resolution does not otherwise require argument types to be complete. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151434 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
emaOverload.cpp
|
64bee65a3436e3f0c352fcfe2130676f3502cffe |
25-Feb-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Work-in-progress for lambda conversion-to-block operator. Still need to implement the retain+autorelease outside of ARC, and there's a bug that causes the generated code to crash in ARC (which I think is unrelated to my code, although I'm not completely sure). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151428 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
a66eccbf1f26a2a48c59b6e733dde9c79c19f0df |
25-Feb-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Improve the diagnostic in ARC mode when a conditional with an Objective-C type and void* is used. <rdar://problem/10486347>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151416 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
d08d599da101f3fe3fd79e853f1dcea6be89d7c2 |
25-Feb-2012 |
DeLesley Hutchins <delesley@google.com> |
Bugfix: bogus warning -- "invalid use of non-static data member", when a class is forward declared, and the reference to the data member in question does not occur within a method body. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151413 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprMember.cpp
|
ed878af7914df535b32d64f555fa118413186672 |
25-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Implement C++11 [over.match.copy]p1b2, which allows the use of explicit conversion functions to initialize the argument to a copy/move constructor that itself is the subject of direct initialization. Since we don't have that much context in overload resolution, we end up threading more flags :(. Fixes <rdar://problem/10903741> / PR10456. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151409 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExpr.cpp
emaInit.cpp
emaOverload.cpp
|
a08c2fb74ef823c185619ecc532f8fced6a1982f |
24-Feb-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Make helper static. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151400 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
221c27f0d34c5938d84bbb8fafe1c3e3f1f87f2e |
24-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
C++11 [class.ctor]p5 says that A defaulted default constructor for a class X is defined as deleted if [...] - X is a union and all of its variant members are of const-qualified type. A pedantic reading therefore says that union X { }; has a deleted default constructor, which is both silly and almost certainly unintended. Pretend as if this this read - X is a union with one or more variant members, and all of its variant members are of const-qualified type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151394 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
62348f041adccdf9376f5c355ed64ecbce0b4f0f |
24-Feb-2012 |
Dmitri Gribenko <gribozavr@gmail.com> |
Fix comment: correct predicate name, reformat comment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151389 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
39304fad1c8a7b7e64121e9ae544b18e460b682c |
24-Feb-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
__decltype is a GNU extension, not a C++11 extension. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151377 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
|
ec79d877c1998366480d97a7a6c94e15c053edd8 |
24-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Two minor, related fixes for template instantiation with blocks: - Make sure that the block expression is instantiation-dependent if the block is in a dependent context - Make sure that the C++ 'this' expression gets captured even if we don't rebuild the AST node during template instantiation. This would also have manifested as a bug for lambdas. Fixes <rdar://problem/10832617>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151372 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
28e4702a1f978213ff945fe4369e3be7444bf320 |
24-Feb-2012 |
Matt Beaumont-Gay <matthewbg@google.com> |
Sink variable into assert git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151356 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
5d86f61b9c54429fc3f9149fc0f7009010a644a1 |
24-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Kill a spurious use of hasTrivialDefaultConstructor() git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151353 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
4ca8ac2e61c37ddadf37024af86f3e1019af8532 |
24-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Implement a new type trait __is_trivially_constructible(T, Args...) that provides the behavior of the C++11 library trait std::is_trivially_constructible<T, Args...>, which can't be implemented purely as a library. Since __is_trivially_constructible can have zero or more arguments, I needed to add Yet Another Type Trait Expression Class, this one handling arbitrary arguments. The next step will be to migrate UnaryTypeTrait and BinaryTypeTrait over to this new, more general TypeTrait class. Fixes the Clang side of <rdar://problem/10895483> / PR12038. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151352 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
reeTransform.h
|
8b9414e868853fc052251455674bf7512261e14a |
24-Feb-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Modernize some code which processes CastExprs to use CastKinds. No intended functional change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151298 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
f64bc202a2bcdf7b10f418ad52aaa7366c8ffef9 |
23-Feb-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c++: Type of an objc string literal is NSString, not 'id'. // rdar://10907410 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151296 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
9428772f16e379bcad35254251f96e3d1077c730 |
23-Feb-2012 |
Aaron Ballman <aaron@aaronballman.com> |
Turned on support for __declspecs: noreturn, noinline, nothrow and naked in MS compatibility mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151295 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
97df54e0c075bc8d6a869597e771dad0c11a2180 |
23-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Pull the OpaqueValueExpr's source expression into its constructor, so that we can correctly compute value-dependence of the OVE. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151291 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaPseudoObject.cpp
|
644af7b50bd0541468b45c197f5b637e934d48a0 |
23-Feb-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[libclang] Make sure that all top-level decls in a @implementation are marked as such. Previously we missed tag declarations; fixes rdar://10902015 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151283 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
ac37150c13c4e6f54551c52a1118f105be5f136b |
23-Feb-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c default synthesis. classes which adopt protocol properties must still auto synthesize those propeties which have been redeclared in the class. // rdar://10907410 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151268 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
8c43dccdae3083e73061cb1b2f517b77d35876a0 |
23-Feb-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Replace some DenseSets with SmallPtrSets. Apart from the "small" optimization, the current implementation is also a denser. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151257 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaLookup.cpp
|
a789416a497b2e14e7c2fd721d03e541120bac8d |
23-Feb-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Replace the std::map in the init list checker with a DenseMap to reduce malloc thrashing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151254 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
25d0a0f67d9e949ffbfc57bf487012f5cbfd886e |
23-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Provide the __is_trivially_assignable type trait, which provides compiler support for the std::is_trivially_assignable library type trait. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151240 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
860097c4ee7a365b6d462436659082c8355e03fd |
23-Feb-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Two fixes to how we compute visibility: * Handle some situations where we should never make a decl more visible, even when merging in an explicit visibility. * Handle attributes in members of classes that are explicitly specialized. Thanks Nico for the report and testing, Eric for the initial review, and dgregor for the awesome test27 :-) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151236 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
5c89c399ba0a171e3312a74e008d61d174d961f3 |
23-Feb-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Try to handle qualifiers more consistently for array InitListExprs. Fixes <rdar://problem/10907510>, and makes the ASTs a bit more self-consistent. (I've chosen to keep the qualifiers, but it isn't a strong preference; if anyone prefers removing them, please yell.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151229 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaInit.cpp
|
47611c88fb0446673c6e590ab461934054be290a |
23-Feb-2012 |
Aaron Ballman <aaron@aaronballman.com> |
Turned on support for __declspec(deprecated) in MS compatibility mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151225 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
5b38a0f98e4420dae1bd3e13959bc207c97a9e98 |
22-Feb-2012 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Doug's review comments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151173 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
b734e2437d3c4b20a28b448e75cb45ef71f0b518 |
22-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Teach overload resolution to prefer user-defined conversion via a lambda closure type's function pointer conversion over user-defined conversion via a lambda closure type's block pointer conversion, always. This is a preference for more-standard code (since blocks are an extension) and a nod to efficiency, since function pointers don't require any memory management. Fixes PR12063. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151170 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
33deb35535aebe81bed0eaf5c14f3032276a086e |
22-Feb-2012 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Fix parsing and processing initializer lists in return statements and as direct member initializers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151155 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaStmt.cpp
|
76517426dc8bf7734c07eefc35171a6bfdba1a2b |
22-Feb-2012 |
Hans Wennborg <hans@hanshq.net> |
Warn about non-standard format strings (pr12017) This adds the -Wformat-non-standard flag (off by default, enabled by -pedantic), which warns about non-standard things in format strings (such as the 'q' length modifier, the 'S' conversion specifier, etc.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151154 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
341785ec52f87c0803ba52dc88faac4e136f8593 |
22-Feb-2012 |
Bill Wendling <isanbard@gmail.com> |
More ArrayRef-ification of methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151152 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
4fe5be028b723fedc28bb33be96cde1ab2574ee6 |
22-Feb-2012 |
Bill Wendling <isanbard@gmail.com> |
ArrayRef-icize the function arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151151 91177308-0d34-0410-b5e6-96231b3b80d8
umpDiagnostics.cpp
emaTemplateDeduction.cpp
emaTemplateVariadic.cpp
|
428c620478d513081399798db5550bf0c779f244 |
22-Feb-2012 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Throw away stray CXXDefaultArgExprs. Fixes PR12061. I think there's a deeper problem here in the way TransformCXXConstructExpr works, but I won't tackle it now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151146 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
ac1303eca6cbe3e623fb5ec6fe7ec184ef4b0dfa |
22-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Generate an AST for the conversion from a lambda closure type to a block pointer that returns a block literal which captures (by copy) the lambda closure itself. Some aspects of the block literal are left unspecified, namely the capture variable (which doesn't actually exist) and the body (which will be filled in by IRgen because it can't be written as an AST). Because we're switching to this model, this patch also eliminates tracking the copy-initialization expression for the block capture of the conversion function, since that information is now embedded in the synthesized block literal. -1 side tables FTW. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151131 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDeclCXX.cpp
emaLambda.cpp
|
76f3f69db1416425070177243e9f390122c553e0 |
22-Feb-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Implement C++11 [expr.call]p11: If the operand to a decltype-specifier is a function call (or a comma expression with a function call on its right-hand side), possibly parenthesized, then the return type is not required to be complete and a temporary is not bound. Other subexpressions inside a decltype expression do not get this treatment. This is implemented by deferring the relevant checks for all calls immediately within a decltype expression, then, when the expression is fully-parsed, checking the relevant constraints and stripping off any top-level temporary binding. Deferring the completion of the return type exposed a bug in overload resolution where completion of the argument types was not attempted, which is also fixed by this change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151117 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaExpr.cpp
emaExprCXX.cpp
emaOverload.cpp
reeTransform.h
|
977ea7864a50eee39f6bef8a5a79154ac9ba4b3e |
21-Feb-2012 |
John McCall <rjmccall@apple.com> |
Don't crash on attempts to synthesize an invalid property. rdar://problem/10904479 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151089 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
b09ab8c293833c3dbcbf78f0db5e01fec46966bf |
21-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Only pop the expression evaluation context corresponding to a lambda expression after we've finished the function body of the corresponding function call operator. Otherwise, ActOnFinishFunctionBody() will see the (unfinished) evaluation context of the lambda expression itself. Fixes PR12031. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151082 91177308-0d34-0410-b5e6-96231b3b80d8
emaLambda.cpp
|
f57c413e444b441fa75ae8911d183c19b53bdd56 |
21-Feb-2012 |
Jean-Daniel Dupas <devlists@shadowlab.org> |
When calling a non variadic format function(vprintf, vscanf, NSLogv, …), warn if the format string argument is a parameter that is not itself declared as a format string with compatible format. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151080 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
f4b7de1cef3007cc0479775638198287384d9af1 |
21-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Improve our handling of lambda expressions that occur within default arguments. There are two aspects to this: - Make sure that when marking the declarations referenced in a default argument, we don't try to mark local variables, both because it's a waste of time and because the semantics are wrong: we're not in a place where we could capture these variables again even if it did make sense. - When a lambda expression occurs in a default argument of a function template, make sure that the corresponding closure type is considered dependent, so that it will get properly instantiated. The second bit is a bit of a hack; to fix it properly, we may have to rearchitect our handling of default arguments, parsing them only after creating the function definition. However, I'd like to separate that work from the lambdas work. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151076 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaLambda.cpp
|
a7b07fd0e13d3bee1f33ad74c35e24681f85451e |
21-Feb-2012 |
Craig Topper <craig.topper@gmail.com> |
Remove comma from end of enum to silence build warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151036 91177308-0d34-0410-b5e6-96231b3b80d8
emaLambda.cpp
|
5878cbcfaa90b8515550db86033fd5a0efab971d |
21-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Implement non-internal linkage for lambda closure types that need a stable mangling, since these lambdas can end up in multiple translation units. Sema is responsible for deciding when this is the case, because it's already responsible for choosing the mangling number. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151029 91177308-0d34-0410-b5e6-96231b3b80d8
emaLambda.cpp
|
552e29985a710f4ced62b39d70557501bd31ca9b |
21-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Implement name mangling for lambda expressions that occur within the initializers of data members (both static and non-static). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151017 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaLambda.cpp
|
ccc1b5eebc6ca8a904c58c0468b9a71483b7c7cf |
21-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Implement name mangling for lambda expressions that occur within the default arguments of function parameters. This simple-sounding task is complicated greatly by two issues: (1) Default arguments aren't actually a real context, so we need to maintain extra state within lambda expressions to track when a lambda was actually in a default argument. (2) At the time that we parse a default argument, the FunctionDecl doesn't exist yet, so lambda closure types end up in the enclosing context. It's not clear that we ever want to change that, so instead we introduce the notion of the "effective" context of a declaration for the purposes of name mangling. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151011 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaExpr.cpp
emaLambda.cpp
reeTransform.h
|
ee0653963537f6ea60f655856fb0c83d7d4010db |
21-Feb-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Make RequireLiteralType work correctly with incomplete array types. PR12037. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151005 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
ff2348888133dcc64f7363af2093cb608caeb7ce |
21-Feb-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix a constexpr FIXME: When implicitly instantiating the primary template for an explicit specialization of a function template, mark the instantiation as constexpr if the specialization is, rather than requiring them to match. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151001 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplate.cpp
|
fa07ab57eb565b4a00712adcefb29d96b445bfcd |
20-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Make sure that we set up the right declaration contexts when creating and introducing the lambda closure type and its function call operator. Previously, we assumed that the lambda closure type would land directly in the current context, and not some parent context (as occurs with linkage specifications). Thanks to Richard for the test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150987 91177308-0d34-0410-b5e6-96231b3b80d8
emaLambda.cpp
|
af300298ab86752fa64e339ba34195888a830756 |
20-Feb-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
modern objc translator. Finish off first cut of the modern meta-data translation by commenting out private ivar declarations in user source. Also, added several tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150985 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
ee18803f163c4ffcbc8f55a1aae48514d4f80521 |
20-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
When we resolve the type of an 'auto' variable, clear out the linkage of that variable; it will need to be recomputed with the resolved type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150984 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
9e8c92a9c9b949bbb0408fbbd9a58e34894b6efc |
20-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Basic support for name mangling of C++11 lambda expressions. Because name mangling in the Itanium C++ ABI for lambda expressions is so dependent on context, we encode the number used to encode each lambda as part of the lambda closure type, and maintain this value within Sema. Note that there are a several pieces still missing: - We still get the linkage of lambda expressions wrong - We aren't properly numbering or mangling lambda expressions that occur in default function arguments or in data member initializers. - We aren't (de-)serializing the lambda numbering tables git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150982 91177308-0d34-0410-b5e6-96231b3b80d8
emaLambda.cpp
reeTransform.h
|
772291a67d483c1c2abf324eec5d8d6ca476bfdc |
19-Feb-2012 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Emit a warning when list-initializing a std::initializer_list member. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150933 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExprCXX.cpp
|
bac5cf4110c1c9ba0992fad4fd9f66cedc27f3da |
19-Feb-2012 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Add a testcase for using objects with list-constructors, and fix a Sema crash by repeating an old hack. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150925 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
d2231c9424d6cbbcecb6f89cc2de5b987327aeaa |
19-Feb-2012 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Fix a crash for nested initializer list initialization. Still does the wrong thing in CodeGen, in that it never destructs anything. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150922 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
e8e92b9dccc362be33a7f9bb84a114b18db65b10 |
19-Feb-2012 |
Ahmed Charles <ace2001ac@gmail.com> |
Remove dead code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150919 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
dfb80ded6767f7b79a0f1fa4f6921d543ff0a643 |
18-Feb-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix wrong-code bug: __imag on a scalar lvalue should produce a zero rvalue, rather than an lvalue referring to the scalar. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150889 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
d41854a18cf7dde667d22c8dc4bff4ce4b2e7170 |
18-Feb-2012 |
David Chisnall <csdavec@swan.ac.uk> |
Remove a debugging line accidentally left in the last commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150882 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
5f3c163b7b19a0c7e02509a0984ee1256bca890d |
18-Feb-2012 |
David Chisnall <csdavec@swan.ac.uk> |
Implement #pragma redefine_extname. This fixes PR5172 and allows clang to compile C++ programs on Solaris using the system headers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150881 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
8b1d32bf63bce17503a979bb99fe008cabc05a0e |
18-Feb-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Remove unused but set variable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150877 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
999713eea940f4e087cc3ac878689c5c5c7a7225 |
18-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Rewrite variable capture within lambda expressions and blocks, eliminating a bunch of redundant code and properly modeling how the captures of outside blocks/lambdas affect the types seen by inner captures. This new scheme makes two passes over the capturing scope stack. The first pass goes up the stack (from innermost to outermost), assessing whether the capture looks feasible and stopping when it either hits the scope where the variable is declared or when it finds an existing capture. The second pass then walks down the stack (from outermost to innermost), capturing the variable at each step and updating the captured type and the type that an expression referring to that captured variable would see. It also checks type-specific restrictions, such as the inability to capture an array within a block. Note that only the first odr-use of each variable needs to do the full walk; subsequent uses will find the capture immediately, so multiple walks need not occur. The same routine that builds the captures can also compute the type of the captures without signaling errors and without actually performing the capture. This functionality is used to determine the type of declaration references as well as implementing the weird decltype((x)) rule within lambda expressions. The capture code now explicitly takes sides in the debate over C++ core issue 1249, which concerns the type of captures within nested lambdas. We opt to use the more permissive, more useful definition implemented by GCC rather than the one implemented by EDG. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150875 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaLambda.cpp
reeTransform.h
|
68932845a432d2a1dbbc57a84fd85bbb37c90487 |
18-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Unify our computation of the type of a captured reference to a variable; it was previously duplicated, and one of the copies failed to account for outer non-mutable lambda captures. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150872 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaType.cpp
|
e61eb0443a77dd178934d070f458e1a08b84eb96 |
18-Feb-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Add a bunch of missing calls to DiagnoseSentinelCalls. <rdar://problem/10885993>. This should probably be refactored... but it isn't completely obvious what refactoring is best. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150869 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExprCXX.cpp
emaOverload.cpp
|
213d70b58b4f48050c3e545ce1bd4b0ec3af74be |
18-Feb-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Diagnose uses of deleted destructors and inaccessible defaulted destructors. We had two separate issues here: firstly, varions functions were assuming that they did not need to perform semantic checks on trivial destructors (this is not true in C++11, where a trivial destructor can nonetheless be private or deleted), and a bunch of DiagnoseUseOfDecl calls were missing for uses of destructors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150866 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExprCXX.cpp
|
7d5088aa52d6e32b309ad0af32ea520ddbc5f953 |
18-Feb-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Initial refactoring of 'ShouldDeleteSpecialMember', in preparation for providing decent diagnostics. Finish the work of combining all the 'ShouldDelete' functions into one. In unifying the code, fix a minor bug where an anonymous union with a deleted default constructor as a member of a union wasn't being considered as making the outer union's default constructor deleted. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150862 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaLookup.cpp
|
1f27805fe4f5463fd5b4d5396affe1ef23320688 |
17-Feb-2012 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Don't allow non-empty ParenListExprs as array-new initializers. Don't know what I was thinking there. Fixes PR12023. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150804 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
32cf1f27ae8620e7b79bb4e81a067187c0aab7ae |
17-Feb-2012 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Basic code generation support for std::initializer_list. We now generate temporary arrays to back std::initializer_list objects initialized with braces. The initializer_list is then made to point at the array. We support both ptr+size and start+end forms, although the latter is untested. Array lifetime is correct for temporary std::initializer_lists (e.g. call arguments) and local variables. It is untested for new expressions and member initializers. Things left to do: Massively increase the amount of testing. I need to write tests for start+end init lists, temporary objects created as a side effect of initializing init list objects, new expressions, member initialization, creation of temporary objects (e.g. std::vector) for initializer lists, and probably more. Get lifetime "right" for member initializers and new expressions. Not that either are very useful. Implement list-initialization of array new expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150803 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
bd64520ca4e4d4c531637d311f8ea384c912fce8 |
17-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Only add 'const' to the type of variables captured in a lambda when we're capturing it by value in a non-mutable lambda. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150791 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
27dd7d962bbf774988bc5e59d04a7743ed503514 |
17-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Rework the Sema/AST/IRgen dance for the lambda closure type's conversion to function pointer. Rather than having IRgen synthesize the body of this function, we instead introduce a static member function "__invoke" with the same signature as the lambda's operator() in the AST. Sema then generates a body for the conversion to function pointer which simply returns the address of __invoke. This approach makes it easier to evaluate a call to the conversion function as a constant, makes the linkage of the __invoke function follow the normal rules for member functions, and may make life easier down the road if we ever want to constexpr'ify some of lambdas. Note that IR generation is responsible for filling in the body of __invoke (Sema just adds a dummy body), because the body can't generally be expressed in C++. Eli, please review! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150783 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaLambda.cpp
|
85b29a4c862bb9f41d9739e5dab6436fe6d44ff8 |
17-Feb-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Reject continue/break statements within members of local functions nested within loop and switch statements, by teaching Scope that a function scope never has a continue/break parent for the purposes of control flow. Remove the hack in block and lambda expressions which worked around this by pretending that such expressions were continue/break scopes. Remove Scope::ControlParent, since it's unused. In passing, teach default statements to recover properly from a missing ';', and add a fixit for same to both default and case labels (the latter already recovered correctly). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150776 91177308-0d34-0410-b5e6-96231b3b80d8
cope.cpp
|
3336353578a02eb7dc35926c2440577993196e36 |
16-Feb-2012 |
Kaelyn Uhrain <rikka@google.com> |
Avoid infinite mutual recursion in DiagnoseInvalidRedeclaration. Don't try to typo-correct a method redeclaration to declarations not in the current record as it could lead to infinite recursion if CorrectTypo finds more than one correction candidate in a parent record. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150735 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
7bdc15252ca2415f149ad812f0e5184d758e6105 |
16-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Lambda closure types are always considered to be like "local" classes, even if they are not within a function scope. Teach template instantiation to treat them as such, and make sure that we have a local instantiation scope when instantiating default arguments and static data members. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150725 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaTemplateInstantiateDecl.cpp
|
b9c64d84ea3edd5e2fffb0a2e85ca1308be4f429 |
16-Feb-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
C++11 allows unions to have static data members. Remove the corresponding restriction and add some tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150721 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f11641a2c651e4e9733c5f5011993554d7c635e5 |
16-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
If code completion patterns are not enabled, use simpler else/else if completions that don't insert braces. Fixes <rdar://problem/10764168>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150707 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
ae1b4af84ed0200c1040837ed62762557fbce5a7 |
16-Feb-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Add fixits for ARC casting errors for implicit conversions as well. rdar://10289283 Also fix the fixit (oh the irony) when it uses CFBridgingRetain/CFBridgingRelease; they are supposed to be calls with the casted expression as parameter, they should not be inserted into the cast like the __bridge keywords. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150705 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
dd5756c04c98e354b85c4f7eb660ae60c6d341ec |
16-Feb-2012 |
DeLesley Hutchins <delesley@google.com> |
Minor fix to template instantiation, which properly instantiates dependent attributes on static members of templatized classes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150704 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
634b2930f5a8fc4b153437657ce786ca3fba5b1e |
16-Feb-2012 |
DeLesley Hutchins <delesley@google.com> |
Thread safety analysis: Don't check for lockable on undefined types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150702 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
bd45d257a404ed1f87090c8a32b5dd75576b7d11 |
16-Feb-2012 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Proper checking of list-initializers for array new expressions. This finishes generalized initializer support in Sema. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150688 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
2aed8b88613863f3c439cdfb205bdf8b608fb205 |
16-Feb-2012 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Revert "Revert "Make CXXNewExpr contain only a single initialier, and not hold the used constructor itself."" This reintroduces commit r150682 with a fix for the Bullet benchmark crash. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150685 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprCXX.cpp
reeTransform.h
|
1548d14f4092a817f7d90ad3e7a65266dc85fbc5 |
16-Feb-2012 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Revert "Make CXXNewExpr contain only a single initialier, and not hold the used constructor itself." It leads to a compiler crash in the Bullet benchmark. This reverts commit r12014. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150684 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprCXX.cpp
reeTransform.h
|
5f688f4b15d02aa7ad159c46b1f78fe59d412f12 |
16-Feb-2012 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Make CXXNewExpr contain only a single initialier, and not hold the used constructor itself. Holding the constructor directly makes no sense when list-initialized arrays come into play. The constructor is now held in a CXXConstructExpr, if construction is what is done. The new design can also distinguish properly between list-initialization and direct-initialization, as well as implicit default-initialization constructors and explicit value-initialization constructors. Finally, doing it this way removes redundance from the AST because CXXNewExpr doesn't try to handle both the allocation and the initialization responsibilities. This breaks the static analysis of new expressions. I've filed PR12014 to track this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150682 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprCXX.cpp
reeTransform.h
|
a2d7dfab309375fbf016b650fa74f9b5d03a9752 |
16-Feb-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Shift Microsoft enum extensions from -fms-extensions to -fms-compatibility, so -fms-extensions doesn't affect enum semantics in incompatible ways. <rdar://problem/10657186>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150663 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f6e2e0291b8964ed41b4325e21dd90b86e791f10 |
16-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Implicitly define a lambda's conversion functions (to function pointers and block pointers). We use dummy definitions to keep the invariant that an implicit, used definition has a body; IR generation will substitute the actual contents, since they can't be represented as C++. For the block pointer case, compute the copy-initialization needed to capture the lambda object in the block, which IR generation will need later. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150645 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExpr.cpp
|
3ad02aa90105a9fcfd3d4328e800aa1362a90234 |
15-Feb-2012 |
Kaelyn Uhrain <rikka@google.com> |
Silence a valgrind warning, and remove an unused var. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150629 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
0f163e964289bc18e9bc1ec37a6a01018ba62640 |
15-Feb-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Support GCC's bug^Wextension allowing class array members to be initalized by a parenthesized braced-init-list in the base/member initialization list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150625 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
2d4d7fd0ca37b61406dfe58acbefa8cf20ee050a |
15-Feb-2012 |
Kaelyn Uhrain <rikka@google.com> |
Improve typo correction involving nested name specifiers. Snooping in other namespaces when the identifier being corrected is already qualified (i.e. a valid CXXScopeSpec is passed to CorrectTypo) and ranking synthesized namespace qualifiers relative to the existing qualifier is now performed. Support for disambiguating the string representation of synthesized namespace qualifers has also been added (the change to test/Parser/cxx-using-directive.cpp is an example of an ambiguous relative qualifier). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150622 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
c2956e5681113bbcec5ff98833345166942a211b |
15-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Lambda closure types have a conversion function to a block pointer with the same parameter types and return type as the function call operator. This is the real answer to http://stackoverflow.com/questions/4148242/is-it-possible-to-convert-a-c0x-lambda-to-a-clang-block :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150620 91177308-0d34-0410-b5e6-96231b3b80d8
emaLambda.cpp
|
c25d1c9821e576ae6e3d11f621ff0901aa4e7c69 |
15-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Factor the construction of the lambda-to-function-pointer conversion function declaration into a separate function. No functionality change git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150617 91177308-0d34-0410-b5e6-96231b3b80d8
emaLambda.cpp
|
e4e68d45f89ff4899d30cbd196603d09b7fbc150 |
15-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
When overload resolution picks an implicitly-deleted special member function, provide a specialized diagnostic that indicates the kind of special member function (default constructor, copy assignment operator, etc.) and that it was implicitly deleted. Add a hook where we can provide more detailed information later. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150611 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
emaDeclCXX.cpp
emaInit.cpp
emaOverload.cpp
|
4773654f2700d6fbb20612fbb6763b35860fa74d |
15-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Introduce a new initialization entity for lambda captures, and specialize location information and diagnostics for this entity. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150588 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaExpr.cpp
emaInit.cpp
|
793cd1c4cdfaafc52e2c2ad9dae959befe4bb166 |
15-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Specialize noreturn diagnostics for lambda expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150586 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
emaStmt.cpp
|
0bcc3d87223d7796946bfa6dd6174af900d8eba4 |
15-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Fix silly precedence error. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150585 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
4e88df72e690498aeba2dc3d5089388b27be66fa |
15-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Specialize the diagnostic complaining about conflicting types of return statements within a lambda; this diagnostic previously referred to blocks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150584 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
81f3bff7c202d688c9298bc049fdb5b6f77057b1 |
15-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Implement code completion support for lambda capture lists. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150583 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
be6126a2a784e1446460b8d15c2b26f880c871fc |
15-Feb-2012 |
Hans Wennborg <hans@hanshq.net> |
Make -Wformat fix-its preserve original conversion specifiers. This commit makes PrintfSpecifier::fixType() and ScanfSpecifier::fixType() only fix a conversion specification enough that Clang wouldn't warn about it, as opposed to always changing it to use the "canonical" conversion specifier. (PR11975) This preserves the user's choice of conversion specifier in cases like: printf("%a", (long double)1); where we previously suggested "%Lf", we now suggest "%La" printf("%x", (long)1); where we previously suggested "%ld", we now suggest "%lx". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150578 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
37ce0104b182c9410cf2a76fe5a63a81dac876ac |
15-Feb-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
If a static data member of a class template which could be used in a constant expression is referenced, defined, then referenced again, make sure we instantiate it the second time it's referenced. This is the static data member analogue of r150518. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150560 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
4d4e5c1ae83f4510caa486b3ad19de13048f9f04 |
15-Feb-2012 |
John McCall <rjmccall@apple.com> |
Split reinterpret_casts of member pointers out from CK_BitCast; this is general goodness because representations of member pointers are not always equivalent across member pointer types on all ABIs (even though this isn't really standard-endorsed). Take advantage of the new information to teach IR-generation how to do these reinterprets in constant initializers. Make sure this works when intermingled with hierarchy conversions (although this is not part of our motivating use case). Doing this in the constant-evaluator would probably have been better, but that would require a *lot* of extra structure in the representation of constant member pointers: you'd really have to track an arbitrary chain of hierarchy conversions and reinterpretations in order to get this right. Ultimately, this seems less complex. I also wasn't quite sure how to extend the constant evaluator to handle foldings that we don't actually want to treat as extended constant expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150551 91177308-0d34-0410-b5e6-96231b3b80d8
emaCast.cpp
|
c6889e7ed16604c51994e1f11becf213fdc64eb3 |
14-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Implement C++ core issue 974, which permits default arguments for lambda expressions. Because these issue was pulled back from Ready status at the Kona meeting, we still emit an ExtWarn when using default arguments for lambda expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150519 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaLambda.cpp
reeTransform.h
|
57b9c4e9d85971e20ab0dac3eadabae672c43c62 |
14-Feb-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
If a constexpr function template specialization is referenced, and then the template is defined, and then the specialization is referenced again, don't forget to instantiate the template on the second reference. Use the source location of the first reference as the point of instantiation, though. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150518 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
625bb569df0c34feec0d52c0ec5215f21ef2e054 |
14-Feb-2012 |
Dmitri Gribenko <gribozavr@gmail.com> |
Generalize -Wempty-body: warn when statement body is empty (closes: PR11329) * if, switch, range-based for: warn if semicolon is on the same line. * for, while: warn if semicolon is on the same line and either next statement is compound statement or next statement has more indentation. Replacing the semicolon with {} or moving the semicolon to the next line will always silence the warning. Tests from SemaCXX/if-empty-body.cpp merged into SemaCXX/warn-empty-body.cpp. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150515 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaChecking.cpp
emaDeclCXX.cpp
emaStmt.cpp
reeTransform.h
|
53393f23d8b767f976427a6d45b310bf37dd91c4 |
14-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Check the return type of lambda expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150503 91177308-0d34-0410-b5e6-96231b3b80d8
emaLambda.cpp
|
1d0c9a8d0573d1f670f484cc17aa94f06be971a5 |
14-Feb-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR11650: Implement resolution of core issue 1301. Value initialization can't be used to construct an object of union type with a deleted default constructor (plus fixes for some related value-initialization corner cases). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150502 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
75d8ba38965998a07a057c6d1d72359d2cc62c09 |
14-Feb-2012 |
John McCall <rjmccall@apple.com> |
Warn about non-int main() results in GNU C mode instead of erroring. Based on a patch by Vasiliy Korchagin! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150500 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
a73652465bcc4c0f6cb7d933ad84e002b527a643 |
14-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Implement support for lambda capture pack expansions, e.g., [&values...] { print(values...); } git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150497 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaLambda.cpp
reeTransform.h
|
63aae82bb12bbbe9028e597fb77e40fa8d348c12 |
14-Feb-2012 |
Kaelyn Uhrain <rikka@google.com> |
Use several weighted factors to determine typo candidate viablity. Replace the simple Levenshtein edit distance for typo correction candidates--and the hacky way adding namespace qualifiers would affect the edit distance--with a synthetic "edit distance" comprised of several factors and their relative weights. This also allows the typo correction callback object to convey more information about the viability of a correction candidate than simply viable or not viable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150495 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
14c598268ff7534d3753ae84eba9b8a81bf0bf8f |
14-Feb-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Use a simpler (and more efficient) pattern to pad vectors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150475 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExpr.cpp
|
eb273b798760ed960edb0a619092da314e21f4ea |
14-Feb-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix another issue introduced by the proposed wording for core issue 1358: since the instantiation of a constexpr function temploid is now always constexpr, a defaulted constexpr function temploid is often ill-formed by the rule in [dcl.fct.def.default]p2 that an explicitly-defaulted constexpr function must have a constexpr implicit definition. To avoid making loads of completely reasonable code ill-formed, do not apply that rule to templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150453 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
d5387e86ce3dfe1ae09e050ee11d86ca0d066d04 |
14-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Link together the call operator produced from transforming a lambda expression with the original call operator, so that we don't try to separately instantiate the call operator. Test and tweak a few more bits for template instantiation of lambda expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150440 91177308-0d34-0410-b5e6-96231b3b80d8
emaLambda.cpp
reeTransform.h
|
7ca4850a3e3530fa6c93b64b740446e32c97f992 |
13-Feb-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Deal with a horrible C++11 special case. If a non-literal type has a constexpr constructor, and that constructor is used to initialize an object of static storage duration such that all members and bases are initialized by constant expressions, constant initialization is performed. In this case, the object can still have a non-trivial destructor, and if it does, we must emit a dynamic initializer which performs no initialization and instead simply registers that destructor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150419 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
dfca6f53ab97d28d43e3fa2564209df08f3d282c |
13-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Introduce support for template instantiation of lambda expressions. This is mostly a simple refact, splitting the main "start a lambda expression" function into smaller chunks that are driven either from the parser (Sema::ActOnLambdaExpr) or during AST transformation (TreeTransform::TransformLambdaExpr). A few minor interesting points: - Added new entry points for TreeTransform, so that we can explicitly establish the link between the lambda closure type in the template and the lambda closure type in the instantiation. - Added a bit into LambdaExpr specifying whether it had an explicit result type or not. We should have had this anyway. This code is 'lightly' tested. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150417 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaLambda.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
reeTransform.h
|
20ff0e2d74c188cb3fd4ec3dead41a80a37c0202 |
13-Feb-2012 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Don't route explicit construction via list-initialization through the functional cast code path. It sometimes does the wrong thing, produces horrible error messages, and is just unnecessary. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150408 91177308-0d34-0410-b5e6-96231b3b80d8
emaCast.cpp
emaExprCXX.cpp
|
9daa7bfdff7256cef693d7bf10084881bcb9253c |
13-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Keep track of the set of array index variables we use when we synthesize a by-copy captured array in a lambda. This information will be needed by IR generation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150396 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaLambda.cpp
|
da8962a6198bc4bf09a38209db99551b2b0a41a0 |
13-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Move the storage of lambda captures and capture initializers from LambdaExpr over to the CXXRecordDecl. This allows us to eliminate the back-link from the closure type to the LambdaExpr, which will simplify and lazify AST deserialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150393 91177308-0d34-0410-b5e6-96231b3b80d8
emaLambda.cpp
|
86c3ae46250cdcc57778c27826060779a92f3815 |
13-Feb-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Update constexpr implementation to match CWG's chosen approach for core issues 1358, 1360, 1452 and 1453. - Instantiations of constexpr functions are always constexpr. This removes the need for separate declaration/definition checking, which is now gone. - This makes it possible for a constexpr function to be virtual, if they are only dependently virtual. Virtual calls to such functions are not constant expressions. - Likewise, it's now possible for a literal type to have virtual base classes. A constexpr constructor for such a type cannot actually produce a constant expression, though, so add a special-case diagnostic for a constructor call to such a type rather than trying to evaluate it. - Classes with trivial default constructors (for which value initialization can produce a fully-initialized value) are considered literal types. - Classes with volatile members are not literal types. - constexpr constructors can be members of non-literal types. We do not yet use static initialization for global objects constructed in this way. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150359 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
|
6d9ef30c5026e80fb398ed32bcdf69e4d714f033 |
12-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Implement the standard decltype() semantics described in C++11 [dcl.type.simple]p4, which treats all xvalues as returning T&&. We had previously implemented a pre-standard variant of decltype() that doesn't cope with, e.g., static_ast<T&&>(e) very well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150348 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
f8af98286022f72157d84951b48fde5fb369ab29 |
12-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Within the body of a lambda expression, decltype((x)) for an id-expression 'x' will compute the type based on the assumption that 'x' will be captured, even if it isn't captured, per C++11 [expr.prim.lambda]p18. There are two related refactors that go into implementing this: 1) Split out the check that determines whether we should capture a particular variable reference, along with the computation of the type of the field, from the actual act of capturing the variable. 2) Always compute the result of decltype() within Sema, rather than AST, because the decltype() computation is now context-sensitive. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150347 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaType.cpp
|
6dc00f6e98a00bd1c332927c3e04918d7e8b0d4f |
12-Feb-2012 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Proper initializer list support for new expressions and type construct expressions. Array new still missing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150346 91177308-0d34-0410-b5e6-96231b3b80d8
emaCast.cpp
emaExprCXX.cpp
|
215e4e17d00e12c38687a95502506d8f2ca3e646 |
12-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Lambdas have a deleted default constructor and a deleted copy assignment operator, per C++ [expr.prim.lambda]p19. Make it so. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150345 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDeclCXX.cpp
emaLambda.cpp
|
3a45c0e61dfc19f27b8ebcb15dd70159a36f1f9a |
12-Feb-2012 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Change the way we store initialization kinds so that all direct inits can distinguish between list and parens form. This allows us to correctly diagnose the last test cases from litb. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150343 91177308-0d34-0410-b5e6-96231b3b80d8
emaCast.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaInit.cpp
|
168319c81b8f4e7addf36ad15ef24919faf23504 |
12-Feb-2012 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Employ DirectList initialized entities to properly sort through some initialization edge cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150342 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaInit.cpp
|
5b9cc5df25c2198f270dd1d5c438fdce70d4051d |
12-Feb-2012 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Represent C++ direct initializers as ParenListExprs before semantic analysis instead of having a special-purpose function. - ActOnCXXDirectInitializer, which was mostly duplication of AddInitializerToDecl (leading e.g. to PR10620, which Eli fixed a few days ago), is dropped completely. - MultiInitializer, which was an ugly hack I added, is dropped again. - We now have the infrastructure in place to distinguish between int x = {1}; int x({1}); int x{1}; -- VarDecl now has getInitStyle(), which indicates which of the above was used. -- CXXConstructExpr now has a flag to indicate that it represents list- initialization, although this is not yet used. - InstantiateInitializer was renamed to SubstInitializer and simplified. - ActOnParenOrParenListExpr has been replaced by ActOnParenListExpr, which always produces a ParenListExpr. Placed that so far failed to convert that back to a ParenExpr containing comma operators have been fixed. I'm pretty sure I could have made a crashing test case before this. The end result is a (I hope) considerably cleaner design of initializers. More importantly, the fact that I can now distinguish between the various initialization kinds means that I can get the tricky generalized initializer test cases Johannes Schaub supplied to work. (This is not yet done.) This commit passed self-host, with the resulting compiler passing the tests. I hope it doesn't break more complicated code. It's a pretty big change, but one that I feel is necessary. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150318 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
ultiInitializer.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaInit.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
56a04287a1c713870d1e03206cce785e985cc866 |
12-Feb-2012 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Fix parsing new expressions using init lists. Probably still do the wrong thing in cases involving array new. Show that many cases using initializer list constructors work, in that they parse and pass semantic analysis. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150316 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
f2e4dfcd325db2c1a960697be2c750f277dcafce |
11-Feb-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Implement core issue 5: a temporary created for copy-initialization has a cv-unqualified type. This is essential in order to allow move-only objects of const-qualified types to be copy-initialized via a converting constructor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150309 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
8327118ff60cd9c4812fba1e5ba4eb3cb5ed3401 |
11-Feb-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Make sure to try instantiating a templated type which is used in an _Atomic before complaining that it's incomplete. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150308 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
668165ab1e604b063c0aa0df8ff91c80879670bf |
11-Feb-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Make sure Sema creates a field for 'this' captures. (Doug, please double-check that this is correct.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150292 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
734bd6e25c349248634d1d0c5d7127c4868331b0 |
11-Feb-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
For class template implicit instantiation, also update its location to point to the pattern template that it came from, otherwise we had this situation: template <typename T1, typename T2> struct S { }; template <typename T> struct S<T, int> { }; void f() { S<int, int> s; // location of declaration "S<int, int>" was of "S<T1, T2>" not "S<T, int>" } git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150290 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
f0459f87aaf05e76ce0d8c8c1e4c68e3c22195b7 |
11-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Implement C++11 [expr.lambda.prim]p13, which prohibits lambdas in default arguments if in fact those lambdas capture any entity. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150282 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
a73cdcbc1dc1ed98c54556c6adcd2b12301759cc |
10-Feb-2012 |
David Blaikie <dblaikie@gmail.com> |
Support all null pointer literals in format strings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150276 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
6d968363877388f0a0268711d59367907b465ae1 |
10-Feb-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[libclang] Indexing API: Fully index implict template instantiations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150267 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e3d8e737e18f0ce95d87be03f74b35413443173c |
10-Feb-2012 |
Ted Kremenek <kremenek@apple.com> |
Enhance checking for null format string literal to take into account __null. Fixes <rdar://problem/8269537>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150260 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
3ac109cd17151bb8ad3a40b0cbb0e1923cd6c4a0 |
10-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Allow implicit capture of 'this' in a lambda even when the capture default is '=', and reword the warning about explicitly capturing 'this' in such lambdas to indicate that only explicit capture is banned. Introduce Fix-Its for this and other "save the programmer from themself" rules regarding what can be explicitly captured and what must be implicitly captured. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150256 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaLambda.cpp
|
67b2c554dc12f589471713b7b01e9c94257ae593 |
10-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Add test from [expr.prim.lambda]p12, which deals with odr-use and nested captures. We currently don't get odr-use correct in array bounds, so that bit is commented out while we sort out what we need to do. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150255 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b555971345750350c21d541afe135054c7402933 |
10-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Don't introduce a lambda's operator() into the class until after we have finished parsing the body, so that name lookup will never find anything within the closure type. Then, add this operator() and the conversion function (if available) before completing the class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150252 91177308-0d34-0410-b5e6-96231b3b80d8
emaLambda.cpp
|
d37b360bf9f954af119c9805fdc79ab9d30e06c6 |
10-Feb-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR11684, core issue 1417: o Correct the handling of the restrictions on usage of cv-qualified and ref-qualified function types. o Fix a bug where such types were rejected in template type parameter default arguments, due to such arguments not being treated as a template type arg context. o Remove the ExtWarn for usage of such types as template arguments; that was a standard defect, not a GCC extension. o Improve the wording and unify the code for diagnosing cv-qualifiers with the code for diagnosing ref-qualifiers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150244 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaType.cpp
|
eefb3d5b49c844347f212073a7e975b8118fe8e9 |
10-Feb-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Track whether a function type has a trailing return type as type sugar. Use this to pretty-print such function types better, and to fix a case where we were not instantiating templates in lexical order. In passing, move the Variadic bit from Type's bitfields to FunctionProtoType to get the Type bitfields down to 32 bits. Also ensure that we always substitute the return type of a function when substituting explicitly-specified arguments, since that can cause us to bail out with a SFINAE error before we hit a hard error in parameter substitution. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150241 91177308-0d34-0410-b5e6-96231b3b80d8
emaLambda.cpp
emaTemplateDeduction.cpp
emaType.cpp
reeTransform.h
|
73d90928c0462daf0665fd7f8e44ca00d896540d |
10-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Add various tests for captures and the reaching scope of the lambda expression. Implement C++11 [expr.prim.lambda]p12's requirement that capturing a variable will odr-use it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150237 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ef7d78bd5be466c369b04af742ed8268244d4fe7 |
10-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Implement the conversion to a function pointer for lambda expressions, per C++ [expr.prim.lambda]p6. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150236 91177308-0d34-0410-b5e6-96231b3b80d8
emaLambda.cpp
emaOverload.cpp
|
4d8d22bfaed6e5d7da6b5556415b18c43b44e36c |
10-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Extend CXXRecordDecl with a function that determines the mapping from the variables captured by a lambda to the fields that store the captured values. To be used in IRgen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150235 91177308-0d34-0410-b5e6-96231b3b80d8
emaLambda.cpp
|
d6cf912e1e33167452f328d15b98a790c58c03c0 |
10-Feb-2012 |
Ted Kremenek <kremenek@apple.com> |
Revert r145999. This turned out to be a bad idea. Unfortunately, 'id' is used so profusely in many APIs and large codebases that this made the deprecated warning trigger happy to the point of not being useful. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150223 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprObjC.cpp
|
572ae0a32ece4bd7ea24e3d8f9bfe3e11aa26414 |
10-Feb-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Make sure we convert struct layout pragmas to attributes for class templates the same way we do for non-template classes. <rdar://problem/10791194>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150221 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
3e78b19e51034dd27c6e0d811522148345e299e4 |
09-Feb-2012 |
Aaron Ballman <aaron@aaronballman.com> |
Switching to using dyn_cast_or_null, and fixing line endings in the test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150209 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
bb3d14e55d267bf5228699c7bf0c8ccdb71c8f46 |
09-Feb-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objc: If a method is not implemented in the category implementation but has been declared in its primary class, superclass, or in one of their protocols, no need to issue unimplemented method. // rdar://10823023 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150206 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
7badd2467a1650c0c2a5fdef974f590fc32c3694 |
09-Feb-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Make sure a variable with a C++ direct initializer triggers jump scope checking. Fixes PR10620 / <rdar://problem/9958362> . git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150204 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
a0c2b21e0d84ad289781e08e14148da6b8b8b76d |
09-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Don't allow deduction of a lambda result type from an initializer list; it is not an expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150194 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
54042f1bd78f1f1ea86be7d4af541462e127d2ed |
09-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Implement return type deduction for lambdas per C++11 [expr.prim.lambda]p4, including the current suggested resolution of core isue 975, which allows multiple return statements so long as the types match. ExtWarn when user code is actually making use of this extension. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150168 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaLambda.cpp
|
760b37bcae12f4bbc68bb6cabf6ed68d265b0826 |
09-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Restore the appropriate lexical declaration context for a lambda's function call operator (to the lambda class). This allows us to IRgen calls to simple (non-capturing) lambdas, e.g., [](int i, int j) -> int { return i + j; }(1, 2) Eli will be providing test cases as he brings up more IRgen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150166 91177308-0d34-0410-b5e6-96231b3b80d8
emaLambda.cpp
|
b326ca8ffbea96f9cc8a457b0f57be880304a6f5 |
09-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Remove the "unsupported" error for lambda expressions. It's annoying, and rapidly becoming untrue. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150165 91177308-0d34-0410-b5e6-96231b3b80d8
emaLambda.cpp
|
e2c5913c48f66bfec9e58a8ad1d90e5eeffad586 |
09-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Implement C++ [expr.prim.lambda]p2, which bans lambda expressions in unevaluated operands. Be certain that we're marking everything referenced within a capture initializer as odr-used. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150163 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaLambda.cpp
|
30ecfad3af057bff74d1c98099eda0677525574e |
09-Feb-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
DR1359: A constexpr constructor does not need to initialize an empty struct or empty union. This still rejects anonymous member structs or unions which only contain such empty class types, pending standard wording defining exactly what an empty class type is. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150157 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
b4e5e286a5cd156247720b1eb204abaa8e09568d |
09-Feb-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
CWG issue 1405: mutable members are allowed in literal types, but can't undergo lvalue-to-rvalue conversions in constant expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150145 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
0ca7e8bf904d1c2cf70d271f3a06c1d71ff7e4fb |
09-Feb-2012 |
Aaron Ballman <aaron@aaronballman.com> |
Attempting to initialize a union member that does not exist no longer crashes. Patch by Remi Gacogne git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150144 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
18fe084d72392a5ceaa1fab7d3f3f0d0f2538069 |
09-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Implement capture-by-copy for arrays in lambdas. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150138 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
5e058eb02875530f1aed10c3417a1011744239b1 |
09-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Don't complain about the lack of a constructor for a lambda expression. They are constructed in different ways git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150136 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaLambda.cpp
|
20f87a4cd91b8d76571dc96aece916ac0bdf8b9f |
09-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
When we create a non-static data member in the closure object for a capture, make sure we actually add the field. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150135 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
1f9a5db047c00f66f4a1ebfc6ae2bf78433036e3 |
09-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Factor the logic for capturing variables in a lambda into its own function; it's going to get longer soon. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150132 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
630d5fffdf342128bd73f817013ee91e030daac1 |
09-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Along the error path for lambdas, mark the lambda class as invalid and finalize it git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150130 91177308-0d34-0410-b5e6-96231b3b80d8
emaLambda.cpp
|
2c0bf2437089f9a297cf18530361a185e76f2150 |
09-Feb-2012 |
Aaron Ballman <aaron@aaronballman.com> |
Adding support for warning when a non-C compatible user-defined type is returned from an extern "C" function. Fixes bug 6143 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150128 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
503384f731b5abcbf870b0a5224eb920e631db0a |
09-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Various interrelated cleanups for lambdas: - Complete the lambda class when we finish the lambda expression (previously, it was left in the "being completed" state) - Actually return the LambdaExpr object and bind to the resulting temporary when needed. - Detect when cleanups are needed while capturing a variable into a lambda (e.g., due to default arguments in the copy constructor), and make sure those cleanups apply for the whole of the lambda expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150123 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExpr.cpp
emaLambda.cpp
|
e2a7ad001fe1dc4a0d5fef312e7f7189e1f29369 |
08-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Factor C++11 lambda expressions implementation into a separate file. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150089 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
emaExprCXX.cpp
emaLambda.cpp
|
1e3767ac5449db6a1ede192d5e4217e34fa61f26 |
08-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
When computing the type of a local variable reference within a lambda, only add 'const' for variables captured by copy in potentially evaluated expressions of non-mutable lambdas. (The "by copy" part was missing). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150088 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
76e3da57b0e8cf72d221f44d54566ef206341668 |
08-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
When completing a lambda expression, make sure to check and attach the body of the lambda to the function call operator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150087 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDecl.cpp
emaExpr.cpp
emaExprCXX.cpp
|
925d8e7c0f18e03dc4bc634b3c6c1ec09373d993 |
08-Feb-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Implement the agreed resolution to DR1457: a signed left shift of a 1 bit into the sign bit doesn't have undefined behavior, but a signed left shift of a 1 bit out of the sign bit still does. As promised to Howard :) The suppression of the potential constant expression checking in system headers is also removed, since the problem it was working around is gone. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150059 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
59a839c5a4eecfeb495fc64224f6a949d1c5b2da |
08-Feb-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Make sure template argument deduction is consistently performed in an unevaluated context. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150049 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
46e75477bd24a703da11d354587c9bea69d6888f |
08-Feb-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[libclang] For CXXOperatorCallExprs, give a valid source location to the DeclRefExpr that is referencing the member function, so we can index the referenced function. Fixes rdar://10762375&10324915 & http://llvm.org/PR11192 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150033 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
d85bf9dd23920f5400bb8d6a41c8ebb1aecfdee9 |
08-Feb-2012 |
John McCall <rjmccall@apple.com> |
Only complain about __strong __strong id, not __strong SomeStrongTypedef or __strong __typeof__(some.strong.thing). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150029 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
200fa53fd420aa8369586f569dbece04930ad6a3 |
08-Feb-2012 |
John McCall <rjmccall@apple.com> |
Revise the SplitQualType interface to make it its own thing instead of a typedef of std::pair. This slightly improves type-safety, but mostly makes code using it clearer to read as well as making it possible to add methods to the type. Add such a method for efficiently single-step desugaring a split type. Add a method to single-step desugaring a locally-unqualified type. Implement both the SplitQualType and QualType methods in terms of that. Also, fix a typo ("ObjCGLifetime"). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150028 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaOverload.cpp
emaType.cpp
|
2837a2f02195e624b14b419b2d3e6682a6bc5a0f |
08-Feb-2012 |
Jean-Daniel Dupas <devlists@shadowlab.org> |
non-literal strftime format string is not unsafe. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150009 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
d7a3e2c5f61cd4893f95b69a424fe4def3aa0f69 |
07-Feb-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Revert my patches which removed Diagnostic.h includes by moving some operator overloads out of line. This seems to negatively affect compile time onsome ObjC tests (which use a lot of partial diagnostics I assume). I have to come up with a way to keep them inline without including Diagnostic.h everywhere. Now adding a new diagnostic requires a full rebuild of e.g. the static analyzer which doesn't even use those diagnostics. This reverts commit 6496bd10dc3a6d5e3266348f08b6e35f8184bc99. This reverts commit 7af19b817ba964ac560b50c1ed6183235f699789. This reverts commit fdd15602a42bbe26185978ef1e17019f6d969aa7. This reverts commit 00bd44d5677783527d7517c1ffe45e4d75a0f56f. This reverts commit ef9b60ffed980864a8db26ad30344be429e58ff5. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150006 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
52aabafeee9e8634eceb46b1a3fdbd3cd22b1cf7 |
07-Feb-2012 |
Jean-Daniel Dupas <devlists@shadowlab.org> |
Implements support of format_arg attribute on C++ member. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149998 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
849639d8b548519cc5a00c0c9253f0c0d525060d |
07-Feb-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Make parsing of objc @implementations more robust. Parsing of @implementations was based on modifying global state from the parser; the logic for late parsing of methods was spread in multiple places making it difficult to have a robust error recovery. -it was difficult to ensure that we don't neglect parsing the lexed methods. -it was difficult to setup the original objc container context for parsing the lexed methods after completing ParseObjCAtImplementationDeclaration and returning to top level context. Enhance parsing of @implementations by centralizing it in Parser::ParseObjCAtImplementationDeclaration(). ParseObjCAtImplementationDeclaration now returns only after an @implementation is fully parsed; all the data and logic for late parsing of methods is now in one place. This allows us to provide code-completion for late parsed methods with mis-matched braces. rdar://10775381 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149987 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
01d08018b7cf5ce1601707cfd7a84d22015fc04e |
07-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Introduce basic ASTs for lambda expressions. This covers: - Capturing variables by-reference and by-copy within a lambda - The representation of lambda captures - The creation of the non-static data members in the lambda class that store the captured variables - The initialization of the non-static data members from the captured variables - Pretty-printing lambda expressions There are a number of FIXMEs, both explicit and implied, including: - Creating a field for a capture of 'this' - Improved diagnostics for initialization failures when capturing variables by copy - Dealing with temporaries created during said initialization - Template instantiation - AST (de-)serialization - Binding and returning the lambda expression; turning it into a proper temporary - Lots and lots of semantic constraints - Parameter pack captures git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149977 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprCXX.cpp
reeTransform.h
|
11e70d7fe2eb11874c3619ad26dc2b525b81074f |
07-Feb-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Fix a bug in semantic analysis involving anonymous structs and flexible arrays. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149966 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
04ca25276245fbcf0a353e965de476080fa01b99 |
07-Feb-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Fix a couple of nasty bugs involving negative enum constants. <rdar://problem/10760113>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149965 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
bb3d9976fd0e037ec9864baeaf23dc138bcb6df0 |
07-Feb-2012 |
Kaelyn Uhrain <rikka@google.com> |
Remove the unused TypoCorrectionConsumer::MaxEditDistance. MaxEditDistance was effectively unused as it being initialized to the max unsigned valued but never updated. Removing it avoids conversion headaches once the "edit distance" of a typo correction is a weighted composite of several values instead of roughly the number of characters changed; comparing the weighted composite value to the number of characters in a typo would require some form of normalization to make it comparable to the old, character-based notion of edit distance. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149953 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
0a29422eb722c0ffbb98b98d8636042b19069f1a |
07-Feb-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Misc improvements to the diagnostic when a variable is odr-used in a context that is not allowed to capture variables. Fixes PR11883. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149937 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
56ff283a1f8e4e898568426f56e67a096efd1f80 |
07-Feb-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Fix a minor regression from my potentially-evaluated expression changes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149930 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
66581d41527628d4b37f7b05c288f77be7415d7d |
06-Feb-2012 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Added source location for the template keyword in DependentTemplateSpecializationTypeLoc nodes (DTSTLoc). The new info is propagated to TSTLoc on template instantiation, getting rid of 3 FIXMEs in TreeTransform.h and another one Parser.cpp. Simplified code in TypeSpecLocFiller visitor methods for DTSTLoc and DependentNameTypeLoc by removing what now seems to be dead code (adding corresponding assertions). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149923 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
emaTemplate.cpp
emaType.cpp
reeTransform.h
|
5b6a3ddda0669b6e3ea3de1f239eee40004423e5 |
06-Feb-2012 |
Manuel Klimek <klimek@google.com> |
Canonicalize the base class used in the nested-name-specifier of a generated assignment operator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149909 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
38a42916cb07fd368d9e2ae1e7915fa896f9ec06 |
06-Feb-2012 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Removed redundant location info from ElaboratedTypeLoc / DependentNameLoc / DependentTSTLoc. Uniformed names referencing elaborated keyword. No intended functionality changes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149889 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaTemplate.cpp
emaType.cpp
reeTransform.h
|
55d23c925b058be29b792008ddb7d68f6c4fa9a0 |
06-Feb-2012 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Added location for template keyword in TemplateSpecializationTypeLoc. In the process removed some naming ambiguities. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149870 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
emaExprCXX.cpp
emaTemplate.cpp
emaType.cpp
reeTransform.h
|
9d9922af13edf3ddf8804a41a98d997324fdd58e |
06-Feb-2012 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Fixed instantiation of DependentScopeDeclRefExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149868 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprMember.cpp
emaOverload.cpp
emaTemplate.cpp
reeTransform.h
|
5bbc385ad2d8e487edfbc2756eaf4fb0b920cfe4 |
06-Feb-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Move instantiateTemplateAttribute into the sema namespace, make helpers static. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149864 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
d79093af384ac0ea78f4237a001eae7467e06a61 |
05-Feb-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
constexpr: Implement DR1358: An instantiation of a constexpr function which can't produce a constant expression is not ill-formed (so long as some instantiation of that function can produce a constant expression). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149802 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
f7ccbad5d9949e7ddd1cbef43d482553b811e026 |
05-Feb-2012 |
Dylan Noblesmith <nobled@dreamwidth.org> |
Basic: import SmallString<> into clang namespace (I was going to fix the TODO about DenseMap too, but that would break self-host right now. See PR11922.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149799 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaChecking.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExceptionSpec.cpp
emaExpr.cpp
emaExprObjC.cpp
emaInit.cpp
emaObjCProperty.cpp
emaTemplate.cpp
|
6f42b62b6194f53bcbc349f5d17388e1936535d7 |
05-Feb-2012 |
Dylan Noblesmith <nobled@dreamwidth.org> |
Basic: import OwningPtr<> into clang namespace git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149798 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
6cd03dbb310f472b14b8d6d69d8c9b5b7f1200e2 |
04-Feb-2012 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
A useful approximation of initializer list constructors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149792 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaInit.cpp
|
96715b288060c8e168cbca62f366c12e88c5483d |
04-Feb-2012 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Factor out the actual overload resolution from TryConstructorInitialization, since it needs to be used again for list constructor resolution. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149791 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
08ae369fbe870cfb5077fbd1c652836b8dbeab8b |
04-Feb-2012 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Don't unwrap initializer lists before calling TryConstructorInitialization, instead doing a little more work inside. This should make finding initializer list constructors easier, as well as fix one place where the ({}) vs {} issue was probably poorly handled. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149790 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
8fe83e1df954d72c0f4ffc15d20a5222ec151c21 |
04-Feb-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Move a method from IdentifierTable.h out of line and remove the SmallString include. Fix all the transitive include users. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149783 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaChecking.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExceptionSpec.cpp
emaInit.cpp
emaObjCProperty.cpp
emaTemplate.cpp
|
00bd44d5677783527d7517c1ffe45e4d75a0f56f |
04-Feb-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Move various diagnostic operator<< overloads out of line and remove includes of Diagnostic.h. Fix all the files that depended on transitive includes of Diagnostic.h. With this patch in place changing a diagnostic no longer requires a full rebuild of the StaticAnalyzer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149781 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
282e7e66748cc6dd14d6f7f2cb52e5373c531e61 |
04-Feb-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
In C++11 mode, when an integral constant expression is desired and we have a value of class type, look for a unique conversion operator converting to integral or unscoped enumeration type and use that. Implements [expr.const]p5. Sema::VerifyIntegerConstantExpression now performs the conversion and returns the converted result. Some important callers of Expr::isIntegralConstantExpr have been switched over to using it (including all of those required for C++11 conformance); this switch brings a side-benefit of improved diagnostics and, in several cases, simpler code. However, some language extensions and attributes have not been moved across and will not perform implicit conversions on constant expressions of literal class type where an ICE is required. In passing, fix static_assert to perform a contextual conversion to bool on its argument. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149776 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
emaStmt.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
|
f39aec17b89f8f0dd78e78c50ad2fa08f12272e3 |
04-Feb-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Don't allow a value of a scoped enumeration to be used as the first bound for an array new expression. This lays some groundwork for the implicit conversion to integral or unscoped enumeration which C++11 ICEs undergo. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149772 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaOverload.cpp
emaStmt.cpp
|
a506586ad3cb0f3635b0e77b86e5e9e5fb2ccc17 |
04-Feb-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Disallow constexpr main. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149770 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
0b458fd8b6321c11e8b22727e0e9b9960e93ff4d |
04-Feb-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix a rejects-valid in C++11: array new of a negative size, or overflowing array new, is well-formed with defined semantics of throwing (a type which can be caught by a handler for) std::bad_array_new_length, unlike in C++98 where it is somewhere nebulous between undefined behavior and ill-formed. If the array size is an integral constant expression and satisfies one of these criteria, we would previous the array new expression, but now in C++11 mode, we merely issue a warning (the code is still rejected in C++98 mode, naturally). We don't yet implement new C++11 semantics correctly (see PR11644), but we do implement the overflow checking, and (for the default operator new) convert such expressions to an exception, so accepting such code now does not seem especially unsafe. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149767 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
507a8a3fbb2c43247474daa7ccb8dd0a46c32ec5 |
04-Feb-2012 |
Nick Lewycky <nicholas@mxc.ca> |
Don't warn on use of default allocator with an over-aligned type when the allocator is given the pointer to allocate into. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149760 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
50a9a12d4f7387bcff3213d4b56e74bab9f4f5d2 |
04-Feb-2012 |
Sean Callanan <scallanan@apple.com> |
Clang has existing support for debuggers that want to provide "po"-like functionality which treats the result of an expression implicitly as "id" (if it is not otherwise known) and prints it as an Objective-C object. This has in the past been gated by the "DebuggerSupport" language option, but that is too general. Debuggers also provide other commands like "print" that do not make any assumptions about whether the object is an Objective-C object. This patch makes the assumption conditional on a new language option: DebuggerCastResultToId. I have also made corresponding modifications to the testsuite. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149735 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
0cc5d40e5cb0af88c5487ac660ed259eb2b434ae |
04-Feb-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Suppress the used-but-not-defined warning for static data members while I look into a rather nasty bug in the new odr-use marking code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149731 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
5ba73e1af8ef519161bd40063dc325457e21676a |
04-Feb-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
constexpr: The recent support for potential constant expressions exposed a bug in the implementation of libstdc++4.6, where numeric_limits<int>::min() is defined as (int)1 << 31, which isn't a constant expression. Disable the 'constexpr function never produces a constant expression' error inside system headers to compensate. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149729 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
cefc7b20fdb97b989163199e0849b4325e9b7804 |
04-Feb-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Make explicit captures which cause implicit captures work correctly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149719 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprCXX.cpp
|
b942cb24a060435b18fef5b43eb33d77afc0d03a |
03-Feb-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Implement implicit capture for lambda expressions. Still left: explicit captures in lambdas need to cause implicit capture, and I need to take a look at the diagnostics for some cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149718 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
|
b70126a328f89937f46db42f9e3cba1592887c91 |
03-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
When a pack expansion occurs in the template argument list of an alias template without a corresponding parameter pack, don't immediately substitute the alias template. This is under discussion in the C++ committee, and may become ill-formed, but for now we match GCC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149697 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
acbabf177079ed41c055b1484465082f9f1d3d06 |
03-Feb-2012 |
Hans Wennborg <hans@hanshq.net> |
Don't warn about anonymous struct/union in C11. Also, in C, call this a C11 extension rather than a GNU extension. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149695 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
8fbbae532e3cb5f45e9e862c60d48c78b0997325 |
03-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Implement support for a pack expansion into a fixed-length template. Such pack expansions can easily fail at template instantiation time, if the expanded parameter packs are of the wrong length. Fixes <rdar://problem/10040867>, PR9021, and the example that came up today at Going Native. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149685 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
8deabc133c121f6c5561d0b2171a41cb2c29b2ce |
03-Feb-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Move isSentinelNullExpr() from Sema to ASTContext to make it more widely available. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149675 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
2e5156274b8051217565b557bfa14c80f7990e9c |
03-Feb-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Thread safety analysis: * When we detect that a CFG block has inconsistent lock sets, point the diagnostic at the location where we found the inconsistency, and point a note at somewhere the inconsistently-locked mutex was locked. * Fix the wording of the normal (non-loop, non-end-of-function) case of this diagnostic to not suggest that the mutex is going out of scope. * Fix the diagnostic emission code to keep a warning and its note together when sorting the diagnostics into source location order. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149669 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
41f4431f3989ff23029eaf2ad947f07e39fb268c |
03-Feb-2012 |
Chad Rosier <mcrosier@apple.com> |
C++ 5.2.10p2 has a note that mentions that, subject to all other restrictions, a cast to the same type is allowed so long as it does not cast away constness. Fix for PR11747. Patch by Aaron Ballman. Reviewed by Eli. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149664 91177308-0d34-0410-b5e6-96231b3b80d8
emaCast.cpp
|
3c0e80e9f2f733b7b56251e9bfd4c1097a81b2f5 |
03-Feb-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Refactor capture in blocks to use new-style capture hooks. Start adding a bit of the code for lambdas. The only visible changes are that we use the C++11 odr-used rules to figure out when a variable is captured, and type-checking in lambdas is slightly more accurate. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149663 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
d67d0cc40f31956b40b44b6ee3619d17a0f73294 |
03-Feb-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Note whether a lambda is mutable in the LambdaScopeInfo; this information will be necessary to handle references to captured variables. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149660 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
afdb041308bca3e875b23e7a22d879e9039bff03 |
03-Feb-2012 |
Anna Zaks <ganna@apple.com> |
Do not show macro expansion in strncat warnings, which can be defined as a builtin. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149657 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
4cc9b10523b61ed260767aeb62cc36fd7734a942 |
03-Feb-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objc: Issue diagnostic when receiver type is a forward class declaration and it is treated as of 'id' type resulting in multiple method lookup. // rdar://10686120 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149653 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
d2cce136878badcee6694b216479d7f1b72a1e68 |
03-Feb-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Add some code to accurately perform odr-used marking for variables per the C++11 rules. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149641 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
emaExprCXX.cpp
|
ad7eff2faf517779689327dc268817c2c2c8ebc4 |
02-Feb-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
Further enhance comment for property in continuation class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149639 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
83db10e0b6c9fce154259fc00fc3aa15960abb99 |
02-Feb-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Initialize the user defined conversion function to null if this is an aggregate initialization from an initializer list. Found by valgrind. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149627 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
ff2a0ecae1d7692dbb63aa540dba41a8c21d7ee4 |
02-Feb-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objc: comment the code which allows narroing of property object type in continuation class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149625 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
e23518342e326e3d6e9139f05384f030e2a94d4a |
02-Feb-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c: When redeclaraing in continuation class a 'readonly' property to 'readwrite', also allow redeclaration of property type to a narrowring object type. // rdar://10790488 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149614 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
4f7dcdbdfc50a244c3f3ca66f15b0b39a56f8f64 |
02-Feb-2012 |
Matt Beaumont-Gay <matthewbg@google.com> |
Pacify gcc's -Wreturn-type git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149610 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
5f2987c11491edb186401d4e8eced275f0ea7c5e |
02-Feb-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Split Sema::MarkDeclarationReferenced into multiple functions; the additional entry points are needed to implement C++11 odr-use marking correctly. No functional change in this patch; I'll actually make the change which fixes the odr-use marking in a followup patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149586 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprMember.cpp
emaInit.cpp
emaOverload.cpp
emaTemplate.cpp
reeTransform.h
|
c645ddf240efb112ff8f17371811deb3ebc1a5b5 |
02-Feb-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objc: don't crash if primary class is missing and continuation class is declaring ivars. // rdar://10752081 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149573 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
34ff062936ac78142a2c0dc8d1ae6a40df456819 |
02-Feb-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Change the check for constant-conversion with width-1 bitfields so it doesn't suppress quite as many cases. Based off a testcase in the gcc testsuite. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149572 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
20039ae1d9f520d8395899d807473b638fb48688 |
02-Feb-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Reject mismatched "#pragma GCC visibility push" and "#pragma GCC visibility pop". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149559 91177308-0d34-0410-b5e6-96231b3b80d8
emaAttr.cpp
emaDeclCXX.cpp
|
52b6236427e7b608eadaac2bf8f5a24dd16a1130 |
01-Feb-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
Look for declaration of CFBridgingRetain/CFBridgingRetain before changing the diagnostic. Also use correct spelling for both. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149554 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
c36bedc90c687caa71748480c60707ea4608b092 |
01-Feb-2012 |
Anna Zaks <ganna@apple.com> |
Add a new compiler warning, which flags anti-patterns used as the size argument in strncat. The warning is ignored by default since it needs more qualification. TODO: The warning message and the note are messy when strncat is a builtin due to the macro expansion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149524 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
b710dfe5231b0cd44dd987b9bd33c7f6ac165807 |
01-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Diagnose the restriction on default arguments in C++11 [expr.prim.lambda]p5. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149517 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
a1f2114d9e81923c750f6b439302ac03552c37db |
01-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Introduce the lambda scope before determining explicit captures, which cleans up and improves a few things: - We get rid of the ugly dance of computing all of the captures in data structures that clone those of CapturingScopeInfo, centralizing the logic for accessing/updating these data structures - We re-use the existing capture logic for 'this', which actually works now. Cleaned up some diagnostic wording in minor ways as well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149516 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaLookup.cpp
|
b223d8c4266655fe7a9491a0aff0263597672823 |
01-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
When providing code completions for a switch over a scoped enumeration type, be sure to add the qualifier for the enumeration type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149471 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
8398cbfc73f7ff0a676232db9ea9160bb9dafd8d |
01-Feb-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
constexpr: Unlike other incomplete types, 'void' cannot possibly be completed as a literal type. Disallow it as the return type of a constexpr function declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149469 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
93962e5360a43200faa70939571afc4fb9326cf7 |
01-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Improve checking of explicit captures in a C++11 lambda expression: - Actually building the var -> capture mapping properly (there was an off-by-one error) - Keeping track of the source location of each capture - Minor QoI improvements, e.g, highlighing the prior capture if there are multiple captures, pointing at the variable declaration we found if we reject it. As part of this, add standard citations for the various semantic checks we perform, and note where we're not performing those checks as we should. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149462 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
|
ee625afea71ef5a9c1e386564919b86915d96b0d |
01-Feb-2012 |
Nico Weber <nicolasweber@gmx.de> |
Fix crash on invalid in microsoft anonymous struct extension. Fixes PR11847. Patch from Jason Haslam! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149460 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
fe9b559f81535ade84d24c42569378f80df47847 |
01-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
Diagnose attempts to explicitly capture a __block variable in a lambda. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149458 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
16e46dd0c284296cea819dfbf67942ecef02894d |
01-Feb-2012 |
Kaelyn Uhrain <rikka@google.com> |
Make the callback object to Sema::CorrectTypo mandatory. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149451 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprMember.cpp
emaExprObjC.cpp
emaInit.cpp
emaLookup.cpp
emaTemplate.cpp
emaTemplateVariadic.cpp
|
7eb82f0d094d7180e7dee4fdea6a276c5febf81b |
01-Feb-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objc-arc: In various diagnostics mention CFBridgingRetain/CFBridgingRelease calls instead of __bridge_retained/__bridge_transfer casts as preferred way of moving cf objects to arc land. // rdar://10207950 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149449 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
d29975fd08713eb9d1777e60536addaa62df8995 |
31-Jan-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Make sure we call MaybeCreateExprWithCleanups for the sub-expression of an indirect goto. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149441 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
reeTransform.h
|
c6c14e56e34864c5d9343d9ea62ab688cf301eee |
31-Jan-2012 |
Eli Friedman <eli.friedman@gmail.com> |
A couple minor fixes to template instantiation for for-range loops. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149440 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
289e31f386fe8b5e489588533e34c4e21df764bd |
31-Jan-2012 |
Ted Kremenek <kremenek@apple.com> |
Revert r149359. This was a hack to a problem with an easy workaround, and it doesn't feel like general solution. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149404 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
220947bd5a66b0f25f5e74d6029769dfb34f07b4 |
31-Jan-2012 |
Jean-Daniel Dupas <devlists@shadowlab.org> |
FormatCheckers should emit all diagnostics using EmitFormatDiagnostic(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149394 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
fdba18263ffd624846701ad115d35edb3e2ee0a7 |
31-Jan-2012 |
Ted Kremenek <kremenek@apple.com> |
Don't warn about -Wshorten-64-to-32 in unreachable code. Fixes <rdar://problem/10759934>. Apparently this is a common idiom in Linux (among other places). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149359 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
0692a1991bdb8b3112887fce90d75f2103a0080b |
31-Jan-2012 |
Ted Kremenek <kremenek@apple.com> |
Make a bunch of local functions 'static'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149358 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
339b9072e26a2a0fe796dc69c4d28d964d0ec86d |
31-Jan-2012 |
Nico Weber <nicolasweber@gmx.de> |
Let %S, %ls, %C match 16bit types in NSStrings. As discussed at http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20120130/052200.html git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149325 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
f72fccf533bca206af8e75d041c29db99e6a7f2c |
30-Jan-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
constexpr: disallow signed integer overflow in integral conversions in constant expressions in C++11. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149286 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
ce3aa395240207fd1cfa11342fd4b9fd46d6b025 |
30-Jan-2012 |
Jean-Daniel Dupas <devlists@shadowlab.org> |
Disable "non literal format string" for NSString that result from a macro expansion. This is to prevent diagnostic when using NSLocalizedString or CFCopyLocalizedString macros which are usually used in place of NS and CF strings literals. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149268 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
013b3668b67c8cb3ad2ee516c5607a3eba11829f |
30-Jan-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
SmallBitVectorize the deduced parameter set. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149253 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
|
34269df5db40b7c4b4f52aed579d9b3108ff79e4 |
30-Jan-2012 |
Jean-Daniel Dupas <devlists@shadowlab.org> |
Update on format attribute handling. - Remove the printf0 special handling as we treat it as printf anyway. - Perform basic checks (non-literal, empty) for all formats and not only printf/scanf. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149236 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
c5b2e58840748145d1706c1d1481369d1863fabf |
29-Jan-2012 |
Douglas Gregor <dgregor@apple.com> |
Implement code completion support for module import declarations, e.g., @import <complete with module names here> or @import std.<complete with submodule names here> Addresses <rdar://problem/10710117>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149199 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
4188760f6bb20f91c6883dffd89204419f852dee |
29-Jan-2012 |
John McCall <rjmccall@apple.com> |
Complain about attempts to use 'protected' visibility on targets like Darwin that don't support it. We should also complain about invalid -fvisibility=protected, but that information doesn't seem to exist at the most appropriate time, so I've left a FIXME behind. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149186 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
e4b92761b43ced611c417ae478568610f1ad7b1e |
27-Jan-2012 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Added source location for the template keyword in AST template-id expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149127 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
emaChecking.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprMember.cpp
emaOverload.cpp
emaStmt.cpp
emaTemplate.cpp
emaType.cpp
reeTransform.h
|
69d53845c68a4f01920b58ba6ce507d78220689c |
27-Jan-2012 |
Jean-Daniel Dupas <devlists@shadowlab.org> |
Remove redundant checks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149125 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
fad03b75e0297546c5d12ec420b5b79d5b7baa2a |
27-Jan-2012 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Avoid redundant NNS qualification in constructor/destructor names. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149124 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplate.cpp
|
745f5147e065900267c85a5568785a1991d4838f |
27-Jan-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
constexpr: Implement the [dcl.constexpr]p5 check for whether a constexpr function definition can produce a constant expression. This also provides the last few checks for [dcl.constexpr]p3 and [dcl.constexpr]p4. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149108 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
0fa063816818ac53a0015a5d2b0328812005b40e |
27-Jan-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Turn off implicit truncation warning for compound assignment to bitfields; it might be reasonable in some cases, but it clearly doesn't make sense in some cases, like the included testcase. <rdar://problem/10238797>, part 2. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149095 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
3a643afa402d51b5fc4faccb4329e9c4392d4551 |
27-Jan-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Make the bitfield implicit truncation warning slightly more aggressive, and make the printed warning a bit more accurate. The new behavior matches gcc's -Wconversion. <rdar://problem/10238797>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149089 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
e8c904ff343f440e213b88e6963f5ebfbec7ae60 |
26-Jan-2012 |
John McCall <rjmccall@apple.com> |
Don't suppress access-control or invalid-type diagnostics from a declarator just because we were able to build an invalid decl for it. The invalid-type diagnostics, in particular, are still useful to know, and may indicate something about why the decl is invalid. Also, recover from an illegal pointer/reference-to-unqualified-retainable type using __strong instead of __autoreleasing; in general, a random object is much more likely to be __strong, so this avoids unnecessary cascading errors in the most common case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149074 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaType.cpp
|
b4ab8431b414ca399edc890f12f758cb19c090b8 |
26-Jan-2012 |
Peter Collingbourne <peter@pcc.me.uk> |
Improve efficiency of Sema::MaybeBindToTemporary by working with the canonical type directly and adding a fast path for the common case that the type is directly a RecordType. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149039 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
84b007fae6c0cd30fa07074d34fbe2bf61fa44f9 |
26-Jan-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Refactor to share code for handling return statements between lambda expressions and block literals. As it turns out, almost all the logic can be shared. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149031 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaStmt.cpp
reeTransform.h
|
ceccab908bd7824751b1def127272ec04dd4732b |
26-Jan-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Slight refactoring; catch yet another case where we were missing an lvalue-to-rvalue conversion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149003 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaOverload.cpp
emaStmt.cpp
|
01f276dac946c0845f6eb3449ab253cfdba841a1 |
26-Jan-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Don't stack-allocate an IntegerLiteral which can be referred to after the current method returns. PR11744, part 2. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148995 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
457a377ac8566ddc0c455a64843ecf5e675cfff8 |
25-Jan-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Fix a crash involving a multi-dimensional dependent VLA. PR11744. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148989 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
3943b1c0215da2a4171dd6c696cb75d19e5a04a9 |
25-Jan-2012 |
Kaelyn Uhrain <rikka@google.com> |
Allow typo correction to be disabled in BuildOverloadedCallExpr variant. This suppresses typo correction for auto-generated call expressions such as to 'begin' or 'end' within a C++0x for-range statement. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148979 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaStmt.cpp
|
cd78e612d6fa8e214e6a6bb0e739a0c3e419df91 |
25-Jan-2012 |
Kaelyn Uhrain <rikka@google.com> |
Avoid correcting unknown identifiers to types where types aren't allowed. Pass a typo correction callback object from ParseCastExpr to Sema::ActOnIdExpression to be a bit more selective about what kinds of corrections will be allowed for unknown identifiers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148973 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
60a09dcc4656b82c7f96f8719a403a83247f6742 |
25-Jan-2012 |
Kaelyn Uhrain <rikka@google.com> |
Add custom callback object for typo correction in BuildRecoveryCallExpr. The new callback, in addition to limiting which keywords to include in the pool of typo correction candidates, also filters out non-keyword candidates that don't refer to (template) functions that accept the number of arguments that are present for the call being recovered. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148962 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
d1bb4ae6cbc0f8bea4b329e040f58b18c03388e7 |
25-Jan-2012 |
Douglas Gregor <dgregor@apple.com> |
When we're substituting into a function parameter pack and expect to get a function parameter pack (but don't due to weird substitutions), complain. Fixes the last bit of PR11848. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148960 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
e98e5b54543f8a9e35626fb44dc0c649e71917d9 |
25-Jan-2012 |
Jean-Daniel Dupas <devlists@shadowlab.org> |
Add support for const pointer to literal-objc string as format attribute. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148948 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
8c9fe200890663e1026be25d66f0929caa87a0ca |
25-Jan-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Fix r148920 to what I actually meant to commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148921 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
e0dbedfdd1f4f57cc9e8fd594385cff961593014 |
25-Jan-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Add missing check for placeholders. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148920 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
00b465747138ec5c00e1d7568d2eb88c6db6042d |
25-Jan-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
In TreeTransform<Derived>::TransformBlockExpr, call ActOnBlockError for errors, patch by Dmitri Gribenko. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148915 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
c0536c8294fc4453f0f1d1cf24a62bfc725fd492 |
25-Jan-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix PR11848: decree that an alias template contains an unexpanded parameter pack iff its substitution contains an unexpanded parameter pack. This has the effect that we now reject declarations such as this (which we used to crash when expanding): template<typename T> using Int = int; template<typename ...Ts> void f(Int<Ts> ...ints); The standard is inconsistent on how this case should be treated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148905 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
3add9f0ac80b0a4d78611dcdb4fd89c37f1c13d8 |
25-Jan-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Make sure we correctly treat __is_convertible_to as an unevaluated context. PR11833. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148893 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
0d266d623452f09d06973528217390d762a8f3fa |
25-Jan-2012 |
Douglas Gregor <dgregor@apple.com> |
Whenever Sema attempts to look in the global method pool, try to load additional data from the external Sema source. This properly copes with modules that are imported after we have already searched in the global method pool for a given selector. For PCH, it's a slight pessimization to be fixed soon. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148891 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
43d1251a471d19ce83aa8ce91c0104addada5add |
25-Jan-2012 |
Jean-Daniel Dupas <devlists@shadowlab.org> |
Add "multiple format attributes" support on block. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148890 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
5ac4b6917aa34fae6da64036539023a6155a3d48 |
25-Jan-2012 |
Douglas Gregor <dgregor@apple.com> |
Rework the external Sema source's ReadMethodPool() so that it doesn't return pre-built lists. Instead, it feeds the methods it deserializes to Sema so that Sema can unique them, which keeps the chains shorter. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148889 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDeclObjC.cpp
|
44fae525e792f09ecbe07c0a62cdbcb81e04306b |
25-Jan-2012 |
Douglas Gregor <dgregor@apple.com> |
Factor out the addition of a method into the global method pool, and teach it to always add the new method at the *end* of the list rather than as the second element in the list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148886 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
d814eaf0dfb30f1cb6f90b056f8126f7e31e7ef4 |
24-Jan-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Switch PerformImplicitConversion over to use DefaultLvalueConversion for lvalue-to-rvalue conversion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148874 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
1acbe5e65631c7b52fa559df2bdcfdf76d4c410a |
24-Jan-2012 |
Jean-Daniel Dupas <devlists@shadowlab.org> |
Replace a hack to handle NSLog/NSLogv in sema by declaring them as Library Builtins. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148873 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
c15707d8da08df2eb22f6ed047743fa3f7c9831b |
24-Jan-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[libclang] In clang::getCursorKindForDecl() don't return "UnexposedDecl" for forward references of classes and protocols, this breaks libclang API usage. rdar://10747438. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148861 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
fca84b232dd74c91b2e0f963a3f8c3bd351a9037 |
24-Jan-2012 |
Nick Lewycky <nicholas@mxc.ca> |
Add a new warning, -Wover-aligned, which detects attempts to use the default allocator to construct an object which declares more alignment than the default allocator actually provides. Fixes PR9527! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148857 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
a5ee6345b5af1c88262d02d248e76ad2423161a0 |
24-Jan-2012 |
Kaelyn Uhrain <rikka@google.com> |
Small code cleanup/simplification in Sema::ClassifyName. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148850 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
466f45a06b654d85e9504e37ccf7255ffe4f0e2b |
24-Jan-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objc: Issue a generic diagnostic assigning to an objc object in any abi mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148847 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
71efba0bbafaefab14419fbd284efff5f7acade7 |
24-Jan-2012 |
Kostya Serebryany <kcc@google.com> |
The following patch adds __attribute__((no_address_safety_analysis)) which will allow to disable address safety analysis (such as e.g. AddressSanitizer or SAFECode) for a specific function. When building with AddressSanitizer, add AddressSafety function attribute to every generated function except for those that have __attribute__((no_address_safety_analysis)). With this patch we will be able to 1. disable AddressSanitizer for a particular function 2. disable AddressSanitizer-hostile optimizations (such as some cases of load widening) when AddressSanitizer is on. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148842 91177308-0d34-0410-b5e6-96231b3b80d8
ttributeList.cpp
emaDeclAttr.cpp
|
ecd7b04ae7764179d40ee4e3e49c99d1fbcb4eff |
24-Jan-2012 |
Douglas Gregor <dgregor@apple.com> |
Promote the extension warning for attempts to catch a reference or pointer to incomplete type from an ExtWarn to an error. We put the ExtWarn in place as part of a workaround for Boost (PR6527), but it (1) doesn't actually match a GCC extension and (2) has been fixed for two years in Boost, and (3) causes us to emit code that fails badly at run time, so it's a bad idea to keep it. Fixes PR11803. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148838 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
7b383e4a3888c2bebc2762a94c23ad1fbb060281 |
24-Jan-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objc: issue error if assigning objects in fragile-abi too. // rdar://10731065 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148823 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
5d5051f3e79bf754134ccdf7a1dc7778cd80c73e |
24-Jan-2012 |
Douglas Gregor <dgregor@apple.com> |
Only mark an IdentifierInfo as having changed since deserialization when it actually has changed (and not, e.g., when we've simply attached a deserialized macro definition). Good for ~1.5% reduction in module file size, mostly in the identifier table. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148808 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
|
f211662199c87461f3b1475a549ab439c63ca83b |
24-Jan-2012 |
David Blaikie <dblaikie@gmail.com> |
Support decltype in member initializers. This is the last piece of N3031 (decltype in weird places) - supporting the use of decltype in a class ctor's member-initializer-list to specify the base classes to initialize. Reviewed by Richard Smith. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148789 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
23661d3e348c5f44ae89b6848bbc331829bb46f2 |
24-Jan-2012 |
David Blaikie <dblaikie@gmail.com> |
Revert various template unreachability code I committed accidentally. r148774, r148775, r148776, r148777 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148780 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
36b7c63664bea8e9aa85a024c515877be2ff92fa |
24-Jan-2012 |
David Blaikie <dblaikie@gmail.com> |
Simple hack to do unreachable code analysis on template patterns. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148774 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
7514f31c8fa3fbb3428d0dca98c32145fb0faaa5 |
24-Jan-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Rename Sema::isNullExpr() -> Sema::isSentinelNullExpr() which is more descriptive. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148772 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e42670bb6885934f01a6f7ffce58add5b5b3822b |
24-Jan-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c: Ignore with warning forward class declaration whose name matches a typedef declaring an object type. // rdar://10733000 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148760 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
b832f6dea893f25b40500a04781286236281cb20 |
23-Jan-2012 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Minor fixups for auto deduction of initializer lists. Fix some review comments. Add a test for deduction when std::initializer_list isn't available yet. Fix redundant error messages. This fixes and outstanding FIXME too. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148735 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaOverload.cpp
emaStmt.cpp
emaTemplateDeduction.cpp
|
4f1813e55a13a19d4981d245d1da583c1051305b |
23-Jan-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Introduce Sema::isNullExpr() that contains the checks that Sema::DiagnoseSentinelCalls() does. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148722 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
438ee1fc5e5baaa204faede83cb999e45bb6b57e |
23-Jan-2012 |
Kaelyn Uhrain <rikka@google.com> |
In CorrectTypo, use the cached correction as a starting point instead. Previously, for unqualified lookups, a positive cache hit is used as the only non-keyword correction and a negative cache hit immediately returns an empty TypoCorrection. With the new callback objects, this behavior causes false negatives by not accounting for the fact that callback objects alter the set of potential/allowed corrections. The new behavior is to seed the set of corrections with the cached correction (for positive hits) to estabilishing a baseline edit distance. Negative cache hits are only stored or used when either no callback object is provided or when it returns true for a call to ValidateCandidate with an empty TypoCorrection (i.e. when ValidateCandidate does not seem to be doing any checking of the TypoCorrection, such as when an instance of the base callback class is used solely to specify the set of keywords to be accepted). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148720 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
f5cd27d7eef3fd4021545dd76a1faf7152fda344 |
23-Jan-2012 |
Douglas Gregor <dgregor@apple.com> |
Handle pseudo-object expressions (and any other placeholder expression) when code-completing member access expressions. Fixes <rdar://problem/10717172>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148703 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
f3c82c5f5c0321babf054983c29ad84cc90244f7 |
23-Jan-2012 |
Douglas Gregor <dgregor@apple.com> |
Downgrade C++11 narrowing conversion errors to warnings default-mapped to an error, so that users can turn them off if necessary. Note that this does *not* change the behavior of in a SFINAE context, where we still flag an error even if the warning is disabled. This matches GCC's behavior. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148701 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
2d757ec0e6cbd9aab4bcea7a0a83d71f5080c736 |
23-Jan-2012 |
Nico Weber <nicolasweber@gmx.de> |
Add a source range to the ms path. Spotted by David Blaikie. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148683 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
df1be86ef5f5d55fc23b2339ee76e076424d9ba0 |
23-Jan-2012 |
Nico Weber <nicolasweber@gmx.de> |
In microsoft mode, downgrade pseudo-destructors on void from error to warning. This matches cl.exe's behavior and fixes PR11791. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148682 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
585d7795c2dddaa510b3bb1b3b18633bfcfdf643 |
23-Jan-2012 |
David Blaikie <dblaikie@gmail.com> |
Implement -Wswitch-enum correctly. Clang previously implemented -Wswitch-enum the same as -Wswitch. This patch corrects the behavior to match GCC's. The critical/only difference being that -Wswitch-enum is not silenced by the presence of a default case in the switch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148679 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
28976604ff81048e17b4aba6f1f9bc2b29a870a3 |
23-Jan-2012 |
Nico Weber <nicolasweber@gmx.de> |
Eli says this should check MicrosoftMode instead. Also change a || that I accidentally changed to && back to ||. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148677 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
afcc96a20029ac9009feefbc555a4f9d923e3e06 |
23-Jan-2012 |
Nico Weber <nicolasweber@gmx.de> |
In ms mode, a move assignment operator shouldn't mark a copy ctor as deleted. MSVC2010's pair class has a move assignment operator but no explicit copy constructor, which makes it unusable without this change. For symmetry, let move copy constructors not mark the default assignment operator as deleted either. Both changes match cl.exe's behavior. Fixes pr11826. Also update the standard excerpt to point to the right paragraph. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148675 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
8c382060c9e6668a94f1485dd16f012cda526c5f |
23-Jan-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Make sure the AST correctly represents lvalue-to-rvalue conversions where appropriate. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148673 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaStmt.cpp
|
9366750a5a97c8aeae1df4898ea849b087865195 |
22-Jan-2012 |
David Blaikie <dblaikie@gmail.com> |
Fix -Wswitch to warn about out of bounds enum cases even when there's a default For consistency with GCC & reasonable sanity. The FIXME suggests that the original author was perhaps using the default check for some other purpose, not realizing the more obvious limitation/false-negatives it creates, but this doesn't seem to produce any regressions & fixes the included test. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148649 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
6b6fb4fe64684df35975fbe299d5085d70c5c178 |
22-Jan-2012 |
Francois Pichet <pichet2000@gmail.com> |
In Microsoft Mode, disable the C++11 strict integral conversion rules for enumerator that were introduced with r148439. Otherwise MSVC headers won't compile in C++ 11 mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148642 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
31ceb61172bca7ebc3fb90e9125864c7a29c55c0 |
21-Jan-2012 |
David Blaikie <dblaikie@gmail.com> |
Add -Wswitch-enum-redundant-default. This warning acts as the complement to the main -Wswitch-enum warning (which warns whenever a switch over enum without a default doesn't cover all values of the enum) & has been an an-doc coding convention in LLVM and Clang in my experience. The purpose is to ensure there's never a "dead" default in a switch-over-enum because this would hide future -Wswitch-enum errors. The name warning has a separate flag name so it can be disabled but it's grouped under -Wswitch-enum & is on-by-default because of this. The existing violations of this rule in test cases have had the warning disabled & I've added a specific test for the new behavior (many negative cases already exist in the same test file - and none regressed - so I didn't add more). Reviewed by Ted Kremenek ( http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20120116/051690.html ) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148640 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
3fc809de96f9b0a4fcf7bc936399194d0b7198c8 |
21-Jan-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Remove redundant argument. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148628 91177308-0d34-0410-b5e6-96231b3b80d8
emaAttr.cpp
|
78a542478dd63c2789816dcc1cdab5c9a6eef99b |
21-Jan-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Fix some comments relating to ExpressionEvaluationContexts. Get rid of a couple of uses of ConstantEvaluated which don't make sense. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148624 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExpr.cpp
emaType.cpp
|
be25db97e20f72e960d87b52216b9fd9871c620b |
21-Jan-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Add obvious missing call to MarkDeclarationReferenced. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148611 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
71b8fb5d4233420d2ed2f150a54ea61431bd8684 |
21-Jan-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Make clang's AST model sizeof and typeof with potentially-evaluated operands correctly, similar to what we already do with typeid. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148610 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
emaExpr.cpp
|
c8dc1352071575c36401158094a865ad682fb886 |
21-Jan-2012 |
Douglas Gregor <dgregor@apple.com> |
Fix the code completion string for variadic macros with more than one argument, which was broken and very ugly (and even had a test case to make *sure* it was broken and ugly). Fixes <rdar://problem/10609117>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148606 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
23323e0253716ff03c95a00fb6903019daafe3aa |
20-Jan-2012 |
DeLesley Hutchins <delesley@google.com> |
Delayed template instantiation of late-parsed attributes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148595 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
7b9ff0c09025dcbe48ec7db71330e2066d1e1863 |
20-Jan-2012 |
DeLesley Hutchins <delesley@google.com> |
Instantiate dependent attributes when instantiating templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148592 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
emaDecl.cpp
emaDeclAttr.cpp
emaTemplateInstantiateDecl.cpp
|
3026348bd4c13a0f83b59839f64065e0fcbea253 |
20-Jan-2012 |
David Blaikie <dblaikie@gmail.com> |
More dead code removal (using -Wunreachable-code) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148577 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaLookup.cpp
emaTemplateDeduction.cpp
emaTemplateVariadic.cpp
emaType.cpp
|
74fe66181db91d45d48f57abe325ea487e32ddbc |
20-Jan-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Replace a dubious use of SmallVectorImpl with a proper copy. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148549 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
b7ff74a6764ad837ce348bc7dd0f0804e4dbf492 |
20-Jan-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Localize variable, remove unused assignment. Found by the clang static analyzer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148544 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
dc370c1e70a2f876c65be4057ead751b72c8ddd5 |
20-Jan-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Remove unused variables. Found by clang's own static analyzer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148542 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaTemplateInstantiateDecl.cpp
|
ef331b783bb96a0f0e34afdb7ef46677dc4764cb |
20-Jan-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Remove PotentiallyPotentiallyEvaluated, and replace it with a much simpler and less error-prone way of handling the relevant cases. Towards marking of whether a declaration is used more accurately. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148522 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprCXX.cpp
emaExprMember.cpp
emaType.cpp
reeTransform.h
|
796c1a1e3e63e459e371383ac878aa5f40b02a8c |
19-Jan-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
An instantiation of a constexpr static data member in a class template is constexpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148505 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
b0f9dd22bf469028b2c40eab60ad1019c3e6089d |
19-Jan-2012 |
Tanya Lattner <tonic@nondot.org> |
A few style changes. Change CheckVectorLogicalOperands to pass params by ref. Add another test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148452 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
bcdd7d92883d771106e54357245733358eac9672 |
19-Jan-2012 |
Kaelyn Uhrain <rikka@google.com> |
Remove the now-unused CorrectTypoContext enum. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148441 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
8ef7b203332b0c8d65876a1f5e6d1db4e6f40e4b |
19-Jan-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
constexpr: converted constant expression handling for enumerator values, case values and non-type template arguments of integral and enumeration types. This change causes some legal C++98 code to no longer compile in C++11 mode, by enforcing the C++11 rule that narrowing integral conversions are not permitted in the final implicit conversion sequence for the above cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148439 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaInit.cpp
emaOverload.cpp
emaStmt.cpp
emaTemplate.cpp
|
43e875d2610afcf9e7017b71f46116dc86624fd9 |
18-Jan-2012 |
Kaelyn Uhrain <rikka@google.com> |
Convert SemaDecl.cpp to pass callback objects to CorrectTypo. Includes tests highlighting the cases where accuracy has improved (there is one call that does no filtering beyond selecting the set of allowed keywords, and one call that only triggers for ObjC code for which a test by someone who knows ObjC would be welcome). Also fixes a small typo in one of the suggestion messages, and drops a malformed "expected-note" for a suggestion that did not occur even when the malformed note was committed as r145930. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148420 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
556b1d0f3a039a691ed4f6dd91b8587435f30b0b |
18-Jan-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objc: deprecate direct usage of 'isa' of objc objects in favor of usage of api's intended for. // rdar://8290002 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148404 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprMember.cpp
|
79f0a8262b330f5e1ffeb3af94e80c723d65ee85 |
18-Jan-2012 |
Seth Cantrell <seth.cantrell@gmail.com> |
Fix char literal types in C L'x' is actually wchar_t support C11 u and U char literals git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148390 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
4798f8dfdb15fc03fa6b4104efed8762d52ebb18 |
18-Jan-2012 |
Kaelyn Uhrain <rikka@google.com> |
Convert DiagnoseEmptyLookup to use correction callbacks. No new unit tests yet as there is no behavioral change (except for slightly more specific filtering in Sema::ActOnStartOfLambdaDefinition). Tests will be added as the code paths are traced in greater depth to determine how to improve the results--there are at least one or two known bugs that require those improvements. This commit lays the groundwork for those changes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148382 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprCXX.cpp
emaOverload.cpp
|
4c3fc9b38d3723f73e4ded594cebf38c76f91d93 |
18-Jan-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Move narrowing conversion detection code from SemaInit to SemaOverload, ready for it to be used in converted constant expression checking, and fix a couple of issues: - Conversion operators implicitly invoked prior to the narrowing conversion were not being correctly handled when determining whether a constant value was narrowed. - For conversions from floating-point to integral types, the diagnostic text incorrectly always claimed that the source expression was not a constant expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148381 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
emaOverload.cpp
|
9bc291d5c00f47383ce7358e6309abf45324b028 |
18-Jan-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Make PotentiallyPotentiallyEvaluated contexts work correctly when referencing a class field from outside an instance method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148376 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprMember.cpp
|
6b3014b07c40a6ed8b0c8ed63950df02eeb82c28 |
18-Jan-2012 |
Eli Friedman <eli.friedman@gmail.com> |
The value of a case statement is a potentially evaluated context. Found by inspection. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148373 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
93c878ee093f2a233c32b29f074e6a3f511e333f |
18-Jan-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Fix a couple issues where we didn't correctly delay diagnostics in PotentiallyPotentiallyEvaluated contexts. In preparation for making sizeof() PotentiallyPotentiallyEvaluated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148367 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaType.cpp
|
87eaf726528124a1ad49f38402e9b619685fe30b |
17-Jan-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objc-arc: when 'assign' attribute is unspecified, rely on property's type for its life-time to avoid bogus warning with -Warc-unsafe-retained-assign. // rdar://10694932 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148355 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
98d3606cd5583f35ba1f8cb11bf3245dd4f7ea02 |
17-Jan-2012 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Add Sema::isInitListConstructor. This will be needed for upcoming work. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148354 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
62b7cfb73e202051e7ab0dad42ba213acd0dec7e |
17-Jan-2012 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Auto deduction support for std::initializer_list, including for-range support. This means you can now write: for (int i : {1, 4, 512, 23, 251}) {} git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148353 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaStmt.cpp
emaTemplateDeduction.cpp
|
84760e3a5d885ab19b5d11aafe78dfdfe2911e3a |
17-Jan-2012 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Template argument deduction for std::initializer_list arguments from initializer lists. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148352 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplateDeduction.cpp
|
bb95e51a3668c50133b989467cd44ba4d8a42e8a |
17-Jan-2012 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Rename the first of 11 DeduceTemplateArguments overloads. There are 5 functions of this name in Sema, and 6 more static helpers in SemaTemplateDeduction.cpp. The Sema functions have jobs like "deduce for function call", "deduce for taking the address", etc. The static helpers have jobs like "deduce by comparing two types", "deduce by comparing two lists of types", "deduce by comparing two template arguments", etc. The fact that they all are called the same and only differ in two of their 6 or more arguments makes the code using them very hard to read. Here I rename the one function that concerns me most at the moment, but as a matter of cleanup, the others will eventually be renamed as well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148351 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
fe5922809ec906390769a2cf0a765f395fa0c599 |
17-Jan-2012 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Basic overloading support for std::initializer_list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148350 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
2b916b8b55aaf0152ab9ad630c8454bf6373b085 |
17-Jan-2012 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Sema support for initialization of std::initializer_list from initializer lists. This does not yet support CodeGen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148349 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
395e04dbd7294bae4640aef1705cec3d052578b0 |
17-Jan-2012 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Add Sema::isStdInitializerList, which will be necessary for the upcoming operations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148348 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDeclCXX.cpp
|
8788491e10a24e70b7282f312c22d74ac478c899 |
17-Jan-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Correctly resolve an overload set passed to an overloaded operator=. PR11784. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148335 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
29c3f814b64808c6dac4597b61a50ceecdf141fc |
17-Jan-2012 |
Jean-Daniel Dupas <devlists@shadowlab.org> |
Fix a couples of issues in format strings checking. PR 10274: format function attribute with the NSString archetype yields no compiler warnings PR 10275: format function attribute isn't checked in Objective-C methods git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148324 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExprObjC.cpp
|
6b81b0d82a78740b3fb69bacf5d729b6f9374dac |
17-Jan-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objc: fixes a bug where struct used inside an objc class was not being exported to parent decl context resulting in bogus mismatch warning later on. // rdar://10655530 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148320 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
a6ea10e22b600d92e084f6b11b9b9a92d0eb2412 |
17-Jan-2012 |
Douglas Gregor <dgregor@apple.com> |
Delay the creation of the built-in Objective-C class 'Protocol' by moving it from a "special type" to a predefined declaration, as we do for id, Class, and SEL. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148313 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
9fdefb338ead088dd7a5dd4ff3df807586b26d41 |
17-Jan-2012 |
David Blaikie <dblaikie@gmail.com> |
Re-add an over-zealously removed break. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148296 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
312ede8a6dd313f44d30fb285d80330287fd7e1e |
17-Jan-2012 |
David Blaikie <dblaikie@gmail.com> |
Remove dead comments as per Chandler's feedback to r148292 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148294 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
7530c034c0c71a64c5a9173206d9742ae847af8b |
17-Jan-2012 |
David Blaikie <dblaikie@gmail.com> |
Remove unreachable code in Clang. (replace with llvm_unreachable where appropriate or when GCC requires it) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148292 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
eclSpec.cpp
emaAccess.cpp
emaCXXScopeSpec.cpp
emaCast.cpp
emaChecking.cpp
emaCodeComplete.cpp
emaDeclAttr.cpp
emaExceptionSpec.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprMember.cpp
emaInit.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
|
561d3abc881033776ece385a01a510e1cbc1fa92 |
17-Jan-2012 |
David Blaikie <dblaikie@gmail.com> |
Remove unnecessary default cases in switches over enums. This allows -Wswitch-enum to find switches that need updating when these enums are modified. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148281 91177308-0d34-0410-b5e6-96231b3b80d8
emaAttr.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaExpr.cpp
emaInit.cpp
emaType.cpp
|
ea8c59aaa6bd19976879142296f8fd12f8926738 |
17-Jan-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Introduce a CodeCompletionResult::CreateCodeCompletionString() that does not depend on Sema, it accepts an ASTContext and a Preprocessor. Step towards making clang_getCursorCompletionString not depend on Sema. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148278 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaCodeComplete.cpp
|
6fc9e1d98205649e4d0f741d194d288a45995a62 |
17-Jan-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Introduce a static Sema::MarkDeducedTemplateParameters() that only depends on an ASTContext. This is a step towards making clang_getCursorCompletionString not depend on Sema. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148277 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
55693fbe18e9431dbb0ea9e20d140d8bc6bc4c72 |
17-Jan-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Revert r148271; this requires more thought. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148276 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
58219e7f27641bb3c635f17e79b7edc0a955a188 |
17-Jan-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Change the behavior of the lvalue-to-rvalue conversion for varargs in PotentiallyPotentiallyEvaluated contexts so that we model it in a sane way in most cases, and give up for the edge case which hopefully doesn't matter too much. In preparation for correctly treating sizeof() as a PotentiallyPotentiallyEvaluated context. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148271 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
0a151a137a68bb656acbcce7ff2407613bb80cfc |
17-Jan-2012 |
Anna Zaks <ganna@apple.com> |
Use Builtin ID as the return value for FunctionDecl::getMemoryFunctionKind(). This is a follow up on the Chris's review for r148142: We don't want to pollute FunctionDecl with an extra enum. (To make this work, added memcmp and family to the library builtins.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148267 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
4f692c27d74e249d6ef8d24792c35f3e5c620e2a |
16-Jan-2012 |
Tanya Lattner <tonic@nondot.org> |
Add support for OpenCL 1.1 logical operations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148254 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
cf7c14c3451658311aeaed84c6395082fa91e60d |
16-Jan-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Add some calls to MarkDeclarationReferenced, towards a point where every declaration which is used is marked as used. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148253 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExprCXX.cpp
|
7a7ee3033e44b45630981355460ef89efa0bdcc4 |
16-Jan-2012 |
David Chisnall <csdavec@swan.ac.uk> |
Some improvements to the handling of C11 atomic types: - Add atomic-to/from-nonatomic cast types - Emit atomic operations for arithmetic on atomic types - Emit non-atomic stores for initialisation of atomic types, but atomic stores and loads for every other store / load - Add a __atomic_init() intrinsic which does a non-atomic store to an _Atomic() type. This is needed for the corresponding C11 stdatomic.h function. - Enables the relevant __has_feature() checks. The feature isn't 100% complete yet, but it's done enough that we want people testing it. Still to do: - Make the arithmetic operations on atomic types (e.g. Atomic(int) foo = 1; foo++;) use the correct LLVM intrinsic if one exists, not a loop with a cmpxchg. - Add a signal fence builtin - Properly set the fenv state in atomic operations on floating point values - Correctly handle things like _Atomic(_Complex double) which are too large for an atomic cmpxchg on some platforms (this requires working out what 'correctly' means in this context) - Fix the many remaining corner cases git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148242 91177308-0d34-0410-b5e6-96231b3b80d8
emaCast.cpp
emaChecking.cpp
emaExpr.cpp
|
52e4c60e31fee851e2988f7909aebf488e57fc12 |
16-Jan-2012 |
David Blaikie <dblaikie@gmail.com> |
Refactor variables unused under non-assert builds. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148229 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
244ee7b89a483fd3764637abdf95de2893b437d0 |
15-Jan-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Pedantic diagnostic correction: in C++, we have integral constant expressions, not integer constant expressions. In passing, fix the 'folding is an extension' diagnostic to not claim we're accepting the code, since that's not true in -pedantic-errors mode, and add this diagnostic to -Wgnu. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148209 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
1136ef09ff327c2032ec20e2c2ab87cdbf017b1b |
14-Jan-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Use a smaller vector than SmallVector. Shrinks OverloadCandidate from 208 to 168 bytes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148204 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaOverload.cpp
|
9e2822bb4ada53a3cebd9a3f793fef8d700c5c9a |
14-Jan-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Clear ImplicitConversionSequence the obvious way which turns out to be less fragile. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148200 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
314f5544fbdcfb1082df070f730fe8acbdb85180 |
14-Jan-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Give OverloadCandidateSet the responsibility for destroying the implicit conversion sequences so we don't get double frees when the vector reallocates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148198 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
47b1d96bde79633d4aeded1cde2c5f870a58af24 |
14-Jan-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objc: disallow __block attribute on method params. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148197 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
ef96ee0be5f100789f451641542a69cd719144d2 |
14-Jan-2012 |
Douglas Gregor <dgregor@apple.com> |
De-virtualize getPreviousDecl() and getMostRecentDecl() when we know we have a redeclarable type, and only use the new virtual versions (getPreviousDeclImpl() and getMostRecentDeclImpl()) when we don't have that type information. This keeps us from penalizing users with strict type information (and is the moral equivalent of a "final" method). Plus, settle on the names getPreviousDecl() and getMostRecentDecl() throughout. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148187 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaAccess.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaLookup.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
09dd3798e100ace40defdc5541277502346213f2 |
14-Jan-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Pool allocate ImplicitConversionSequences. To avoid malloc thrashing give OverloadCandidateSet an inline capacity for conversion sequences. We use the fact that OverloadCandidates never outlive the OverloadCandidateSet and have a fixed amount of conversion sequences. This eliminates the oversized SmallVector from OverloadCandidate shrinking it from 752 to 208 bytes. On the test case from the "Why is CLANG++ so freaking slow" thread on llvmdev this avoids one gig of vector reallocation (including memcpy) which translates into 5-10% speedup on Lion/x86_64. Overload candidate computation is still the biggest malloc contributor when compiling templated c++ code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148186 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
0e6a16f3e8c8d80a61e89848d216972aa8daea27 |
14-Jan-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
OverloadCandidateSet: Stop exposing SmallVector internals Replace push_back with addCandidate which will let us make use of the fixed size of the conversion sequence vector soon. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148185 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
f785a7d611404cf4747287a2bbc59b4d0e6a5a8c |
14-Jan-2012 |
Douglas Gregor <dgregor@apple.com> |
Introduce Decl::getPreviousDecl() and Decl::getMostRecentDecl(), virtual functions that provide previous/most recent redeclaration information for any declaration. Use this to eliminate the redundant, less efficient getPreviousDecl() functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148184 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
dd9d64547831728dd792654bb26477f5099a2153 |
14-Jan-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Progress towards making isUsed() reflect whether a declaration is odr-used; don't set isUsed for local variables which are referenced in unevaluated contexts. Make other code use isReferenced() (which basically indicates that a declaration isn't dead) where appropriate. I was forced to change test/SemaCXX/linkage.cpp because we aren't actually modeling extern "C" in the AST the way that testcase expects; we were not printing a warning only because we skipped the relevant check. Someone who actually understands the semantics here should fix that. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148158 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
|
f8ec8c9935acf77ff929b0aa51428d70c37c232a |
14-Jan-2012 |
Kaelyn Uhrain <rikka@google.com> |
Convert SemaTemplate*.cpp to pass a callback object to CorrectTypo. The change to SemaTemplateVariadic.cpp improves the typo correction results in certain situations, while the change to SemaTemplate.cpp does not change existing behavior. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148155 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateVariadic.cpp
|
117c45666c99f1797c708767d7c0ccaa7902ec42 |
14-Jan-2012 |
Douglas Gregor <dgregor@apple.com> |
Make sure to consider non-DeclContext scopes properly when finding multiple name lookup results in C/Objective-C. Fixes a regression a caused in r147533, found by Enea Zaffanella! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148154 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
d9b859a74ecaede23a78d37f364498102ef418c9 |
13-Jan-2012 |
Anna Zaks <ganna@apple.com> |
Move identification of memory setting and copying functions (memset, memcmp, strncmp,..) out of Sema and into FunctionDecl so that the logic could be reused in the analyzer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148142 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
e4c7f90da208ed2caeab784b32f416a50eed8da3 |
13-Jan-2012 |
Kaelyn Uhrain <rikka@google.com> |
Convert SemaExprMember.cpp to pass a callback object to CorrectTypo, improving the typo correction results in certain situations. This is also the first typo correction callback conversion to affect an existing unit test. :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148140 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprMember.cpp
|
e40141542d96f556b5c1b5e3b8acca8f11c27527 |
13-Jan-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Refactor for clarity. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148135 91177308-0d34-0410-b5e6-96231b3b80d8
emaFixItUtils.cpp
|
3534050c491454e4a5c7bcd0f8e6054cd89012cd |
13-Jan-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR11754: Reject non-static constexpr member functions in classes with virtual base classes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148094 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
9ec0ef31c3bc40612e8bf47bd7d265d5e7c01ff9 |
13-Jan-2012 |
Eli Friedman <eli.friedman@gmail.com> |
constexpr is allowed on static member functions of non-literal classes. Per report on cfe-dev. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148090 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
059d578c7d45f687a81bcc97ab80404256a5287f |
13-Jan-2012 |
Eli Friedman <eli.friedman@gmail.com> |
A few minor improvements to error recovery trying to access member of a function. In particular, this restores the cool error recovery for the example from http://blog.llvm.org/2010/04/amazing-feats-of-clang-error-recovery.html , which regressed a few months back. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148089 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprMember.cpp
|
f037541d5c7dcf3553cf26e4b047be869980c23a |
13-Jan-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Don't crash while trying to diagnose a function declared at block scope with an incomplete return type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148088 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaFixItUtils.cpp
|
2f4d88f4418afafbd0b22ce0f79cdead6f3a6f99 |
13-Jan-2012 |
Kaelyn Uhrain <rikka@google.com> |
Fix up the calls to CorrectTypo in Sema*ObjC.cpp to use callback objects, and add a basic CorrectionCandidateCallback template class to simplify the fixups. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148085 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
emaExprObjC.cpp
|
7984de35644701c0d94336da7f2215d4c26d9f5b |
13-Jan-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Improve 0-argument -Wvexing-parse diagnostic by adding notes with fix-its: - If the declarator is at the start of a line, and the previous line contained another declarator and ended with a comma, then that comma was probably a typo for a semicolon: int n = 0, m = 1, l = 2, // k = 5; myImportantFunctionCall(); // oops! - If removing the parentheses would correctly initialize the object, then produce a note suggesting that fix. - Otherwise, if there is a simple initializer we can suggest which performs value-initialization, then provide a note suggesting a correction to that initializer. Sema::Declarator now tracks the location of the comma prior to the declarator in the declaration, if there is one, to facilitate providing the note. The code to determine an appropriate initializer from the -Wuninitialized warning has been factored out to allow use in both that and -Wvexing-parse. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148072 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
emaDecl.cpp
emaFixItUtils.cpp
|
3b4b047ff0ebaefeaed0a5f545b4fa91f18e6cdb |
12-Jan-2012 |
Kaelyn Uhrain <rikka@google.com> |
Convert SemaCXXScopeSpec.cpp to pass a callback object to CorrectTypo, improvng the typo correction results in certain situations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148052 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
|
f2b4f7b6772ccba2ea8aae411ea09d8d32d90015 |
12-Jan-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objc: do not warn when converting to a const id qualfied by its list of protools. // rdar://10669694 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148051 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
425d631082699b37624a7b1d6abb87c7abd5abe6 |
12-Jan-2012 |
Kaelyn Uhrain <rikka@google.com> |
Convert SemaInit.cpp to pass a callback object to CorrectTypo. And once again improve the typo correction results in certain situations just by moving the existing checks on the correction. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148037 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
1d7049a6eddcc1a4bd33c6a595d4ad2ae8c1cece |
12-Jan-2012 |
Douglas Gregor <dgregor@apple.com> |
In Objective-C++, actually compute the base type of a member access expression for an Objective-C object or pointer type, so that we don't attempt to treat the member name as a template. Fixes <rdar://problem/10672501>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148028 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaTemplate.cpp
|
746f5bcbfde5b25269169c63c66492311673b67d |
12-Jan-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Add IsImplicit field in ObjCMessageExpr that is true when the message was constructed, e.g. for a property access. This allows the selector identifier locations machinery for ObjCMessageExpr to function correctly, in that there are not real locations to handle/report for such a message. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148013 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
emaPseudoObject.cpp
|
ed0b31f8474b60661de6cbb75fb04aa0de9bd1ef |
12-Jan-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Fix some edge cases with C++ casts and placeholder expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147984 91177308-0d34-0410-b5e6-96231b3b80d8
emaCast.cpp
|
3306f961fa940754dfa0e4e34c57e0c57bea3890 |
12-Jan-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c: fixes a regression in looking up names in class extensions and categories by recent refactoring of objc class ASTs. // rdar://1066654 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147982 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
ec3bd728cc6505c98543b001a1988c237f5fb9a9 |
11-Jan-2012 |
Douglas Gregor <dgregor@apple.com> |
Improve the diagnostic when trying to redefine a typedef with a variably-modified type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147973 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
dc98cd0cdd2eee8290b624ef69c6d91ce626d85e |
11-Jan-2012 |
Kaelyn Uhrain <rikka@google.com> |
Fix the caching in CorrectTypo so that other non-keyword identifiers are still added if the cached correction fails validation. Also fix a copy-and-paste error in a comment from my previous commit. Finally, add an example of the benefit the typo correction callback adds to TryNamespaceTypoCorrection--which happens to also tickle the above caching problem, as the only way a non-namespace Decl would be added to the possible corrections is if it was cached as the correction for a previous instance of the same typo where the typo was corrected to a non-namespace via a different code path. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147968 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaLookup.cpp
|
3efd348d3586b22bb0153f17181128a1b3c41140 |
11-Jan-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
minor refactoring to improve compile-time performance. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147963 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
7d5e6948e6a4e04ee67b607f931d90d3063579f2 |
11-Jan-2012 |
Kaelyn Uhrain <rikka@google.com> |
Add initial callback object support to Sema::CorrectTypo. Also includes two examples of the callback: a wrapper/replacement for the CorrectTypoContext enum, and a conversion of the two calls to CorrectTypo in SemaDeclCXX.cpp (one of which provides verifiable improvement to the typo correction, as demonstrated in the added test). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147962 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaLookup.cpp
|
015f608042a1d247899866849e69a4e9a1aff6a8 |
11-Jan-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objc-arc: evaluate 'readonly' property with no known life-time to that of its backing 'ivar's lifetime. // rdar://10558871 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147956 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
c0004df84fca9225b66a50adc66cf21c34298227 |
11-Jan-2012 |
Douglas Gregor <dgregor@apple.com> |
C11 allows typedefs to be redefined. Implement this in C11 mode, and downgrade the default-error warning to an ExtWarn in C90/99. <rdar://problem/10668057> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147925 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
b69b42c55d56815bab62991bf839cdb41634d3af |
11-Jan-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Start refactoring code for capturing variables and 'this' so that it is shared between lambda expressions and block literals. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147917 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
reeTransform.h
|
806054db6653d29cb0d9692df3612cbcd03d0530 |
11-Jan-2012 |
John McCall <rjmccall@apple.com> |
Do placeholder conversions on array bounds in both declarators and new-expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147900 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaType.cpp
|
67310745f32be49d85aca83b47a7707f63a82adf |
10-Jan-2012 |
Douglas Gregor <dgregor@apple.com> |
When something goes wrong in type-checking a namespace definition, make the namespace declaration invalid git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147882 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
6e6f93a1f16d9804db79390382e9d1f6322cdbfd |
10-Jan-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objc-arc: fixes a crash when trying to find out retaining cycle ownership of property sent to 'super'. // rdar://10640891 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147868 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
02577fffafce0d88c7ad71502bb9e9bb628b2c0c |
10-Jan-2012 |
Chandler Carruth <chandlerc@gmail.com> |
Remove a set, but unused variable. Found with GCC's warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147864 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
7ead5c7b6fd48cf549e55b4db499c26ecf88ae75 |
10-Jan-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Implement the missing pieces of Evaluate for _Complex types. With that complete, remove some code from CGExprConstant which is no longer necessary. While I'm here, a couple minor tweaks to _Complex-in-C++. (Specifically, make _Complex types literal types, and don't warn for _Complex int.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147840 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
|
15e17aed79163d0d40ed7914f7fe992c400d93dd |
10-Jan-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Per John's comment, it makes sense to ask isLambda on any CXXRecordDecl; make sure that's safe. Get rid of a check which is now unnecessary in Sema::getFunctionLevelDeclContext(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147837 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
bdad7a2e21686296b78dac6190b78d11c996f6d7 |
10-Jan-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Update C++11 scoped enumeration support to match the final proposal: - reject definitions of enums within friend declarations - require 'enum', not 'enum class', for non-declaring references to scoped enumerations git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147824 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaTemplate.cpp
|
20abee6b95c4f5a61e471b4b616439280ca4a81b |
10-Jan-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objc++: patch for IRgen for atomic properties of c++ objects with non-trivial assignment/copy functions. Also, one additional sema check. // rdar://6137845 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147817 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
d18840d1e27c1b9c27bb74923b87f8ae33ec4736 |
10-Jan-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Don't crash with -Wlarge-by-value-copy and a dependent type. PR11726. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147812 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d1d512a9cd1923566a52e57b7e1e8ae65392f66b |
09-Jan-2012 |
Nico Weber <nicolasweber@gmx.de> |
Fix "note" of a duplicate explicit instantiation definition following a specialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147798 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
c02d62f0b82c144f7db2a71c3b4565de8c6163e5 |
09-Jan-2012 |
Douglas Gregor <dgregor@apple.com> |
Always allow redefinition of typedefs when modules are enabled. This is important because it's fairly common for headers (especially system headers) to want to provide only those typedefs needed for that particular header, based on some guard macro, e.g., #ifndef _SIZE_T #define _SIZE_T typedef long size_t; #endif which is repeated in a number of headers. The guard macro protects against duplicate definitions. However, this means that only the first occurrence of this pattern actually defines size_t, so the submodule corresponding to this header has the only visible definition. If a user then imports a different submodule from the same module, size_t will be known but not visible, and therefore cannot be used. By allowing redefinition of typedefs, each header that wants to define size_t can do so independently, so it will be available in the corresponding submodules. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147775 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
753a20001f136707d6cb40ef94ee87b39986a9f9 |
09-Jan-2012 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Made unknown builtin diagnostic remappable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147774 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
06284c1dc56caed19850bc3766c89f51763724c3 |
07-Jan-2012 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Fixed TypeofExpr AST and code generation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147730 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f5c9f9fd6f5e2850b9b0f19283430245b696c6e5 |
07-Jan-2012 |
Douglas Gregor <dgregor@apple.com> |
Switch NamespaceDecl from its own hand-rolled redeclaration chain over to Redeclarable<NamespaceDecl>, so that we benefit from the improveed redeclaration deserialization and merging logic provided by Redeclarable<T>. Otherwise, no functionality change. As a drive-by fix, collapse the "inline" bit into the low bit of the original namespace/anonymous namespace, saving 8 bytes per NamespaceDecl on x86_64. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147729 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaLookup.cpp
|
72899c34e3d1abfffa241ad0ce5c4bf175e5ea51 |
07-Jan-2012 |
Eli Friedman <eli.friedman@gmail.com> |
More lambda work: semantic analysis of capturing 'this'. It's a bit complicated, but we have to be careful about when exactly captures are marked given PotentiallyPotentiallyEvaluated contexts. (Actually, it's not 100% correct yet, but it's close enough for the moment.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147723 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaCodeComplete.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprMember.cpp
emaOverload.cpp
|
e81d7e9810eed0d805263791d761ec545d2cf779 |
07-Jan-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Lambdas: semantic analysis of explicit captures. This patch (and some of my other commits related to lambdas) is heavily based off of John Freeman's work-in-progress patches. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147706 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
d87a0cd2b3e1c9e9f01212875f4cbe5b7bb7ab57 |
06-Jan-2012 |
Matt Beaumont-Gay <matthewbg@google.com> |
Suppress -Wunused-value within macros from system headers. Along the way, move a helper function from SemaChecking.cpp to a more accessible home in SourceManager. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147692 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaStmt.cpp
|
0782ef2bd0ef5025ac6512cfa445a80a464c3b7f |
06-Jan-2012 |
Douglas Gregor <dgregor@apple.com> |
During name lookup, use redecl_iterator to walk over the redeclaration chain to determine whether any declaration of the given entity is visible, eliminating the redundant (and less efficient) getPreviousDeclaration() implementation. This tweak uncovered an omission in the handling of RedeclarableTemplateDecl, where we weren't making sure to search for additional redeclarations of a template in other module files. Things would be cleaner if RedeclarableTemplateDecl actually used Redeclarable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147687 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
1a5d35539a16f3b2eb2426f3f23a8376b190741c |
06-Jan-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Improvements to the uninitialized variable warning: Check if the constructor call is elidable or if the constructor is trivial instead of checking if it is user declared. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147652 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
906a7e1c0f272f7e539c82dda01f4644031ce637 |
06-Jan-2012 |
Eli Friedman <eli.friedman@gmail.com> |
More lambda work. Fixes a minor bug Richard pointed out, makes lookup for lambda parameters work correctly, recording more information into the AST. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147650 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaExprCXX.cpp
emaType.cpp
|
2f0e88a87cea6d21429d9f5c0b1c53f24caf77cf |
06-Jan-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
David Blaikie and Chandler would like us to diagnose int f(); in function scopes under -Wvexing-parse, so now we do. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147649 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
1d7bcf4b35f8bc0a0a40f4ea7b06b55c63725108 |
06-Jan-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Tweak to r147599 for PR10828: Move the check from the parser into sema, and use the Semantic Powers to only warn on class types (or dependent types), where the constructor or destructor could do something interesting. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147642 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
a0b2ba1d0ec27240f922c95b5acd8df905e3d3e0 |
06-Jan-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Minor refactoring of sentinel warning on blocks. Add a test for this warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147641 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaExpr.cpp
|
71207fc0470e1eee40a2951cd5cc3ff47725b755 |
05-Jan-2012 |
Ted Kremenek <kremenek@apple.com> |
After further discussion, rename attribute 'objc_disable_automatic_synthesis' to 'objc_requires_property_definitions'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147622 91177308-0d34-0410-b5e6-96231b3b80d8
ttributeList.cpp
emaDeclAttr.cpp
emaDeclObjC.cpp
emaObjCProperty.cpp
|
6aeaa60217e1ed11a621409acf1b53df0d14b591 |
05-Jan-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Tweak the fix to PR8977: an empty expression-list represents value initialization, not default initialization. Fixes PR11712. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147620 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
|
ec9ea7200718478e8a976529defbe21942a11c9c |
05-Jan-2012 |
Eli Friedman <eli.friedman@gmail.com> |
More lambda work. Tweak the Sema interface slightly. Start adding the pieces to build the lambda class and its call operator. Create an actual scope for the lambda body. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147595 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
|
447af24a003aa8d0dc7317a56f06f5b8361f8808 |
05-Jan-2012 |
Douglas Gregor <dgregor@apple.com> |
When we're performing name lookup for a tag, we still allow ourselves to see hidden declarations because every tag lookup is effectively a redeclaration lookup. For example, image that struct foo; is declared in a submodule that is known but hasn't been imported. If someone later writes struct foo *foo_p; then "struct foo" is either a reference or a redeclaration. To keep the redeclaration chains sound, we treat it like a redeclaration for name-lookup purposes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147588 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
79430e9983f5e67a378fc1f50cd6278f2cea8259 |
05-Jan-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Minor cleanup; no functional change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147582 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
73076431605556fdbf28d287d084a73a24a8b8d4 |
05-Jan-2012 |
John McCall <rjmccall@apple.com> |
The value of a const weak variable is not an integer constant. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147575 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaInit.cpp
|
22f18fd72d1a2205afdfa6a975b75cd76ef40f3a |
05-Jan-2012 |
Ted Kremenek <kremenek@apple.com> |
Rename attribute 'objc_suppress_autosynthesis' to 'objc_disable_automatic_synthesis'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147567 91177308-0d34-0410-b5e6-96231b3b80d8
ttributeList.cpp
emaDeclAttr.cpp
|
b7a7819473709c01ea024a2dc15e99d38f0f8760 |
05-Jan-2012 |
Douglas Gregor <dgregor@apple.com> |
Store the submodules of a module in source order, as they are stored in the module map. This provides a bit more predictability for the user, as well as eliminating the need to sort the submodules when serializing them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147564 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
da611a74c408af0f9526acc690b85214bf180852 |
05-Jan-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objc: When issuing warning for missing synthesis for properties in classes declared with objc_suppress_autosynthesis attribute, pinpoint location of the said class in a note. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147562 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
65639284118d54ddf2e51a05d2ffccda567fe246 |
05-Jan-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Add an APValue representation for the difference between two address-of-label expressions. Add support to Evaluate and CGExprConstant for generating/handling them. Remove the special-case for such differences in Expr::isConstantInitializer. With that done, remove a bunch of buggy code from CGExprConstant for handling scalar expressions which is no longer necessary. Fixes PR11705. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147561 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
da795b45f47df61a1b5a491e8d4ea078cf2a217b |
04-Jan-2012 |
Douglas Gregor <dgregor@apple.com> |
Implement declaration merging for typedefs loaded from disjoint modules, so long as the typedefs refer to the same underlying type. This ensures that the typedefs end up in the same redeclaration chain. To test this, fix name lookup for C/Objective-C to properly deal with multiple declarations with the same name in the same scope. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147533 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
256fc4d0743d520a2535d6de003aa828f5de8b27 |
04-Jan-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Process attributes in explicit function template instantiations. Fixes part of PR11690. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147523 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
f88c400085eac7068399d0a01dbad89f8c579f07 |
04-Jan-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Add an explicit LambdaExprContext to Declarator, to parallel BlockLiteralContext. Use it to ensure semantic analysis of types isn't confused by the lack of a type specifier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147522 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaType.cpp
|
dc3b723d35067e5d13474247b94a10c869cc7e58 |
04-Jan-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Stub out the Sema interface for lambda expressions, and change the parser to use it. Unconditionally error on lambda expressions because they don't work in any meaningful way yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147515 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
9f37cd1810646ffc9002c7a6477fe158ee15ede4 |
04-Jan-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
In non-gc, non-arc mode, property of 'Class' type variety is treated as a 'void *'. No need to issue warning reserved for objc object properties. // rdar://10565506 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147504 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
3f26e0fdcdb58742b7d7871cb42b6a28e7847262 |
04-Jan-2012 |
Douglas Gregor <dgregor@apple.com> |
Minor tweak to name lookup for C/Objective-C: after the first name, still consider whether this is a redeclaration lookup when determining whether to look for the visible declaration git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147499 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
7a537404f039d4b7d063bbdc3c8c924be977dff2 |
04-Jan-2012 |
Douglas Gregor <dgregor@apple.com> |
Test "merging" of typedef types across distinct modules. At present, the AST reader doesn't actually perform a merge, because name lookup knows how to merge identical typedefs together. As part of this, teach C/Objective-C name lookup to return multiple results in all cases, rather than first digging through the attributes to see if the value is overloadable. This way, we'll catch ambiguous lookups in C/Objective-C. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147498 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaLookup.cpp
|
341b8be2b8069e09eb4d928bebf5d55a50515614 |
03-Jan-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objc: diagnose misplacement of objc_suppress_autosynthesis attribute. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147490 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
eb4f2c56c298071d58b441ccf801b039be93788a |
03-Jan-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objc: use objc_suppress_autosynthesis attribute on classes which should not be default synthesized. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147468 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
emaObjCProperty.cpp
|
e23dcf3524fe01208cc79e707412f0a5dd8eed7b |
03-Jan-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
objc: introduce objc_suppress_autosynthesis class attributes for later use. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147457 91177308-0d34-0410-b5e6-96231b3b80d8
ttributeList.cpp
emaDeclAttr.cpp
|
5948ae1021122164b22f74353bb7fe325a64f616 |
03-Jan-2012 |
Douglas Gregor <dgregor@apple.com> |
Introduce a non-uglified syntax for module imports in Objective-C: @import identifier [. identifier]* ; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147452 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
0257b7fbbe2e48bdc4c435a275b5daac195fb1cb |
03-Jan-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Process attributes in explicit template instatiation definitions. Fixes PR11690. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147441 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
d07cc36c71558b62889691184dd04655a33fd12a |
02-Jan-2012 |
Douglas Gregor <dgregor@apple.com> |
Diagnose cases where the definition of a particular type is required, is known (to Clang), but is not visible because the module has not yet been imported. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147436 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprMember.cpp
emaType.cpp
|
a28cb3ee88946deeb8e58d41c1e75de2d93e9cbd |
02-Jan-2012 |
Douglas Gregor <dgregor@apple.com> |
Eliminate ObjCProtocolDecl's end-of-definition location. It is not used anywhere. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147422 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
ec1a58b201b3276966aaade8ac3ac4705aba96c2 |
02-Jan-2012 |
Douglas Gregor <dgregor@apple.com> |
Move ObjCProtocolDecl::EndLoc into its DefinitionData, and give ObjCProtocolDecl proper source-range information. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147420 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
c9d3c7edb513e9b8a6ab65b04133653e71d7a72b |
01-Jan-2012 |
Douglas Gregor <dgregor@apple.com> |
Eliminate the ForwardDecl/InitiallyForwardDecl bits from ObjCProtocolDecl. They are no longer needed git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147419 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
bd9482d859a74bf2c45ef8b8aedec61c0e1c8374 |
01-Jan-2012 |
Douglas Gregor <dgregor@apple.com> |
Eliminate ObjCForwardProtocolDecl, which is redundant now that ObjCProtocolDecl modules forward declarations properly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147415 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
emaDeclObjC.cpp
emaLookup.cpp
|
3937f87e53b3ee0c8da93536f48f6f96c006309d |
01-Jan-2012 |
Douglas Gregor <dgregor@apple.com> |
Eliminate ASTMutationListener::UpdatedAttributeList, which is no longer needed now that we aren't back-patching ObjCProtocolDecls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147413 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
27c6da284f90e32cda0ec8f52a2b6ba5a2613252 |
01-Jan-2012 |
Douglas Gregor <dgregor@apple.com> |
Wire up redeclaration chains for Objective-C protocols, so that both forward declarations and definitions of an Objective-C protocol are represented within a single chain of ObjCProtocolDecls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147412 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclObjC.cpp
emaLookup.cpp
|
1d784b277cdfd4eba03680715d2a082b3f28d295 |
01-Jan-2012 |
Douglas Gregor <dgregor@apple.com> |
Introduce the core infrastructure needed to model redeclaration chains for Objective-C protocols, including: - Using the first declaration as the canonical declaration - Using the definition as the primary DeclContext - Making sure that all declarations have a pointer to the definition data, and that we know which declaration is the definition - Serialization support for redeclaration chains and for adding definitions to already-serialized declarations. However, note that we're not taking advantage of much of this code yet, because we're still re-using ObjCProtocolDecls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147410 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
5e2a1ff9f28d2eab256d2553e76a9c9d54693875 |
01-Jan-2012 |
Douglas Gregor <dgregor@apple.com> |
Move the data that corresponds to the definition of a protocol into a separately-allocated DefinitionData structure. Introduce various functions that will help with the separation of declarations from definitions (isThisDeclarationADefinition(), hasDefinition(), getDefinition()). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147408 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
emaDeclObjC.cpp
|
27b7ce6199bfd008ba8d10c8bd91d926e2274df3 |
01-Jan-2012 |
Rafael Espindola <rafael.espindola@gmail.com> |
Use hasSameType. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147407 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d7c56e1114bfe7d461786903bb720d2c6efc05a1 |
29-Dec-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Change the diagnostics which said 'accepted as an extension' to instead say 'is an extension'. The former is inappropriate and confusing when building with -Werror/-pedantic-errors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147357 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaInit.cpp
emaType.cpp
|
80d4b55db94db2172a04617d1a80feca6bbcea5c |
28-Dec-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Small refactoring and simplification of constant evaluation and some of its clients. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147318 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaStmt.cpp
emaType.cpp
|
375bb1413c041055262c8a416f20d10474a5eda9 |
27-Dec-2011 |
Douglas Gregor <dgregor@apple.com> |
Eliminate ObjCClassDecl, which is redundant now that ObjCInterfaceDecl covers both declarations (@class) and definitions (@interface) of an Objective-C class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147299 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
emaDeclObjC.cpp
emaLookup.cpp
|
5df37bd0242e838e465f0bd51a70af424d152053 |
26-Dec-2011 |
Rafael Espindola <rafael.espindola@gmail.com> |
Delay checking of typedefs of dependent types. Fixes PR11630. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147281 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplateInstantiateDecl.cpp
|
dd4b350143c26c030a482f091908a2e077503411 |
25-Dec-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix constexpr handling to allow 'extern constexpr' variable declarations. We no longer have access to the source locations we need to produce the 'replace constexpr with const' fixits, so they're gone for now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147273 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
8d2a701734f6e0aa778f6be4e6b6d561d8ba6fdb |
25-Dec-2011 |
Rafael Espindola <rafael.espindola@gmail.com> |
Remove unused variables. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147260 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
b701d3d0b20b00cb3b1d874a23f1e8d450f989f8 |
24-Dec-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Always implicitly declare move assignment operations for dynamic classes, in case they override virtual functions from a base class. Also fix -print-stats counting of move assignment/construction. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147258 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
ff91d240d431afbec18e25909caaf5c17f26e643 |
23-Dec-2011 |
Nico Weber <nicolasweber@gmx.de> |
Fix several issues related to specializations and explicit instantiations. Explicit instantiations following specializations are no-ops and hence have no PointOfInstantiation. That was done correctly in most cases, but for a specialization -> instantiation decl -> instantiation definition chain, the definition didn't realize that it was a no-op. Fix that. Also, when printing diagnostics for these no-ops, get the diag location from the decl name location. Add many test cases, one of them not yet passing (but it failed the same way before this change). Fixes http://llvm.org/pr11558 and more. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147225 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
ffbe9b9c64ab2e94b9d48ec56e511f75826fc80a |
23-Dec-2011 |
Benjamin Kramer <benny.kra@googlemail.com> |
Mass rename C1x references to C11. The name hasn't proliferated like "C++0x" so this patch is surprisingly small. Also drop -Wc1x-extensions in favor of -Wc11-extensions. I don't think we need to keep this around for compatibility. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147221 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b0c6c33c3479d2cb4c3b9f5a6e58c58d07c731e7 |
22-Dec-2011 |
Nick Lewycky <nicholas@mxc.ca> |
Fix build under -Wswitch by adding support for FK_ListConstructorOverloadFailed to initialization sequence dumping. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147171 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
cf15cef8447e8b3ae08e81ad25ae9eb443038acf |
22-Dec-2011 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Overloading for initializer list construction. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147156 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
emaOverload.cpp
|
10f04a6267eb07d3be00db1fd0369e1398f5d0a8 |
22-Dec-2011 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
List-initialization via constructor part 1. Still needs: pretty-printing, overloading, initializer_list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147145 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
6180245e9f63d2927b185ec251fb75aba30f1cac |
22-Dec-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR11614: Mark defaulted special constructors as constexpr if their implicit definition would satisfy the constexpr requirements. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147128 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
1d238ea926bbdd04356ce475934fcd4cac654c4b |
21-Dec-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
C++11 half of r147023: In C++11, additionally eagerly instantiate: - constexpr function template instantiations - variables of reference type - constexpr variables git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147031 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
|
3e9ea0b8cd7c4691d62e385245556be5fded58a7 |
21-Dec-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
C++ constant expression handling: eagerly instantiate static const integral data members of class templates so that their values can be used in ICEs. This required reverting r105465, to get such instantiated members to be included in serialized ASTs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147023 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaTemplateInstantiateDecl.cpp
|
28441e6cee11fe6c2b3e13980f81203d14e73202 |
21-Dec-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc QOI: Don't't warn about mismatch between attributes on method declaration and definition if former is in a system header. // rdar://10580333 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147020 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
b5ea9db3cf47e8d4bc60d922331773dbfd265c6f |
20-Dec-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc/c++: Issue diagnostic when free-standing ivar is accessed in class method instead of crash. // rdar://10593227 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146998 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
c7feca0392f7a55e1efa56fd1579881cd59d03d3 |
20-Dec-2011 |
Nico Weber <nicolasweber@gmx.de> |
Fix a crash on invalid, http://llvm.org/pr11599 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146988 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
2ccd89cff3f1c18b48f649240302446a7dae28b9 |
20-Dec-2011 |
Douglas Gregor <dgregor@apple.com> |
When performing name lookup for a redeclaration, ignore module visibility restrictions. This ensures that all declarations of the same entity end up in the same redeclaration chain, even if some of those declarations aren't visible. While this may seem unfortunate to some---why can't two C modules have different functions named 'f'?---it's an acknowedgment that a module does not introduce a new "namespace" of names. As part of this, stop merging the 'module-private' bit from previous declarations to later declarations, because we want each declaration in a module to stand on its own because this can effect, for example, submodule visibility. Note that this notion of names that are invisible to normal name lookup but are available for redeclaration lookups is how we should implement friend declarations and extern declarations within local function scopes. I'm not tackling that problem now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146980 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaLookup.cpp
emaTemplate.cpp
|
3ff53b3587862439a1a84a7b0bc9a7dbee0cf4eb |
20-Dec-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Update the CMake build for r146959's new files. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146967 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
|
b6f8d28411955bc5349217a657ad5f274f72293a |
20-Dec-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Revert r146766, and add a testcase for which it introduced a wrong-code bug. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146961 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
99ba9e3bd70671f3441fb974895f226a83ce0e66 |
20-Dec-2011 |
David Blaikie <dblaikie@gmail.com> |
Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146959 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
emaConsumer.cpp
|
f6702a3927147655206ae729a84339c4fda4c651 |
20-Dec-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Unlike in C++03, a constant-expression is not an unevaluated operand in C++11. Split out a new ExpressionEvaluationContext flag for this case, and don't treat it as unevaluated in C++11. This fixes some crash-on-invalids where we would allow references to class members in potentially-evaluated constant expressions in static member functions, and also fixes half of PR10177. The fix to PR10177 exposed a case where template instantiation failed to provide a source location for a diagnostic, so TreeTransform has been tweaked to supply source locations when transforming a type. The source location is still not very good, but MarkDeclarationsReferencedInType would need to operate on a TypeLoc to improve it further. Also fix MarkDeclarationReferenced in C++98 mode to trigger instantiation for static data members of class templates which are used in constant expressions. This fixes a link-time problem, but we still incorrectly treat the member as non-constant. The rest of the fix for that issue is blocked on PCH support for early-instantiated static data members, which will be added in a subsequent patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146955 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExpr.cpp
emaExprMember.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
reeTransform.h
|
099e7f647ccda915513f2b2ec53352dc756082d3 |
19-Dec-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
constexpr handling improvements. Produce detailed diagnostics when a 'constexpr' variable is initialized by a non-constant expression, and pass in the variable being declared so that earlier-initialized fields' values can be used. Rearrange VarDecl init evaluation to make this possible, and in so doing fix a long-standing issue in our C++ constant expression handling, where we would mishandle cases like: extern const int a; const int n = a; const int a = 5; int arr[n]; Here, n is not initialized by a constant expression, so can't be used in an ICE, even though the initialization expression would be an ICE if it appeared later in the TU. This requires computing whether the initializer is an ICE eagerly, and saving that information in PCH files. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146856 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
85c60db2131c6d210d4777c3d50bdaf0e69bb8bf |
18-Dec-2011 |
Benjamin Kramer <benny.kra@googlemail.com> |
Silence gcc warnings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146847 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
a1be278c4f3a234ff61f04018d26c6beecde1654 |
18-Dec-2011 |
Douglas Gregor <dgregor@apple.com> |
Completely re-implement (de-)serialization of declaration chains. The previous implementation relied heavily on the declaration chain being stored as a (circular) linked list on disk, as it is in memory. However, when deserializing from multiple modules, the different chains could get mixed up, leading to broken declaration chains. The new solution keeps track of the first and last declarations in the chain for each module file. When we load a declaration, we search all of the module files for redeclarations of that declaration, then splice together all of the lists into a coherent whole (along with any redeclarations that were actually parsed). As a drive-by fix, (de-)serialize the redeclaration chains of TypedefNameDecls, which had somehow gotten missed previously. Add a test of this serialization. This new scheme creates a redeclaration table that is fairly large in the PCH file (on the order of 400k for Cocoa.h's 12MB PCH file). The table is mmap'd in and searched via a binary search, but it's still quite large. A future tweak will eliminate entries for declarations that have no redeclarations anywhere, and should drastically reduce the size of this table. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146841 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
fc038e9ef8ed262724f42597ca5c844de97b1202 |
17-Dec-2011 |
Eli Friedman <eli.friedman@gmail.com> |
Remove a non-gcc-compatible extension that would apply attributes on declarations without a declarator to structs. Add a warning for ignored attributes. Patch by Michael Han. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146796 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
8a93d27a507d9c455eb802a29dc572aa8577393a |
16-Dec-2011 |
Nicola Gigante <nicola.gigante@gmail.com> |
Fix an inconsistency in the syntactic form of InitListExpr in case of initialization that involves a ConstructorConversion git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146766 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
25b009a9d2a79929112d3c28c7dd1730bf5246c8 |
16-Dec-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR11594: Don't blindly build a UnaryOperator UO_Minus on an expression which might not be an rvalue when checking array accesses. Instead, pass through a flag indicating the array index is negated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146753 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExpr.cpp
|
08d6e032a2a0a8656d12b3b7b93942987bb12eb7 |
16-Dec-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
C++11 constexpr: Add note stacks containing backtraces if constant evaluation fails within a call to a constexpr function. Add -fconstexpr-backtrace-limit argument to driver and frontend, to control the maximum number of notes so produced (default 10). Fix APValue printing to be able to pretty-print all APValue types, and move the testing for this functionality from a unittest to a -verify test now that it's visible in clang's output. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146749 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
91ec7894ec186dd36f509682f00486c98d8228ed |
16-Dec-2011 |
David Blaikie <dblaikie@gmail.com> |
Support decltype in pseudo destructors and dependent destructor calls. Reviewed by Eli Friedman. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146738 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
6b65d4a9cc5aed96a7f1a36e75dd9c4adb164e0b |
16-Dec-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc: after issuing the warning on direct use of __attribute__((NSObject)) on properties, prevent consequential error diagnostics. // rdar://10591336 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146737 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
298aaf2c97ab7c4d5bd3a8e8d8112e3bc77b29b6 |
16-Dec-2011 |
Logan Chien <loganchien@google.com> |
Merge with clang upstream r146715 (Dec 16th 2011) Change-Id: I66024a7b6eb0ee37d7b3ff7ce41c0bfb4b514bee
|
0af550115df1f57f17a4f125ff0e8b34820c65d1 |
16-Dec-2011 |
Douglas Gregor <dgregor@apple.com> |
Fix chaining of ObjCInterfaceDecl redeclarations git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146722 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDeclObjC.cpp
|
bd79119a50172db92ad3ce77ec3ac3c51e42a126 |
16-Dec-2011 |
Sean Callanan <scallanan@apple.com> |
Sema::RequireCompleteType currently attempts to instantiate a class from its template pattern before it consults the ExternalASTSource. LLDB in particular will sometimes provide patterns that need to be completed first. To make this possible, I have moved the completion before the code that does the instantiation, allowing the ExternalASTSource to provide the required information. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146715 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
05c272fed899b8d3142cf080e86a235fc6168862 |
15-Dec-2011 |
Douglas Gregor <dgregor@apple.com> |
Move ObjCInterfaceDecl's "EndLoc" into DefinitionData, since it only applies to an actual definition. Plus, clarify the purpose of this field and give the accessor a different name, since getLocEnd() is supposed to be the same as getSourceRange().getEnd(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146694 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclObjC.cpp
|
d63348c3382965a9e1719c8eaa63e2891dd5e234 |
15-Dec-2011 |
Douglas Gregor <dgregor@apple.com> |
When name lookup finds a module-private Objective-C class declaration, check whether any previous declarations of the class were visible. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146680 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
7723fec9b45b7258c0eddf4cbfd0d335348f5edc |
15-Dec-2011 |
Douglas Gregor <dgregor@apple.com> |
Keep track of all declarations of an Objective-C class (both forward declarations and definitions) as ObjCInterfaceDecls within the same redeclaration chain. This new representation matches what we do for C/C++ variables/functions/classes/templates/etc., and makes it possible to answer the query "where are all of the declarations of this class?" git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146679 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
emaCodeComplete.cpp
emaDeclObjC.cpp
|
018887209f51de943c17718a6f3bce904d612813 |
15-Dec-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Refactor and simplify AddInitializerToDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146673 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
dec1cc4ec73e96f315ab7dee51459700c0ad821d |
15-Dec-2011 |
Douglas Gregor <dgregor@apple.com> |
Two null Decl*'s don't refer to the same declaration, because they don't refer to anything. Amusingly, we were relying on this in one place. Thanks to Chandler for noticing the weirdness in declaresSameEntity. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146659 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
d02deebce5f1b283101e035a7f5d5bab0d2068ec |
15-Dec-2011 |
Hans Wennborg <hans@hanshq.net> |
Support the 'a' length modifier in scanf format strings as a C90 extension. This fixes gcc.dg/format/c90-scanf-3.c and ext-4.c (test for excess errors). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146649 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
2e5c15be82f362611c5928ce853d0685ff98c766 |
15-Dec-2011 |
Douglas Gregor <dgregor@apple.com> |
Move the definition-specific data of ObjCInterfaceDecl into a separately-allocated DefinitionData structure, which we manage the same way as CXXRecordDecl::DefinitionData. This prepares the way for making ObjCInterfaceDecls redeclarable, to more accurately model forward declarations of Objective-C classes and eliminate the mutation of ObjCInterfaceDecl that causes us serious trouble in the AST reader. Note that ObjCInterfaceDecl's accessors are fairly robust against being applied to forward declarations, because Clang (and Sema in particular) doesn't perform RequireCompleteType/hasDefinition() checks everywhere it has to. Each of these overly-robust cases is marked with a FIXME, which we can tackle over time. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146644 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
emaDeclObjC.cpp
emaExprObjC.cpp
|
b17ee5bff0d7986c14cdddb279e0131bd7f9678d |
15-Dec-2011 |
Eli Friedman <eli.friedman@gmail.com> |
Enhance the -Wsign-compare handling to suppress the -Wsign-compare warning in the case of a shifted bitfield. PR11572. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146634 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
f8aba8c618920db8f6ef2db0c554b0c270503cef |
15-Dec-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc: do not auto synthesize properties declared in protocols; with a warning. // rdar://10567333 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146626 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
5e3a8bea1cb3a8508a99982278934df32ccc7387 |
15-Dec-2011 |
Douglas Gregor <dgregor@apple.com> |
In debugger support mode, if we have a top-level message send expression with an unknown result type, assume that the result type is 'id'. Fixes <rdar://problem/10400663>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146622 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
60ef308e51c71b760d7f598c1b763ceb7b768148 |
15-Dec-2011 |
Douglas Gregor <dgregor@apple.com> |
Replace all comparisons between ObjCInterfaceDecl pointers with calls to declaresSameEntity(), as a baby step toward tracking forward declarations of Objective-C classes precisely. Part of <rdar://problem/10583531>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146618 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprMember.cpp
emaObjCProperty.cpp
emaOverload.cpp
|
daaefc5381f9aafbb1cb6f88fb5ac6aaf34d65bf |
15-Dec-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Produce more detailed diagnostics when static_assert condition is not an ICE. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146607 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExpr.cpp
|
d3d08533116b4ad5ff5d29c88a0e136687297058 |
14-Dec-2011 |
Douglas Gregor <dgregor@apple.com> |
Don't consider an overloaded operator& when the expression is actually going to be a pointer-to-member constant. Fixes <rdar://problem/10544564>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146587 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
76178ed0911797175b13ac733c390233f02bb841 |
14-Dec-2011 |
David Blaikie <dblaikie@gmail.com> |
Move & comment the 'decltype in declarator-id' as suggested by Doug Gregor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146576 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
553689148f546783e127749438bf6d7806e6bb1d |
14-Dec-2011 |
Douglas Gregor <dgregor@apple.com> |
When name lookup comes across a declaration that is in a module that is not visible, look for any previous declarations of that entity that might be visible. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146563 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
80fb7dd8e0c56632dc68f5864f70abb2fde0e1df |
14-Dec-2011 |
Matt Beaumont-Gay <matthewbg@google.com> |
r146430 lost some compile-time performance on MultiSource/Benchmarks/MiBench/security-rijndael; this gets most of it back. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146562 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
a6dc7eff27a8c59bee42809270971931b811dd44 |
14-Dec-2011 |
Richard Trieu <rtrieu@google.com> |
Make the diagnostic message more consistant. Update the type comparison to handle non-pointer types. This is for the extra info printed when function types are compared. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146525 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
7209646add692c50503435bcffb13187a3349552 |
13-Dec-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc: diagnose duplicate declaration of methods in classes. // rdar://10535349 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146504 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
df512bfbc4b8c00202ea7a8c900c59ec55890676 |
13-Dec-2011 |
David Blaikie <dblaikie@gmail.com> |
Disallow decltype in qualified declarator-ids. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146480 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
ba96ffcb2a444d12ffcc4781bd443279c7250d7e |
13-Dec-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc-arc: better diagnostic when block is declared inside a struct/union. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146444 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
8ef8f431aaeed3d7418959c81dfaa677b44f05ed |
12-Dec-2011 |
Matt Beaumont-Gay <matthewbg@google.com> |
Suppress -Warray-bounds in certain cases involving macros from system headers. The motivation here is a "clever" implementation of strncmp(), which peels the first few comparisons via chained conditional expressions which ensure that the input arrays are known at compile time to be sufficiently large. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146430 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
dd1f29b6d686899bfd033f26e16cb1621e5549e8 |
12-Dec-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Prepare constant expression infrastructure for the generation of richer diagnostics. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146365 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
4db8c4483ea7b271bcce3a0312a0ac434313c09b |
12-Dec-2011 |
David Blaikie <dblaikie@gmail.com> |
Fix/test decltype dtor calls with invalid base expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146354 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
6fcd932dfd6835f70cc00d6f7c6789793f6d7b66 |
10-Dec-2011 |
Hans Wennborg <hans@hanshq.net> |
Check that arguments to a scanf call match the format specifier, and offer fixits when there is a mismatch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146326 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
9aab9c4116bb3ea876d92d4af10bff7f4c451f24 |
10-Dec-2011 |
Douglas Gregor <dgregor@apple.com> |
Make sure that we infer __strong, etc. when we instantiate variables under ARC. Fixes <rdar://problem/10530209>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146307 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaDeclObjC.cpp
emaTemplateInstantiateDecl.cpp
|
006e42f0c8b65b783d565ef10b938a9e82fc02e3 |
10-Dec-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Add ability to supply additional message to availability macros, // rdar://10095131 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146304 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
92be2a5f4e938fc512683cd4e7dfd4e6789eb787 |
10-Dec-2011 |
Douglas Gregor <dgregor@apple.com> |
When we manage to re-use an expression during tree transformation (= template instantiation), and that expression might produce a temporary, invoke MaybeBindToTemporary. Otherwise, we forget to destroy objects, release objects, etc. Fixes <rdar://problem/10531073>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146301 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
f48fdb0937e67f691393f9ffdf75653e5128ea13 |
09-Dec-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
C++11 constant expressions: Don't use CheckICE in C++11; instead, determine whether an expression is a (core) constant expression as a side-effect of evaluation. This takes us from accepting far too few expressions as ICEs to accepting slightly too many -- fixes for the remaining cases are coming next. The diagnostics produced when an expression is found to be non-constant are currently quite poor (with generic wording but reasonable source locations), and will be improved in subsequent commits. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146289 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
2def77399ab3088106a2d61372344f5b7104e1a2 |
09-Dec-2011 |
David Blaikie <dblaikie@gmail.com> |
Add notes for suppressing and (if it's a zero-arg function returning bool) fixing the function-to-bool conversion warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146280 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
6dce88d9f71cd4be18554af94145a9147b363199 |
09-Dec-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc-arc: diagnose synthesis of a 'weak unavailable' property. // rdar://10535245 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146272 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
44d95b55711bc5c2e4055ebf1b5156e7fd3f0196 |
09-Dec-2011 |
David Blaikie <dblaikie@gmail.com> |
Provide a separate warning for weak vtables in explicit template instantiations. There's no (current) way to fix such templates to emit strong symbols/vtables, but perhaps users want to know about the cost being incurred anyway. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146265 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
f4f0c6095d1f481b94c6821c65e3bf1c9df42af7 |
09-Dec-2011 |
Hans Wennborg <hans@hanshq.net> |
Make printf warnings refer to wint_t and wchar_t by name in addition to underlying type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146254 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
c6994005dc9f677c831b8e90bdab483cc2197c29 |
09-Dec-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Save category name loc in ObjCCategoryImplDecl, patch by Jason Haslam! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146213 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
1fa3c0682a52c45c4ad0be3a82d0c85f26657072 |
08-Dec-2011 |
DeLesley Hutchins <delesley@google.com> |
This patch extends thread safety analysis with support for the scoped_lockable attribute. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146174 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
53a75c07dbe79b3dd5dd88a0378aefa18f793083 |
08-Dec-2011 |
David Blaikie <dblaikie@gmail.com> |
Decltype in non-pseudo (& non-dependent) dtor calls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146155 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
e3ca33aba226c7b5d50703df008ef0ef5f9ea7da |
08-Dec-2011 |
Hans Wennborg <hans@hanshq.net> |
Only do typo correction for implicit function decls when they are treated as errors. Doing typo correction when these are just warnings slows down the compilation of source which deliberately uses implicit function declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146153 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
a792aff1c7de253b89c473fdb7eef4a5bba83aec |
07-Dec-2011 |
Hans Wennborg <hans@hanshq.net> |
Make printf warnings refer to intmax_t et al. by name in addition to underlying type. For example, the warning for printf("%zu", 42.0); changes from "conversion specifies type 'unsigned long'" to "conversion specifies type 'size_t' (aka 'unsigned long')" (This is a second attempt after r145697, which got reverted.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146032 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
aa9c3503867bc52e1f61c4da676116db1b1cdf01 |
07-Dec-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
When folding the size of a global scope VLA to a constant, require the array bound to not have side effects(!). Add constant-folding support for expressions of void type, to ensure that we can still fold ((void)0, 1) as an array bound. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146000 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
b76a97e91dc4bea0b6b3da06c84e02f50cd351d3 |
07-Dec-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc: issue deprecated/unavailable diagnostic when methods with these attributes are sent to receivers of 'id' type too. // rdar://10459930 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145999 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprObjC.cpp
|
122de3e131a6902d22c97471520ec9005cca6f03 |
06-Dec-2011 |
Hans Wennborg <hans@hanshq.net> |
Suggest typo corrections for implicit function declarations. A mistyped function call becomes an inmplicit function declaration in C. Suggest typo correction when one can be found. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145930 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d64251fd56577dd5c78903454632361e094c6dc1 |
06-Dec-2011 |
Erik Verbruggen <erikjv@me.com> |
Extend warnings for missing '@end'. Fixes PR2709. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145928 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
26b45d86085a125af036dbcf85dad3087b664ab2 |
06-Dec-2011 |
Richard Trieu <rtrieu@google.com> |
Switch a cast to a dyn_cast and check the pointer before using. Fixes a crash in the following code: void test4(bool (&x)(void)) { while (x); } git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145918 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
19efa3ee5a7f2232884f9cca6871329ffe85653c |
06-Dec-2011 |
Eli Friedman <eli.friedman@gmail.com> |
Make sure we perform lvalue-to-rvalue conversions for enum initializers. PR11484. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145874 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
ec236787c5868eef53a807ca1a68b6b0b8c604c6 |
06-Dec-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc: put out more coherent warning when method definition attributes don't match its declaration. // rdar://10529259. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145872 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
e14ca9f509dc22d8fcc5d21d70d28a5848983b42 |
05-Dec-2011 |
Lang Hames <lhames@gmail.com> |
Add a warning for implicit conversion from function literals (and static methods) to bool. E.g. void foo() {} if (f) { ... // <- Warns here. } Only applies to non-weak functions, and does not apply if the function address is taken explicitly with the addr-of operator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145849 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
42d6d0c91ab089cb252ab2f91c16d4557f458a2c |
04-Dec-2011 |
David Blaikie <dblaikie@gmail.com> |
Support decltype in nested-name-specifiers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145785 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
|
649657e7d6c150136cae5ab22e39b9794cff80cc |
04-Dec-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Move block return type inference diagnostic to a common place where Function or array lvalue conversions happens. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145782 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
5e9392ba18f5925e26cc5714d1412eda0d219826 |
03-Dec-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement support for the __is_final type trait, to determine whether a class is marked 'final', from Alberto Ganesh Barbati! Fixes PR11462. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145775 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
0586520acb2f368c874943353a222be7f00c3068 |
03-Dec-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
If block literal return type is not specified, return type of the block is inferred from return types. All the return statements have to agree about the type. // rdar://10466373 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145774 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaStmt.cpp
reeTransform.h
|
4d604d6f1d413864e7dad8e368ba9a69a3f478c7 |
03-Dec-2011 |
Francois Pichet <pichet2000@gmail.com> |
In Microsoft mode, don't perform typo correction in a template member function dependent context because it interferes with the "lookup into dependent bases of class templates" feature. Basically typo correction will try to offer a correction instead of looking into type dependent base classes. I found this problem while parsing Microsoft ATL code with clang. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145772 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
1cdb70b20793cb88c89282c78f6afe55c7c578c3 |
03-Dec-2011 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implement overload resolution for reference-typed parameters supplied with initializer lists. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145769 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
93ebfa6139bbca4d446c7343e3afc8e5ec777484 |
03-Dec-2011 |
Douglas Gregor <dgregor@apple.com> |
When we treat an #include or #import as a module import, create an implicit ImportDecl in the translation unit to record the presence of the import. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145727 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
15de72cf580840c61e5704c2f8a2b56f9d0638e1 |
03-Dec-2011 |
Douglas Gregor <dgregor@apple.com> |
Introduce a module import declaration, so that we properly represent, e.g., __import_module__ std.vector; in the AST. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145725 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
687b5df89d4ba91219df578d02087c68c09a0332 |
03-Dec-2011 |
Nick Lewycky <nicholas@mxc.ca> |
Revert r145697 and dependent patch r145702. It added a dependency from lib/Analysis to lib/Sema which is cyclical. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145724 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
10ce9321551efffa6ed2cff39084400e1dfcf307 |
02-Dec-2011 |
Douglas Gregor <dgregor@apple.com> |
Make sure that name lookup in C checks whether a name is hidden. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145700 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
5fdc1b993dcb01e8a994fdacfc4eb089832c82e3 |
02-Dec-2011 |
Hans Wennborg <hans@hanshq.net> |
Make conversion specifier warning refer to typedef if possible. For example, the warning for printf("%zu", 42.0); changes from "conversion specifies type 'unsigned long'" to "conversion specifies type 'size_t' (aka 'unsigned long')" git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145697 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
90db26000aefe9335370013eec64c85232d80227 |
02-Dec-2011 |
Douglas Gregor <dgregor@apple.com> |
Implementing parsing and resolution of module export declarations within module maps, which will (eventually) be used to re-export a module from another module. There are still some pieces missing, however. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145665 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
5e35693721364673f8196e4f5a370f56b92e6053 |
01-Dec-2011 |
Douglas Gregor <dgregor@apple.com> |
Introduce the notion of name visibility into modules. For a given (sub)module, all of the names may be hidden, just the macro names may be exposed (for example, after the preprocessor has seen the import of the module but the parser has not), or all of the names may be exposed. Importing a module makes its names, and the names in any of its non-explicit submodules, visible to name lookup (transitively). This commit only introduces the notion of name visible and marks modules and submodules as visible when they are imported. The actual name-hiding logic in the AST reader will follow (along with test cases). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145586 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
a38c4730fb016abc20a5479540b65ff3992095ab |
01-Dec-2011 |
Douglas Gregor <dgregor@apple.com> |
When typo-correction an Objective-C superclass name, don't typo-correct to ourselves. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145583 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
f1d1ca5b2b40e66d927c2abd16d8baa21af6911f |
01-Dec-2011 |
Douglas Gregor <dgregor@apple.com> |
When sending a message to a receiver that has "unknown any" type, force the unknown any type to "id" so that the message send can be completed without requiring a case. Fixes <rdar://problem/10506646>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145552 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprObjC.cpp
|
968a0ee9d98549308e3e70e787e4fd669d2a829d |
01-Dec-2011 |
Ted Kremenek <kremenek@apple.com> |
Specially whitelist the selector 'addOperationWithBlock:' for the retain-cycle checking in -Warc-retain-cycles. This commonly is hit by users using NSOperationQueue. Fixes <rdar://problem/10465721>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145548 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
75df4eeede7b91c22c1d63fafd4dd4142844e3b9 |
01-Dec-2011 |
Ted Kremenek <kremenek@apple.com> |
Further tweak -Wurneachable-code and templates by allowing the warning to run on explicit template specializations (which represent actual functions somebody wrote). Along the way, refactor some other code which similarly cares about whether or not they are looking at a template instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145547 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
1a4761edca58c6b559de825b9abfb66f7f1ba94a |
01-Dec-2011 |
Douglas Gregor <dgregor@apple.com> |
Promote ModuleMap::Module to a namespace-scope class in the Basic library, since modules cut across all of the libraries. Rename serialization::Module to serialization::ModuleFile to side-step the annoying naming conflict. Prune a bunch of ModuleMap.h includes that are no longer needed (most files only needed the Module type). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145538 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
5dfee06daa359bbe0f3c9de055b8a02d61a05173 |
30-Nov-2011 |
Ted Kremenek <kremenek@apple.com> |
Don't run -Wunreachable-code on template instantiations. Different instantiations may produce different unreachable code results, and it is very difficult for us to prove that ALL instantiations of a template have specific unreachable code. If we come up with a better solution, then we can revisit this, but this approach will at least greatly reduce the noise of this warning for code that makes use of templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145520 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
01e19be69a37bc4ab7746c454cfaa6aec7bb7c6a |
30-Nov-2011 |
John McCall <rjmccall@apple.com> |
Fix the instantiation of pseudo-object expressions. This is a really bad way to go about this, but I'm not sure there's a better choice without substantial changes to TreeTransform --- most notably, preserving implicit semantic nodes instead of discarding and rebuilding them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145480 91177308-0d34-0410-b5e6-96231b3b80d8
emaPseudoObject.cpp
reeTransform.h
|
3d3589db579f7695667b913c5043dd264ebe546f |
30-Nov-2011 |
Douglas Gregor <dgregor@apple.com> |
Switch the module-loading interfaces and parser from a simple top-level module name to a module path (e.g., std.vector). We're still missing a number of pieces for this actually to do something. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145462 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
c8d7f586180995ba33d03c0f6115b6a7bdefe326 |
29-Nov-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Revert r145244. It causes us to create broken ASTs with missing type information for some cast expressions. Original commit message: Removed useless ImplicitCast nodes in explicit cstyle and static casts git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145447 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaCast.cpp
emaExprCXX.cpp
emaInit.cpp
|
381711c6e7911d762f81a65e9ef4339a6a3d6524 |
29-Nov-2011 |
Matt Beaumont-Gay <matthewbg@google.com> |
Suppress -Warray-bounds for classes (not just structs) where the last field is a 1-length character array. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145445 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
36ef7029ea437c216f0bde2a0d4817d8b15e47b2 |
29-Nov-2011 |
Lang Hames <lhames@gmail.com> |
Test isa<FunctionDecl> to exclude objective-C methods. This ensures the following cast will never fail. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145441 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
cfbc5b5660f49fae63acc1f5ef05df87070a2a3c |
29-Nov-2011 |
Matt Beaumont-Gay <matthewbg@google.com> |
Merge branch 'yo-dawg-i-herd-u-like-arrays' git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145421 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
9b2eb7b1a1bdd1fe4acb200b448312ef407283df |
29-Nov-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc: warn if NSObject attribute appears other than in a typedef. // rdar://10453342 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145358 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
f48538897ccd6726e87485267495a62fdfd0b369 |
28-Nov-2011 |
Douglas Gregor <dgregor@apple.com> |
When synthesizing an implicitly-defined copy or move constructor, or when computing the exception specification of a copy or move constructor, ignore non-static data member initializers. Fixes PR11418 / <rdar://problem/10478642>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145269 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
70f30c530bc6c8d76a6e18e01dcee62e308355cb |
28-Nov-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Remove code made redundant by my previous patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145266 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
39b4fc888d2b9b8fe1a9c982964b5054ba1c3c73 |
28-Nov-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
pinpoint name/location of deprecated/unavailable enumerator whose enum has been made deprecated/unavailable in the warning. // rdar://10201690 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145264 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
d3c147f4b225a8372c90e07ae3eed0dca9ffb33f |
28-Nov-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc: turn warning for property type mismatch in primary and its continuation class into error. // rdar://10142679 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145255 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
a9766411aaaa1446a5da96dc5042de8da05d89bd |
28-Nov-2011 |
Douglas Gregor <dgregor@apple.com> |
When checking a call to a builtin atomic operation, be sure to consider the _<width> variants as well, which we'll see if we're performing the type checking in a template instantiation where the call expression itself was originally not type-dependent. Fixes PR11411. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145248 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
56f5d36fd13c5e271ebd05192c25c88d28e77f8d |
28-Nov-2011 |
Nicola Gigante <nicola.gigante@gmail.com> |
Removed useless ImplicitCast nodes in explicit cstyle and static casts git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145244 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaCast.cpp
emaExprCXX.cpp
emaInit.cpp
|
bceb75528a4a9757f85df002ab45c6002dc10f94 |
27-Nov-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
In Sema::MaybeBindToTemporary, create a CXXBindTemporaryExpr for an array of objects with non-trivial destructors. PR11365. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145203 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
13dc8f98f6108dca8aaa9721567ed5a2d9911e0f |
27-Nov-2011 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Reference initialization with initializer lists. This supports single-element initializer lists for references according to DR1288, as well as creating temporaries and binding to them for other initializer lists. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145186 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaInit.cpp
|
f7a73a0428ad4819ef945ced4f38b3b6b1c39e72 |
26-Nov-2011 |
Nicola Gigante <nicola.gigante@gmail.com> |
Test commit git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145147 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
4c51548271d2f8385127e1d943764ae8939d7794 |
26-Nov-2011 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Fixed lexical declaration context when instantiating a friend / out-of-line class template member. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145146 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
2a710c84db1ebf0c16cba0ff121ca8e15f045a07 |
25-Nov-2011 |
Logan Chien <loganchien@google.com> |
Merge with clang upstream r145117 (Nov 25th 2011) Change-Id: Id4fde985342e3c81f13887e8728bd94b82523642
|
c8ff915c4bafe520548cc29d342951da23591ae1 |
25-Nov-2011 |
Francois Pichet <pichet2000@gmail.com> |
In Microsoft mode, make "Unqualified lookup into dependent bases of class templates" works inside a friend function definition at class scope. Basically we have to look into the parent *lexical* DeclContext for friend functions at class scope. That's because calling GetParent() return the namespace or file DeclContext. This fixes all remaining cases of "Unqualified lookup into dependent bases of class templates" when parsing MFC code with clang. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145127 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaOverload.cpp
|
6efd4c55a1a481d92966a91141c03e8145234cf6 |
23-Nov-2011 |
Richard Trieu <rtrieu@google.com> |
Add feature to diagnostics that will provide more information on function pointer mismatch. Cases covered are: initialization, assignment, and function arguments. Additional text will give the extra information about the nature of the mismatch: different classes for member functions, wrong number of parameters, different parameter type, different return type, and function qualifier mismatch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145114 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaInit.cpp
emaOverload.cpp
emaTemplateDeduction.cpp
|
c14a03dffff69b5e1c55cc118fc52d8fd9f3a28d |
23-Nov-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[libclang] Fix operations (token annotation, getting cursor, etc.) with a file region inside an objc container that "contains" other file-level declarations. When getting the array of file-level declarations that overlap with a file region, we failed to report that the region overlaps with an objc container, if the container had other file-level declarations declared lexically inside it. Fix this by marking such declarations as "isTopLevelDeclInObjCContainer" in the AST and handling them appropriately. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145109 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclObjC.cpp
|
37f40572c4c78a8c57a7b45266f8b86db172a7c1 |
23-Nov-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[libclang] Indexing API: Fix issues, mostly C++ related. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145107 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
22c107b2b99887b5aec6d1fd38210031e944e31f |
19-Nov-2011 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Fixed HadMultipleCandidates loading. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144995 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
emaOverload.cpp
|
e994624c001143ee2b8a7a4715aaad5efcd71f18 |
18-Nov-2011 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Fixed implicit instantiations source range. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144977 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
6fe2965ce722826ae7c3af85271f900286ef20c3 |
17-Nov-2011 |
David Blaikie <dblaikie@gmail.com> |
Include named unions in union member init checking git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144883 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
e6226ae490903717c8c07782f28bc8349543021f |
17-Nov-2011 |
Francois Pichet <pichet2000@gmail.com> |
In Microsoft mode, make "Unqualified lookup into dependent bases of class templates" works inside default argument instantiation. This is a little bit tricky because during default argument instantiation the CurContext points to a CXXMethodDecl but we can't use the keyword this or have an implicit member call generated. This fixes 2 errors when parsing MFC code with clang. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144881 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaOverload.cpp
|
960809e7e9f4a6e949797d20bc081da80495c0e1 |
16-Nov-2011 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Added missing ImplicitCastExpr around conversion operator call. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144850 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
|
4648255cebd2fc7c18293c1f93afd6e9add9cccc |
16-Nov-2011 |
Bob Wilson <bob.wilson@apple.com> |
Fix Neon builtin pointer argument checking for "sret" builtins. The code for checking Neon builtin pointer argument types was assuming that there would only be one pointer argument. But, for vld2-4 builtins, the first argument is a special sret pointer where the result will be stored. So, instead of scanning all the arguments to find a pointer, have TableGen figure out the index of the pointer argument that needs checking. That's better than scanning all the arguments regardless. <rdar://problem/10448804> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144834 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
30bb420cfe1801742a2ecb242c3b0167d81752d0 |
16-Nov-2011 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Fixed missing cast and wrong cast kind in delete expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144796 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
e614d6c6b12f20f0072c20eb312db2e80d1cb051 |
16-Nov-2011 |
Francois Pichet <pichet2000@gmail.com> |
In Microsoft mode, make "Unqualified lookup into dependent bases of class templates" works inside static functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144729 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
3bc451593fa44bfc45753e44e37cb4242e714f82 |
15-Nov-2011 |
Eli Friedman <eli.friedman@gmail.com> |
Compute whether a class is trivial correctly for template classes with an explicitly deleted or defaulted special member. PR11387. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144715 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
9c0e1ec7b3afd833c1b958ce2aeedff71c7eb4c5 |
15-Nov-2011 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Fixed plausible overloads location. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144700 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
f7ce19400ba4d7e7f17f804490b76035de6fdf5e |
15-Nov-2011 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Fixed a cut&paste error introduced in r141336. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144637 91177308-0d34-0410-b5e6-96231b3b80d8
emaCast.cpp
|
71d9a71d19099a6673750b47b32e9786803fa81d |
15-Nov-2011 |
Logan Chien <loganchien@google.com> |
Merge with clang upstream r144605 (Nov 15th 2011) Conflicts: include/clang-c/Index.h include/clang/AST/APValue.h include/clang/AST/DeclBase.h include/clang/AST/DeclObjC.h include/clang/Basic/DiagnosticSemaKinds.td include/clang/Serialization/ASTWriter.h lib/AST/APValue.cpp lib/AST/ASTImporter.cpp lib/AST/DeclObjC.cpp lib/AST/ExprConstant.cpp lib/Driver/ToolChains.cpp lib/Frontend/SerializedDiagnosticPrinter.cpp lib/Frontend/Warnings.cpp lib/Lex/HeaderSearch.cpp lib/Lex/LiteralSupport.cpp lib/Sema/SemaExpr.cpp lib/Sema/SemaInit.cpp lib/Sema/SemaPseudoObject.cpp test/Analysis/misc-ps.c test/Analysis/retain-release-path-notes.m test/CodeGen/string-literal-unicode-conversion.c test/CodeGenCXX/blocks.cpp test/Driver/crash-cleanup.c test/Misc/serialized-diags.c test/Misc/warning-flags.c tools/c-index-test/c-index-test.c tools/libclang/CXLoadedDiagnostic.cpp tools/libclang/IndexDecl.cpp tools/libclang/IndexTypeSourceInfo.cpp tools/libclang/Indexing.cpp tools/libclang/IndexingContext.cpp tools/libclang/IndexingContext.h tools/libclang/libclang.exports Change-Id: I6621e7d5d9a9d1e4cdec7b7b62ffa6dffaff375d
|
32509f1e60451d86e9fbc473b6e853ba10b5fd1e |
15-Nov-2011 |
John McCall <rjmccall@apple.com> |
Resolve placeholder expressions before trying to deduce 'auto'. Introduce a convenience method to make this a bit easier, and use it elsewhere. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144605 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaInit.cpp
emaPseudoObject.cpp
emaTemplateDeduction.cpp
|
7432b90e88ac9e219f6e8a3151c097b0b7da933c |
15-Nov-2011 |
Douglas Gregor <dgregor@apple.com> |
When we're checking access in a dependent context, don't try to look at the bases of an undefined class. Fixes <rdar://problem/10438657>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144582 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
b3029960632ca8a3248e74770eda64d6c16f7246 |
14-Nov-2011 |
Douglas Gregor <dgregor@apple.com> |
Use Sema::RequireCompleteType to check for the completeness of Objective-C classes. This has two purposes: to consistently provide "forward declaration here" notes when we hit an incomplete type, and to give LLDB a chance to complete the type. RequireCompleteType bits from Sean Callanan! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144573 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
emaExprObjC.cpp
emaStmt.cpp
emaType.cpp
|
2bbcd5ce370753c86d312d2c72a97476ac35b073 |
14-Nov-2011 |
Ted Kremenek <kremenek@apple.com> |
ARC: make assignment to 'self' within class methods illegal. Fixes <rdar://problem/10416568>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144572 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
567c5862be3e278bfc14778612f2d66eafdc4724 |
14-Nov-2011 |
John McCall <rjmccall@apple.com> |
In ARC, don't reclaim objects of Class type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144561 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
c80553efdc269dabd4ed0c3210555f45729ab5dd |
14-Nov-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[PCH] Do not crash if a class extension in a chained PCH introduces/redeclares a property. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144520 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
4fc04da71ed46d63dc991dbea4fd52341e56c0a1 |
13-Nov-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Don't crash when a duplicate interface/protocol is inside an extern "C" context. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144508 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
e2d4f4ed44a32f179c6d48cd1dba8346ab2129d9 |
13-Nov-2011 |
Rafael Espindola <rafael.espindola@gmail.com> |
Fix the signature of the getcontext builtin. Patch by Dimitry Andric. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144505 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
65bfd682010f599a9a04fc7523e95e28c27508ba |
13-Nov-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
When reference binding array rvalues, such as those created by compound literals of array type, materialise a temporary. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144483 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
1bf9a9e6a5bdc0de7939908855dcddf46b661800 |
12-Nov-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Represent an APValue based on a Decl as that Decl, rather than a DeclRefExpr or MemberExpr which refers to it. As a side-effect, MemberExprs which refer to static member functions and static data members are now emitted as constant expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144468 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
1a43415b28e60e0e421ef60e254126acec7ab462 |
12-Nov-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Add a method in ASTMutationListener for the last use of Decl's [is/set]ChangedSinceDeserialization and remove them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144466 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
ad834d534e9a5db3d3baa09593775f83ceaff1f2 |
12-Nov-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[PCH] When completing an objc forward reference, do not serialize the chain of its categories because it is going to be rewritten (and the chain will be serialized again), otherwise we may form a cycle in its categories list when deserializing. Also introduce ASTMutationListener::CompletedObjCForwardRef to notify that a forward reference was completed; using Decl's isChangedSinceDeserialization/setChangedSinceDeserialization is bug inducing and kinda gross, we should phase it out. Fixes infinite loop in rdar://10418538. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144465 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
5bbe816cd08bd28a87e8dadedf2cafb19ebf3b0b |
12-Nov-2011 |
David Blaikie <dblaikie@gmail.com> |
Remove unnecessary 'else's after 'return's. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144464 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
ddadaa4579dbb12dcfad62ee86e1e52e12f298ee |
12-Nov-2011 |
Eli Friedman <eli.friedman@gmail.com> |
Add missing casts to AST. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144455 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
48a60c042162fa57933e96907fd869b04b26f3be |
11-Nov-2011 |
Stephen Hines <srhines@google.com> |
Update Clang to svn 144355. Change-Id: I36bd8b4479f887ed75abb84021996aff77b33bd9
ndroid.mk
|
ffd278b568b7b6abff795231cfa541c9d7dbb33e |
11-Nov-2011 |
Eli Friedman <eli.friedman@gmail.com> |
Make sure that restrict-qualifying an array actually adds a restrict qualifier. PR11354. (operator bool() is evil!) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144355 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
4be48ad91750a66dbc003b1ba56515577c9ab580 |
11-Nov-2011 |
Francois Pichet <pichet2000@gmail.com> |
Move "Unqualified lookup into dependent bases of class templates" Microsoft specific behavior from -fms-extensions to -fms-compatibility. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144341 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
ff416d486f6e34c46d299be8aa054cc1d501cd36 |
11-Nov-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Implicit casts from rvalue to lvalue are not meaningful. Don't accidentally add them when performing a const conversion on the implicit object argument for a member operator call on an rvalue. No change to the testsuite: the test for this change is that the added assertion does not fire any more. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144333 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaOverload.cpp
|
62d3cba9d0c608e894a8ce65f0012d730f29f267 |
10-Nov-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Constant expression evaluation: support for evaluation of structs and unions of literal types, as well as derived-to-base casts for lvalues and derived-to-virtual-base casts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144265 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
0204854b7b139d0041f238655487cb30b0c55686 |
10-Nov-2011 |
David Blaikie <dblaikie@gmail.com> |
Removing unused initialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144264 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
427492c7815b5ec15fb4150805c6c82b25841097 |
10-Nov-2011 |
John McCall <rjmccall@apple.com> |
There's no good reason to track temporaries in ExprWithCleanups, but it is sometimes useful to track blocks. Do so. Also optimize the storage of these expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144263 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaChecking.cpp
emaDecl.cpp
emaExpr.cpp
emaExprCXX.cpp
|
e911eea08ad8bb33034d646e62389761871fb105 |
09-Nov-2011 |
Douglas Gregor <dgregor@apple.com> |
Don't crash when transforming an ill-formed pseudo-destructor expression. Fixes PR11339. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144159 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
b6a42908136c3a49ab43608de484bea25bd836d6 |
09-Nov-2011 |
Douglas Gregor <dgregor@apple.com> |
Introduce proper spacing after the Objective-C parameter qualifiers (bycopy, inout, etc.). Fixes <rdar://problem/10402900>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144157 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
f95e2ccf0124574a9e74a6d0f41ac79f4c828760 |
09-Nov-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Don't crash on invalid objc code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144150 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
7475d279fdd664843c75693cc240991e6efc0a4f |
08-Nov-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc: Don't crash on missing @interface decl. // rdar://10415026 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144143 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
a427024860e9487337336fc7643eed66386ec8a5 |
08-Nov-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc-arc: 'readonly' property of retainable object type is strong by default too. // rdar://10410903 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144118 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
f231359f3148cb2197b2290cbb4792f7283cfb7b |
08-Nov-2011 |
Douglas Gregor <dgregor@apple.com> |
Mark the overloaded atomic builtins as having custom type checking, which they do. This avoids all of the default argument promotions that we (1) don't want, and (2) undo during that custom type checking, and makes sure that we don't run into trouble during template instantiation. Fixes PR11320. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144110 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
c4202bafb6523f9cfbe939d9c352be1720928241 |
08-Nov-2011 |
Bob Wilson <bob.wilson@apple.com> |
Check pointer types for arguments of Neon load/store macros. rdar://9958031 The Neon load/store intrinsics need to be implemented as macros to avoid hiding alignment attributes on the pointer arguments, and the macros can only evaluate those pointer arguments once (in case they have side effects), so it has been hard to get the right type checking for those pointers. I tried various alternatives in the arm_neon.h header, but it's much more straightforward to just check directly in Sema. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144075 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
b7abd3bbc8f26602dba69ec9c40f6ad8bda63e40 |
08-Nov-2011 |
Matt Beaumont-Gay <matthewbg@google.com> |
Revert r143972, which didn't actually compile under -Wnon-virtual-dtor. (TIL: -Wnon-virtual-dtor is not in -Wall.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144058 91177308-0d34-0410-b5e6-96231b3b80d8
emaPseudoObject.cpp
|
2d21c996bf9c26386f475c58adad2ef5851117c6 |
08-Nov-2011 |
Bob Wilson <bob.wilson@apple.com> |
Clean up type flags for overloaded Neon builtins. No functional change. This patch just adds a simple NeonTypeFlags class to replace the various hardcoded constants that had been used until now. Unfortunately I couldn't figure out a good way to avoid duplicating that class between clang and TableGen, but since it's small and rarely changes, that's not so bad. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144054 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
1fdf5b7fcaf58297f01c3c6c7e87908b0b3d34e0 |
07-Nov-2011 |
John McCall <rjmccall@apple.com> |
There are some crazy cases that LookupMethodInReceiverType doesn't duplicate, but they all surface as implicit properties. It's also a useful optimization to not duplicate the implicit getter lookup. So, trust the getter lookup that was already done in these cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144031 91177308-0d34-0410-b5e6-96231b3b80d8
emaPseudoObject.cpp
|
ec603c8d2e1cd9532629c9b1afc445efbcb5351c |
07-Nov-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
constexpr: static data members declared constexpr are required to have an initializer; all other constexpr variables are merely required to be initialized. In particular, a user-provided constexpr default constructor can be used for such initialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144028 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
348d3bdc406fb652fa54949e2f356bc526cfc9c8 |
07-Nov-2011 |
Douglas Gregor <dgregor@apple.com> |
When we notice that a member function is defined with "= delete" or "= default", make a note of which is used when creating the initial declaration. Previously, we would wait until later to handle default/delete as a definition, but this is too late: when adding the declaration, we already treated the declaration as "user-provided" when in fact it was merely "user-declared". Fixes PR10861 and PR10442, along with a bunch of FIXMEs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144011 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplate.cpp
|
1d8790fb2acbc3585c61e3b328cc034a6d3b4a73 |
07-Nov-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
When applying ARC __weak to a non-objc pointer, do not give error that __weak is unsupported by the deployment target, since it is going to be ignored anyway. Makes it easier for incremental migration from GC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143975 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
3f8e00d379c9997a4ac391ddba050f4bbeb5f0a8 |
07-Nov-2011 |
Matt Beaumont-Gay <matthewbg@google.com> |
Better fix for -Wnon-virtual-dtor git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143972 91177308-0d34-0410-b5e6-96231b3b80d8
emaPseudoObject.cpp
|
3adc33b7478f1d47e84b0306cce7bd307757736b |
07-Nov-2011 |
Douglas Gregor <dgregor@apple.com> |
Drastically simplify the mapping from the declaration corresponding to the injected-class-name of a class (or class template) to the declaration that results from substituting the given template arguments. Previously, we would actually perform a substitution into the injected-class-name type and then retrieve the resulting declaration. However, in certain, rare circumstances involving deeply-nested member templates, we would get the wrong substitution arguments. This new approach just matches up the declaration with a declaration that's part of the current context (or one of its parents), which will either be an instantiation (during template instantiation) or the declaration itself (during the definition of the template). This is both more efficient (we're avoiding a substitution) and more correct (we can't get the template arguments wrong in the member-template case). Fixes <rdar://problem/9676205>. Reinstated, now that we have the fix in r143967. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143968 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
ed7f727257b770b6db8a86a29590bb9cbeeb002f |
07-Nov-2011 |
Matt Beaumont-Gay <matthewbg@google.com> |
Appease -Wnon-virtual-dtor git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143965 91177308-0d34-0410-b5e6-96231b3b80d8
emaPseudoObject.cpp
|
6295b53422fbbc9dfaa5035abdada4648ab73d40 |
07-Nov-2011 |
John McCall <rjmccall@apple.com> |
Rip out CK_GetObjCProperty. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143910 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExprCXX.cpp
emaExprObjC.cpp
|
81f51e226ae1d35f0ec706ec56b81d3a9cba64ce |
06-Nov-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Make sure when setting AttributesAsWritten of a property that they do not include ownership qualifiers from the type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143885 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
384fabe9643f4d36d1d85672bd01e4055cf44ff8 |
06-Nov-2011 |
Benjamin Kramer <benny.kra@googlemail.com> |
Unbreak gcc build. For some reason clang and msvc accept this, but gcc doesn't. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143872 91177308-0d34-0410-b5e6-96231b3b80d8
emaPseudoObject.cpp
|
7acf4bf00ecc31652177b3ac1d3f523346581d71 |
06-Nov-2011 |
John McCall <rjmccall@apple.com> |
Change the AST representation of operations on Objective-C property references to use a new PseudoObjectExpr expression which pairs a syntactic form of the expression with a set of semantic expressions implementing it. This should significantly reduce the complexity required elsewhere in the compiler to deal with these kinds of expressions (e.g. IR generation's special l-value kind, the static analyzer's Message abstraction), at the lower cost of specifically dealing with the odd AST structure of these expressions. It should also greatly simplify efforts to implement similar language features in the future, most notably Managed C++'s properties and indexed properties. Most of the effort here is in dealing with the various clients of the AST. I've gone ahead and simplified the ObjC rewriter's use of properties; other clients, like IR-gen and the static analyzer, have all the old complexity *and* all the new complexity, at least temporarily. Many thanks to Ted for writing and advising on the necessary changes to the static analyzer. I've xfailed a small diagnostics regression in the static analyzer at Ted's request. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143867 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExpr.cpp
emaExprObjC.cpp
emaPseudoObject.cpp
emaStmt.cpp
reeTransform.h
|
d87e0e371d00cdf12a85b366714b0f5e781e6c3f |
04-Nov-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
In ARC, when applying an ownership to a non-objc pointer, instead of ignoring it create an attributed type with same type as the original type. We effectively retain the source info that an ownership attribute was present but the attribute is ignored by not modifying the type that it was applied to. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143736 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
4d4e6ddad8885b1c2104f9bfbb7ab4e9157faaf7 |
04-Nov-2011 |
Devang Patel <dpatel@apple.com> |
Revert r143551. It is causing g++.dg/template/crash52.C test failure. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143725 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
ebeea767cc30a812c8680c91421cc8d3e05c0ec3 |
04-Nov-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc: fixed enum type is supported in objc mode. Fixes a bug where enumerator type is not this fixed type. // rdar://10381507 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143724 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
5b1ebba7bae2c808ca10d47c245d3181ea2d3940 |
04-Nov-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
In C++ keep unavailable function calls in the AST, like in C/ObjC. This allows the migrator to visit and fix them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143699 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
8b85f6cd384abdd5343a729a7252fd21d46c9850 |
03-Nov-2011 |
Douglas Gregor <dgregor@apple.com> |
Extend IsSimplyAccessible to check for Objective-C instance variable accessibility. Fixes <rdar://problem/3727335>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143635 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
187c079994c5b6fb30afdb65d40babf61871cfa6 |
03-Nov-2011 |
Douglas Gregor <dgregor@apple.com> |
Class can't be null in this context git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143618 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
b4321f50a9ad98ac80647968cba376b6656897d6 |
03-Nov-2011 |
Douglas Gregor <dgregor@apple.com> |
Refactor Sema::IsSimplyAccessible slightly, to work on a DeclContext rather than a class git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143615 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaCodeComplete.cpp
|
8f2e7db17d6b827fde33ff17da47b22dcc526d53 |
03-Nov-2011 |
Douglas Gregor <dgregor@apple.com> |
When we're checking a friend function template in an out-of-line class definition, we may not have a scope corresponding to the namespace where that friend function template actually lives. Work around this issue by faking up a scope with the appropriate DeclContext. This is a bit of a hack, but it fixes <rdar://problem/10204947>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143614 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplate.cpp
|
738f0039be489168e493debc248d60be07a109c7 |
03-Nov-2011 |
Douglas Gregor <dgregor@apple.com> |
Add a printing policy flag to suppress printing "<anonymous>::" prior to types. Enable this flag for code completion, where knowing whether something is in an anonymous or inline namespace is actually not useful, since you don't have to type it anyway. Fixes <rdar://problem/10208818>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143599 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
476caafd61759300720c76e65f7e0c423850fdb0 |
03-Nov-2011 |
Douglas Gregor <dgregor@apple.com> |
Don't build member initializers for zero-length or incomplete arrays, and don't try to destroy them, either. Fixes <rdar://problem/10228639>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143584 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
a364fb712dbb0dfe2f0852c0c87be5a59a464742 |
02-Nov-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
back out changes in r143399 and r143475. rvale-references are captured by reference in blocks. // rdar://9971124. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143583 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
a95cba91ab8df9ebc1507e649e808968a9a16821 |
02-Nov-2011 |
Douglas Gregor <dgregor@apple.com> |
Fix various minor issues find via unreachable code warnings, from Ahmed Charles! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143569 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
a553e035c53eaaf22fe2c02097c0b8bc4b7552b6 |
02-Nov-2011 |
Douglas Gregor <dgregor@apple.com> |
Drastically simplify the mapping from the declaration corresponding to the injected-class-name of a class (or class template) to the declaration that results from substituting the given template arguments. Previously, we would actually perform a substitution into the injected-class-name type and then retrieve the resulting declaration. However, in certain, rare circumstances involving deeply-nested member templates, we would get the wrong substitution arguments. This new approach just matches up the declaration with a declaration that's part of the current context (or one of its parents), which will either be an instantiation (during template instantiation) or the declaration itself (during the definition of the template). This is both more efficient (we're avoiding a substitution) and more correct (we can't get the template arguments wrong in the member-template case). Fixes <rdar://problem/9676205>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143551 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
2b10ae9073fc4bc000d87cb40f71c3d6a455e7a7 |
02-Nov-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc: warn if a readonly property has a setter attribute too. // rdar://10357768 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143518 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
b2290555c4560263e771904f1534e9e3d60353af |
01-Nov-2011 |
Douglas Gregor <dgregor@apple.com> |
When we run into a constructor or destructor that is defined in the wrong class, make sure to drop it immediately; we don't want that constructor to be available within the DeclContext. Fixes <rdar://problem/9677163>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143506 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
c0577e2ebdb70b4da2946632c0aff8e6fbe0ae69 |
01-Nov-2011 |
Douglas Gregor <dgregor@apple.com> |
When we see an out-of-line definition of a member class template that does not match any declaration in the class (or class template), be sure to mark it as invalid. Fixes PR10924 / <rdar://problem/10119422>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143504 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
2a1652092c0c68924f3a2cd4bf4a3bc892a1a773 |
01-Nov-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Find copy constructor needed to copy an rvalue reference c++ object into block descriptor. // rdar://9971124 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143475 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b28d69823eb0f177a93f16cf2655cf7b7f136393 |
01-Nov-2011 |
Matt Beaumont-Gay <matthewbg@google.com> |
Silence a warning in -Asserts builds git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143471 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
2a4b94452861bf8b7259bcc0b973fd4270d8ccaa |
01-Nov-2011 |
Ted Kremenek <kremenek@apple.com> |
Downgrade err_iboutlet_object_type to a warning. It was breaking a bunch of code. We will reconsider promoting it back to an error later. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143470 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
dcb0b93a25ab5e938f01764b2c99f39f131e01c1 |
01-Nov-2011 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Enable function call and some overload resolution with parameters of aggregate class type and initializer list arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143462 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaOverload.cpp
|
f3aa8d6ef9457c7e36a8f265c781c38dadc7c074 |
01-Nov-2011 |
Eli Friedman <eli.friedman@gmail.com> |
Fix the representation of wide strings in the AST and IR so that it uses the native representation of integers for the elements. This fixes a bunch of nastiness involving treating wide strings as a series of bytes. Patch by Seth Cantrell. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143417 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
12e3a16149e76004393ccd1f3be1b5811efda65c |
01-Nov-2011 |
Douglas Gregor <dgregor@apple.com> |
Rework the AST for the initializer of a delegating constructor, so that it retains source location information for the type. Aside from general goodness (being able to walk the types described in that information), we now have a proper representation for dependent delegating constructors. Fixes PR10457 (for real). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143410 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
|
f8e5fdba9cfeab16727cf05d9e1f1c5b37e1def2 |
31-Oct-2011 |
Eli Friedman <eli.friedman@gmail.com> |
Add missing lvalue-to-rvalue conversion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143364 91177308-0d34-0410-b5e6-96231b3b80d8
emaCast.cpp
|
899ad687a4b7081b1f39eb771d6f37bafeffd380 |
29-Oct-2011 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Fixed FriendDecl source locations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143295 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
|
d778105d47d92af4bf74f3e3019ca74ab0d78986 |
29-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Rename Expr::Evaluate to Expr::EvaluateAsRValue to make it clear that it will implicitly perform an lvalue-to-rvalue conversion if used on an lvalue expression. Also improve the documentation of Expr::Evaluate* to indicate which of them will accept expressions with side-effects. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143263 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDecl.cpp
emaExpr.cpp
emaInit.cpp
emaStmt.cpp
emaType.cpp
|
ca7c12796780e2e1473699ab111d68ba602bd7f2 |
29-Oct-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc-arc: desugar certain type and improve on diagnostic for ownership qualifier cast which won't work. // rdar://10244607 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143258 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
6be7465459a0a524a2f774d4190fca36e40e7d4d |
29-Oct-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[ARC] Do not transfer ARC ownership if the cast is going to result in r-value, in which case the ownership is redundant. Thanks to John for the suggestion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143240 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
51e9ef0f823bcb04e8776665878745f01370f77b |
28-Oct-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c arc: type-casting of an objc pointer to an rvalue retainable object type with life-time qualifier has no effect and wil be diagnosed as error. // rdar://10244607 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143219 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
eaff70076ebddeaf1facd88fdb8e7c71267a255e |
28-Oct-2011 |
Benjamin Kramer <benny.kra@googlemail.com> |
Reflow code. No intended functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143192 91177308-0d34-0410-b5e6-96231b3b80d8
emaPseudoObject.cpp
|
358519b81e0974233fd314fe54656ce48be7a56d |
28-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Add (hopefully) the last missing lvalue-to-rvalue conversion. Add an assertion to catch some future implicit lvalue-to-rvalue casts of inappropriate kinds. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143182 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaExpr.cpp
|
199b5db30fed52eac1beb7ef4493b4f2f89bb9a7 |
28-Oct-2011 |
John McCall <rjmccall@apple.com> |
Be sure to build a dependent expression when we see a binary operator involving a dependently-typed overload set. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143172 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
6adb12dd40178ce513b02d44f8048a76801d6331 |
28-Oct-2011 |
Richard Trieu <rtrieu@google.com> |
Fix for PR9751 to change the behavior of -Wformat warnings. If the format string is part of the function call, then there is no difference. If the format string is not, the warning will point to the call site and a note will point to where the format string is. Fix-it hints for strings are moved to the note if a note is emitted. This will prevent changes to format strings that may be used in multiple places. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143168 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
0ddb17ce2dca12e247170d873f4265f152c66cc4 |
28-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Add missing lvalue-to-rvalue conversion to vector splat casts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143166 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
3bad5b10cc05fe000340fc6e4efc4d8b9af0a62c |
28-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix some cases where a CK_IntegralCast was being used to convert an lvalue to an rvalue. An assertion to catch this is in ImpCastExprToType will follow, but vector operations currently trip over this (due to omitting the usual arithmetic conversions). Also add an assert to catch missing lvalue-to-rvalue conversions on the LHS of ->. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143155 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprMember.cpp
emaStmt.cpp
emaTemplate.cpp
|
1417646ef5470549b2d889b5eb1663cca5c0a3e6 |
27-Oct-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc: fix an ir-gen crash caused by recent property refactoring. // rdar://10327068 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143139 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
37a5e89434d0e98e9949cf97a803ababd2f3502f |
27-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
Make the loading of information attached to an IdentifierInfo from an AST file more lazy, so that we don't eagerly load that information for all known identifiers each time a new AST file is loaded. The eager reloading made some sense in the context of precompiled headers, since very few identifiers were defined before PCH load time. With modules, however, a huge amount of code can get parsed before we see an @import, so laziness becomes important here. The approach taken to make this information lazy is fairly simple: when we load a new AST file, we mark all of the existing identifiers as being out-of-date. Whenever we want to access information that may come from an AST (e.g., whether the identifier has a macro definition, or what top-level declarations have that name), we check the out-of-date bit and, if it's set, ask the AST reader to update the IdentifierInfo from the AST files. The update is a merge, and we now take care to merge declarations before/after imports with declarations from multiple imports. The results of this optimization are fairly dramatic. On a small application that brings in 14 non-trivial modules, this takes modules from being > 3x slower than a "perfect" PCH file down to 30% slower for a full rebuild. A partial rebuild (where the PCH file or modules can be re-used) is down to 7% slower. Making the PCH file just a little imperfect (e.g., adding two smallish modules used by a bunch of .m files that aren't in the PCH file) tips the scales in favor of the modules approach, with 24% faster partial rebuilds. This is just a first step; the lazy scheme could possibly be improved by adding versioning, so we don't search into modules we already searched. Moreover, we'll need similar lazy schemes for all of the other lookup data structures, such as DeclContexts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143100 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
ema.cpp
emaDecl.cpp
|
1404950f857068f3f135611a6ff53631dc94251b |
27-Oct-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Make use of the parameter in Sema::ActOnObjCTemporaryExitContainerContext. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143088 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
749e95ee8353dff9a6d1137ec4556971d27a9f87 |
27-Oct-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Fix crash on an @interface nested inside @implementation, rdar://10336158 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143085 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
393117c9092908f4ef48b4411a053e9c22ecf529 |
27-Oct-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
For the "'@end' is missing in implementation context" point at the location of '@'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143084 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
69cd886bdcc25a6d988c9e4b7e24076f40c970f5 |
27-Oct-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Do not warn when weak-import attribute is applied to enum decl. in Darwin due to certain projects requirement. // rdar://10277579 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143082 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
cda80f83ec59293222fe8b92617c8e9f41725f76 |
26-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Pull out conversion on LHS of -> and . into its own function. This happens implicitly in LookupMemberExpr and explicitly in cases where template instantiation doesn't redo the lookup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143046 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprMember.cpp
reeTransform.h
|
194af989b6bacfa29a92e1ad85961c2b6bc358f4 |
26-Oct-2011 |
Eli Friedman <eli.friedman@gmail.com> |
Compute the promoted integer type of fixed-width enums correctly. Found by inspection. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143021 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
31161c79edf73035ac36007f6ad935d61340dc51 |
26-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix crash due to missing array-to-pointer decay when instantiating an unresolved member expression. Refactoring to follow. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143017 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
7ab75287b50b41f06e4be38d5ca515ce723971a6 |
26-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
UnresolvedMemberExprs need lvalue-to-rvalue conversions during template instantiations too. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143016 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
e859fbf5938fc0f8ca5aa115c35c66732174f513 |
25-Oct-2011 |
John McCall <rjmccall@apple.com> |
Restore r142914 and r142915, now with missing file and apparent GCC compiler workaround. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142931 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
emaChecking.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprMember.cpp
emaExprObjC.cpp
emaInit.cpp
emaObjCProperty.cpp
emaOverload.cpp
emaPseudoObject.cpp
emaStmt.cpp
reeTransform.h
|
50e13c58f2c5dafb9b0fdc93a4610c0e61b2ec8f |
25-Oct-2011 |
NAKAMURA Takumi <geek4civic@gmail.com> |
Revert r142914 and r142915, due to possibly missing file. r142914: "Introduce a placeholder type for "pseudo object"" r142915: "Pull the pseudo-object stuff into its own file." git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142921 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
emaChecking.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprMember.cpp
emaExprObjC.cpp
emaInit.cpp
emaObjCProperty.cpp
emaOverload.cpp
emaStmt.cpp
reeTransform.h
|
0cb6837faf4b19c5409554a86b25afebb9dcd179 |
25-Oct-2011 |
John McCall <rjmccall@apple.com> |
Pull the pseudo-object stuff into its own file. Tidy up some marginally related code just to annoy single-purpose-commit lovers. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142915 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
emaExpr.cpp
|
1374a279a4708255530d462d4b03910e6441bf06 |
25-Oct-2011 |
John McCall <rjmccall@apple.com> |
Introduce a placeholder type for "pseudo object" expressions: expressions which refer to a logical rather than a physical l-value, where the logical object is actually accessed via custom getter/setter code. A subsequent patch will generalize the AST for these so that arbitrary "implementing" sub-expressions can be provided. Right now the only client is ObjC properties, but this should be generalizable to similar language features, e.g. Managed C++'s __property methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142914 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprMember.cpp
emaExprObjC.cpp
emaInit.cpp
emaObjCProperty.cpp
emaOverload.cpp
emaStmt.cpp
reeTransform.h
|
53c8b9e7377bb95a9fb10303c9e613aef5a57d63 |
25-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Don't forget the lvalue-to-rvalue conversion on the LHS when instantiating a dependent ->, where the member being referred to is an anonymous struct or union. This path was missed by the fix in r142890. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142910 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
6f03371d98408cbe50b6668b2a07995e225192b8 |
25-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
Check for unexpanded parameter packs in the name that guards a Microsoft __if_exists/__if_not_exists statement. Also note that we weren't traversing DeclarationNameInfo *at all* within the RecursiveASTVisitor, which would be rather fatal for variadic templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142906 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaTemplate.cpp
emaTemplateVariadic.cpp
reeTransform.h
|
1db0028f9aadf052735dd3433ee43b091a272d3d |
25-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement support for dependent Microsoft __if_exists/__if_not_exists statements. As noted in the documentation for the AST node, the semantics of __if_exists/__if_not_exists are somewhat different from the way Visual C++ implements them, because our parsed-template representation can't accommodate VC++ semantics without serious contortions. Hopefully this implementation is "good enough". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142901 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaStmt.cpp
reeTransform.h
|
2b99fac1f287f5c107793a32ab0bc4065d5bade2 |
25-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Don't forget the lvalue-to-rvalue conversion on the LHS of an -> when rebuilding it during template instantiation, for a known RHS decl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142890 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
f4387944a2888b25ef74b3daee60060c05e27321 |
25-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
Rework Microsoft __if_exists/__if_not_exists parsing and semantic analysis to separate dependent names from non-dependent names. For dependent names, we'll behave differently from Visual C++: - For __if_exists/__if_not_exists at class scope, we'll just warn and then ignore them. - For __if_exists/__if_not_exists in statements, we'll treat the inner statement as a compound statement, which we only instantiate in templates where the dependent name (after instantiation) exists. This behavior is different from VC++, but it's as close as we can get without encroaching ridiculousness. The latter part (dependent statements) is not yet implemented. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142864 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
9b2bb42d19c14c2330b1239c7d8f0e549b15a271 |
25-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
When we perform a lookup for a dependent name that is a member of an unknown specialization, treat this the same way as if the name were not found in the current instantiation. No actual functionality change, since apparently nothing depends on this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142862 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
417a3ec26c5d53bbdcbf6cf13153cd4c0e5e9db8 |
24-Oct-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Minor refactoring of my last patch. Per Doug's suggestion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142807 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
579ee4f9f5c7b8f939621c8008337a3c1c679957 |
24-Oct-2011 |
Ted Kremenek <kremenek@apple.com> |
Rename AnalysisContext to AnalysisDeclContext. Not only is this name more accurate, but it frees up the name AnalysisContext for other uses. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142782 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
dcc71da0bdf1a1490d6dd6b5ed70c3ca4c9fd775 |
23-Oct-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
Fix grammar for C++11 alignment specifiers, and add a few FIXMEs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142760 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
197cd9ee0b868136b686be459e13fae151a2d47f |
23-Oct-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
Diagnose unexpanded parameter packs in member initialisers (including in-class member initialisers). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142758 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
5d398f5773bc89a19a5b5ad8c38a7e0cc7b9b6a1 |
23-Oct-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
Clean up duplicated code in Sema::BuildMemInitializer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142757 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
9234b8bfac532668526df0b344ad7b208cd91613 |
23-Oct-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
Improve unexpanded parameter pack diagnostics by using UPPC_Initializer here. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142756 91177308-0d34-0410-b5e6-96231b3b80d8
ultiInitializer.cpp
|
5e07ce362fa83c3dbb8c940d62fd286012846b88 |
23-Oct-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
Attach class template attributes to the templated CXXRecordDecl, instead of silently discarding them. As a side effect, this improves diagnostics for constexpr class templates slightly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142755 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
3bd5a8169e57debade42d5b748ca564ca9a832ba |
23-Oct-2011 |
Ted Kremenek <kremenek@apple.com> |
[analyzer] Remove LocationContext creation methods from AnalysisManager, and change clients to use AnalysisContext instead. WIP to remove/reduce ExprEngine's usage of AnalysisManager. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142739 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
11005638f651c2a0809b01abf1fd4025fb562021 |
22-Oct-2011 |
Ted Kremenek <kremenek@apple.com> |
Only emit implicit constant conversion truncation warnings in reachable code. Apparently this is what GCC does, and some code depends on this. Fixes <rdar://problem/10321089>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142716 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
0a08ae61a367a31a10aebd3dafdc7e11943eba11 |
22-Oct-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Fixes a minor hick up to my last patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142711 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
e24086e226e66898c77d1fac364db7c855b1fac9 |
22-Oct-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc: private methods can have their attributes, no diagnostic is required. None private methods if their implementation have attribute, they must exactly match those in their declarations. // rdar://10271563 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142709 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
28bc9b09aab06a448784b732ce67e90d1ac7fe07 |
22-Oct-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Don't try to set the "array filler" in a InitListExpr twice. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142695 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
c93c168eb32a804129a0c7b32ed90b72280abc39 |
22-Oct-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
c++: support gcc's application of weak attribute on class declaration which forces any such class and any class that inherits from such a class to have their typeinfo symbols be marked as weak. // rdar://10246395 A test/CodeGenCXX/weak-extern-typeinfo.cpp M lib/Sema/SemaDeclCXX.cpp M lib/Sema/SemaDeclAttr.cpp M lib/CodeGen/CGRTTI.cpp git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142693 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaDeclCXX.cpp
|
57d2b8aefcf58a7bb82de1cdc69358b1893d1219 |
21-Oct-2011 |
DeLesley Hutchins <delesley@google.com> |
Thread safety analysis refactoring: invalid lock expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142666 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
dcd4d6f56cb096eddd8c59b86b335107abc71e5c |
21-Oct-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c: Diagnose redeclaration of private ivars in class extensions. // rdar://10309454 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142664 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
0a45e4389e9683560a8cd267a0e54bb1c0294781 |
21-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
When performing name lookup for the previous declaration of a field, be sure to consider all of the possible lookup results. We were assert()'ing (but behaving correctly) for unresolved values. Fixes PR11134 / <rdar://problem/10290422>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142652 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
6c4e3d30399c1e11228e845e568ea8395f549653 |
21-Oct-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
Permit auto SCS on parameter declarations, C++03 [dcl.stc]p2 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142649 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
14475426eb5d37f179cf80626b4a45fab6e02b6b |
20-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Add -Wc++98-compat diagnostics for jumps which bypass initialization of non-POD but trivially constructible and destructible variables in C++11 mode. Also incidentally improve the precision of the wording for jump diagnostics in C++98 mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142619 91177308-0d34-0410-b5e6-96231b3b80d8
umpDiagnostics.cpp
emaDecl.cpp
|
8a54dc16f2d72adfaacb6f8a0b13021e24d243ba |
20-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
When fixing up the storage class for an anonymous union, don't mark the anonymous union as valid: our fixes have Fix-Its. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142616 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f9c0daf0e4637253bc23d8c0b4ac870cfa45a738 |
20-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
There's no point in marking a declaration invalid just because it shadows a template parameter. Complain about the shadowing (or not, under -fms-extensions), but don't invalidate the declaration. Merely forget about the template parameter declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142596 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaTemplate.cpp
|
c9aa53cd3bacd7be9ce71bc727c7ce468e47dadc |
20-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
Diagnose class template (partial) specializations that occur in the *wrong* class scope. This is one of the problems behind <rdar://problem/9676205>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142588 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
86180ee1921dfd273446d16a8f6826f9c5c5b632 |
20-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
When we parse something that looks like a templated friend tag but actually just has an extraneous 'template<>' header, strip off the 'template<>' header and treat it as a normal friend tag. Fixes PR10660 / <rdar://problem/9958322>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142587 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
52441ce1c7162d190baeaa26a62f657b224a4684 |
20-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Add -Wc++98-compat warning for enumerations in nested name specifiers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142568 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
reeTransform.h
|
13e0b7744ceb8ebe86af3d312a800f08b68cac43 |
20-Oct-2011 |
David Blaikie <dblaikie@gmail.com> |
FixIt insert 'static' for anonymous unions at global or namespace scope. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142566 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
6d4eb704bc2d6cb5d72e35d503ebfe94634e3b9d |
20-Oct-2011 |
David Blaikie <dblaikie@gmail.com> |
Add a fixit to remove storage specifiers on anonymous enums. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142565 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
54ed6c251555338da62ca2b84e8bc440f950ac18 |
20-Oct-2011 |
David Blaikie <dblaikie@gmail.com> |
80 cols (one I created in my last commit, plus a bunch of others that were already there) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142552 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
b2a627951cfcf82b7df35844c9466735cf2b512e |
20-Oct-2011 |
David Blaikie <dblaikie@gmail.com> |
Don't provide errors for anonymous unions when they're actually anonymous classes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142551 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
3da576c5b43325d9b82dd32d0b6eb0db5edcb97d |
19-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
-Wc++98-compat: warn on nontrivial types used in unions and anonymous structs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142541 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
e98282d5bd0736b1e36891504538fe8623e92138 |
19-Oct-2011 |
Matt Beaumont-Gay <matthewbg@google.com> |
Only warn at self-initialization if some later use is always uninitialized. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142538 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
763ab674a26aa3bb941afa45a6a43039fc8b1322 |
19-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
-Wc++98-compat: diagnose if a reference is bound to a prvalue which does not have an unambiguous accessible copying constructor; this is ill-formed in C++98. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142533 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
1cd76e8ca8f890a4defadcae3372c025ebe7607c |
11-Nov-2011 |
John McCall <rjmccall@apple.com> |
Don't apply NRVO to over-aligned variables. The caller only guarantees alignment up to the ABI alignment of the return type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144364 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
538773cbfbba03b85d931efe122b743b7b0cc60d |
11-Nov-2011 |
John McCall <rjmccall@apple.com> |
Be sure to insulate block literals from any cleanups in their enclosing full-expressions. It is somewhat amazing that this hasn't come up as a problem before. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144362 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
8ac2c66a1442985091c5ec2b33ce6d3df3bcb529 |
11-Nov-2011 |
Eli Friedman <eli.friedman@gmail.com> |
Make sure that restrict-qualifying an array actually adds a restrict qualifier. PR11354. (operator bool() is evil!) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144355 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
ef04ecf96d83cd3cbc7bf8cf36d4c7873964194e |
11-Nov-2011 |
Francois Pichet <pichet2000@gmail.com> |
Move "Unqualified lookup into dependent bases of class templates" Microsoft specific behavior from -fms-extensions to -fms-compatibility. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144341 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
acdfa4d504a8f2514d60569f9ce55d45f11795b9 |
11-Nov-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Implicit casts from rvalue to lvalue are not meaningful. Don't accidentally add them when performing a const conversion on the implicit object argument for a member operator call on an rvalue. No change to the testsuite: the test for this change is that the added assertion does not fire any more. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144333 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaOverload.cpp
|
180f47959a066795cc0f409433023af448bb0328 |
10-Nov-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Constant expression evaluation: support for evaluation of structs and unions of literal types, as well as derived-to-base casts for lvalues and derived-to-virtual-base casts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144265 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
64b4b43a23aa8b8009470e3cc451333f623d7d58 |
10-Nov-2011 |
David Blaikie <dblaikie@gmail.com> |
Removing unused initialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144264 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
80ee6e878a169e6255d4686a91bb696151ff229f |
10-Nov-2011 |
John McCall <rjmccall@apple.com> |
There's no good reason to track temporaries in ExprWithCleanups, but it is sometimes useful to track blocks. Do so. Also optimize the storage of these expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144263 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaChecking.cpp
emaDecl.cpp
emaExpr.cpp
emaExprCXX.cpp
|
6b18e740495b67b439fa366367242110365cc4d9 |
09-Nov-2011 |
Douglas Gregor <dgregor@apple.com> |
Don't crash when transforming an ill-formed pseudo-destructor expression. Fixes PR11339. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144159 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
6ef920976a86aa710ccfeeeb7e14e9b38aef5007 |
09-Nov-2011 |
Douglas Gregor <dgregor@apple.com> |
Introduce proper spacing after the Objective-C parameter qualifiers (bycopy, inout, etc.). Fixes <rdar://problem/10402900>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144157 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
ccc9e767f21cb9be55c98f9c7cb319134410184b |
09-Nov-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Don't crash on invalid objc code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144150 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
90f7b62aba1ae2d41bfe2286c210b027fc62681f |
08-Nov-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc: Don't crash on missing @interface decl. // rdar://10415026 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144143 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
f21a92d35953adb038ffbe37cd1a4083e0df0ec0 |
08-Nov-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc-arc: 'readonly' property of retainable object type is strong by default too. // rdar://10410903 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144118 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
5b0c5199a7037d0435d75f37e3ba69a24f757931 |
08-Nov-2011 |
Douglas Gregor <dgregor@apple.com> |
Mark the overloaded atomic builtins as having custom type checking, which they do. This avoids all of the default argument promotions that we (1) don't want, and (2) undo during that custom type checking, and makes sure that we don't run into trouble during template instantiation. Fixes PR11320. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144110 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
6f9f03ef370ad48ece0c5d10edda28f39ccadb5d |
08-Nov-2011 |
Bob Wilson <bob.wilson@apple.com> |
Check pointer types for arguments of Neon load/store macros. rdar://9958031 The Neon load/store intrinsics need to be implemented as macros to avoid hiding alignment attributes on the pointer arguments, and the macros can only evaluate those pointer arguments once (in case they have side effects), so it has been hard to get the right type checking for those pointers. I tried various alternatives in the arm_neon.h header, but it's much more straightforward to just check directly in Sema. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144075 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
1aa1721f14f2162811f5393dbd84e01eadc2c963 |
08-Nov-2011 |
Matt Beaumont-Gay <matthewbg@google.com> |
Revert r143972, which didn't actually compile under -Wnon-virtual-dtor. (TIL: -Wnon-virtual-dtor is not in -Wall.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144058 91177308-0d34-0410-b5e6-96231b3b80d8
emaPseudoObject.cpp
|
da95f73b59f9af964e33725c515139d34c90c863 |
08-Nov-2011 |
Bob Wilson <bob.wilson@apple.com> |
Clean up type flags for overloaded Neon builtins. No functional change. This patch just adds a simple NeonTypeFlags class to replace the various hardcoded constants that had been used until now. Unfortunately I couldn't figure out a good way to avoid duplicating that class between clang and TableGen, but since it's small and rarely changes, that's not so bad. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144054 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
dc4df51d32dea56fbec79037570832dffbcc14e6 |
07-Nov-2011 |
John McCall <rjmccall@apple.com> |
There are some crazy cases that LookupMethodInReceiverType doesn't duplicate, but they all surface as implicit properties. It's also a useful optimization to not duplicate the implicit getter lookup. So, trust the getter lookup that was already done in these cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144031 91177308-0d34-0410-b5e6-96231b3b80d8
emaPseudoObject.cpp
|
66f85713bd0d22f867efa8e9fb0037befdd6b151 |
07-Nov-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
constexpr: static data members declared constexpr are required to have an initializer; all other constexpr variables are merely required to be initialized. In particular, a user-provided constexpr default constructor can be used for such initialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144028 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
45fa560c72441069d9e4eb1e66efd87349caa552 |
07-Nov-2011 |
Douglas Gregor <dgregor@apple.com> |
When we notice that a member function is defined with "= delete" or "= default", make a note of which is used when creating the initial declaration. Previously, we would wait until later to handle default/delete as a definition, but this is too late: when adding the declaration, we already treated the declaration as "user-provided" when in fact it was merely "user-declared". Fixes PR10861 and PR10442, along with a bunch of FIXMEs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144011 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplate.cpp
|
5cad82236ecc0a2eeed2edd75e119f6069a99f4c |
07-Nov-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
When applying ARC __weak to a non-objc pointer, do not give error that __weak is unsupported by the deployment target, since it is going to be ignored anyway. Makes it easier for incremental migration from GC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143975 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
8cacea57b6cd288f7578200e4884ab56bafc1a32 |
07-Nov-2011 |
Matt Beaumont-Gay <matthewbg@google.com> |
Better fix for -Wnon-virtual-dtor git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143972 91177308-0d34-0410-b5e6-96231b3b80d8
emaPseudoObject.cpp
|
2c1227c4da661bdc0b1976740c3ff203ed7609b2 |
07-Nov-2011 |
Douglas Gregor <dgregor@apple.com> |
Drastically simplify the mapping from the declaration corresponding to the injected-class-name of a class (or class template) to the declaration that results from substituting the given template arguments. Previously, we would actually perform a substitution into the injected-class-name type and then retrieve the resulting declaration. However, in certain, rare circumstances involving deeply-nested member templates, we would get the wrong substitution arguments. This new approach just matches up the declaration with a declaration that's part of the current context (or one of its parents), which will either be an instantiation (during template instantiation) or the declaration itself (during the definition of the template). This is both more efficient (we're avoiding a substitution) and more correct (we can't get the template arguments wrong in the member-template case). Fixes <rdar://problem/9676205>. Reinstated, now that we have the fix in r143967. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143968 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
90f93d4c6e257903c951c5ff22cf3cf3806fca63 |
07-Nov-2011 |
Matt Beaumont-Gay <matthewbg@google.com> |
Appease -Wnon-virtual-dtor git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143965 91177308-0d34-0410-b5e6-96231b3b80d8
emaPseudoObject.cpp
|
7864435ef2bce200224120bd1df3aed98ea5b99a |
07-Nov-2011 |
John McCall <rjmccall@apple.com> |
Rip out CK_GetObjCProperty. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143910 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExprCXX.cpp
emaExprObjC.cpp
|
dbbdec994f5a96b5c25aaa679cd86ecabf545f7b |
06-Nov-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Make sure when setting AttributesAsWritten of a property that they do not include ownership qualifiers from the type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143885 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
acf9e82fd34c0a125bf2aa8be1ab868082a7f06a |
06-Nov-2011 |
Benjamin Kramer <benny.kra@googlemail.com> |
Unbreak gcc build. For some reason clang and msvc accept this, but gcc doesn't. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143872 91177308-0d34-0410-b5e6-96231b3b80d8
emaPseudoObject.cpp
|
4b9c2d235fb9449e249d74f48ecfec601650de93 |
06-Nov-2011 |
John McCall <rjmccall@apple.com> |
Change the AST representation of operations on Objective-C property references to use a new PseudoObjectExpr expression which pairs a syntactic form of the expression with a set of semantic expressions implementing it. This should significantly reduce the complexity required elsewhere in the compiler to deal with these kinds of expressions (e.g. IR generation's special l-value kind, the static analyzer's Message abstraction), at the lower cost of specifically dealing with the odd AST structure of these expressions. It should also greatly simplify efforts to implement similar language features in the future, most notably Managed C++'s properties and indexed properties. Most of the effort here is in dealing with the various clients of the AST. I've gone ahead and simplified the ObjC rewriter's use of properties; other clients, like IR-gen and the static analyzer, have all the old complexity *and* all the new complexity, at least temporarily. Many thanks to Ted for writing and advising on the necessary changes to the static analyzer. I've xfailed a small diagnostics regression in the static analyzer at Ted's request. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143867 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExpr.cpp
emaExprObjC.cpp
emaPseudoObject.cpp
emaStmt.cpp
reeTransform.h
|
e71202efccdead44c8a3d4a2296d866d0e89799b |
04-Nov-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
In ARC, when applying an ownership to a non-objc pointer, instead of ignoring it create an attributed type with same type as the original type. We effectively retain the source info that an ownership attribute was present but the attribute is ignored by not modifying the type that it was applied to. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143736 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
03ea52f9f0f6fc796ecae5b568a7be489438269b |
04-Nov-2011 |
Devang Patel <dpatel@apple.com> |
Revert r143551. It is causing g++.dg/template/crash52.C test failure. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143725 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
3b25216a47681e7957c0e9ec37a3cf445ab24743 |
04-Nov-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc: fixed enum type is supported in objc mode. Fixes a bug where enumerator type is not this fixed type. // rdar://10381507 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143724 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
0d579b6a3f555c0e37e84e517c81eb9244fef099 |
04-Nov-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
In C++ keep unavailable function calls in the AST, like in C/ObjC. This allows the migrator to visit and fix them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143699 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
f3c02869a7a50ebdc963d0456fd075368b5b5a3f |
03-Nov-2011 |
Douglas Gregor <dgregor@apple.com> |
Extend IsSimplyAccessible to check for Objective-C instance variable accessibility. Fixes <rdar://problem/3727335>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143635 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
a885dce496f2a9e30650f74607efe11856a76a34 |
03-Nov-2011 |
Douglas Gregor <dgregor@apple.com> |
Class can't be null in this context git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143618 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
17015eff2b3166e445377b15913474b472775e7c |
03-Nov-2011 |
Douglas Gregor <dgregor@apple.com> |
Refactor Sema::IsSimplyAccessible slightly, to work on a DeclContext rather than a class git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143615 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaCodeComplete.cpp
|
fb35e8f497d180e562e2e1bd8cd4b756b2d4a846 |
03-Nov-2011 |
Douglas Gregor <dgregor@apple.com> |
When we're checking a friend function template in an out-of-line class definition, we may not have a scope corresponding to the namespace where that friend function template actually lives. Work around this issue by faking up a scope with the appropriate DeclContext. This is a bit of a hack, but it fixes <rdar://problem/10204947>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143614 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplate.cpp
|
25270b6e6a8416b7532cfe552b41794418ea19b1 |
03-Nov-2011 |
Douglas Gregor <dgregor@apple.com> |
Add a printing policy flag to suppress printing "<anonymous>::" prior to types. Enable this flag for code completion, where knowing whether something is in an anonymous or inline namespace is actually not useful, since you don't have to type it anyway. Fixes <rdar://problem/10208818>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143599 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
ddb21473ef1ff20b3abf7ba3cd6cb29acbd5cf06 |
03-Nov-2011 |
Douglas Gregor <dgregor@apple.com> |
Don't build member initializers for zero-length or incomplete arrays, and don't try to destroy them, either. Fixes <rdar://problem/10228639>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143584 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
c637d738897b1745af3bad7fc551f26b98da838c |
02-Nov-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
back out changes in r143399 and r143475. rvale-references are captured by reference in blocks. // rdar://9971124. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143583 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
21a25167b8279df3d8f889d041a4fd98733d3c27 |
02-Nov-2011 |
Douglas Gregor <dgregor@apple.com> |
Fix various minor issues find via unreachable code warnings, from Ahmed Charles! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143569 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
0b1beb7a295b20f7e05479d599dde027f9f692fe |
02-Nov-2011 |
Douglas Gregor <dgregor@apple.com> |
Drastically simplify the mapping from the declaration corresponding to the injected-class-name of a class (or class template) to the declaration that results from substituting the given template arguments. Previously, we would actually perform a substitution into the injected-class-name type and then retrieve the resulting declaration. However, in certain, rare circumstances involving deeply-nested member templates, we would get the wrong substitution arguments. This new approach just matches up the declaration with a declaration that's part of the current context (or one of its parents), which will either be an instantiation (during template instantiation) or the declaration itself (during the definition of the template). This is both more efficient (we're avoiding a substitution) and more correct (we can't get the template arguments wrong in the member-template case). Fixes <rdar://problem/9676205>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143551 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
48a98c7a8467a9570d2fc7f2aab7f5273a3e218e |
02-Nov-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc: warn if a readonly property has a setter attribute too. // rdar://10357768 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143518 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
5d8419c12a1ffaf710fa11fb1091f10f03f2c1dc |
01-Nov-2011 |
Douglas Gregor <dgregor@apple.com> |
When we run into a constructor or destructor that is defined in the wrong class, make sure to drop it immediately; we don't want that constructor to be available within the DeclContext. Fixes <rdar://problem/9677163>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143506 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
ea9f54aefc0cbf963df8b79028775a39bcf7393f |
01-Nov-2011 |
Douglas Gregor <dgregor@apple.com> |
When we see an out-of-line definition of a member class template that does not match any declaration in the class (or class template), be sure to mark it as invalid. Fixes PR10924 / <rdar://problem/10119422>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143504 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
0505321691aa39105ecd2f92bb64cdaa932fbf08 |
01-Nov-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Find copy constructor needed to copy an rvalue reference c++ object into block descriptor. // rdar://9971124 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143475 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
2eb0ce3610a877f75e95c66d6c2bff315e127009 |
01-Nov-2011 |
Matt Beaumont-Gay <matthewbg@google.com> |
Silence a warning in -Asserts builds git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143471 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
0bfaf067c294bc4064c2f1aee0bc1c51e861ac65 |
01-Nov-2011 |
Ted Kremenek <kremenek@apple.com> |
Downgrade err_iboutlet_object_type to a warning. It was breaking a bunch of code. We will reconsider promoting it back to an error later. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143470 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
cc7a6484d8afd6f8bede2757666c42248228e408 |
01-Nov-2011 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Enable function call and some overload resolution with parameters of aggregate class type and initializer list arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143462 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaOverload.cpp
|
64f45a24b19eb89ff88f7c3ff0df9be8e861ac97 |
01-Nov-2011 |
Eli Friedman <eli.friedman@gmail.com> |
Fix the representation of wide strings in the AST and IR so that it uses the native representation of integers for the elements. This fixes a bunch of nastiness involving treating wide strings as a series of bytes. Patch by Seth Cantrell. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143417 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
76852c218a207ef43583515cb835b6e855353a0f |
01-Nov-2011 |
Douglas Gregor <dgregor@apple.com> |
Rework the AST for the initializer of a delegating constructor, so that it retains source location information for the type. Aside from general goodness (being able to walk the types described in that information), we now have a proper representation for dependent delegating constructors. Fixes PR10457 (for real). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143410 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
|
7a420df78dd207d505b0c05d5f4b12a627b8b994 |
31-Oct-2011 |
Eli Friedman <eli.friedman@gmail.com> |
Add missing lvalue-to-rvalue conversion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143364 91177308-0d34-0410-b5e6-96231b3b80d8
emaCast.cpp
|
0216df8fd3ce58f5a68ef2ab141ea34c96c11164 |
29-Oct-2011 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Fixed FriendDecl source locations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143295 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
|
51f4708c00110940ca3f337961915f2ca1668375 |
29-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Rename Expr::Evaluate to Expr::EvaluateAsRValue to make it clear that it will implicitly perform an lvalue-to-rvalue conversion if used on an lvalue expression. Also improve the documentation of Expr::Evaluate* to indicate which of them will accept expressions with side-effects. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143263 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDecl.cpp
emaExpr.cpp
emaInit.cpp
emaStmt.cpp
emaType.cpp
|
fc2eff57d7497578e8f08a5ee520ad3886a51186 |
29-Oct-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc-arc: desugar certain type and improve on diagnostic for ownership qualifier cast which won't work. // rdar://10244607 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143258 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
6ee54925f709176a33aab4727bc35bea2d05aca4 |
29-Oct-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[ARC] Do not transfer ARC ownership if the cast is going to result in r-value, in which case the ownership is redundant. Thanks to John for the suggestion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143240 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
6d09f01af70bbd58ddbccb0a22f5479782b31797 |
28-Oct-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c arc: type-casting of an objc pointer to an rvalue retainable object type with life-time qualifier has no effect and wil be diagnosed as error. // rdar://10244607 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143219 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
aa9807a85959ffbdc5d9f649d7b24b9b2056d2cd |
28-Oct-2011 |
Benjamin Kramer <benny.kra@googlemail.com> |
Reflow code. No intended functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143192 91177308-0d34-0410-b5e6-96231b3b80d8
emaPseudoObject.cpp
|
9c129f818038e0269ba6b095722aa70176dc321d |
28-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Add (hopefully) the last missing lvalue-to-rvalue conversion. Add an assertion to catch some future implicit lvalue-to-rvalue casts of inappropriate kinds. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143182 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaExpr.cpp
|
ac51650d054c2eaada48d54dba52c08153d2daed |
28-Oct-2011 |
John McCall <rjmccall@apple.com> |
Be sure to build a dependent expression when we see a binary operator involving a dependently-typed overload set. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143172 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
55733de16f492dadbf5f4d2809d6c610ba6d86ae |
28-Oct-2011 |
Richard Trieu <rtrieu@google.com> |
Fix for PR9751 to change the behavior of -Wformat warnings. If the format string is part of the function call, then there is no difference. If the format string is not, the warning will point to the call site and a note will point to where the format string is. Fix-it hints for strings are moved to the note if a note is emitted. This will prevent changes to format strings that may be used in multiple places. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143168 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
61ffd09797d661ae4ae18674d144a27be2d2f5f3 |
28-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Add missing lvalue-to-rvalue conversion to vector splat casts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143166 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
4f87062cb411d5a31cf39f1ac576bba4123930f2 |
28-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix some cases where a CK_IntegralCast was being used to convert an lvalue to an rvalue. An assertion to catch this is in ImpCastExprToType will follow, but vector operations currently trip over this (due to omitting the usual arithmetic conversions). Also add an assert to catch missing lvalue-to-rvalue conversions on the LHS of ->. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143155 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprMember.cpp
emaStmt.cpp
emaTemplate.cpp
|
9c1ba407188fbb702e944fff66c30f21bdf99f8e |
27-Oct-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc: fix an ir-gen crash caused by recent property refactoring. // rdar://10327068 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143139 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
eee242ff426bf79149f221798966e58688383c1e |
27-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
Make the loading of information attached to an IdentifierInfo from an AST file more lazy, so that we don't eagerly load that information for all known identifiers each time a new AST file is loaded. The eager reloading made some sense in the context of precompiled headers, since very few identifiers were defined before PCH load time. With modules, however, a huge amount of code can get parsed before we see an @import, so laziness becomes important here. The approach taken to make this information lazy is fairly simple: when we load a new AST file, we mark all of the existing identifiers as being out-of-date. Whenever we want to access information that may come from an AST (e.g., whether the identifier has a macro definition, or what top-level declarations have that name), we check the out-of-date bit and, if it's set, ask the AST reader to update the IdentifierInfo from the AST files. The update is a merge, and we now take care to merge declarations before/after imports with declarations from multiple imports. The results of this optimization are fairly dramatic. On a small application that brings in 14 non-trivial modules, this takes modules from being > 3x slower than a "perfect" PCH file down to 30% slower for a full rebuild. A partial rebuild (where the PCH file or modules can be re-used) is down to 7% slower. Making the PCH file just a little imperfect (e.g., adding two smallish modules used by a bunch of .m files that aren't in the PCH file) tips the scales in favor of the modules approach, with 24% faster partial rebuilds. This is just a first step; the lazy scheme could possibly be improved by adding versioning, so we don't search into modules we already searched. Moreover, we'll need similar lazy schemes for all of the other lookup data structures, such as DeclContexts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143100 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
ema.cpp
emaDecl.cpp
|
4a7dc8a54b8c35c523e44f7711c9923f5463f43b |
27-Oct-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Make use of the parameter in Sema::ActOnObjCTemporaryExitContainerContext. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143088 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
458bacff986ed8d30e7ae191c823d4db6cfaf16b |
27-Oct-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Fix crash on an @interface nested inside @implementation, rdar://10336158 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143085 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
1104d9b305e5cee1b2d915cd57520d02d3107781 |
27-Oct-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
For the "'@end' is missing in implementation context" point at the location of '@'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143084 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
90eed219f4215adf300800ab7478f568c7a4b2a3 |
27-Oct-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Do not warn when weak-import attribute is applied to enum decl. in Darwin due to certain projects requirement. // rdar://10277579 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143082 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
9138b4e96429cbaae00c52c15c960f72b6645088 |
26-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Pull out conversion on LHS of -> and . into its own function. This happens implicitly in LookupMemberExpr and explicitly in cases where template instantiation doesn't redo the lookup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143046 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprMember.cpp
reeTransform.h
|
3bfb571bd4af9303781c40306a06bf70fe51fa75 |
26-Oct-2011 |
Eli Friedman <eli.friedman@gmail.com> |
Compute the promoted integer type of fixed-width enums correctly. Found by inspection. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143021 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f1f6d85694fcf772f6d602fd9709318b08b96328 |
26-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix crash due to missing array-to-pointer decay when instantiating an unresolved member expression. Refactoring to follow. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143017 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
601d2ee8dd783503f9d556e1ed3b107abf196a1e |
26-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
UnresolvedMemberExprs need lvalue-to-rvalue conversions during template instantiations too. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143016 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
3c3b7f90a863af43fa63043d396553ecf205351c |
25-Oct-2011 |
John McCall <rjmccall@apple.com> |
Restore r142914 and r142915, now with missing file and apparent GCC compiler workaround. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142931 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
emaChecking.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprMember.cpp
emaExprObjC.cpp
emaInit.cpp
emaObjCProperty.cpp
emaOverload.cpp
emaPseudoObject.cpp
emaStmt.cpp
reeTransform.h
|
327a50f46449c946c42d50d97689bcb30e2af7d9 |
25-Oct-2011 |
NAKAMURA Takumi <geek4civic@gmail.com> |
Revert r142914 and r142915, due to possibly missing file. r142914: "Introduce a placeholder type for "pseudo object"" r142915: "Pull the pseudo-object stuff into its own file." git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142921 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
emaChecking.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprMember.cpp
emaExprObjC.cpp
emaInit.cpp
emaObjCProperty.cpp
emaOverload.cpp
emaStmt.cpp
reeTransform.h
|
8628862a5f3fc739dbaa759599851d0aec3822ca |
25-Oct-2011 |
John McCall <rjmccall@apple.com> |
Pull the pseudo-object stuff into its own file. Tidy up some marginally related code just to annoy single-purpose-commit lovers. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142915 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
emaExpr.cpp
|
a1b852f8e1bee5ed3604ee483803cef39ce57a20 |
25-Oct-2011 |
John McCall <rjmccall@apple.com> |
Introduce a placeholder type for "pseudo object" expressions: expressions which refer to a logical rather than a physical l-value, where the logical object is actually accessed via custom getter/setter code. A subsequent patch will generalize the AST for these so that arbitrary "implementing" sub-expressions can be provided. Right now the only client is ObjC properties, but this should be generalizable to similar language features, e.g. Managed C++'s __property methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142914 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprMember.cpp
emaExprObjC.cpp
emaInit.cpp
emaObjCProperty.cpp
emaOverload.cpp
emaStmt.cpp
reeTransform.h
|
a01c71191c93691e592c030cc48764e52272eea5 |
25-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Don't forget the lvalue-to-rvalue conversion on the LHS when instantiating a dependent ->, where the member being referred to is an anonymous struct or union. This path was missed by the fix in r142890. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142910 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
65019acfc46ffb191fac4e781ac0c4b8d0c8434e |
25-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
Check for unexpanded parameter packs in the name that guards a Microsoft __if_exists/__if_not_exists statement. Also note that we weren't traversing DeclarationNameInfo *at all* within the RecursiveASTVisitor, which would be rather fatal for variadic templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142906 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaTemplate.cpp
emaTemplateVariadic.cpp
reeTransform.h
|
ba0513de93d2fab6db5ab30b6927209fcc883078 |
25-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement support for dependent Microsoft __if_exists/__if_not_exists statements. As noted in the documentation for the AST node, the semantics of __if_exists/__if_not_exists are somewhat different from the way Visual C++ implements them, because our parsed-template representation can't accommodate VC++ semantics without serious contortions. Hopefully this implementation is "good enough". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142901 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaStmt.cpp
reeTransform.h
|
97f9fe06e7acd55d7d9075a41e33f54855c75eae |
25-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Don't forget the lvalue-to-rvalue conversion on the LHS of an -> when rebuilding it during template instantiation, for a known RHS decl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142890 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
3896fc5d4daaf003e451e797e37de57dd8cf9cd5 |
25-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
Rework Microsoft __if_exists/__if_not_exists parsing and semantic analysis to separate dependent names from non-dependent names. For dependent names, we'll behave differently from Visual C++: - For __if_exists/__if_not_exists at class scope, we'll just warn and then ignore them. - For __if_exists/__if_not_exists in statements, we'll treat the inner statement as a compound statement, which we only instantiate in templates where the dependent name (after instantiation) exists. This behavior is different from VC++, but it's as close as we can get without encroaching ridiculousness. The latter part (dependent statements) is not yet implemented. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142864 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
3eafbb85d1d9d108f089fd2451ddb6932eaafef2 |
25-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
When we perform a lookup for a dependent name that is a member of an unknown specialization, treat this the same way as if the name were not found in the current instantiation. No actual functionality change, since apparently nothing depends on this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142862 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
9158902bae11aec846edcf132a6dc29c834f197b |
24-Oct-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Minor refactoring of my last patch. Per Doug's suggestion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142807 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
1d26f48dc2eea1c07431ca1519d7034a21b9bcff |
24-Oct-2011 |
Ted Kremenek <kremenek@apple.com> |
Rename AnalysisContext to AnalysisDeclContext. Not only is this name more accurate, but it frees up the name AnalysisContext for other uses. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142782 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
0b64ba926752110cff1344a46b36e29396cc4d25 |
23-Oct-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
Fix grammar for C++11 alignment specifiers, and add a few FIXMEs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142760 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
fef2189421b89dad5582b6dd7561badd4224d974 |
23-Oct-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
Diagnose unexpanded parameter packs in member initialisers (including in-class member initialisers). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142758 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
dc69be23b1e8e02e831d192e479bd4881382cfc5 |
23-Oct-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
Clean up duplicated code in Sema::BuildMemInitializer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142757 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
05b21273ffb02ff5281817b175cedcc1008f819f |
23-Oct-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
Improve unexpanded parameter pack diagnostics by using UPPC_Initializer here. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142756 91177308-0d34-0410-b5e6-96231b3b80d8
ultiInitializer.cpp
|
0661bd0ccae381613c5967cdf2514255e1f92636 |
23-Oct-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
Attach class template attributes to the templated CXXRecordDecl, instead of silently discarding them. As a side effect, this improves diagnostics for constexpr class templates slightly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142755 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
b1b5daf30d2597e066936772bd206500232d7d65 |
23-Oct-2011 |
Ted Kremenek <kremenek@apple.com> |
[analyzer] Remove LocationContext creation methods from AnalysisManager, and change clients to use AnalysisContext instead. WIP to remove/reduce ExprEngine's usage of AnalysisManager. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142739 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
5e745da03df27ac620b0a5cc280d0d1757cfbac1 |
22-Oct-2011 |
Ted Kremenek <kremenek@apple.com> |
Only emit implicit constant conversion truncation warnings in reachable code. Apparently this is what GCC does, and some code depends on this. Fixes <rdar://problem/10321089>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142716 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
ee28a4be624c875e1a3ad08e84f17841117897a1 |
22-Oct-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Fixes a minor hick up to my last patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142711 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
fe6bd6dc51777802a0118521b9039981a0e6a806 |
21-Oct-2011 |
Logan Chien <loganchien@google.com> |
Apply changes to migrate to upstream Oct 20th 2011 (r142531) Change-Id: I32cdb5da2c07c84e01f42b4e87161196f468806a
ndroid.mk
|
00a92abaf907802bfa4d6f38bdd242c6bfc34c09 |
21-Oct-2011 |
Logan Chien <loganchien@google.com> |
Merge with clang upstream Oct 20th 2011 (r142531) Change-Id: I42181113f38ce445f2a48694d6f654438562b71e
|
7fda400103a5ae21fdc5f31b07c69cf60737cb29 |
22-Oct-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc: private methods can have their attributes, no diagnostic is required. None private methods if their implementation have attribute, they must exactly match those in their declarations. // rdar://10271563 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142709 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
21f77cd0c3da8a1dbaf6245cae43baf4c0b80ea4 |
22-Oct-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Don't try to set the "array filler" in a InitListExpr twice. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142695 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
13c7fcceb9fd96f5be03af038ce16b05bb5e9598 |
22-Oct-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
c++: support gcc's application of weak attribute on class declaration which forces any such class and any class that inherits from such a class to have their typeinfo symbols be marked as weak. // rdar://10246395 A test/CodeGenCXX/weak-extern-typeinfo.cpp M lib/Sema/SemaDeclCXX.cpp M lib/Sema/SemaDeclAttr.cpp M lib/CodeGen/CGRTTI.cpp git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142693 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaDeclCXX.cpp
|
f1ac63702143d84db778d32eb185a77fc97db5f5 |
21-Oct-2011 |
DeLesley Hutchins <delesley@google.com> |
Thread safety analysis refactoring: invalid lock expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142666 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
3ff86f79090a1f9317b2d9ac1a95a696701feb71 |
21-Oct-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c: Diagnose redeclaration of private ivars in class extensions. // rdar://10309454 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142664 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
95e5510ee07c465abdcc458fabfd93cf09d90125 |
21-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
When performing name lookup for the previous declaration of a field, be sure to consider all of the possible lookup results. We were assert()'ing (but behaving correctly) for unresolved values. Fixes PR11134 / <rdar://problem/10290422>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142652 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
7a8a2e3c7ff283bc98b5292b6a579d4fca63e36b |
21-Oct-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
Permit auto SCS on parameter declarations, C++03 [dcl.stc]p2 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142649 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
0e9e9814a7f8313c0c02b6afea71f0e4c411873e |
20-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Add -Wc++98-compat diagnostics for jumps which bypass initialization of non-POD but trivially constructible and destructible variables in C++11 mode. Also incidentally improve the precision of the wording for jump diagnostics in C++98 mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142619 91177308-0d34-0410-b5e6-96231b3b80d8
umpDiagnostics.cpp
emaDecl.cpp
|
ef47d27b9c76ed2f20e6c342e66b5450ef7e96ee |
20-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
When fixing up the storage class for an anonymous union, don't mark the anonymous union as valid: our fixes have Fix-Its. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142616 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
cb8f951deacd251d9b3a73dc65f341477e039de1 |
20-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
There's no point in marking a declaration invalid just because it shadows a template parameter. Complain about the shadowing (or not, under -fms-extensions), but don't invalidate the declaration. Merely forget about the template parameter declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142596 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaTemplate.cpp
|
8e0c118cb6c22c448ce502f3e00d01630192f095 |
20-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
Diagnose class template (partial) specializations that occur in the *wrong* class scope. This is one of the problems behind <rdar://problem/9676205>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142588 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
ba4ee9a9b6e4cffc12bb6b395a58b89c189bb07e |
20-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
When we parse something that looks like a templated friend tag but actually just has an extraneous 'template<>' header, strip off the 'template<>' header and treat it as a normal friend tag. Fixes PR10660 / <rdar://problem/9958322>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142587 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
95aafb2453e1fecec8dcfd9e125cd78277f45859 |
20-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Add -Wc++98-compat warning for enumerations in nested name specifiers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142568 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
reeTransform.h
|
82c8ca1eeba6ccdf34916803150df369df3b7ae5 |
20-Oct-2011 |
David Blaikie <dblaikie@gmail.com> |
FixIt insert 'static' for anonymous unions at global or namespace scope. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142566 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f6f876cb08449febc43a6baf7720b256846d01dc |
20-Oct-2011 |
David Blaikie <dblaikie@gmail.com> |
Add a fixit to remove storage specifiers on anonymous enums. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142565 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d662a79f32b1c17dbb5aafcf5f939ca57360d7aa |
20-Oct-2011 |
David Blaikie <dblaikie@gmail.com> |
80 cols (one I created in my last commit, plus a bunch of others that were already there) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142552 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
2b79c320b0801e0094df6c70ad8062da6c58bd1c |
20-Oct-2011 |
David Blaikie <dblaikie@gmail.com> |
Don't provide errors for anonymous unions when they're actually anonymous classes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142551 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
e7d7c39be90bf654a8da0f53f6682d965426d081 |
19-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
-Wc++98-compat: warn on nontrivial types used in unions and anonymous structs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142541 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
0d381810da19dd7677b9a79fca516d298fa5addb |
19-Oct-2011 |
Matt Beaumont-Gay <matthewbg@google.com> |
Only warn at self-initialization if some later use is always uninitialized. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142538 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
83da2e711902c4c54f5601c9000d646dfff06aea |
19-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
-Wc++98-compat: diagnose if a reference is bound to a prvalue which does not have an unambiguous accessible copying constructor; this is ill-formed in C++98. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142533 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
43f5103f8051bbac19022e6edaf7d9138b0f3c0f |
19-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
Improve the warning for cv-qualifiers on free functions, from Ahmed Charles! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142478 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
emaDecl.cpp
emaType.cpp
|
1368e58ae0eb3d92df9fa5538349b6adf6448d15 |
19-Oct-2011 |
David Blaikie <dblaikie@gmail.com> |
Fix pr9789, assert-on-invalid while instantiating an (invalid) class template with a non-final parameter pack. Also improve the warning for non-final parameter packs in this scenario so it only fires once, rather than once for every template parameter after the non-final parameter pack. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142473 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
7c81c2a5915878e4aa6908a097290fd47fb3a154 |
19-Oct-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Don't forget to complete the objc interface before asking for information, otherwise lldb will suffer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142471 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
53e535161dfa9850de394b300915fc250eb0fdf4 |
19-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Add a -Wc++98-compat warning for friend functions of class templates which would be implicitly instantiated (resulting in a redefinition) in C++98. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142468 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
013e5ce167d72b3617951002f8aea5ff79a37d72 |
19-Oct-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
Move static array parameter checks to SemaExpr, per Doug's request git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142465 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExpr.cpp
|
77faa365cb2322cfc8edf58a4f5d68f2370cc39a |
19-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
-Wc++98-compat: warn if a SFINAE substitution in C++11 suppresses an access control diagnostic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142463 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
6b13022faef260c8f49d04310f4a2c0a57f9103b |
18-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
-Wc++98-compat and -Wc++98-compat-pedantic warnings for Sema, part 2. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142426 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
emaDeclCXX.cpp
emaInit.cpp
|
8ca7208d0fb4dcbc5fa8cfeca6a1081ce69da8e0 |
18-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
Provide result types for code completions that describe built-in expressions (this, sizeof, etc.). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142424 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
e0a22d06888c13989b3f72db319f1d498bf69153 |
18-Oct-2011 |
John McCall <rjmccall@apple.com> |
Macro metaprogramming for builtin types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142420 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ebaf0e6ab743394dda086a01b457838cb6e589a8 |
18-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
-Wc++98-compat and -Wc++98-compat-pedantic warnings for Sema, part 1. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142419 91177308-0d34-0410-b5e6-96231b3b80d8
emaCast.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaTemplate.cpp
emaType.cpp
|
f4072ae44b70a7ac234c47c146157fee75437e38 |
18-Oct-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc: more changes in use of IBOutletCollection attribute. 'Class' is disallowed as argument. If the argument is missing, NSObject is assumed. // rdar://10296078 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142409 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
b98ffded10453d80369951f33f3892f35d747c95 |
18-Oct-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Set the objc "property attributes as written" for extension properties as well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142406 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
f106f0ee3ba0c81d4c56f7935f518da53d78c08e |
18-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
In C++11, a class's members are allowed to be nominated as friends. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142393 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
341350ee62abd1ad818e1e3d926cd718960e439b |
18-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
Make it possible to compute the type of 'this' without capturing it. Refactoring to be used in a moment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142360 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaExprMember.cpp
|
a50216cdd5c4102b051d5837c239ec0bb5bde6e5 |
18-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
Add code completions for C++0x expressions git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142357 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
a7da2155167676a6a5d9fca4de947a9cab2a4908 |
18-Oct-2011 |
Hans Wennborg <hans@hanshq.net> |
Suggest %zu for size_t args to printf. For PR11152. Make PrintSpecifier::fixType() suggest "%zu" for size_t, etc. rather than looking at the underlying type and suggesting "%llu" or other platform-specific length modifiers. Applies to C99 and C++11. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142342 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
ee1c68a0d9de322424b368b9e6dc58fa3daefceb |
18-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
Don't format the code completion for parameters of block literal arguments as block literal arguments; the block literal argument code completion should only go one level deep. Fixes <rdar://problem/10291294>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142335 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
2dc7ece8a83f371cb86c2f93282cb3c8e2d010ec |
18-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Add -Wc++11-compat warning for an inline specifier on an explicit instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142333 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
4e8ea0b2e163aa9681e2f14ad75ab4990a69d39b |
18-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
When transforming the arguments for a C++ "new" expression, make sure to drop the implicitly-generated value initialization expression used for initializing scalars. Fixes <rdar://problem/10283928>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142330 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
3e2e91e934ecf083a7c0835b58d9627ca2faddc9 |
18-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Refactor the checking for explicit template instantiations being performed in the right namespace in C++11 mode. Teach the code to prefer the 'must be in precisely this namespace' diagnostic whenever that's true, and fix a defect which resulted in the -Wc++11-compat warning in C++98 mode sometimes being omitted. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142329 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
ea0114313fbfba99f7067a2464c523e96a08e365 |
18-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Perform lvalue-to-rvalue conversions on __builtin_offsetof array argument index before typechecking, as suggested by John. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142308 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
841804baff6ea8ba1904a2ba81265aae1479e882 |
18-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Add -Wc++98-compat warnings for uses of the new keywords 'alignof', 'char16_t', 'char32_t', 'constexpr', 'decltype', 'noexcept', 'nullptr' and 'static_assert'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142302 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
|
6ec96438ede86b1a00f80dff25027f5a876613a8 |
17-Oct-2011 |
Tanya Lattner <tonic@nondot.org> |
The comparison of two vectors should return a signed result. hasIntegerRepresentation() used to always return false for vectors, but since it was changed, it also changed the return type of a compare of two unsigned vectors to be unsigned. This patch removes the check for hasIntegerRepresentation since its not needed and returns the appropriate signed type. I added a new test case and updated exisiting test cases that assumed an unsigned result. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142250 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
d12505054130b24f7696440efdbd1aa660feb6f3 |
17-Oct-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
obj-c++: Fix a IRGen crash when getter is a reference type. Fix is in Sema. // rdar://10153365 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142249 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprMember.cpp
|
e75ce16b4afd7f8a06f25c06bc47952b8bc1210d |
17-Oct-2011 |
Eli Friedman <eli.friedman@gmail.com> |
Add missing case to switch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142246 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
88a4cfde0e0efefc40fbce3ae2c96191132218a8 |
17-Oct-2011 |
John McCall <rjmccall@apple.com> |
Strip qualifiers off the type of an implicit property defined by only a setter. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142236 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
b4a686df4de21ec4eeca69211b21f7fe716abeae |
17-Oct-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Introduce ASTConsumer::HandleTopLevelDeclInObjCContainer which accepts top-level declarations that occurred inside an ObjC container. This is useful to keep track of such decls otherwise when e.g. a function is declared inside an objc interface, it is not passed to HandleTopLevelDecl and it is not inside the DeclContext of the interface that is returned. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142232 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
b05d7b20171bbd2feb14b059f39332cbe1bf1014 |
17-Oct-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Keep track when a ObjC interface/protocol was initially created as a forward reference. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142230 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
5acb0c98b363400f6ade0ae7250f0102224e806b |
17-Oct-2011 |
John McCall <rjmccall@apple.com> |
Teach the ARC compiler to not require __bridge casts when passing/receiving CF objects at +0 to/from Objective-C methods or audited C functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142219 91177308-0d34-0410-b5e6-96231b3b80d8
emaCast.cpp
emaExpr.cpp
emaExprObjC.cpp
emaInit.cpp
emaOverload.cpp
|
4919dfd54e2296ca997e3d1c9dab85976bba8e95 |
17-Oct-2011 |
John McCall <rjmccall@apple.com> |
Add a helper function for determining whether an expression has placeholder type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142203 91177308-0d34-0410-b5e6-96231b3b80d8
emaCast.cpp
|
c046f30721fbb950f28faf9faa9a050f1fcc9bec |
17-Oct-2011 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Revert r142142: "Make a C-style cast a const-cast, to suppress a GCC warning." Richard already fixed the underlying issue, so the cast was superfluous. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142192 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
aa93a875605536d72a10359a0098396192b7d4ec |
17-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
For modules, all macros that aren't include guards are implicitly public. Add a __private_macro__ directive to hide a macro, similar to the __module_private__ declaration specifier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142188 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
d82e5d30930f80a92c1270e270fdb475e3718d25 |
17-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Perform an lvalue-to-rvalue conversion on an array index in a __builtin_offsetof expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142179 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
909c5553afb68743cf793dd7d5d82bdf5fa0bba7 |
17-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Slightly simplify a constant expression check. No functional change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142167 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
20cdbeb8f36576f469db195b4140c293c7281718 |
16-Oct-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
Add sema checks for calls to functions taking static array parameters git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142157 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaType.cpp
|
5405b817e2e56b8d37faee7ddfe4c05c16339562 |
16-Oct-2011 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implement overload resolution from init lists for scalar parameter types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142148 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
c223518ebf72e1709dc8938cd9384161ea5ec0bb |
16-Oct-2011 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Diagnose when omitting braces in direct list-initialization in C++0x. This also applies to C99-style aggregate literals, should they be used in C++11, since they are effectively identical to constructor call list-initialization syntax. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142147 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
3ff5c86d409a55d0e64a28c07197ee3e791166c2 |
16-Oct-2011 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
In the verify-only pass, check that items that don't have an initializer in an init list can be value-initialized, at least when designated initializers are not involved. No test case yet, since early failures cannot be distinguished from late failures until overload resolution works. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142146 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
28bdb141f3cf004b3fe963990b17f4cca3a8710c |
16-Oct-2011 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Check for unavailable declarations in Sema::CanUseDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142145 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
091fffeed8971a577bc3c8057c1ec40015a22775 |
16-Oct-2011 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Drop the Diagnose parameter from Sema::PerformImplicitConversion again and instead use TryImplicitConversion in CheckSingleAssignmentConstraints when that function is in no-diagnostics mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142143 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaOverload.cpp
|
68ff8d627e19f37601e28f5218212ca715bac842 |
16-Oct-2011 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Make a C-style cast a const-cast, to suppress a GCC warning. I should fix the underlying issue eventually, but this interface will probably change anyway. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142142 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
43bcdb2d4d8390aec89e75f4d232b1fb218a59c5 |
15-Oct-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Avoid duplicate unavailbility diagnostics in objc++. // rdar://10268422 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142078 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
bb13c320fff4bc4b3536e62626c97d7b055c6113 |
15-Oct-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
obj-c++: allow the getter/setter to return/take parameters by reference. // rdar://10188258 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142075 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaObjCProperty.cpp
|
0aa86c0463a881be85fd34e04c7de3379997621d |
15-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Add -Wc++98-compat warning for deduced 'auto' type specifier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142057 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
aa4a99b4a62615db243f7a5c433169f2fc704420 |
15-Oct-2011 |
Anton Korobeynikov <asl@math.spbu.ru> |
Provide half floating point support as a storage only type. Lack of half FP was a regression compared to llvm-gcc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142016 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
emaDecl.cpp
emaExpr.cpp
emaExprCXX.cpp
emaOverload.cpp
emaTemplateVariadic.cpp
emaType.cpp
|
ce1846e4ed7cec16518894073f7642a9b1a48004 |
15-Oct-2011 |
Eli Friedman <eli.friedman@gmail.com> |
Attempt to fix Windows buildbot, round 2. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142014 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
dfa64ba45922e1c28e36341bdf34785fea74659b |
15-Oct-2011 |
Eli Friedman <eli.friedman@gmail.com> |
Add template instantiation support for AtomicExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142012 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
reeTransform.h
|
1c522f7c35ced263528896705cbeddf0aac30a19 |
14-Oct-2011 |
Eli Friedman <eli.friedman@gmail.com> |
Attempt to fix buildbot failure on Windows. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142008 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
b8e778da8545624826440366a709d555332ffc73 |
14-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
Don't try to diagnose anything when we're passing incomplete types through varargs. This only happens when we're in an unevaluated context, where we don't want to trigger an error anyway. Fixes PR11131 / <rdar://problem/10288375>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141986 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e5acd13f885ac95d0f2dafda245625b8190235ac |
14-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Reinstate r141898 (reverted in r141921), without the -Wc++98-compat-variadic-templates flag. Consensus is that -Wc++98-compat is a useful addition to clang, but per-C++11-feature warnings may not be. Original patch by Jeffrey Yasskin. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141985 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
fe6f64846b8714b2951d9ea80fc40a3e020f3920 |
14-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
[temp.explicit]p1: constexpr cannot be specified in explicit instantiations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141982 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
b8989f27f116ff2400e92a52c067a69846119eb5 |
14-Oct-2011 |
Benjamin Kramer <benny.kra@googlemail.com> |
Change operator<< for raw_ostream and NamedDecl to take a reference instead of a pointer. Passing a pointer was a bad idea as it collides with the overload for void*. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141971 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaInit.cpp
emaOverload.cpp
|
597cad65b8c67d930b4d8e787dd81a0ee7c1f3f6 |
14-Oct-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Fix misplaced comment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141967 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
2e8b97c5fa0fa9070fafce1bf56eef0c35cf114f |
14-Oct-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Make value kind based on the return type of the getter, not property type, for when getter may be a reference type. // rdar://10188258 revised. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141966 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
cb1c9c36b856ad24bd32ec673fb2490d9770ab5f |
14-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
Under ARC, merge the bit corresponding to the ns_returns_retained attribute from the first declaration to later declarations. Fixes <rdar://problem/10142572>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141957 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
9ce6377714a8eb8f577c87028300421e72b00dc9 |
14-Oct-2011 |
Matt Beaumont-Gay <matthewbg@google.com> |
Only warn in -Wliteral-conversion if the conversion loses information git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141955 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
2060650f2743650a815ce3daa414352911d408fd |
14-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
When declaring an out-of-line template, attempt to rebuild any types within the template parameter list that may have changed now that we know the current instantiation. Fixes <rdar://problem/10194295>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141954 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplate.cpp
|
6164ea1d75385b6fc3c19e5ab9bb686298436a5a |
14-Oct-2011 |
Erik Verbruggen <erikjv@me.com> |
Added clang_getCompletionAnnotation and clang_getCompletionNumAnnotations to retrieve annotations from completion string. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141953 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
|
3a919e7110407ae7609bb6edc57aac16a5990661 |
14-Oct-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Really protect from infinite loop when there are objc method redeclarations. Serialization part will come later. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141950 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
b40034c2e580ab3b08de9dfb738d8e5d8ef79136 |
14-Oct-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Keep track of objc method redeclarations in the same interface. Avoid possible infinite loop when iterating over an ObjCMethod's redeclarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141946 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
f38eaa4748ee6164d5e36309fecef71765ff8b2b |
14-Oct-2011 |
Jeffrey Yasskin <jyasskin@google.com> |
Revert the -Wc++98-compat flag because dgregor doesn't like it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141921 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
5fa065b55bd622f20656e0de3b1f122951146784 |
14-Oct-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc-arc: 'Class' property is implicitly __unsafe_unretained. // rdar://10239594 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141915 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
cda57822327499aeb6fe606f9cf5903cffca3444 |
14-Oct-2011 |
Nico Weber <nicolasweber@gmx.de> |
Extend -Wno-sizeof-array-argument to strncpy and friends. This finds 2 bugs in chromium and 1 in hunspell, with 0 false positives. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141902 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
48a9d189bbc989369155195a4ce8c7e1c02ea02a |
14-Oct-2011 |
Jeffrey Yasskin <jyasskin@google.com> |
Implement the first piece of a -Wc++98-compat flag so that people can build in C++11 mode but keep their sources compatible with C++98. This patch implements the -Wc++98-compat-variadic-templates sub-flag and -Wc++98-compat to include it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141898 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
9e7617220135a6f6226cf09cb242cc1b905aedb4 |
13-Oct-2011 |
Ted Kremenek <kremenek@apple.com> |
Tweak -Wuninitialized's handling of 'int x = x' to report that as the root cause of an uninitialized variable IFF there are other uses of that uninitialized variable. Fixes <rdar://problem/9259237>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141881 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
64a371ff8d525880e519a43fc522cbdc79fc4a89 |
13-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
HasFormOfMemberPointer implies IsAddressOfOperand for an overload set. Simplify git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141878 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaExpr.cpp
|
ee697e69a2063b65bfd0534248e4848461aca3f4 |
13-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
Allow calling an overloaded function set by taking the address of the functions, e.g., (&f)(0). Fixes <rdar://problem/9803316>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141877 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaExpr.cpp
|
5f1c822def3efffe1d8f7299fbbbc3b1cdd4833d |
13-Oct-2011 |
Erik Verbruggen <erikjv@me.com> |
Allow for annotate attributes after access specifiers. When such attributes are found, propagate them to subsequent declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141861 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaDeclCXX.cpp
|
5fad9b8362c62e230f6603d86ec7d1747e74c737 |
12-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
When we determine that a function template specialization produced as part of template argument deduction is ill-formed, we mark it as invalid and treat it as a deduction failure. If we happen to find that specialization again, treat it as a deduction failure rather than silently building a call to the declaration. Fixes PR11117, a marvelous bug where deduction failed after creating an invalid specialization, causing overload resolution to pick a different candidate. Then we performed a similar overload resolution later, and happily picked the invalid specialization to call... resulting in a silent link failure. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141809 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
6700415542121e2cb7d867728046ffa21e402019 |
12-Oct-2011 |
Rafael Espindola <rafael.espindola@gmail.com> |
Add returns_twice to functions that are known to return twice. This implements the same behavior of gcc by keeping the attribute out of the function type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141803 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
920c9c1155c118ac40e5209d4b757b9f54186339 |
12-Oct-2011 |
Ted Kremenek <kremenek@apple.com> |
Fix typo in name of diagnostic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141793 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
d41679d6881d2b424d8b3600fc774308087735a7 |
12-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
Teach __has_nothrow_assign not to complain about access (GCC and EDG ignore access entirely for it) and not to crash on assignment operator templates. Fixes PR11110. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141777 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
5fa6a0422f12216d549d0f2991a29d5690634065 |
12-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
constexpr: don't consider class types with mutable members to be literal types. The standard doesn't allow this, but mutable constexpr variables break the semantics so badly that we can't reasonably accept them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141768 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
13546a871db44c707001f507a9edfd0d5bcc81b4 |
12-Oct-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc: note location of the previously declared property in the diagnostic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141745 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
6dbba4fc128e2e2f5b26be996392bd32c0707f13 |
12-Oct-2011 |
John McCall <rjmccall@apple.com> |
Catch placeholder types in DefaultLvalueConversion and DefaultFunctionArrayLvalueConversion. To prevent significant regression for should-this-be-a-call fixits, and to repair some such regression from the introduction of bound member placeholders, make those placeholder checks try to build calls appropriately. Harden the build-a-call logic while we're at it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141738 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaCast.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprMember.cpp
emaOverload.cpp
|
d8d3ced6f5d7fa55272194b7165a2321a3be31dc |
11-Oct-2011 |
John McCall <rjmccall@apple.com> |
Rename SemaCXXCast.cpp to SemaCast.cpp. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141686 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
emaCXXCast.cpp
emaCast.cpp
|
769bb2d0dbd173589747cc8e7428a66db3b2692e |
11-Oct-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Get rid of ShouldDeleteMoveConstructor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141650 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
c32d684d6c787b332a64c9013598d5ef668c4b45 |
11-Oct-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Consolidate copy constructor deletion into ShouldDeleteSpecialMember. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141645 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
276b061970939293f1abaf694bd3ef05b2cbda79 |
11-Oct-2011 |
Eli Friedman <eli.friedman@gmail.com> |
Initial implementation of __atomic_* (everything except __atomic_is_lock_free). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141632 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
reeTransform.h
|
f11dbe9676832e599e046b2ed0f132a6bb858e0a |
11-Oct-2011 |
Francois Pichet <pichet2000@gmail.com> |
[Microsoft] If -fms-compatibility, then downgrade missing typename error to warning at function prototype scope. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141630 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
fac9467d1676dc05761e12e41e13e01a3a3da52b |
11-Oct-2011 |
Kaelyn Uhrain <rikka@google.com> |
Add typo correction for type names. The main motivation was to do typo correction in C++ "new" statements, though picking it up in other places where type names are expected was pretty much a freebie. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141621 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f09ce394517f950e820623991bbb63d498329cfe |
11-Oct-2011 |
Kaelyn Uhrain <rikka@google.com> |
Clean up DiagnoseInvalidRedeclaration a bit git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141612 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d7e19ce8fbb9c6dfa2e634f36fd8f150c3268de2 |
11-Oct-2011 |
Kaelyn Uhrain <rikka@google.com> |
Move a couple chunks of ActOnFunctionDeclarator to separate functions git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141611 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
2c712f50cd56eaf3662989b556e9c6b1e8fcd11a |
11-Oct-2011 |
Kaelyn Uhrain <rikka@google.com> |
Move some bool flags out of function parameter lists. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141610 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
2afd76618ee35193172c764d25f1f0996765b5e7 |
11-Oct-2011 |
Kaelyn Uhrain <rikka@google.com> |
Only accept a typo correction if it doesn't trigger additional errors git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141609 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
b008012426d1b9b1ba401ad7bebf4d65bd469b92 |
11-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
Don't crash in Sema::IsSimplyAccessible if the declaration is not a C++ class member. Fixes PR11108. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141600 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
13e1bca90dc227e1e9c30900841f8bf976c0c83e |
11-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
When performing a user-defined conversion via a constructor, be sure to check whether the constructor is accessible. Fixes <rdar://problem/10202900>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141588 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
e50b01531afcb4afc40d27720afa09613ddcdfa2 |
11-Oct-2011 |
Ted Kremenek <kremenek@apple.com> |
Rework construction of CXXForRangeStmt not to recycle the same DeclRefExpr in multiple subexpressions. This breaks the tree structure of the AST and completely breaks the CFG invariants. Patch by Jim Goodnow II and reviewed by Richard Smith! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141586 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
9d1bbeab2475fe45a3d4cb8de6810bc3275f1dd7 |
10-Oct-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc: err on a property designated both atomic and nonatomic. // rdar://10260017 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141580 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
089e8939b7b3e72c32477e39df82f18e6a8f436e |
10-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
When substituting into a sizeof parameter pack expression in a context where we can't expand (i.e., multi-level substitution), be sure to substitute the pack with its level-reduced pack. Fixes PR10230. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141568 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
a6b8b2c09610b8bc4330e948ece8b940c2386406 |
10-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Constant expression evaluation refactoring: - Remodel Expr::EvaluateAsInt to behave like the other EvaluateAs* functions, and add Expr::EvaluateKnownConstInt to capture the current fold-or-assert behaviour. - Factor out evaluation of bitfield bit widths. - Fix a few places which would evaluate an expression twice: once to determine whether it is a constant expression, then again to get the value. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141561 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaInit.cpp
emaStmt.cpp
|
fcdd2cb2fdf35f806dd800b369fe0772a1c8c26c |
10-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
Don't suggest 'noreturn' for function template instantiations, because it might be wrong for other instantiations of the same function template. Fixes PR10801. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141559 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
1055393814ac989727aa7437a5f3c3c44b4f83e5 |
10-Oct-2011 |
Kaelyn Uhrain <rikka@google.com> |
Give nicer note when a member redeclaration has or lacks 'const' git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141555 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
36bc2c663f600e7c9dc1a800d36f16603ca3ea51 |
10-Oct-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc: Some refactoring of overriding method decl. code for future work. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141553 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
f8b6e1591b5c5085cf4dec8df657e32a68053b12 |
10-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
Don't analyze comparisons in type- or value-dependent subexpressions. Fixes PR10291. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141552 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
d61db33331c264d6361283602b248a7423040597 |
10-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
Per C++ [class.bit]p2, unnamed bit-fields are not members. Fixes PR10289. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141549 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaInit.cpp
|
6e4337556efa700d5b4dceac22fa0dfbd1cdee8f |
10-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
constexpr: Disable checking of constructor member initializer lists for constexpr constructor templates. Such checking is optional, and currently hard to get right since clang doesn't generate implicit member initializers until instantiation (even for non-dependent members). This is needed for clang to accept libstdc++ from g++4.6 in c++0x mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141547 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
5a706dc1b17f875c7fce20f1fbf9ca372be4c331 |
10-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
Don't complain about qualified property or ivar access when the qualifier itself is invalid. Crasher noticed by Fariborz. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141544 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprMember.cpp
|
d24c306e693a1013b233f062291e87d49fa8a580 |
10-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
When adding a direct initializer to a declaration, allow the initializer to update the type of the declaration. For example, this allows us to determine the size of an incomplete array from its initializer. Fixes PR10288. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141543 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
147545d698972cfd34ece30a5d55e8180784161e |
10-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
Parse the initializer for a class member after handling its declarator, so that the declarator is in scope for the initializer. Fixes PR9989. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141539 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
25aaff9cf8a66bc236e5ccaf6183d11c14674cd3 |
10-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
Always add the built-in overload candidates for operators &&, ||, and !. Fixes PR9865. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141537 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
e16da07474c376fbbeda2d4238cf35e2bd664d5a |
10-Oct-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Begin work consolidating ShouldDelete* functions. Begin with just default constructors. One note is that as a side effect of this, a conformance test was removed on the basis that this is almost certainly a defect as with most of union initialization. As it is, clang does not implement union initialization close to the standard as it's quite broken as written. I hope to write a paper addressing the issues eventually. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141528 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
883af83bd6f9b0b60b8c7a78b8682eb8ab40a4a8 |
10-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement the restrictions in C++ [class.friend]p6, which disallow defining a friend function with a qualified name or in a local class. Fixes PR9853. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141524 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
b5ae92f2f52df88ae14504d3a3f2bddb479829b6 |
10-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
Diagnose attempts to qualify the name of an instance variable or property in an Objective-C++ member access expression. Fixes PR9759. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141522 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprMember.cpp
|
6d0468b2d3aa37c699b697922cd991ae83b64a87 |
10-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
Push "out-of-line" declarations into scope when their lexical/semantic redeclaration contexts are the same, as occurs within linkage specifications. Fixes PR9162. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141521 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
ac57f0b9097e04f70a631549383a2944f74ad844 |
10-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
The effective context of a friend function is its lexical context. Fixes PR9103. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141520 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
6c73a2975ba9112787380abd878876336957b3f6 |
10-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
For the various CF and NS attributes, don't complain if the parameter or return types are dependent. Fixes PR9049. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141518 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
d8f5b333f96b4e8018ff3a0d0db62d9e78eb6bdd |
10-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
Per the note in C++0x [temp.deduct.call]p4, don't attempt template argument deduction against a function parameter that has no deducible template parameters in it. Fixes PR8598. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141517 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
33ab0da4b50c0868f0dbbbbb8d018b44acd2bd4d |
09-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
A friend template specialization is also dependent if any of its template arguments are dependent. Fixes PR10913. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141515 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
44efed03b3ec16148722dfe57e0787a5b5c59741 |
09-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
Only allow taking the address of an expression of type 'overloaded function type' when that expression is actually an overloaded function reference (and not the address of an overloaded function reference). Fixes PR11066. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141514 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b5a0187b12524d2c1e6ac96e81715d1e70bbe0ad |
09-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
Diagnose attempts to declare a non-static data member with a non-identifier name. Fixes PR10839. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141513 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
43fe245b37c3cd36d837aab9eb98551328d30141 |
09-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
When building source location information for an _Atomic type, be sure to fill in the source locations for the underlying value type. Fixes an intermittent crasher (due to uninitialized data) in the PCH test for _Atomic types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141512 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
5c340e803ed2e384ff47f3e560df253515c92e1e |
09-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
After instantiating a 'noexcept' expression, be sure to convert it to a boolean value and check that it is a constant expression. Fixes PR11084. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141511 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
85035647bc4e6cc38cc399a7d30f9a8857f345fa |
09-Oct-2011 |
Benjamin Kramer <benny.kra@googlemail.com> |
Initialize the HadMultipleCandidates flag. Found by valgrind. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141510 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
1b46d8d78be713c546fb9680eaeea8f793bee5bf |
08-Oct-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc: Do not warn about mismatch on Super's readonly property attribute, related to a readwrite property, and Sub's readwrite property. // rdar://9396329 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141497 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
54dec5f9ad13597bbebb6872ab938e2ad4b6aa1b |
08-Oct-2011 |
Benjamin Kramer <benny.kra@googlemail.com> |
Silence a warning about casting away constness. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141496 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
a789ca9b967abe47b84df83bcf4afb150856a8d9 |
08-Oct-2011 |
NAKAMURA Takumi <geek4civic@gmail.com> |
Whitespace git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141486 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
13bf6336ab395eb6af487ab96d32229460907769 |
07-Oct-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc++: some minor cleanup and a test case for atomic setters which requires assignment operator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141415 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
682eae243ae3d96fe3dc302091034e08c414db10 |
07-Oct-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Hack in a workaround for PR11082 until we have a proper fix. This un-breaks every glib-dependent compile with Clang. I'm not sure this is even the best workaround, so suggestions welcome. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141381 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
5e1cdac63c3d9c9b32fa41fa0b2d242a58a20d49 |
07-Oct-2011 |
John McCall <rjmccall@apple.com> |
Rename TagDecl::isDefinition -> isCompleteDefinition for better self-documenting code, since the semantics are subtly different from getDefinition(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141355 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
emaChecking.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaLookup.cpp
emaType.cpp
|
7d65f6965d215f4cb2eb0738ee1b9024e5ab5bba |
07-Oct-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc: Improve on diagnostic when atomic proeprty is synthesized on one accessor and user-provide with another. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141343 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
a180f04c091bf3ede4fe292ba6a29d61da09e936 |
07-Oct-2011 |
John McCall <rjmccall@apple.com> |
Move type-checking for C-style casts in C into the now-misnamed SemaCXXCast.cpp. Should have no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141336 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaExpr.cpp
|
c076e37e2223cfe998fa5e657dece30da78fcdc4 |
07-Oct-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Implicitly assume that a ObjC category to an unavailable interface is also unavailable; only give an 'unavailable' error on the @implementation of the category. rdar://10234078 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141335 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
emaDeclObjC.cpp
emaExpr.cpp
|
3a387441ae339363ee5b254658f295e97bd9e913 |
07-Oct-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
When using an unavailable/deprecated interface Foo inside Foo's interface/implementation don't emit unavailable errors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141334 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclObjC.cpp
emaExpr.cpp
|
b001de7458d17c17e6d8b8034c7cfcefd3b70c00 |
07-Oct-2011 |
Eli Friedman <eli.friedman@gmail.com> |
Support for C1x _Atomic specifier (see testcase). This is primarily being committed at the moment to help support C++0x <atomic>, but it should be a solid base for implementing the full specification of C1x _Atomic. Thanks to Jeffrey Yasskin for the thorough review! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141330 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaLookup.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateVariadic.cpp
emaType.cpp
reeTransform.h
|
57e264e9f4ff0a72f3585a960cdf63437b76fa93 |
06-Oct-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc++: For atomic properties of c++ class objec typet, appropriate operator= is called. Issue a warning for non-trivial case until runtime support is provided. // rdar://6137845 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141302 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
b52c0dddffdb27b3a058913020001afcfc937d8d |
06-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR11067: A definition of a constexpr static variable doesn't need an initializer if the in-class declaration had one. Such a declaration must be initialized by a constant expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141279 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d12059673dcef32bc2b6bae5321654d33863afe6 |
06-Oct-2011 |
Erik Verbruggen <erikjv@me.com> |
Added CXAvailability_NotAccessible to indicate that a declaration is available, but not accessible from the current code completion context. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141278 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaAccess.cpp
emaCodeComplete.cpp
emaLookup.cpp
|
b8b0e75aeec85a7a268fdba311de4f1cd527fae1 |
06-Oct-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
OpenCL: add a non-standard extension, cl_clang_storage_class_specifiers, which enables support for C99 storage-class specifiers. This extension is intended to be used by implementations to implement OpenCL C built-in functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141271 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
emaDecl.cpp
|
a1e797e7c0de5f4ac63ff902f22f457cc9360ba7 |
05-Oct-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Fix the rewriter, rdar://10234024. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141201 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
7cc58b4c927fca539d43eaa58e00dca95946eb7c |
05-Oct-2011 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Added a flag to identify resolved overloaded function references. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141171 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
reeTransform.h
|
b45ae256cfd5ef3ab22b4d715159f978d8120d45 |
05-Oct-2011 |
John McCall <rjmccall@apple.com> |
Refactor the analysis of C++ cast expressions so that even C-style and functional casts are built in SemaCXXCast.cpp. Introduce a helper class to encapsulate most of the random state being passed around, at least one level down. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141170 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaChecking.cpp
emaExpr.cpp
emaExprCXX.cpp
|
53c8167d7a007daae87f342c0fedd03f1dcf1b62 |
05-Oct-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
c: assignment/init of a function pointer whose function(s) return to one which does not return (has noreturn attribute) should warn as it is an unsafe assignment. // rdar://10095762 c++ already handles this. This is the c version. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141141 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
203050c2d5413c3f7e18dfa39451bf6f954136ca |
05-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
Don't allow an rvalue reference to bind to the result of a calling a conversion function whose result type is an lvalue reference. The initialization code already handled this properly, but overload resolution was allowing the binding. Fixes PR11003 / <rdar://problem/10233078>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141137 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
118c6c0dd659d34af2ab17a126f45c1e3e02e94a |
04-Oct-2011 |
Eli Friedman <eli.friedman@gmail.com> |
Remove a nonsensical bit of code from InitListChecker::getStructuredSubobjectInit which was increasing the reserved size for an init list past its maximum possible size. Fixes PR11056, a case where we were reserving a bunch of memory for arrays that was never actually used. (No testcase because I don't think we have any way to actually write a testcase for this; the chosen value of NumElements has no effects on anything other than performance and memory usage.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141106 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
68af536046461b514b59aedac016b52784ece3f7 |
04-Oct-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc: Turn diagnostic on property type mismatch in continuation class into warning. // rdar://10231514 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141100 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
1711fc91efb36d131f7ba771f73f0154dc1abd1f |
04-Oct-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Improve location fidelity of objc decls. -Add the location of the class name to all objc container decls, not just ObjCInterfaceDecl. -Make objc decls consistent with the rest of the NamedDecls and have getLocation() point to the class name, not the location of '@'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141061 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
175fb1070be0ee24a75064b118f0e13fbe354200 |
04-Oct-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc arc: Suppress certain arc diagnostics on unavailable functions. // rdar://10186536 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141037 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
|
09d8212989c64abad4b745f37f56ca77b44de537 |
03-Oct-2011 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Fixed source range for template implicit instantiations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141018 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateInstantiate.cpp
|
c6ac32283ea3d769ce51407e1aa1d52de6a5a010 |
03-Oct-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc++: Accessing explicit property of reference type need not bind to a temporary. Fixes //rdar://10188258 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141009 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
f87cced71a955dca5731e7b28bc182e4824c0355 |
03-Oct-2011 |
Rafael Espindola <rafael.espindola@gmail.com> |
Propagate __attribute__((returns_twice)) from C to IL. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141002 91177308-0d34-0410-b5e6-96231b3b80d8
ttributeList.cpp
emaDeclAttr.cpp
|
491306a83c4f0f49f95a3bcbca8580cb98a91c7a |
03-Oct-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Allow getting all source locations of selector identifiers in a ObjCMethodDecl. Instead of always storing all source locations for the selector identifiers we check whether all the identifiers are in a "standard" position; "standard" position is -Immediately before the arguments: -(id)first:(int)x second:(int)y; -With a space between the arguments: -(id)first: (int)x second: (int)y; -For nullary selectors, immediately before ';': -(void)release; In such cases we infer the locations instead of storing them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140989 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaObjCProperty.cpp
|
207180802c836fda8acbedb47a92f9d2bdca59c3 |
03-Oct-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Allow getting all source locations of selector identifiers in a ObjCMessageExpr. Instead of always storing all source locations for the selector identifiers we check whether all the identifiers are in a "standard" position; "standard" position is -Immediately before the arguments: [foo first:1 second:2] -With a space between the arguments: [foo first: 1 second: 2] -For nullary selectors, immediately before ']': [foo release] In such cases we infer the locations instead of storing them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140987 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
reeTransform.h
|
8d9ed7980405e91a12e33338a78fb99620adf553 |
03-Oct-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
ArrayRef'ize ObjCMessageExpr git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140986 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
11d77169555480ee0a04c6e5bc390d8fde41175d |
03-Oct-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Pass from the parser the locations of selector identifiers when creating objc method decls. They are not stored in the AST yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140984 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
emaObjCProperty.cpp
|
da92a7f91cf88f49e02050919676f7fb8e3bdff8 |
03-Oct-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Don't keep NumSelectorArgs in the ObjCMethodDecl, the number can be derived from the selector. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140983 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
emaObjCProperty.cpp
|
951376242c076c3f62dd78bf672909fc011991db |
03-Oct-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Pass all the locations of the selector identifiers for a message expression from the parser. They are not kept in the AST yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140982 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
78dd67e78c50a7abdc7c358e5eac1770d5fea22a |
03-Oct-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
CUDA: diagnose invalid calls across targets git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140978 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExpr.cpp
emaOverload.cpp
|
1f24076313e3c4921134db555194605c9a1ea49e |
03-Oct-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
CUDA: add separate diagnostics for too few/many exec config args git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140977 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
af15b4d0aa2da714ff1648ddf6db17154d9a7f26 |
03-Oct-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
Add ConvertArgumentsForCall diagnostics for at least/at most n args git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140976 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
8591a7f5215f6469603e6bc8f4fdbcc78e215ab9 |
03-Oct-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
CUDA: diagnose unconfigured calls to global functions git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140975 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
cdda47faab5c2c61c239491a1a091e071ed3e38e |
01-Oct-2011 |
John McCall <rjmccall@apple.com> |
Parse attributes written in an ObjC method parameter type as attributes on the parameter declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140944 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
e82247a71a1a76e78f3b979b64d5f6412ab40266 |
01-Oct-2011 |
John McCall <rjmccall@apple.com> |
Hey, maybe we shouldn't silently ignore decl attributes on declarators written as types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140931 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaExpr.cpp
emaType.cpp
|
9f569cca2a4c5fb6026005434e27025b9e71309d |
01-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
constexpr: semantic checking for constexpr functions and constructors. Based in part on patches by Peter Collingbourne. We diverge from the C++11 standard in a few areas, mostly related to checking constexpr function declarations, and not just definitions. See WG21 paper N3308=11-0078 for details. Function invocation substitution is not available in this patch; constexpr functions cannot yet be used from within constant expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140926 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
|
2cf031d33ce6801dc11183a3cb48168f53fe06c4 |
01-Oct-2011 |
John McCall <rjmccall@apple.com> |
Allow the results of cf_returns_not_retained function calls, or calls to audited functions without an explicit return attribute, to be casted without a bridge cast. Tie this mechanism in with the existing exceptions to the cast restrictions. State those restrictions more correctly and generalize. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140912 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
717a20b9cebb0d261b74995f8ebf3a1c814bbc08 |
01-Oct-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Mark a TagDecl when it is free standing (e.g. "struct foo;") git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140894 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f2e5945e3a989e9d981c03c4a9cbbfb6232c8c07 |
30-Sep-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc arc: allow objc_returns_inner_pointer on methods that return a reference type, since inner reference is much like an inner pointer. // rdar://10139365 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140880 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
f2cee5cbdaf6fc017ae35cc8ecabc3b607a5f7e4 |
30-Sep-2011 |
Benjamin Kramer <benny.kra@googlemail.com> |
Fix compiler warning about && in ||. This time the warning found an actual bug, we don't want to handle force_align_arg_pointer differently than __force_align_arg_pointer__. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140877 91177308-0d34-0410-b5e6-96231b3b80d8
argetAttributesSema.cpp
|
9afbfbe71c8e69e2643d468a041473d07d2635d4 |
30-Sep-2011 |
Eli Friedman <eli.friedman@gmail.com> |
Support dllimport and dllexport on x86-64 Windows. PR10978. Patch by Ruben Van Boxem. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140871 91177308-0d34-0410-b5e6-96231b3b80d8
argetAttributesSema.cpp
|
2dfdb948bef51a601e763191e4becfe59880d382 |
30-Sep-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[libclang] Introduce CXCursor_CXXAccessSpecifier for C++'s public:/private:/protected: specifiers. Patch by Paolo Capriotti! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140864 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
8dfac0baaf0f81d3945bcb306480e358ba8d1f08 |
30-Sep-2011 |
John McCall <rjmccall@apple.com> |
Add explicit attributes to mark functions as having had their CoreFoundation object-transfer properties audited, and add a #pragma to cause them to be automatically applied to functions in a particular span of code. This has to be implemented largely in the preprocessor because of the requirement that the region be entirely contained in a single file; that's hard to impose from the parser without registering for a ton of callbacks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140846 91177308-0d34-0410-b5e6-96231b3b80d8
ttributeList.cpp
emaAttr.cpp
emaDecl.cpp
emaDeclAttr.cpp
|
55dec868977ccb89cab0286122f9345f63bb5de7 |
30-Sep-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
constexpr functions are implicitly const. More tests to follow. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140831 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
2d23ec29805f54edb3243022c64d752b8fbe5f46 |
30-Sep-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Suggest adding 'constexpr' if the GNU extension for in-class initializers for static const float members is used in C++11 mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140828 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
947be1941e9a1d4233116f51a45799d3904d4231 |
30-Sep-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Mark the ExtWarn for in-class initialization of static const float members as a GNU extension. Don't extend the scope of this extension to all literal types in C++0x mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140820 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
0f32caff4dc351719ca3362d95f859d72fdd6f1b |
30-Sep-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Minor refactoring. Enumerators may inherit the deprecated/unavailable attributes from the enumeration type. // rdar://10201690 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140818 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
2da7a51270a5f40e88d07750ebdadd774368b9f4 |
29-Sep-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
In C++0x, static const volatile data members cannot be initialized in-class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140809 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
c6d990a767150b02337de1136fdb55ccf349f4d1 |
29-Sep-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
constexpr: semantic checking for constexpr variables. We had an extension which allowed const static class members of floating-point type to have in-class initializers, 'as a C++0x extension'. However, C++0x does not allow this. The extension has been kept, and extended to all literal types in C++0x mode (with a fixit to add the 'constexpr' specifier). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140801 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
97db7265ac1993e14e5877292e23d5ed2e9cf719 |
29-Sep-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
c - Enumerators may inherit the deprecated/unavailable attributes from the enumeration type. // rdar://10201690 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140800 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
fe98da0fa352462c02db037360788748f95466f7 |
29-Sep-2011 |
John McCall <rjmccall@apple.com> |
Add an ns_bridged attribute, used to specify that a pointer to the annotated struct type can be used as an Objective-C object pointer. If an argument is given, the type is actually "toll-free bridged" to the specific type named there, rather than just to 'id'. For now, we cannot rely on all types being so annotated, and we'll always have to have exceptions for things like CFTypeRef (aka const void*), but this is clearly a good foundation for improving toolage in this area. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140779 91177308-0d34-0410-b5e6-96231b3b80d8
ttributeList.cpp
emaDeclAttr.cpp
|
2f041d0b12aa87f3345e5fb2e38fefba30c5bff3 |
29-Sep-2011 |
Ted Kremenek <kremenek@apple.com> |
Like IBOutletCollection, it only makes sense to apply the IBOutlet annotation to Objective-C object types. Fixes <rdar://problem/10142685>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140778 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
4cd5791f4aa6deb572979bb38c1deedbc155efe0 |
29-Sep-2011 |
Ted Kremenek <kremenek@apple.com> |
Do not warn about empty format strings when there are no data arguments. Fixes <rdar://problem/9473155>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140777 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
e37cdc42bf7298a974dfdfa9c03ef11398e7c889 |
29-Sep-2011 |
David Blaikie <dblaikie@gmail.com> |
Unnecessary else git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140775 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
78213e4aec6d8d22b5828dd2687fa19116ebaa26 |
28-Sep-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc arc: Diagnose block pointer type mismatch when some arguments types are ns_consumed and some otherwise matching types are not. This is objc side of // rdar://10187884 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140729 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
f9d9527a0f52937a1a99da465b42c3cfe080bc6a |
28-Sep-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc++ arc: Diagnose block pointer type mismatch when some arguments types are ns_consumed and some otherwise matching types are not. This fixes the objc++ side only *auch*. // rdar://10187884 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140717 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
8cd8de4c0fb5f3e86dbbde5844903136c5e0e046 |
28-Sep-2011 |
Ted Kremenek <kremenek@apple.com> |
Tweak -Wobjc-missing-super-calls to not warning about missing [super dealloc] when in GC-only mode, and to not warning about missing [super finalize] when not using GC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140713 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
440ec2ebbe2e7aa2a5f733a41cf845d354d16e23 |
28-Sep-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
For __weak/__strong/etc. ownership attributes, don't macro expand them in diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140711 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
39834ba5a9a9e998cc542f683d0e6327b406f088 |
28-Sep-2011 |
Eli Friedman <eli.friedman@gmail.com> |
PR11002: Make sure we emit sentinel warnings with a valid source location. (Ideally, we want to use the location returned by getLocForEndOfToken, but that is not always successful.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140658 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
d2ee809f9e7c2c7a83b8918efa11e98863463f78 |
28-Sep-2011 |
Ted Kremenek <kremenek@apple.com> |
Include prefix with default synthesized ivars. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140657 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
8987b2385d9ba63ada66e1344ace79b04d5cb5c3 |
28-Sep-2011 |
Douglas Gregor <dgregor@apple.com> |
Only print _Bool as 'bool' when 'bool' is defined as an object-like macro whose only replacement token is '_Bool'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140656 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaChecking.cpp
emaCodeComplete.cpp
emaExceptionSpec.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
|
30c42404202d2e2512e51efc6066bd614cfdb5a4 |
28-Sep-2011 |
Douglas Gregor <dgregor@apple.com> |
When 'bool' is not a built-in type but is defined as a macro, print 'bool' rather than '_Bool' within types, to make things a bit more readable. Fixes <rdar://problem/10063263>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140650 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaCodeComplete.cpp
emaExceptionSpec.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
|
3240fe3b715327c8fda6f5a3bc8a092b1fce82a7 |
28-Sep-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objcetive-c-arc: When overriding a method, its ns_consumed patameter attribute must match its overriden method. Same also for ns_returns_retained/not_retained on the result type. This is one half of // rdar://10187884 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140649 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
c1c0dfb376b829b94d4c61e9f358ce23e6aa3169 |
27-Sep-2011 |
Eli Friedman <eli.friedman@gmail.com> |
Get rid of useless helper Sema::CastCategory. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140642 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaTemplate.cpp
|
c737acb8e86564becc5939d681089d1851e6be1a |
27-Sep-2011 |
Douglas Gregor <dgregor@apple.com> |
Revert r139989 and r140031, which implemented the Objective-C type system change in <rdar://problem/10109725> that allows conversion from 'self' in class methods to the root of the class's hierarchy. This conversion rule is a hack that has non-trivial repurcussions (particularly with overload resolution). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140605 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprObjC.cpp
|
2246368b1061ef48e00bfc95d519d4393dff9926 |
27-Sep-2011 |
Bill Wendling <isanbard@gmail.com> |
Revert r140589. It was causing failures during llvm compilation: llvm[1]: Compiling CommandLine.cpp for Debug+Asserts build if /Users/void/llvm/llvm-opt.obj/Release+Asserts/bin/clang++ -I/Users/void/llvm/llvm.obj/include -I/Users/void/llvm/llvm.obj/lib/Support -I/Users/void/llvm/llvm.src/include -I/Users/void/llvm/llvm.src/lib/Support -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -g -fno-exceptions -fno-common -Woverloaded-virtual -Wcast-qual -m64 -Wall -W -Wno-unused-parameter -Wwrite-strings -c -MMD -MP -MF "/Users/void/llvm/llvm.obj/lib/Support/Debug+Asserts/CommandLine.d.tmp" -MT "/Users/void/llvm/llvm.obj/lib/Support/Debug+Asserts/CommandLine.o" -MT "/Users/void/llvm/llvm.obj/lib/Support/Debug+Asserts/CommandLine.d" /Users/void/llvm/llvm.src/lib/Support/CommandLine.cpp -o /Users/void/llvm/llvm.obj/lib/Support/Debug+Asserts/CommandLine.o ; \ then /bin/mv -f "/Users/void/llvm/llvm.obj/lib/Support/Debug+Asserts/CommandLine.d.tmp" "/Users/void/llvm/llvm.obj/lib/Support/Debug+Asserts/CommandLine.d"; else /bin/rm "/Users/void/llvm/llvm.obj/lib/Support/Debug+Asserts/CommandLine.d.tmp"; exit 1; fi In file included from /Users/void/llvm/llvm.src/lib/Support/CommandLine.cpp:25: /Users/void/llvm/llvm.src/include/llvm/Support/system_error.h:690:14: error: unknown type name 'make_error_condition'; did you mean 'error_condition'? {*this = make_error_condition(_e);} ^~~~~~~~~~~~~~~~~~~~ error_condition ... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140599 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
104be6fc8de206c9b79b241b36ebaf9407b3be08 |
27-Sep-2011 |
Eli Friedman <eli.friedman@gmail.com> |
PR11009: Fix a FIXME which was leading to an assertion failure with rvalue references. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140594 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
93476ddd9ce490f9c08d78b640efad812cb019d1 |
27-Sep-2011 |
Kaelyn Uhrain <rikka@google.com> |
Add typo correction for the type name in C++ "new" statements git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140589 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
a929ec7b673b244bec024ba7eb95140404a7af5d |
27-Sep-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc - don't complain about unimplemented property when conforming protocol declares the property, as well as one of its superclasses. Property will be implemented in the super class. // rdar://10120691 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140586 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
615eb7c477eb0523bfc1d238c57cee9497c874e3 |
27-Sep-2011 |
Ted Kremenek <kremenek@apple.com> |
Fix regression of -Warray-bounds involving varargs functions [PR 11007]. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140584 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
2aac0c9f8bc4dca3f883f429af8c1f57132d62d0 |
27-Sep-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc - compare setter/property types using hasSameUnqualifiedType in //rdar://10156674 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140576 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
936b779ed0bb0425d19cd331832b13e1f0077a43 |
27-Sep-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc - in matching setter argument type to its property type, ingore the type qualifiers. // rdar://10156674 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140571 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
a6b33808ef7e80ab68a052c97dab9077dca159c5 |
26-Sep-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc-arc: mark functions which return types which can't be dealt with in arc mode and are in system headers as unavailable. // rdar://10186625 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140565 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
8a5d929268beeb69b654120fb0b4f8893ad230eb |
26-Sep-2011 |
Eli Friedman <eli.friedman@gmail.com> |
CheckStringInit has side effects; make sure we don't run it in VerifyOnly mode, at least for the moment. <rdar://problem/10185490>. Sebastian, please take a look at this; I'm not entirely sure it is the right thing to do. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140552 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
a4e20e1e43df39e39328035c84c46fdcbbf3a01e |
26-Sep-2011 |
Eli Friedman <eli.friedman@gmail.com> |
Fix a typo in the new VerifyOnly handling in SemaInit. No visible difference at the moment, as far as I can tell. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140546 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
40847cfb58acc3cac7d68727df9455ac45f2e118 |
26-Sep-2011 |
David Blaikie <dblaikie@gmail.com> |
Rename DiagnosticInfo to Diagnostic as per issue 5397 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140493 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
d6471f7c1921c7802804ce3ff6fe9768310f72b9 |
26-Sep-2011 |
David Blaikie <dblaikie@gmail.com> |
Rename Diagnostic to DiagnosticsEngine as per issue 5397 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140478 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
eclSpec.cpp
ema.cpp
emaCXXCast.cpp
emaChecking.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaOverload.cpp
|
a41ee4921f0b42861cbb795752919ee3eddaf143 |
25-Sep-2011 |
Benjamin Kramer <benny.kra@googlemail.com> |
Add a missing increment to avoid infinite looping in the regression test. Also make sure we set the error flag when correcting a typo. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140466 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
e003cfc080b9aa53f85da6cccb3fe6fac4815047 |
24-Sep-2011 |
Benjamin Kramer <benny.kra@googlemail.com> |
Update CMake build. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140462 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
|
fd2a00a60837d19fcf27449d1c580bb1b24ba429 |
24-Sep-2011 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Add a special note for overload resolution when an initializer list argument cannot be converted. This is in preparation for overload resolution of initializer lists. Currently, you will always get this message when you try to pass an init list to an overloaded function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140461 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
6df6548e44a61c444bd85dccd0398cba047c79b1 |
24-Sep-2011 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Correctly parse braced member initializers (even in delayed parsing) and correctly pass the information on to Sema. There's still an incorrectness in the way template instantiation works now, but that is due to a far larger underlying representational problem. Also add a test case for various list initialization cases of scalars, which test this commit as well as the previous one. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140460 91177308-0d34-0410-b5e6-96231b3b80d8
ultiInitializer.cpp
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
|
cea8d966f826554f0679595e9371e314e8dbc1cf |
24-Sep-2011 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Treat list-initialization of scalars as a first-class citizen in C++11. Allow empty initializer lists for scalars, which mean value-initialization. Constant evaluation for single-element and empty initializer lists for scalars. Codegen for empty initializer lists for scalars. Test case comes in next commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140459 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
14b0c194b356a1204d081765b3e6699687bed97c |
24-Sep-2011 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Give InitListChecker a verification-only mode, where it neither emits diagnostics nor builds a semantic (structured) initializer list, just reports on whether it can match the given list to the target type. Use this mode for doing init list checking in the initial step of initialization, which will eventually allow us to do overload resolution based on the outcome. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140457 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaInit.cpp
emaOverload.cpp
|
8713d4e874f2adc2928ebfb86c845574a14e3b3e |
24-Sep-2011 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
In Initialization, add step kind SK_ListConstructorCall (list-initialization resolves to a constructor call in C++11) and failure kind FK_ListInitializationFailed (early InitListChecker run failed). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140456 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
b0edea9f03cf81227fa35513802f8f146f65c528 |
24-Sep-2011 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Inline Sema::CheckInitList into its only user. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140455 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
5d3d41d0873d51b405972baf38e1f3a7ef5b49e0 |
24-Sep-2011 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Fix typos and non-doxygen-ness in a few comments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140454 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
fce1a3ab56879a7eb92c7e0b465c1f2c07e0c512 |
24-Sep-2011 |
Francois Pichet <pichet2000@gmail.com> |
[microsoft] In Microsoft mode, if we are inside a template class member function and we can't resolve an identifier then assume the identifier is type dependent. The goal is to postpone name lookup to instantiation time to be able to search into type dependent base classes. This fixes a few errors when parsing MFC code with clang. BTW clang trunk is now about 5 patches away to be able the parse the default wizard-generated MFC project. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140452 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
a4b984d8396724a8e1137c22186c558c0cb0bf3f |
24-Sep-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc - redeclaration of property in extension class must match property type declaration in its primary class. // rdar://10142679 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140438 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
bc2b91a8f682023acb6543257f7c08f68ea964ae |
24-Sep-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc - fixes a crash when undefined typed property followed by it implementation crashes when attempt is made to access the synthesized ivar. // rdar://10177744 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140432 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
eb2d1f1c88836bd5382e5d7aa8f6b85148a88b27 |
23-Sep-2011 |
David Blaikie <dblaikie@gmail.com> |
Removing a bunch of dead returns/breaks after llvm_unreachables. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140407 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaOverload.cpp
emaStmt.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
reeTransform.h
|
c193dd84414c32b7c66f5b68176401665c0d2301 |
23-Sep-2011 |
Douglas Gregor <dgregor@apple.com> |
Don't propagate the 'availability' attribute through declaration merging for overrides. One might want to make a method's availability in a superclass different from that of its subclass. Fixes <rdar://problem/10166223>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140406 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f1f8b1a404d9ce6f0eb78e97b598a220d8ca9090 |
23-Sep-2011 |
Richard Trieu <rtrieu@google.com> |
Add a new warning to -Wliteral-conversion to catch cases where a string literal is cast to a boolean. An exception has been made for string literals in logical expressions to allow the common case of use in assert statements. bool x; x = "hi"; // Warn here void foo(bool x); foo("hi"); // Warn here assert(0 && "error"); assert("error); // Warn here git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140405 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExprCXX.cpp
|
a120d01c66010db47332b7ca67b737fda6c2c264 |
23-Sep-2011 |
Douglas Gregor <dgregor@apple.com> |
When checking for weak vtables, check whether the actual definition of the key function is inline, rather than the original declaration. Perhaps FunctionDecl::isInlined() is poorly named. Fixes <rdar://problem/9979458>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140400 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
b219cfc4d75f0a03630b7c4509ef791b7e97b2c8 |
23-Sep-2011 |
David Blaikie <dblaikie@gmail.com> |
Switch assert(0/false) llvm_unreachable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140367 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
dentifierResolver.cpp
emaAttr.cpp
emaCXXScopeSpec.cpp
emaChecking.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExceptionSpec.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
emaStmt.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
reeTransform.h
|
d836c0d379403a173ae1ede56fcad034d04a1e34 |
23-Sep-2011 |
Douglas Gregor <dgregor@apple.com> |
Don't finalize checking of base and member initializers for a constructor template. Fixes PR10457. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140350 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
690b2dbde0ef9eec6b5c950b0c4c7106db37f0a5 |
22-Sep-2011 |
Douglas Gregor <dgregor@apple.com> |
Only trigger the initialize-an-array-via-elementwise-copy/move code generation when we're dealing with an implicitly-defined copy or move constructor. And, actually set the implicitly-defined bit for implicitly-defined constructors and destructors. Should fix self-host. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140334 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
71a7605977113c795edd44fcbd2302ad49506653 |
22-Sep-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Don't use TemplateArgumentListInfo inside AST nodes because it may leak. Use ASTTemplateArgumentListInfo instead. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140331 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
af130823cbac5c02f7fe57a5733ee511f5a3ac98 |
22-Sep-2011 |
Douglas Gregor <dgregor@apple.com> |
Don't allow template argument deduction to deduce a placeholder type, ever. Fixes PR10939. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140304 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
9df05ea69b16e48f2b1cda56c2c341ce77493f4e |
22-Sep-2011 |
Tobias Grosser <grosser@fim.uni-passau.de> |
In OpenCL, conversions between different vector types are disallowed OpenCL 6.2.1 says: "Implicit conversions between built-in vector data types are disallowed." OpenCL 6.2.2 says: "Explicit casts between vector types are not legal." For example: uint4 u = (uint4)(1); int4 i = u; // invalid implicit conversion int4 e = (int4)u; // invalid explicit conversion Fixes PR10967. Submitted by: Anton Lokhmotov <Anton.lokhmotov@gmail.com> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140300 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
77b6de07be9186063c12928d2e9785a5d4eecbf6 |
22-Sep-2011 |
David Blaikie <dblaikie@gmail.com> |
ArrayRef-ifying the fields passed to Sema::ActOnFields git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140293 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaTemplateInstantiate.cpp
|
a71f9d0a5e1f8cafdd23a17e292de22fdc8e99ff |
22-Sep-2011 |
David Blaikie <dblaikie@gmail.com> |
ArrayRef-ifying the UnexpandedParameterPacks passed to Sema::CheckParameterPacksForExpansion git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140290 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaTemplateVariadic.cpp
reeTransform.h
|
37c31c2e050856f87efd652958352181e72e5dea |
21-Sep-2011 |
Tobias Grosser <grosser@fim.uni-passau.de> |
In the OpenCL mode, the AltiVec mode must be off and checks must be strict OpenCL is different from AltiVec in the way it supports vector literals. OpenCL is strict with regards to semantic checks. For example, implicit conversions and explicit casts between vectors of different types are disallowed. Fixes PR10975. Submitted by: Anton Lokhmotov <Anton.lokhmotov@gmail.com> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140270 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
4278c654b645402554eb52a48e9c7097c9f1233a |
21-Sep-2011 |
David Blaikie <dblaikie@gmail.com> |
ArrayRef-ifying Function/BlockDecl's setParams git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140268 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
f250365ce65412d7d4e331fccf042b6e974c2f14 |
21-Sep-2011 |
Douglas Gregor <dgregor@apple.com> |
Diagnose attempts to write a templated data member, from Stepan Dyatkovskiy! Fixes PR10896. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140250 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
ca82a82082edc982a1fb5fcfef2dd2c8cf9bc824 |
21-Sep-2011 |
John McCall <rjmccall@apple.com> |
Enforce access control for conversion operators used in contextual conversions (rather than just call-arguments). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140244 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaExprCXX.cpp
emaOverload.cpp
|
036277e3e7bfa3ccef96fabf0b34a75d9a7c015b |
21-Sep-2011 |
Francois Pichet <pichet2000@gmail.com> |
[microsoft] Move missing typename warning from -fms-extensions to -fms-compatibility. Also allow the missing typename warning at function scope. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140240 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
47456faf29a1eba1a3de55f3c06c82019d28ffd0 |
21-Sep-2011 |
Richard Trieu <rtrieu@google.com> |
Change: assert(!"error message"); To: assert(0 && "error message"); which is more consistant across the code base. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140232 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
5b76f373d23cc3b292ecf523349aaaa388eea375 |
21-Sep-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[ARC] Allow forming 'id*' in an unevaluated context. Fixes rdar://10148540. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140212 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
cc6306e96782a8da2d818bfaca003645530ffd2f |
21-Sep-2011 |
Francois Pichet <pichet2000@gmail.com> |
Move Microsoft access specifier bug emulation from -fms-extensions to -fm-compatibility. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140189 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
f7572a64a1e5f6f700527583ec5206a58ce6d9b6 |
20-Sep-2011 |
Douglas Gregor <dgregor@apple.com> |
Introduce an egregious hack for modules to cope with headers that come from unfriendly (== not at all modularized) directories. This is temporary, and it only affects module construction until I'll figured out how to deal with system headers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140159 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
8be0c74e4a779b13c2d8fd8482dcd438eeb089d3 |
20-Sep-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
Remove redundant break statements, and replace asserts with llvm_unreachable Per John's review comments for r140068. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140142 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
3f224b2efde9b02dcc78c5c85667a62dcd1f5ab3 |
20-Sep-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Fix a pretty nasty bug in noreturn destructors that cascaded into lots of false positive warnings that depend on noreturn destructors pruning the CFGs, but only in C++0x mode! This was really surprising as the debugger quickly reveals that the attributes are parsed correctly (and using the same code) in both modes. The warning fires in the same way in both modes. But between parsing and building the destructor declaration with the noreturn attribute and the warning, it magically disappears. The key? The 'noexcept' appears! When we were rebuilding the destructor type with the computed implicit noexcept we completely dropped the old type on the floor. This almost makes sense (as the arguments and return type to a destructor aren't exactly unpredictable), but lost any function type attributes as well. The fix is simple, we build the new type off of the old one rather than starting fresh. Testing this is a bit awkward. I've done it by running the noreturn-sensitive tests in both modes, which previous failed and now passes, but if anyone has ideas about how to more specifically and thoroughly test that the extended info on a destructor is preserved when adding noexcept, I'm all ears. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140138 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
0c706c29f20b6fa36759fa41333b9c3ec0bd2969 |
20-Sep-2011 |
Eli Friedman <eli.friedman@gmail.com> |
Add list initialization for complex numbers in C. Essentially, this allows "_Complex float x = {1.0f, 2.0f};". See changes to docs/LanguageExtensions.html for a longer description. <rdar://problem/9397672>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140090 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
8c25fc584ce27d59df9923f153e8a132dde58d04 |
19-Sep-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
OpenCL: introduce support for function scope __local variables git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140068 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
a64ccefdf0ea4e03ec88805d71b0af74950c7472 |
19-Sep-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Rename SourceLocation::getFileLocWithOffset -> getLocWithOffset. It already works (and is useful with) macro locs as well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140057 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
emaChecking.cpp
emaExpr.cpp
emaExprMember.cpp
|
71ac1e003b7a82ca6ac7ed76e4d0f9c6d4a1e30a |
19-Sep-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc - some refactoring of my last 'self' patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140031 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
84e0ccff7a6e51d7b81fd58686b493a4880dd44d |
19-Sep-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
CurContext cannot be null ever. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140022 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
24dd9ad9001d1aa16223de135d7e4ed34e94b207 |
19-Sep-2011 |
Erik Verbruggen <erikjv@me.com> |
Removed an unused field and its accessors methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140017 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaDeclCXX.cpp
|
a495066d3cc094b3eb5edb4efbdb169da1f67841 |
19-Sep-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
In constructors, don't generate implicit initializers for members of anonymous structs contained within anonymous unions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140015 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
9aca87d4b48058d56a48d62435ad6a871cc62ad1 |
19-Sep-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Remove function which is unused as of r139996. Thanks to David Blaikie for bringing this to my attention. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140013 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
8b3c99e0167e0565905e1b05de2b8536d8e80d27 |
18-Sep-2011 |
Francois Pichet <pichet2000@gmail.com> |
Move the "jump bypasses variable initialization" error -> warning downgrade from -fms-extensions to -fms-compatibility. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140008 91177308-0d34-0410-b5e6-96231b3b80d8
umpDiagnostics.cpp
|
1c98d627e5f0b79365d4e64cd4c6795ebed895f3 |
18-Sep-2011 |
Francois Pichet <pichet2000@gmail.com> |
In Microsoft mode(-fms-compatibility), prefer an integral conversion to a floating-to-integral conversion if the integral conversion is between types of the same size. For example: void f(float); void f(int); int main { long a; f(a); } Here, MSVC will call f(int) instead of generating a compile error as clang will do in standard mode. This fixes a few errors when parsing MFC code with clang. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140007 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
416f63e42d4c34a38833a3aa8fa1ebb3c847722b |
18-Sep-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR10304: Do not call destructors for data members from union destructors. Prior to C++11, this has no effect since any such destructors must be trivial, and in C++11 such destructors must not be called. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139997 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
c115f630b748b2f27cff34137fb6a50b10a471a5 |
18-Sep-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR10954: variant members should not be implicitly initialized in constructors if no mem-initializer is specified for them, unless an in-class initializer is specified. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139996 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
16ee8191ca6953e173c983e3175a8d7504b5baae |
18-Sep-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix PR10531. Attach an initializer to anonymous unions, since the default constructor might not be trivial (if there is an in-class initializer for some member) and might be deleted. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139991 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
de5998f1d7dcecb777257ec932142d65de636eb8 |
18-Sep-2011 |
Nico Weber <nicolasweber@gmx.de> |
Let -Warray-bounds handle casted array types without false positives. Fixes PR10771. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139990 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
1d4e8e9340c9699069a33a74562e883a305f7607 |
17-Sep-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc - Treat type of 'self' in class methods as root of class of this method. // rdar://10109725 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139989 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprObjC.cpp
|
898f284d3777b6880b6a7051cccd0d11db7d5457 |
17-Sep-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc: Don't crash with decl context for property impl. is missing. // rdar//10127639 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139988 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
62ec1f2fd7368542bb926c04797fb07023547694 |
17-Sep-2011 |
Francois Pichet <pichet2000@gmail.com> |
Rename LangOptions::Microsoft to LangOptions::MicrosoftExt to make it clear that this flag must be used only for Microsoft extensions and not emulation; to avoid confusion with the new LangOptions::MicrosoftMode flag. Many of the code now under LangOptions::MicrosoftExt will eventually be moved under the LangOptions::MicrosoftMode flag. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139987 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
umpDiagnostics.cpp
emaAccess.cpp
emaCXXCast.cpp
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaExceptionSpec.cpp
emaExpr.cpp
emaExprMember.cpp
emaInit.cpp
emaOverload.cpp
emaTemplate.cpp
emaType.cpp
argetAttributesSema.cpp
|
2e96511773c6a21291dfa5218eb8ba79f04b5318 |
17-Sep-2011 |
Francois Pichet <pichet2000@gmail.com> |
In Microsoft mode, warn if an indirect goto jump over a variable initialization. Also add a test case for the non Microsoft case because such test didn't exist. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139971 91177308-0d34-0410-b5e6-96231b3b80d8
umpDiagnostics.cpp
|
481037f01b7445b42033ef652ad59ccaef3f33fd |
16-Sep-2011 |
Richard Trieu <rtrieu@google.com> |
Moves calls of checkArithmeticNull() from CreateBuiltinBinOp() into the individual Check*Operands() functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139895 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
1748b1256646cf0752f172c53ad7482f7beed185 |
16-Sep-2011 |
Caitlin Sadowski <supertri@google.com> |
Thread safety: Adding FIXMEs and a couple cleanups git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139894 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
c3ba24f8af1ded9ec494960061f544e953dc4abf |
16-Sep-2011 |
Richard Trieu <rtrieu@google.com> |
Remove no longer needed LHSType and RHSType from checkArithmeticNull() git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139879 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
5e3a23585f6e2f397be6ead14fee6b9c1b110fb1 |
16-Sep-2011 |
Richard Trieu <rtrieu@google.com> |
Change checkArithmeticNull() to use a NonNullType, instead of checking both the LHSType and RHSType for everything. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139878 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
dd22509c82eb7681a0f46b41d61cb2e25a4d8fa1 |
15-Sep-2011 |
Richard Trieu <rtrieu@google.com> |
Finish the lex->LHS and rex->RHS cleanup in Sema. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139856 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExprCXX.cpp
|
412a49641c9365662b34331d36bf072bc3a228ea |
15-Sep-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
reverse patch in r139818 to focus on 'self' instead of 'Class'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139834 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
7d7ef8298d4711206772ff9eb51f5140536cbeab |
15-Sep-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Objective-c: Conversion from type Class to any root class type is allowed in class methods with no warning. //rdar://10109725 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139818 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
69f5d14bae44f05b22fa50bb87122a61081fcd57 |
15-Sep-2011 |
Caitlin Sadowski <supertri@google.com> |
Thread safety: cleaning up FIXME for trylocks git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139805 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
4e4bc75d3570835e13183c66ac08974cdc016007 |
15-Sep-2011 |
Caitlin Sadowski <supertri@google.com> |
Thread safety: refactoring various out of scope warnings to use the same inteface. This eliminates a lot of unnecessary duplicated code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139801 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
df8327c28d293cf7c6952b86dba26863235dcc0f |
14-Sep-2011 |
Caitlin Sadowski <supertri@google.com> |
Thread safety: reverting to use separate warning for requirement to hold any lock git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139723 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
7c24334bedf59bd9af57ee53eb8f6d9f6a50ca9b |
14-Sep-2011 |
Kaelyn Uhrain <rikka@google.com> |
Plug an abstraction leak and fix a crasher in DiagnoseInvalidRedeclaration git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139718 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f45b357c0d0df99e160a6320e279ef788dd91ba6 |
14-Sep-2011 |
Eli Friedman <eli.friedman@gmail.com> |
PR10864: make sure we correctly delay type-checking for inline asm tied operands with dependent type. Patch by Likai Liu. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139716 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
528a499eb84d61667f65b16a13780c135b822f6b |
14-Sep-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc-arc: warn when a 'retain' block property is declared which does not force a 'copy' of the block literal object. // rdar://9829425 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139706 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
f1e7af36d6673185994b3d1751cf7e9a9a1491b8 |
13-Sep-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Add the location of the interface reference to IBOutletCollectionAttr. Depends on a llvm tablegen commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139618 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
265941bc308d65cc270d5c4de5806f37ce405606 |
13-Sep-2011 |
John McCall <rjmccall@apple.com> |
Refactoring, mostly to give ObjCPropertyDecls stronger invariants for their semantic attributes and then to take advantage of that. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139615 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaObjCProperty.cpp
|
e87158dfbca01577810f301543c3cdcfc955d8b0 |
13-Sep-2011 |
Caitlin Sadowski <supertri@google.com> |
Thread safety: Initializing var before exhaustive switch statement to deal with extraneous warning produced by gcc but not clang git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139611 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
e289d81369914678db386f6aa86faf8f178e245d |
13-Sep-2011 |
Douglas Gregor <dgregor@apple.com> |
Switch LangOptions over to a .def file that describes header of the language options. Use that .def file to declare the LangOptions class and initialize all of its members, eliminating a source of annoying initialization bugs. AST serialization changes are next up. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139605 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaObjCProperty.cpp
|
768d6cae40ad4ff3aed5483269d068ff7a45e229 |
13-Sep-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Keep the source range of attributes. Depends on a llvm tablegen commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139600 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
argetAttributesSema.cpp
|
ffcc3105d223899740e79f3f8199f3881df4d1de |
13-Sep-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Record the full source range of an attribute. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139599 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
c985b88efc9188845952ab524fe6d4717705257b |
13-Sep-2011 |
Francois Pichet <pichet2000@gmail.com> |
In Microsoft mode, downgrade "goto into protected scope" from error to warning if we are jumping over a variable initialization via a goto. This fixes a few errors when parsing MFC code with clang. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139595 91177308-0d34-0410-b5e6-96231b3b80d8
umpDiagnostics.cpp
|
e05ee6df356c25e792b0334d7a4dec3fe4f79f07 |
13-Sep-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Switch -Wreturn-type to completely rely on the CFG model of no-return. This deletes a bunch of crufty code, and allows more logic sharing between the analyzer and the warnings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139594 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
48822fbd088c4821f15fee5a2957a69a1f98e746 |
12-Sep-2011 |
Douglas Gregor <dgregor@apple.com> |
Kill off an irrelevant FIXME git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139523 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
6eef9fb34c75278f2e17149d33c7957437bd9a1a |
12-Sep-2011 |
Richard Trieu <rtrieu@google.com> |
Refactor CheckAdditionOperands() to use early return for pointer addition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139520 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e389585f8a40f80004d3b98b99f3980305ef78a0 |
12-Sep-2011 |
Douglas Gregor <dgregor@apple.com> |
Diagnose attempt to mark function-local declarations as __module_private__. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139519 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d9f1934bd0caadf5eab8dcf19671260e13a5f7fe |
12-Sep-2011 |
Richard Trieu <rtrieu@google.com> |
Fix two comments from warn to emit error to match the actual diagnostic used. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139510 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
591dc84101228dc391fca05193be5870ec661edc |
12-Sep-2011 |
Douglas Gregor <dgregor@apple.com> |
Allow __module_private__ on fields git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139499 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f3a762a8de396af471f35b77f6897989867c898e |
12-Sep-2011 |
Douglas Gregor <dgregor@apple.com> |
Remove the restriction on module-private friends. Since the friend declaration may be the first declaration, we want the ability to that declaration to be marked module-private. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139497 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
|
cb4d7c202e74783d9c820f155ae27605aa9f5c16 |
12-Sep-2011 |
Hans Wennborg <hans@hanshq.net> |
Silence ?: precendence warning when parenthesis are present. Fixes PR10898. The warning should be silent when there are parenthesis around the condition expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139492 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
afc5b15022886c9e9e84d7aa0f2168b83e712310 |
10-Sep-2011 |
Benjamin Kramer <benny.kra@googlemail.com> |
Silence "end of non-void function" warnings with llvm_unreachable and add an assert. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139474 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
33e56f3273457bfa22c7c50bc46cf5a18216863d |
10-Sep-2011 |
John McCall <rjmccall@apple.com> |
Rename the ARC cast kinds to start with "ARC". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139466 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaInit.cpp
|
4f4f349208b2b2307454e169ac7b039e989f003f |
10-Sep-2011 |
David Blaikie <dblaikie@gmail.com> |
Show either a location or a fixit note, not both, for uninitialized variable warnings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139463 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
dc05b11c67331016473fbc7909827b1b89c9616b |
10-Sep-2011 |
John McCall <rjmccall@apple.com> |
When converting a block pointer to an Objective-C pointer type, extend the lifetime of the block by copying it to the heap, or else we'll get a dangling reference because the code working with the non-block-typed object will not know it needs to copy. There is some danger here, e.g. with assigning a block literal to an unsafe variable, but, well, it's an unsafe variable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139451 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaExpr.cpp
emaExprCXX.cpp
|
b3321093f6ead084427eb4a6621832fc4ee2f5de |
10-Sep-2011 |
Douglas Gregor <dgregor@apple.com> |
Fix a diagnostics crasher with -Wmissing-noreturn in Objective-C methods, and improve the diagnostic slightly along the way. Fixes <rdar://problem/10098695>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139446 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
78bf680ddf8522676474883fad2fe245f839d2ab |
10-Sep-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Fix a -Wreturn-type warning due to this field not explicitly having the enumeration type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139445 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
6fbdfec363f8c74e0a4fdb23fa3303cbf5b1fb49 |
10-Sep-2011 |
Stephen Hines <srhines@google.com> |
Disallow mixing of vector component types. BUG=5280004 This change strengthens the vector component check to ensure that we don't mix/match indices using "rgba" with ones using "xyzw". An error diagnostic is now generated for the invalid component name. Change-Id: I6015dc9f602663cd617c47fb9e53adbf127f8db2
emaExprMember.cpp
|
77f68bb90af93b95045fb994e7cd68137adcc132 |
10-Sep-2011 |
Julien Lerouge <jlerouge@apple.com> |
Bring llvm.annotation* intrinsics support back to where it was in llvm-gcc: can annotate global, local variables, struct fields, or arbitrary statements (using the __builtin_annotation), rdar://8037476. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139423 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDecl.cpp
emaDeclAttr.cpp
|
fd641f943a7d5508858fb5f449a0f5767fa34ac7 |
09-Sep-2011 |
Kaelyn Uhrain <rikka@google.com> |
Add smarter sorting of overload candidates that failed template deduction. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139417 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
6274d30d77870393d83a404dd223b8005f2b8cd5 |
09-Sep-2011 |
Douglas Gregor <dgregor@apple.com> |
Friends cannot be declared module-private git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139411 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
|
d023aec8907831a18d3514a95b843a7ee06b6b5e |
09-Sep-2011 |
Douglas Gregor <dgregor@apple.com> |
Specializations cannot be module-hidden. Diagnose attempts to do so. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139406 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplate.cpp
|
5c16d635ff67fd8f083a704b7c82607ed49a8ba2 |
09-Sep-2011 |
Douglas Gregor <dgregor@apple.com> |
Don't produce 'instancetype' as the type of a message send expression. Map it down to 'id'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139394 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
e761230ae3751b525cadd8066c74ec278ee4ef57 |
09-Sep-2011 |
Douglas Gregor <dgregor@apple.com> |
__module_private__ is inherited by redeclarations of an entity, and must also be present of the first declaration of that entity. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139384 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaTemplate.cpp
|
6311d2bb3db1ec1064f45a14983ae5806adc676a |
09-Sep-2011 |
Douglas Gregor <dgregor@apple.com> |
Propagate __module_private__ from previous declarations to later declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139380 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplate.cpp
|
bbcb7ea8a062a8f1d5cb504e4518a5d4fbab873a |
09-Sep-2011 |
Douglas Gregor <dgregor@apple.com> |
When type-checking a call to an overloaded, builtin atomic operation, construct a new DeclRefExpr rather than re-using the existing DeclRefExpr. Patch by Likai Liu, fixes PR8345. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139373 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
99107ebc0a5aea953b736e12757e0919d5249d43 |
09-Sep-2011 |
Caitlin Sadowski <supertri@google.com> |
Thread safety: This patch deals with previously unhandled cases when building lock expressions. We now resolve this expressions, avoid crashing when encountering cast expressions, and have a diagnostic for unresolved lock expressions git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139370 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
402aa0698fec81e574818a0a6c2000fac0b2c4c6 |
09-Sep-2011 |
Caitlin Sadowski <supertri@google.com> |
Thread Safety: Moving the analysis to a new file git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139369 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
a49d1d8a34381802040c3d7fa218e93b457d2b1d |
09-Sep-2011 |
Caitlin Sadowski <supertri@google.com> |
Thread safety: refactoring test cases git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139368 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
75f23aeb1c820b49f9faebed63b1cbef76c2c907 |
09-Sep-2011 |
Caitlin Sadowski <supertri@google.com> |
Thread safety: refactoring to use an error handler git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139367 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
67bc6071d7abea2d4870bc4fd8f119ebd93c46f3 |
09-Sep-2011 |
Francois Pichet <pichet2000@gmail.com> |
Update comment because JumpDiagnostics.cpp is not just about VLA scope. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139364 91177308-0d34-0410-b5e6-96231b3b80d8
umpDiagnostics.cpp
|
3323fad09e9f2c280e0dbe767be398203bb0c6ac |
09-Sep-2011 |
John McCall <rjmccall@apple.com> |
Clean up the sentinel-attribute checking code a lot. Document what 'nullPos' is supposed to mean, at least at this one site. Use closed forms for the arithmetic. Rip out some clever but ultimately pointless code that was trying to use 0 or 0L depending the size of a pointer vs. the size of int; first, it didn't work on LLP64 systems, and second, the sentinel checking code requires a pointer-typed value anyway, so this fixit would not have actually removed the warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139361 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaExpr.cpp
|
7f3a6d37ba113910e2cbf7490d0f4bb162cd994e |
09-Sep-2011 |
John McCall <rjmccall@apple.com> |
Code formatting; no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139355 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
0bcc9bc6cd46757000245fb7b91302e6ec3478a1 |
09-Sep-2011 |
John McCall <rjmccall@apple.com> |
Contextually converting to 'id' is not a useful operation. Contextually converting to an arbitrary Objective-C pointer type is. Without significantly re-implementing anything, change the API to reflect this, and as a minor optimization, strip the pointer conversion off before potentially building it. Mostly, this removes a really bizarre-looking bit of code from BuildInstanceMessage. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139354 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
emaOverload.cpp
|
1d9b3b25f7ac0d0195bba6b507a684fe5e7943ee |
09-Sep-2011 |
John McCall <rjmccall@apple.com> |
Give conversions of block pointers to ObjC pointers a different cast kind than conversions of C pointers to ObjC pointers. In order to ensure that we've caught every case, add asserts to CastExpr that strictly determine which cast kind is used for which kind of bit cast. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139352 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaCXXCast.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprObjC.cpp
emaOverload.cpp
|
5e4c80b43fae03bc56b68fe08089e6cffe9ba6fc |
09-Sep-2011 |
Richard Trieu <rtrieu@google.com> |
Clean up the RebuildUnknownAnyExpr visitor in SemaExpr.cpp. Mainly swapped around variable names so that this visitor be more like other visitors in clang. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139351 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
90ab75b5ad328d2b155ec83fd4e80cd0f7af5729 |
09-Sep-2011 |
Richard Trieu <rtrieu@google.com> |
Changed references of BaseTy, MemInitTy, CXXScopeTy, TemplateParamsTy to CXXBaseSpecifier, CXXCtorInitializer, NestedNameSpecifier, TemplateParameterList and removed their typedefs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139350 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
8d267c57afb3af418ed5281b7a9bb4555d701a82 |
09-Sep-2011 |
Douglas Gregor <dgregor@apple.com> |
Modules: introduce the __module_private__ declaration specifier, which indicates that a declaration is only visible within the module it is declared in. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139348 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaTemplate.cpp
|
f81e5a9e3f3ff80c56e4afb4fe6311a8735f36e8 |
09-Sep-2011 |
Richard Trieu <rtrieu@google.com> |
Change all references of type ExprTy to Expr and get rid of the typedefs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139347 91177308-0d34-0410-b5e6-96231b3b80d8
emaAttr.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclCXX.cpp
|
ccd891ae75e9678f1138868e50508c8083d021fa |
09-Sep-2011 |
Richard Trieu <rtrieu@google.com> |
Capitialize paramater names in SemaExpr.cpp and resolve any parameter name conflicts between declarations and definitions from this and previous refactorings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139346 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
69ff26bd1e7a2faffec0c3b9740cfb0c6bb354c5 |
09-Sep-2011 |
Douglas Gregor <dgregor@apple.com> |
The integer type of an enumeration type isn't always canonical git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139334 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
179b920a8bca0811cf4ae32910925c3f98cca4cc |
09-Sep-2011 |
Caitlin Sadowski <supertri@google.com> |
Thread safety: small edit to unused variation on warning left in by accident from earlier commit git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139331 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
634c8af0805ba33b1530470e03aa314141036aa2 |
09-Sep-2011 |
Matt Beaumont-Gay <matthewbg@google.com> |
Extend -Wliteral-conversion to catch "int i = -1.234" git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139326 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
8bccabeac6b98650dfd88bd1fc84e841eb42af4b |
08-Sep-2011 |
Caitlin Sadowski <supertri@google.com> |
Thread Safety: In C++0x Mutexes are the objects that control access to shared variables, while Locks are the objects that acquire and release Mutexes. We switch to this new terminology. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139321 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
af37061fea31f3f1d0638edb5486e8d72c701522 |
08-Sep-2011 |
Caitlin Sadowski <supertri@google.com> |
Thread Safety: adding basic no thread safety analysis option git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139310 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
978191e0906606e32965cebcf81627d8e8711b13 |
08-Sep-2011 |
Caitlin Sadowski <supertri@google.com> |
Thread safety: Adding basic support for locks required and excluded attributes git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139308 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
a53257c94a4d871e64070f72edb687dcfb08c15d |
08-Sep-2011 |
Caitlin Sadowski <supertri@google.com> |
Thread safety: shared vs. exclusive locks git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139307 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
ed9d84a2112e2bd56befb5f4fa8fc5bdf71fafa3 |
08-Sep-2011 |
Caitlin Sadowski <supertri@google.com> |
Thread safety: added support for function scopes in attribute arguments. This patch was written by DeLesley Hutchins. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139302 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
|
eff98fc3561f6b717f6348f04b3f4fe03e934466 |
08-Sep-2011 |
Caitlin Sadowski <supertri@google.com> |
Thread Safety: Patch to implement delayed parsing of attributes within a class scope. This patch was also written by DeLesley Hutchins. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139301 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
emaDecl.cpp
|
14068e83f30864ed278fa43c5954404b47e99e7d |
08-Sep-2011 |
David Blaikie <dblaikie@gmail.com> |
Adding FixIts to static/inline main declaration diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139282 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
e97179c675b341927807c718be215c8d1aab8acb |
08-Sep-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement the Objective-C 'instancetype' type, which is an alias of 'id' that can be used (only!) via a contextual keyword as the result type of an Objective-C message send. 'instancetype' then gives the method a related result type, which we have already been inferring for a variety of methods (new, alloc, init, self, retain). Addresses <rdar://problem/9267640>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139275 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
emaExprObjC.cpp
emaType.cpp
|
5520f23edb421a1f87d8d3b1356b3919114f6d88 |
07-Sep-2011 |
Richard Trieu <rtrieu@google.com> |
Change diagnoseAddressOfInvalidType() to use an enum to determine what error message to display. Also, move the function call into on location instead of having it spread among many places in the if/else statements. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139260 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
82340e8cbd353ae4ddb545f61ba9816c8d69ba8e |
07-Sep-2011 |
Kaelyn Uhrain <rikka@google.com> |
Fix Sema::CorrectTypo to ignore found but unresolved symbols git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139252 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
edc08821d3f73514291b339db29aca1a17485e39 |
07-Sep-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc-gc: More sema work for properties declared 'weak' in GC mode. // rdar://10073896 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139235 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
900693b715b3832a42ae87157332baece94ccdd8 |
07-Sep-2011 |
Eli Friedman <eli.friedman@gmail.com> |
Make sure the FunctionDecl's created by "#pragma weak" have correct ParmVarDecl's. PR10878. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139224 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
befece14a371a963568a922fed74dbec0d4a0c11 |
07-Sep-2011 |
Richard Trieu <rtrieu@google.com> |
Rename variables in SemaExpr.cpp to give a more consistant naming scheme. ExprResult LHS, RHS, Expr *LHSExpr, *RHSExpr QualType LHSType, RHSType Functions changed: DiagnoseLogicalAndInLogicalOrLHS() DiagnoseBinOpPrecedence() ActOnBinOp() BuildBinOp() git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139219 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
78ea78bda17d54548fc7b8afa1c9aecafc9cf622 |
07-Sep-2011 |
Richard Trieu <rtrieu@google.com> |
Rename variables in SemaExpr.cpp to give a more consistant naming scheme. ExprResult LHS, RHS, Expr *LHSExpr, *RHSExpr QualType LHSType, RHSType Functions changed: CreateBuiltinBinOp() DiagnoseBitwisePrecedence() git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139218 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
268942b22464c7364e2c6868915484cd4b7596f7 |
07-Sep-2011 |
Richard Trieu <rtrieu@google.com> |
Rename variables in SemaExpr.cpp to give a more consistant naming scheme. ExprResult LHS, RHS, Expr *LHSExpr, *RHSExpr QualType LHSType, RHSType Functions changed: CheckAssignmentOperands() DiagnoseSelfAssignment() checkArithmeticNull() git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139215 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
9f60dee66e76a20302aecdf677236ff030bf157b |
07-Sep-2011 |
Richard Trieu <rtrieu@google.com> |
Rename variables in SemaExpr.cpp to give a more consistant naming scheme. ExprResult LHS, RHS, Expr *LHSExpr, *RHSExpr QualType LHSType, RHSType Functions changed: CheckVectorCompareOperands() CheckBitwiseOperands() CheckLogicalOperands() git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139214 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
47eb89871e020babbaddeed4ee4447bc34824b9f |
07-Sep-2011 |
Richard Trieu <rtrieu@google.com> |
Change the self-reference visitor (which gives the warning for self-reference oninitalization warning of -Wuninitialized) to exclude member variables that can decay into pointers. This will cause it to no longer warn on this code: struct foo { char a[100], *e; } bar = { .e = bar.a }; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139213 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
9a776695e9f3831e59519fd45d130bff20456d7a |
07-Sep-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc-gc: Don't force a __strong type'd property to be 'weak'. This prevents a crash and should probably be flagged as error - later to come. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139211 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
0f74d1e441fdf2229118b7ca5c88db29d5e8f44f |
07-Sep-2011 |
Francois Pichet <pichet2000@gmail.com> |
In Microsoft mode, if we are inside a template class member function and we can't resolve a function call then create a type-dependent CallExpr even if the function has no type dependent arguments. The goal is to postpone name lookup to instantiation time to be able to search into type dependent base classes. With this patch in, clang will generate only 37 errors (down from 212) when parsing a typical MFC source file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139210 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaOverload.cpp
|
4019f7d384ab0d993ffd345f38ff0fa3a84e750b |
07-Sep-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc-gc: Adds support for "weak" property attribute under GC. // rdar://10073896 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139203 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
f1775fb1081db58015e6d9e4a2fd83bed440a296 |
06-Sep-2011 |
Richard Trieu <rtrieu@google.com> |
Rename variables in SemaExpr.cpp to give a more consistant naming scheme. ExprResult LHS, RHS, Expr *LHSExpr, *RHSExpr QualType LHSType, RHSType Functions changed: CheckCompareOperands() git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139187 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ba26149eb7b20bc9d4ed0581aefe7237b2a08fd8 |
06-Sep-2011 |
Richard Trieu <rtrieu@google.com> |
Rename variables in SemaExpr.cpp to give a more consistant naming scheme. ExprResult LHS, RHS, Expr *LHSExpr, *RHSExpr QualType LHSType, RHSType Functions changed: checkEnumComparison() diagnoseDistinctPointerComparison() convertPointersToCompositeType() diagnoseFunctionPointerToVoidComparison() git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139184 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
1c8cfbfc8b42e47e3a3597fbb28a15042aa219ed |
06-Sep-2011 |
Richard Trieu <rtrieu@google.com> |
Rename variables in SemaExpr.cpp to give a more consistant naming scheme. ExprResult LHS, RHS, Expr *LHSExpr, *RHSExpr QualType LHSType, RHSType Functions changed: DiagnoseBadShiftValues() CheckShiftOperands() git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139183 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
def75847c537eb56e0f548cca5d2b60a76f58a79 |
06-Sep-2011 |
Richard Trieu <rtrieu@google.com> |
Rename variables in SemaExpr.cpp to give a more consistant naming scheme. ExprResult LHS, RHS, Expr *LHSExpr, *RHSExpr QualType LHSType, RHSType Functions changed: diagnoseArithmeticOnTwoVoidPointers() checkArithmeticBinOpPointerOperands() diagnosePointerIncompatibility() CheckAdditionOperands() CheckSubtractionOperands() git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139182 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
08062aaaa5e32a9a313109a53afc1e13d3689eb5 |
06-Sep-2011 |
Richard Trieu <rtrieu@google.com> |
Rename variables in SemaExpr.cpp to give a more consistant naming scheme. ExprResult LHS, RHS, Expr *LHSExpr, *RHSExpr QualType LHSType, RHSType Functions changed: CheckVectorOperands() CheckMultiplyDivideOperands() CheckRemainderOperands() git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139181 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
f8b7f7177d722d254e255a7754446148ef514789 |
06-Sep-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement the Named Return Value Optimization (NRVO) for blocks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139178 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
|
f7720da157f84cc8cd4974ad1e804fc2fd03de6f |
06-Sep-2011 |
Richard Trieu <rtrieu@google.com> |
Rename variables in SemaExpr.cpp to give a more consistant naming scheme. ExprResult LHS, RHS, Expr *LHSExpr, *RHSExpr QualType LHSType, RHSType Functions changed: CheckTransparentUnionArgumentConstraints() CheckSingleAssignmentConstraints() InvalidOperands() git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139176 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
f7603f6ca76aec055cbf1644c89ce0dca9fa2c03 |
06-Sep-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement the Named Return Value Optimization (NRVO) for Objective-C++ methods. Fixes PR10835 / <rdar://problem/10050178>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139175 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
facef2ef39f5468068b60da26f9f9049115a361d |
06-Sep-2011 |
Richard Trieu <rtrieu@google.com> |
Rename variables in SemaExpr.cpp to give a more consistant naming scheme. ExprResult LHS, RHS, Expr *LHSExpr, *RHSExpr QualType LHSType, RHSType Functions changed: CheckAssignmentConstraints() git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139173 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
1da27a1caa3c54849db0e5314dd013166a7677a7 |
06-Sep-2011 |
Richard Trieu <rtrieu@google.com> |
Rename variables in SemaExpr.cpp to give a more consistant naming scheme. ExprResult LHS, RHS, Expr *LHSExpr, *RHSExpr QualType LHSType, RHSType Functions changed: checkPointerTypesForAssignment() checkBlockPointerTypesForAssignment() checkObjCPointerTypesForAssignment() CheckAssignmentConstraints() git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139170 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
33fc7571026084f86745df14c95b40ce46d73f43 |
06-Sep-2011 |
Richard Trieu <rtrieu@google.com> |
Rename variables in SemaExpr.cpp to give a more consistant naming scheme. ExprResult LHS, RHS, Expr *LHSExpr, *RHSExpr QualType LHSType, RHSType Functions changed: DiagnoseConditionalForNull() CheckConditionalOperands() IsArithmeticBinaryExpr() DiagnoseConditionalPrecedence() git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139167 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
5cc86807bb5510a797c75bf58ee97c416ad4a3c0 |
06-Sep-2011 |
Benjamin Kramer <benny.kra@googlemail.com> |
Spelling. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139165 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
2e8a95dd3c6194f48e610104882195399fe5135e |
06-Sep-2011 |
Richard Trieu <rtrieu@google.com> |
Rename variables in SemaExpr.cpp to give a more consistant naming scheme. ExprResult LHS, RHS, Expr *LHSExpr, *RHSExpr QualType LHSType, RHSType Functions changed: handleIntegerConversion() UsualArithmeticConversions() git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139164 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
8ef5c8ef41b8578ac754815c57728c3a3e6b422c |
06-Sep-2011 |
Richard Trieu <rtrieu@google.com> |
Rename variables in SemaExpr.cpp to give a more consistant naming scheme. ExprResult LHS, RHS, Expr *LHSExpr, *RHSExpr QualType LHSType, RHSType Functions changed: handleFloatConversion() handleComplexIntConvsersion() git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139153 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
cafd30b4cd2f1a18baecb0ae7dc5f2351b8b8bcb |
06-Sep-2011 |
Richard Trieu <rtrieu@google.com> |
Rename variables in SemaExpr.cpp to give a more consistant naming scheme. ExprResult LHS, RHS, Expr *LHSExpr, *RHSExpr QualType LHSType, RHSType Functions changed: handleComplexFloatToComplexFloatConverstion() handleComplexFloatConversion() git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139151 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b2b5658a8e4ad566303ec98caceaa3485e7635f7 |
06-Sep-2011 |
Douglas Gregor <dgregor@apple.com> |
When performing a derived-to-base cast on the right-hand side of the synthesized move assignment within an implicitly-defined move assignment operator, be sure to treat the derived-to-base cast as an xvalue (rather than an lvalue). Otherwise, we'll end up getting the wrong constructor. Optimize a direct call to a trivial move assignment operator to an aggregate copy, as we do for trivial copy assignment operators, and update the the assertion in CodeGenFunction::EmitAggregateCopy() to cope with this optimization. Fixes PR10860. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139143 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
f740012171d549c02288087044073ae3fc13622b |
05-Sep-2011 |
Francois Pichet <pichet2000@gmail.com> |
Pass 0 instead of a empty TemplateArgumentListInfo when creating a CXXDependentScopeMemberExpr to handle a "this->" fixit (lookup into dependent bases of class template) Otherwise the fixit doesn't really work for subsequent lookup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139105 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
8f4fb190852d3f86787c7e2c3dfc1b96143197ae |
04-Sep-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR10458: Finesse behaviour of C++0x features when in pre-0x mode. Accept for-range and auto with an ExtWarn, and produce a -Wc++0x-compat warning in C++98 mode when auto is used as a storage class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139102 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
|
74e611a5fd0b5977c664d13a07b625ae23527d0d |
04-Sep-2011 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Add test case for defaulted copy and move structure validation. Fix bug this uncovered. Address minor comments from Doug. Enable cxx_implicit_moves feature. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139101 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
fec0959f95454b4241e3060408656e8fbe4ac6c1 |
03-Sep-2011 |
Benjamin Kramer <benny.kra@googlemail.com> |
More unused variable removal. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139080 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
d77ba899b3ed39aa4bdba22aabc4bcd5ca6effdf |
03-Sep-2011 |
Benjamin Kramer <benny.kra@googlemail.com> |
Make helpers static, remove unused variables. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139078 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaExpr.cpp
|
bf3380a317ab09ae7f23c1bc17cb562f8175a986 |
03-Sep-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Teach -Wdangling-field to warn about temporaries bound to references as well. Also, clean up the flow of the code a bit, and factor things more nicely. Finally, add the test case that was missing from my previous commit (sorry), with new tests added to cover temporaries and other fun cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139077 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
81c6477bcd39b6b1a0a7d9c38da5ab8cbb6ea565 |
03-Sep-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Add a simple new warning to catch blatantly dangling pointer and reference members of classes. We've had several bugs reported because of this, and there's no reason not to flag it right away in the compiler. Comments especially welcome on the strategy for implementing this warning (IE, what should trigger this?) and on the text of the warning itself. I'm going to extend this to cover obvious cases with temporaries and beef up the test cases some in subsequent patches. I'll then run it over a large codebase and make sure its not misbehaving before I add it to -Wall or turn it on by default. I think this one might be a good candidate for on by default. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139075 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
43dff1bdac7b2788ccbfa0b7be85e3aa0e20ac70 |
02-Sep-2011 |
Richard Trieu <rtrieu@google.com> |
Fix some indenting issues in SemaExpr.cpp git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139042 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
8289f49c0c094bacdac9cc0da8882042506e3fc1 |
02-Sep-2011 |
Richard Trieu <rtrieu@google.com> |
Refactor UsualArithmeticConversions() in SemaExpr.cpp into several functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139033 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
cc2fca2ba2716293204901b8d2393428b965f12a |
02-Sep-2011 |
Eli Friedman <eli.friedman@gmail.com> |
Make StmtDumper::VisitCXXFunctionalCastExpr dump the attached cast kind. Fix the cast kind for a cast from floating-point to enum type. (The difference isn't actually visible, but that's just because IRGen is overly forgiving.) Per report by Enea Zaffanella on cfe-dev. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139011 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
e648ac33e52c0c28914abdf8969b01ccf892924f |
02-Sep-2011 |
Richard Trieu <rtrieu@google.com> |
Move the warning for different enum comparisons and the warning for using NULL as a non-pointer in a binary operation into separate functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138995 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
7be1be0d5e1395f9a05ed90379f4940d54646245 |
02-Sep-2011 |
Richard Trieu <rtrieu@google.com> |
Reduce code duplication for pointer comparisons in CheckCompareOperands(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138994 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
097ecd2c57916576db8c344db47d6819f89bb13e |
02-Sep-2011 |
Richard Trieu <rtrieu@google.com> |
Pull out incomplete pointer type checking code, used from arithmetic checking functions, into its own function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138993 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
26f960774e411bc1e37caed6b6a51db56fa6a2ad |
02-Sep-2011 |
Richard Trieu <rtrieu@google.com> |
Refactor CheckConditionalOperands() by moving chunks of code to helper functions making a slimmer function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138992 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
09a26ad31d63b3faa9f1fe0041156746da84cdf5 |
02-Sep-2011 |
Richard Trieu <rtrieu@google.com> |
Refactor CheckAddressOfOperand() by pulling out redundant code and moving hard coding strings from SemaExpr.cpp to DiagnosticSemaKinds.td. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138987 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
bcfd1f55bfbb3e5944cd5e03d07b343e280838c4 |
02-Sep-2011 |
Douglas Gregor <dgregor@apple.com> |
Extend the ASTContext constructor to delay the initialization of builtin types (When requested). This is another step toward making ASTUnit build the ASTContext as needed when loading an AST file, rather than doing so after the fact. No actual functionality change (yet). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138985 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaExpr.cpp
emaExprCXX.cpp
emaStmt.cpp
emaType.cpp
argetAttributesSema.cpp
|
db44a6b00768a14e8a4d388d67edef61a1ae2d63 |
02-Sep-2011 |
Richard Trieu <rtrieu@google.com> |
Refactor CheckAdditionOperands(), CheckSubtractionOperands(), and CheckIncrementDecrementOperand() in SemaExpr.cpp to move reused code to separate functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138975 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e2ca828119b8bff4a5c25c6db8ee4fec558451e7 |
01-Sep-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Don't try keeping a 'LeadingEmptyMacroLoc' in NullStmt. This fails in the face of buffering C++/ObjC method bodies. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138972 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
898267f67b8131c4bed4430e2cfaf69ccf4c2de1 |
01-Sep-2011 |
Richard Trieu <rtrieu@google.com> |
Extend the self-reference warning to catch when a constructor references itself upon initialization, such as using itself within its own copy constructor. struct S {}; S s(s); git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138969 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaInit.cpp
|
45d3d716622f12f9d8e77f2e4c8ffddf4bfe3559 |
01-Sep-2011 |
Douglas Gregor <dgregor@apple.com> |
When defining the implicit move assignment operator, don't perform semantic analysis when taking the address of an xvalue. Instead, just build the unary operator directly, since it's safe to do so (from the IRgen and AST perspectives) for any glvalue. Fixes PR10822. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138935 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
8697d308c1bdd50e5c45757ac11be701c26e9e97 |
01-Sep-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c: this patch (re)introduces objective-c's default property synthesis. This new feature is currently placed under -fobjc-default-synthesize-properties option and is off by default pending further testing. It will become the default feature soon. // rdar://8843851 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138913 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
emaDecl.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaLookup.cpp
emaObjCProperty.cpp
|
819e74544a326b90d13aa73e6497b187c6545ff5 |
31-Aug-2011 |
John McCall <rjmccall@apple.com> |
Don't assert when diagnosing a missing cast of an unknown-anytype message send to an unknown method. rdar://problem/9416370, redux. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138893 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprObjC.cpp
|
140ab234c23f392d5422691c5de1ee3c15026def |
31-Aug-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c - This patch buffers method implementations and does the Sema on their body after the entire class/category @implementation is seen. This change allows messaging of forward private methods, as well as, access to synthesized ivars of properties with foward synthesize declarations; among others. In effect, this patch removes several restrictions placed on objective-c due to in-place semantics processing of methods. This is part of // rdar://8843851. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138865 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
b0656ec72e25e5c8e463c2dc39914636f0cb06d1 |
31-Aug-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Improve the diagnostic text for -Wmissing-noreturn to include the name of the function in question when applicable (that is, not for blocks). Patch by Joerg Sonnenberger with some stylistic tweaks by me. When discussing this weth Joerg, streaming the decl directly into the diagnostic didn't work because we have a pointer-to-const, and the overload doesn't accept such. In order to make my style tweaks to the patch, I first changed the overload to accept a pointer-to-const, and then changed the diagnostic printing layer to also use a pointer-to-const, cleaning up a gross line of code along the way. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138854 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
1155c42e7b1b4e401bb0a331a6d715d637958c75 |
31-Aug-2011 |
Douglas Gregor <dgregor@apple.com> |
Allow C99 hexfloats in C++0x mode. This change resolves the standards collision between C99 hexfloats and C++0x user-defined literals by giving C99 hexfloats precedence. Also, warning about user-defined literals that conflict with hexfloats and those that have names that are reserved by the implementation. Fixes <rdar://problem/9940194>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138839 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
b89d5ed785e2eb7dd64aa38d481d939155f62c41 |
31-Aug-2011 |
Jeffrey Yasskin <jyasskin@google.com> |
Fix PR10694: Boolean conversions can be from pointers, and those conversions aren't considered narrowing conversions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138838 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
85ea7aa961deac1d754f610af8062ae3f8b4e2a5 |
30-Aug-2011 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Declare and define implicit move constructor and assignment operator. This makes the code duplication of implicit special member handling even worse, but the cleanup will have to come later. For now, this works. Follow-up with tests for explicit defaulting and enabling the __has_feature flag to come. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138821 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExpr.cpp
emaLookup.cpp
|
955fadbdfecfa24a590febe66a86519096787f2d |
30-Aug-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Remove a few mutating ObjCCategoryDecl methods. Remove -setClassInterface -setNextClassCategory -insertNextClassCategory and combine them in the Create function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138817 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
2334f3aeda318f68e763379afa5ac7a91b90caa7 |
30-Aug-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Remove a couple of unnecessary objc method lookups. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138815 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
2148011bffc011f8e5f5b6dc1e312fa4afbc10a9 |
30-Aug-2011 |
John McCall <rjmccall@apple.com> |
Be sure to emit lvalue-to-rvalue casts for loads from x-values. Doing this happens to disrupt the pattern that ARC was looking for for move optimizations, so we need to fix that simultaneously. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138789 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
2cae1e216c12c7574f5ac59cb0844d22bed9401d |
30-Aug-2011 |
Douglas Gregor <dgregor@apple.com> |
Fix a typo when determining whether to strip cv-qualifiers during template argument deduction git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138787 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
709bca84cfdd9ca41518e4ef3797abdf172b9947 |
30-Aug-2011 |
John McCall <rjmccall@apple.com> |
Update the comment on the default-argument conversion fix; thanks to Johannes Schaub for talking me around to sense. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138784 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
27f0776caf8c0d0870eb0125a13a613603848203 |
30-Aug-2011 |
Nico Weber <nicolasweber@gmx.de> |
Do not warn about [super finalize] in arc mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138776 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
05b436ef550837e2141c55c590fb16010b8658d8 |
30-Aug-2011 |
Caitlin Sadowski <supertri@google.com> |
Thread safety: added basic handling for pt_guarded_by/var and guarded_by/var annotations. We identify situations where we are accessing (reading or writing) guarded variables, and report an error if the appropriate locks are not held. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138774 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
10af87932fe4bffad539b24d512a33a1803daeae |
29-Aug-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Minor clean up of objc's decl context stuff. No change in functionality. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138742 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclObjC.cpp
|
b4d0a9678f8c592990593233e64c59247f40a74a |
29-Aug-2011 |
Caitlin Sadowski <supertri@google.com> |
Thread safety: various minor bugfixes, with test cases This patch is by DeLesley Hutchins. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138738 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
9906149972906e340f512a60f72a8676748f24d8 |
29-Aug-2011 |
Jeffrey Yasskin <jyasskin@google.com> |
Print 'int' instead of 'const int' in the narrowing conversion error, since the qualification of a type doesn't affect whether a conversion is a narrowing conversion. This doesn't work in template cases because SubstTemplateTypeParmType gets in the way. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138735 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
80cb6e69d9e85231588ae604e4bc2bc9a07389af |
29-Aug-2011 |
Nico Weber <nicolasweber@gmx.de> |
Warn on missing [super finalize] calls. This matches gcc's logic. Second half of PR10661. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138730 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDecl.cpp
emaDeclObjC.cpp
emaExprObjC.cpp
|
96a914a50cb8c01be8a3b7481cc4791e19c4285b |
28-Aug-2011 |
John McCall <rjmccall@apple.com> |
Disable the l-value to r-value conversion on C++ class types passed to varargs functions in unevaluated contexts. AFAICT, there is no standards justification for this, but it matches what other compilers do and therefore preserves compatibility with certain template metaprogramming idioms. Should fix self-host. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138715 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b8607398a5e1e552f82a86d1d8c3a4031ac4c946 |
27-Aug-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c - Make warning on unimplemented protocols point to class implementation where it is supposed to be implemented. // rdar://10009982. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138714 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
95ed7784a335aca53b0c6e952cf31a4cfb633360 |
27-Aug-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c: Treat top-level objective-c declarations , such as list of forward @class decls, in a DeclGroup node. Deal with its consequence throught clang. This is in preparation for more Sema work ahead. // rdar://8843851. Feel free to reverse if it breaks something important and I am unavailable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138709 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
emaDeclObjC.cpp
emaLookup.cpp
|
5f8d604246976a93a73549b07bbc8ee0b2061b50 |
27-Aug-2011 |
John McCall <rjmccall@apple.com> |
The lvalue-to-rvalue on structs in C++ is actually part of default argument promotion and needs to happen unconditionally. This is particularly semantically important in C++0x. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138691 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExpr.cpp
|
cc68c9bb2b827fa1b2e758e8e77eb121ffa0ad0a |
27-Aug-2011 |
Douglas Gregor <dgregor@apple.com> |
In C++0x mode, suggest nullptr as the initializer for an uninitialized pointer variable. Patch by David Blaikie! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138687 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
6aa52ec6b969faabf3764baf79d89810b8249a7e |
27-Aug-2011 |
Douglas Gregor <dgregor@apple.com> |
Introduce support for a simple module import declaration, which loads the named module. The syntax itself is intentionally hideous and will be replaced at some later point with something more palatable. For now, we're focusing on the semantics: - Module imports are handled first by the preprocessor (to get macro definitions) and then the same tokens are also handled by the parser (to get declarations). If both happen (as in normal compilation), the second one is redundant, because we currently have no way to hide macros or declarations when loading a module. Chris gets credit for this mad-but-workable scheme. - The Preprocessor now holds on to a reference to a module loader, which is responsible for loading named modules. CompilerInstance is the only important module loader: it now knows how to create and wire up an AST reader on demand to actually perform the module load. - We search for modules in the include path, using the module name with the suffix ".pcm" (precompiled module) for the file name. This is a temporary hack; we hope to improve the situation in the future. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138679 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
9414449e299036efbd411d92266983dfc24e24e9 |
26-Aug-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc-arc: Mention property's attribute by name when finding life-time conflict with its declared ivar. // rdar://10007230 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138659 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
7b2f51c758a14205f4c4215d7dc04a4cf3947b8a |
26-Aug-2011 |
Eli Friedman <eli.friedman@gmail.com> |
Don't assert on taking the address of a non-type template parameter. Fixes PR10766. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138648 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
1795d371c3ef79c3a2316677ea2014b2952915ac |
26-Aug-2011 |
Eli Friedman <eli.friedman@gmail.com> |
Make sure we don't crash printing builtin candidates for overloads of deleted operators. Fixes PR10757. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138645 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
66c203051f052cb2f9c550338fd966075a5bdcee |
26-Aug-2011 |
John McCall <rjmccall@apple.com> |
In -Wno-error=non-pod-varargs, initialize a temporary with the crazy comma expression so that we get an r-value in the varargs position. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138638 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
4906cf97fb6b7aebf5b1b8b99762f0f8fe1f15ea |
26-Aug-2011 |
John McCall <rjmccall@apple.com> |
Be sure to do unary conversions on the operand to an ARC bridged cast. Noticed by AST inspection by Ted Kremenek! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138616 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
3a51d418b267c2b302f1f6a10273049c6ce95e2b |
26-Aug-2011 |
Matt Beaumont-Gay <matthewbg@google.com> |
Fix a crash-on-invalid. Much to everyone's surprise, the default constructor for TypeResult produces an instance with Invalid == false. This seems like a decision we may want to revisit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138601 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
8c7e67d7644c3ab298bd6be724c9480da0979af6 |
26-Aug-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Don't warn on category implementing a method, if declated method in the class belongs to a synthesized property getter/setter. // rdar://10014946 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138598 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
467dc88512b4ba4bb16e274ea3771dc1415d31da |
26-Aug-2011 |
Douglas Gregor <dgregor@apple.com> |
Introduce a -cc1 option "-emit-module", that creates a binary module from the given source. -emit-module behaves similarly to -emit-pch, except that Sema is somewhat more strict about the contents of -emit-module. In the future, there are likely to be more interesting differences. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138595 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
ca4c40ab4995d195d9a4d175fa7c30dcc2d99ebf |
26-Aug-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc - fix a bug exposed by my recent decl context changes. // rdar://10015110 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138594 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
f09530f88ece49993f1b72271b0417574e897956 |
25-Aug-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Reverse r138567 until a buildbot failure is investigated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138584 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
90dedc86d9cbeabfb8c63e497ca30ddff3fa5608 |
25-Aug-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Fixes a typo in my last patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138571 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
d8e987bee9d39f9131e9be319483265fd894c108 |
25-Aug-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc -arse: Use DeclGroup for forward class declarations; as in @class foo, bar. More cleanup to follow. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138567 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
940b97f524bfc9e43f9c27a7eb97816bbc5e9bf5 |
24-Aug-2011 |
Caitlin Sadowski <supertri@google.com> |
Thread safety: Fix a few typos in last commit -- use LockID instead of Lock in comments and start a couple methods with a lowercase letter git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138460 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
0f3b4ca1764cd6d457f511d340fba504f41763c3 |
24-Aug-2011 |
Ted Kremenek <kremenek@apple.com> |
Start reworking -Wunreachable-code. The original analysis had serious flaws with how it handled SCC's of dead code, or simply having false negatives by overly suppressing warnings. WIP. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138410 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
f1d10d939739f1a4544926d807e4f0f9fb64be61 |
24-Aug-2011 |
Ted Kremenek <kremenek@apple.com> |
Constify the result of CFGStmt::getStmt(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138408 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
f40fd6bbb2684db5efb18627ea355613c235d23f |
24-Aug-2011 |
Eli Friedman <eli.friedman@gmail.com> |
Refactor and fix checking for initialization of flexible array members. The old version had the checks scattered across the code, missed some checks, and had a couple nasty bugs in existing checks. Fixes PR10648 and another similar accepts-invalid bug. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138398 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaInit.cpp
|
629f118e6928f69178fab8fad6ff755b33a69f42 |
23-Aug-2011 |
Eli Friedman <eli.friedman@gmail.com> |
Remove function parameter which always used the default value. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138368 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
3ac1fbc303d22af2e11a14023ecee7bd7b7d0bfd |
23-Aug-2011 |
Caitlin Sadowski <supertri@google.com> |
Thread-safety analysis: adding in a basic lockset tracking system. This system flags an error when unlocking a lock which was not held, locking the same lock twice, having a different lockset on each iteration of a loop, or going out of scope while still holding a lock. In order to successfully use the lockset, this patch also makes sure that attribute arguments are attached correctly for later parsing. This patch was also worked on by DeLesley Hutchins. Note: This patch has been reviewed by Chandler Carruth and Jeffrey Yasskin. Feel free to provide post-commit review comments for a subsequent patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138350 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
emaDeclAttr.cpp
|
903d6dc86bf3b6346d23607c850d3bc83a36b826 |
23-Aug-2011 |
Matt Beaumont-Gay <matthewbg@google.com> |
Fix an incorrect note. For the test case added to function-redecl.cpp, we were previously complaining about a mismatch in the parameter types, since the definition used the typedef'd type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138318 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
7939418cbdf1b610a69e6adf29cd7dc8d0e9eaf8 |
22-Aug-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc - use existing API for temporary switch of objc's decl context. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138267 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
4eb14ca3ded87493ddfab73cf4be7fc24c3d48ea |
22-Aug-2011 |
Ted Kremenek <kremenek@apple.com> |
Do not perform check for missing '[super dealloc]' under ARC as calling -dealloc is illegal in that mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138261 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
58a764940df0cd41767367eb2f4fced6f374176b |
22-Aug-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc - minor comment fix up and cleanup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138253 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
emaObjCProperty.cpp
|
9a1ecf0522ccb7a45577f856150c15af0ee1df2a |
22-Aug-2011 |
Nico Weber <nicolasweber@gmx.de> |
Warn on missing [super dealloc] calls. This matches gcc's logic. Half of PR10661. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138240 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDecl.cpp
emaDeclObjC.cpp
emaExprObjC.cpp
|
a28948f34817476d02412fa204cae038e228c827 |
22-Aug-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Restore patch I reversed in r138040. Known buildbot failures are resolved. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138234 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
emaDecl.cpp
emaDeclObjC.cpp
emaObjCProperty.cpp
|
5c5218e188b39b2e93b541156a69ef061e11aab8 |
19-Aug-2011 |
Matt Beaumont-Gay <matthewbg@google.com> |
Improve the correctness and accuracy of the message for -Wdynamic-class-memaccess git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138074 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
bc03aea4bec84d7abecabd26b8583adb687c4089 |
19-Aug-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc-arc: @property definitions should default to (strong) when not specified. // rdar://9971982 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138062 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
e6f07f538fd0eddd6c087fcc01d4e4ff19129c71 |
19-Aug-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Revers r138040. Need to look at a few buildbot failures. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138049 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
emaDecl.cpp
emaDeclObjC.cpp
emaObjCProperty.cpp
|
3dbf2f5f00cfc8b25318c119c0d39f4a49d15ebe |
19-Aug-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c: Bring objective-c handling of decl context to modernity. Instead of passing down individual context objects from parser to sema, establish decl context in parser and have sema access current context as needed. I still need to take of Doug's comment for minor cleanups. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138040 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
emaDecl.cpp
emaDeclObjC.cpp
emaObjCProperty.cpp
|
7d23b4a6e855f156bbd30cf2702ebbeb5bc57028 |
19-Aug-2011 |
Benjamin Kramer <benny.kra@googlemail.com> |
Reflow code. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138032 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
3d095febaa397fd4a5588210d5ecec1046085420 |
19-Aug-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Fix the rest of the indent goofiness here. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138024 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
47eb2b6bafefb20f53d8186a90dceaaedcb6a18b |
19-Aug-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Fix an egregious formatting goof. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138023 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
8f7462237ff542a4556775f98709ed300aa1731a |
19-Aug-2011 |
Ted Kremenek <kremenek@apple.com> |
Enhance -Wstrl-incorrect-size to not report a FIXIT for destinations that are flexible arrays or have size 1. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138004 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
d2c8972726b14313508684245aa994cccbcef248 |
18-Aug-2011 |
Kaelyn Uhrain <rikka@google.com> |
Don't accept a typo correction if the corrected identifier is the same as the uncorrected identifier. Fixes a problem pointed out by Eli. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137987 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
bd5da9d1a711e90b3bc265b4798954085c0b48d9 |
18-Aug-2011 |
Ted Kremenek <kremenek@apple.com> |
Reapply r137903, but fix the definition of size_t in the test case to use __SIZE_TYPE__ (and hence be portable). Also, change the warning to -Wstrl-incorrect-size. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137980 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
5c5f03e4020e90b9760ec547962ba02b029cc359 |
18-Aug-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[libclang] Support code-completion inside macro arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137973 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
516116308007280f0dd6661cdd94112468c3c5fc |
18-Aug-2011 |
Kaelyn Uhrain <rikka@google.com> |
Rework DiagnoseInvalidRedeclaration to add the ability to correct typos when diagnosing invalid function redeclarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137966 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
80f5b16efb658dabbcf971f42ed8b789aaaa6baa |
18-Aug-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Always mark friend function declarations in class templates as implicitly instantiable, even if we don't see a body on the friend function declaration. The body may simply have not yet been attached. This fixes PR10666. There may be an alternate, preferred implementation strategy, see my FIXME. Review would definitely be appreciated Doug. =D git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137934 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
1cb4f664fd4f72a65a145e9ff8a7e2540ab09156 |
18-Aug-2011 |
Ted Kremenek <kremenek@apple.com> |
Revert r137903, "Add experimental -Wstrlcpy-size warning that looks to see if the size argument for strlcpy/strlcat is the size of the *source*, and not the size of the *destination*. This warning is off by default (for now)." This currently doesn't work on Windows. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137920 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
5440bfaff6aec058b60bc6da75bb4f13b7a76491 |
18-Aug-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Remove the last FIXMEs on -Wunused-comparison since it got moved to entirely use the existing -Wunused-value infrastructure. This also fixes a few missed cases for -Wunused in general. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137916 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
b0a58cd0d69d213b6cd1e6a7bb7319f4f270944b |
18-Aug-2011 |
Francois Pichet <pichet2000@gmail.com> |
Downgrade "err_init_list_variable_narrowing" into a warning in Microsoft mode even if c++0x is enabled. This necessary to parse MSVC code in C++0x mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137904 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
4b53117c9942db2e08f18be25d9ccf7daf6af0b2 |
18-Aug-2011 |
Ted Kremenek <kremenek@apple.com> |
Add experimental -Wstrlcpy-size warning that looks to see if the size argument for strlcpy/strlcat is the size of the *source*, and not the size of the *destination*. This warning is off by default (for now). Warning logic provided by Geoff Keating. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137903 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
0a7efe1142d241678c91bf93ee6adb51289863a4 |
18-Aug-2011 |
John McCall <rjmccall@apple.com> |
Reorganize the return-type vs. expression checking code in block returns; no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137884 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
d963c37eb912342c8325048749e449861cf0a6e3 |
17-Aug-2011 |
John McCall <rjmccall@apple.com> |
Gather cleanups correctly in block return statements. Thanks to Ted for finding this with magic tools. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137877 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
75cf3e86d33ce810c12084126385371b335c30ba |
17-Aug-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Mark objc methods that are implicitly declared for properties (not user-declared) as implicit. This results in libclang ignoring such methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137852 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
emaObjCProperty.cpp
|
ec8058f64bbcd79bd47748f4cf8628123dd3bae6 |
17-Aug-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Treating the unused equality comparisons as something other than part of -Wunused was a mistake. It resulted in duplicate warnings and lots of other hacks. Instead, this should be a special sub-category to -Wunused-value, much like -Wunused-result is. Moved to -Wunused-comparison, moved the implementation to piggy back on the -Wunused-value implementation instead of rolling its own, different mechanism for catching all of the "interesting" statements. I like the unused-value mechanism for this better, but its currently missing several top-level statements. For now, I've FIXME-ed out those test cases. I'll enhance the generic infrastructure to catch these statements in a subsequent patch. This patch also removes the cast-to-void fixit hint. This hint isn't available on any of the other -Wunused-value diagnostics, and if we want it to be, we should add it generically rather than in one specific case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137822 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
50bf68fc9698742e36c311fc37e6e4b7de235c4b |
17-Aug-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Don't suggest assignment in implausible situation. We still warn, as the code is very likely to be buggy, but its going to require more significant changes on the part of the user to correct it in this case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137820 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
9d8eb3b2a892697aed332f6c318a8554fc2623ce |
17-Aug-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Introduce a new warning, -Wtop-level-comparison. This warning is a complement to the warnings we provide in condition expressions. Much like we warn on conditions such as: int x, y; ... if (x = y) ... // Almost always a typo of '==' This warning applies the complementary logic to "top-level" statements, or statements whose value is not consumed or used in some way: int x, y; ... x == y; // Almost always a type for '=' We also mirror the '!=' vs. '|=' logic. The warning is designed to fire even for overloaded operators for two reasons: 1) Especially in the presence of widespread templates that assume operator== and operator!= perform the expected comparison operations, it seems unreasonable to suppress warnings on the offchance that a user has written a class that abuses these operators, embedding side-effects or other magic within them. 2) There is a trivial source modification to silence the warning for truly exceptional cases: (void)(x == y); // No warning A (greatly reduced) form of this warning has already caught a number of bugs in our codebase, so there is precedent for it actually firing. That said, its currently off by default, but enabled under -Wall. There are several fixmes left here that I'm working on in follow-up patches, including de-duplicating warnings from -Wunused, sharing code with -Wunused's implementation (and creating a nice place to hook diagnostics on "top-level" statements), and handling cases where a proxy object with a bool conversion is returned, hiding the operation in the cleanup AST nodes. Suggestions for any of this code more than welcome. Also, I'd really love suggestions for better naming than "top-level". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137819 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
b33c19fef2b227cd2d8f1de0bcfc157d9e264b21 |
17-Aug-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Switch this code to use the more idiomatic 'dyn_cast' pattern. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137780 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
af1fc7af351758b0ea0d285bdfe5640128109a4e |
15-Aug-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Track in the AST whether a function is constexpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137653 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
|
9b127f3b44e685cbe513595b7e0115b0884b0604 |
15-Aug-2011 |
Matt Beaumont-Gay <matthewbg@google.com> |
Add fixit notes for -Wconstant-logical-operand. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137620 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
f20d27288c7f124dcc9c50c7c6bf766d522ceb31 |
15-Aug-2011 |
Douglas Gregor <dgregor@apple.com> |
Teach reference initialization from the result of a user-defined conversion to initialize the standard conversion *after* the user-defined conversion properly. Fixes PR10644. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137608 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
af0f4d0b2e38c810effc8b024ad2fb6604eec5d3 |
14-Aug-2011 |
Francois Pichet <pichet2000@gmail.com> |
Implement function template specialization at class scope extension in Microsoft mode. A new AST node is introduced: ClassScopeFunctionSpecialization. This node holds a FunctionDecl that is not yet specialized; then during the class template instantiation the ClassScopeFunctionSpecialization will spawn the actual function specialization. Example: template <class T> class A { public: template <class U> void f(U p) { } template <> void f(int p) { } // <== class scope specialization }; This extension is necessary to parse MSVC standard C++ headers, MFC and ATL code. BTW, with this feature in, clang can parse (-fsyntax-only) all the MSVC 2010 standard header files without any error. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137573 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
6d0ee8d77b6d37fa0dec1d55aa13429a6608e7a9 |
12-Aug-2011 |
Jeffrey Yasskin <jyasskin@google.com> |
Conversions to bool count as integer conversions for the purposes of the C++0x narrowing error. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137512 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
37bee67ea7e8cec219cb7c0f9256a9aa96c0c476 |
12-Aug-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix some comments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137491 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f80b0db7b131ce5bc9451b21d0555bd686e348f1 |
12-Aug-2011 |
Douglas Gregor <dgregor@apple.com> |
Overriding the predefined Protocol isn't something that's actually done and is likely to not work well anyway; take away this unnecessary complexity. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137465 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
772eeaefef2c883aabe35caf4543e7e32d290183 |
12-Aug-2011 |
Douglas Gregor <dgregor@apple.com> |
Switch the __int128_t and __uint128_t types over to predefined types in the AST format, which are built lazily by the ASTContext when requested. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137437 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
7a27ea52b7bd635c89bec5a9c521a3bf7d204238 |
12-Aug-2011 |
Douglas Gregor <dgregor@apple.com> |
Switch the Objective-C 'SEL' type over to a predefined type in the AST file format, lazily generating the actual declaration in ASTContext as needed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137434 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
79d6726921897811232554ed94c5d77b5b7b3fc0 |
12-Aug-2011 |
Douglas Gregor <dgregor@apple.com> |
Switch the Objective-C 'Class' type over to a predefined type in the AST file format, lazily generating the actual declaration in ASTContext as needed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137431 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
4dfd02a17c6d604c72e6936527c5e1c56d3ecb7a |
12-Aug-2011 |
Douglas Gregor <dgregor@apple.com> |
Move the creation of the predefined typedef for Objective-C's 'id' type over into the AST context, then make that declaration a predefined declaration in the AST format. This ensures that different AST files will at least agree on the (global) declaration ID for 'id', and eliminates one of the "special" types in the AST file format. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137429 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
79e610a99b43b9e6df8f9b6b59dbaf5d38a682d3 |
12-Aug-2011 |
Richard Trieu <rtrieu@google.com> |
The current warning in -Wnull-arithmetic for comparisons between NULL and non-pointers is not very helpful. This patch will update the wording to be more helpful to users. Old warning: warning: use of NULL in arithmetic operation [-Wnull-arithmetic] return 10 <= NULL; ^ ~~~~ New warning: warning: comparison between NULL and non-pointer ('int' and NULL) [-Wnull-arithmetic] return 10 <= NULL; ~~ ^ ~~~~ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137377 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
01a4cf11777bb34c35f5d251a9e95eb736d0842b |
11-Aug-2011 |
Douglas Gregor <dgregor@apple.com> |
Encapsulate the Objective-C id/Class/SEL "redefinition" types in ASTContext with accessors/mutators. The only functional change is that the AST writer won't bother writing the id/Class/SEL redefinition type if it hasn't been explicitly set; previously, it ended up being written as a synonym for the built-in id/Class/SEL. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137349 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDecl.cpp
emaExpr.cpp
emaExprMember.cpp
|
70979d4de873382d0ba13b5bd8fb3ee797384582 |
11-Aug-2011 |
Richard Trieu <rtrieu@google.com> |
Refactoring of DiagnoseBitwisePrecedence() in SemaExpr.cpp to reduce code duplication. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137259 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
a6d1e7623a9b7bd60779275c42827951a892993b |
10-Aug-2011 |
Douglas Gregor <dgregor@apple.com> |
When performing the lookup in the current scope for a member access to a member template, e.g., x.f<int> if we have found a template in the type of x, but the lookup in the current scope is ambiguous, just ignore the lookup in the current scope. Fixes <rdar://problem/9915664>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137255 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
d10f4bc5a05ce0cdc1646dbb0f706bb9d3dfc0c5 |
10-Aug-2011 |
Kaelyn Uhrain <rikka@google.com> |
Add a test case for the divide-by-zero fix in r137234 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137240 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
18f169770d9d3f826bad8f1359c8c5770c5ab16f |
10-Aug-2011 |
Kaelyn Uhrain <rikka@google.com> |
Make sure ptrarith_typesize is at least 1 to avoid division by zero git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137234 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
730cfb18463d8c2f6d0e4d4380fdd67e4abe5d97 |
10-Aug-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c: Using existing infrastructure for finding overridden methods to diagnose their type mismatch. This is a general solution for previous fixes for // rdar://6191214 and // rdar://9352731 and removes lots of duplicate code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137222 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
136da1c4320156fe8924139f58fbeed2e32cc6e8 |
10-Aug-2011 |
Douglas Gregor <dgregor@apple.com> |
When adding the base and member initializers for an implicitly-defined special member function, make sure to classify an explicitly-defaulted copy constructor as a "copy" operation. Fixes PR10622. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137219 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
c90df6a0ad61041e976e0136c29e6d57b17cba3d |
10-Aug-2011 |
Douglas Gregor <dgregor@apple.com> |
Update a comment to match the recently-changed code git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137216 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
3b6b7accb55980b149571d44e96f92dae500b0a9 |
10-Aug-2011 |
Douglas Gregor <dgregor@apple.com> |
For the availability attribute, allow a declaration to be deprecated in the same version that it is introduced. Stuff happens. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137214 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
4dc41c9b766140b507980a13acccf2f05ed19cd3 |
10-Aug-2011 |
Douglas Gregor <dgregor@apple.com> |
Rewrite default initialization of anonymous structs/unions within a constructor. Previously, we did some bogus recursion into the fields of anonymous structs (recursively), which ended up building invalid ASTs that would cause CodeGen to crash due to invalid GEPs. Now, we instead build the default initializations based on the indirect field declarations at the top level, which properly generates the sequence of GEPs needed to initialize the proper member. Fixes PR10512 and <rdar://problem/9924046>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137212 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
a19950edd94c1b80e73c9f45d821b125bd0ee72f |
10-Aug-2011 |
John McCall <rjmccall@apple.com> |
Change an assert into a check. I'm pretty sure there was a point in time when this assert was valid, but it's not valid now. Also teach this code to correctly introduce function-to-pointer decay. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137201 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b51e0315d4ffd12670441ea2284ae1188485df14 |
09-Aug-2011 |
Caitlin Sadowski <supertri@google.com> |
Thread Safety: Added basic argument parsing for all new attributes. This patch special cases the parser for thread safety attributes so that all attribute arguments are put in the argument list (instead of a special parameter) since arguments may not otherwise resolve correctly without two-token lookahead. This patch also adds checks to make sure that attribute arguments are lockable objects. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137130 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
6b63f551b183e14fab6ac51d6e5199c90b699035 |
09-Aug-2011 |
Douglas Gregor <dgregor@apple.com> |
Make sure to canonicalize the argument type of a non-type template argument of enumeration type when checking template arguments. Fixes PR10579. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137101 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
6b167f4fc40477847687c004b73166f53eeda8da |
09-Aug-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Don't emit memcpy for copying fields of arrays of volatile elements. Use the the path that generates a loop. This fixes bogus error that clang puts out. // rdar://9894548 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137080 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
2112190efa85f50af84a3c4efe03c5bf69247ba2 |
08-Aug-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c: diagnose protocol inconsistencies in following situation. When a class explicitly or implicitly (through inheritance) "conformsTo" two protocols which conflict (have methods which conflict). This patch fixes the previous patch where warnings were coming out in non-deterministic order. This is 2nd part of // rdar://6191214. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137055 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
adc7a739301d123914b7124e749b7ec74fa91397 |
08-Aug-2011 |
Kaelyn Uhrain <rikka@google.com> |
Make sure FunctionDecls aren't considered during overload resolution if there are explicit template args. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137054 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
7ca13ef64136929df852c038ebbddee070dc5119 |
08-Aug-2011 |
David Chisnall <csdavec@swan.ac.uk> |
Silence the category-replacing-class-method warning for +load: category implementations of +load do not replace the class definition in a meaningful sense, they are run when the category loads, the +load method for class is run when the class is loaded. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137053 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
a8e0cd8cdecc7e0ba1792e46773b884c6eed4829 |
06-Aug-2011 |
John McCall <rjmccall@apple.com> |
Do l-value conversion, etc., on a switch condition expression in ActOnStartOfSwitchStmt (i.e. before binding up a full-expression) instead of ActOnFinishSwitchStmt. Among other things, this means that property l-values are properly converted inside the full-expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137014 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
emaStmt.cpp
|
22d4fed17df02f5fa07165a69228b0b0f1a73a28 |
06-Aug-2011 |
Benjamin Kramer <benny.kra@googlemail.com> |
Only look at decls after the current one when checking if it's the last field in a record. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137009 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
270ba59c4111c9e9d040cf3b95f1f3e0a8440dff |
06-Aug-2011 |
Ted Kremenek <kremenek@apple.com> |
Revert 136984 and 136927. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136998 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
d6c8865e6f306556b7eef972ceec2cc8ba026a0d |
06-Aug-2011 |
Kaelyn Uhrain <rikka@google.com> |
Perform array bounds checking in more situations and properly handle special case situations with the unary operators & and *. Also extend the array bounds checking to work with pointer arithmetic; the pointer arithemtic checking can be turned on using -Warray-bounds-pointer-arithmetic. The changes to where CheckArrayAccess gets called is based on some trial & error and a bunch of digging through source code and gdb backtraces in order to have the check performed under as many situations as possible (such as for variable initializers, arguments to function calls, and within conditional in addition to the simpler cases of the operands to binary and unary operator) while not being called--and triggering warnings--more than once for a given ArraySubscriptExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136997 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExpr.cpp
emaExprCXX.cpp
|
8e68f1c8a2919ea83c2053731d6011074f1062e1 |
05-Aug-2011 |
Roman Divacky <rdivacky@freebsd.org> |
Let attribute((cdecl)) and company override -mrtd default calling convention. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136971 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
c268434b332bbe57950d977633369bf5822d9554 |
05-Aug-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Flesh out the -Warray-bounds detection of C89 tail-padded one-element arrays. This now suppresses the warning only in the case of a one-element array as the last field in a struct where the array size is a literal '1' rather than any macro expansion or template parameter. This doesn't distinguish between the language standard in use to allow code which dates from C89 era to compile without the warning even in C99 and C++ builds. We could add a separate warning (under a different flag) with fixit hints to switch to a flexible array, but its not clear that this would be desirable. Much of the code using this idiom is striving for maximum portability. Tests were also fleshed out a bit, and the diagnostic itself tweaked to be more pretty w.r.t. single elment arrays. This is more ugly than I would like due to APInt's not being supported by the diagnostic rendering engine. A pseudo-patch for this was proposed by Nicola Gigante, but I reworked it both for several correctness issues and for code style. Sorry this was so long in coming. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136965 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
ba44712b0e578a851751e199bb75dbbff5836fed |
05-Aug-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Finally getting around to re-working this to more accurately white-list 1-element character arrays which are serving as flexible arrays. This is the initial step, which is to restrict the 1-element array whitelist to arrays that are member declarations. I'll refine it from here based on the proposed patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136964 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
cc2f30c4ed7770b6005bd55b529a55c1fcc250fc |
05-Aug-2011 |
Matt Beaumont-Gay <matthewbg@google.com> |
Extend memset/memcpy/memmove checking to include memcmp git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136950 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
ace5e76e5c707f4a8447abc01ef540fa6d57ff95 |
05-Aug-2011 |
Kaelyn Uhrain <rikka@google.com> |
Have the typo correction in DiagnoseEmptyLookup properly handle template functions when performing function overload resolution. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136948 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaOverload.cpp
|
844d5728557a324fe10ad990dd537e59780873ef |
05-Aug-2011 |
Kaelyn Uhrain <rikka@google.com> |
Fix a small bug where DiagnoseEmptyLookup would no longer print any messages when performing typo correction involving any overloaded template functions. The added test cases, while currently demontrating sub-optimal behavior, will not trigger any messages without the 1-line change to SemaExpr.cpp. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136943 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
42d7b2d25b6f90dc397886d05502b10ab5a8b51b |
05-Aug-2011 |
Matt Beaumont-Gay <matthewbg@google.com> |
Specialize diag::warn_unused_call for the "warn_unused_result" attribute, so it can be controlled with a distinct flag. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136941 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
6a3bec320e5617922f1f15657dcdaeb22610ca23 |
04-Aug-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c: diagnose protocol inconsistencies in following situation. When a class explicitly or implicitly (through inheritance) "conformsTo" two protocols which conflict (have methods which conflict). This is 2nd part of // rdar://6191214. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136927 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
4d9d157afb35742bc6348defbe45bc6de780ec77 |
04-Aug-2011 |
Kaelyn Uhrain <rikka@google.com> |
Match type names and give more info for out-of-line function definition errors. Having a function declaration and definition with different types for a parameter where the types have same (textual) name can occur when an unqualified type name resolves to types in different namespaces in each location. The error messages have been extended by adding notes that point to the first parameter of the function definition that doesn't match the declaration, instead of a generic "member declaration nearly matches". The generic message is still used in cases where the mismatch is not in the paramenter list, such as mismatched cv qualifiers on the member function itself. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136891 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
a56a992cbe651051a9cfb75c3ea411df4dc4c201 |
04-Aug-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Refactoring of my last patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136841 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
f0c1d8f804e7854bedf3f241409185951ee67866 |
03-Aug-2011 |
Kaelyn Uhrain <rikka@google.com> |
Improve overloaded function handling in the typo correction code. Change TypoCorrection to store a set of NamedDecls instead of a single NamedDecl. Also add initial support for performing function overload resolution to Sema::DiagnoseEmptyLookup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136807 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaLookup.cpp
emaOverload.cpp
|
74133075f5024ce87e4c1eb644d77c20e1c521f4 |
03-Aug-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c: Methods declared in methods must type match those declated in its protocols. First half or // rdar://6191214 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136794 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
0bbea1b87ef3849f5a8591c480f114fb4393d493 |
03-Aug-2011 |
Douglas Gregor <dgregor@apple.com> |
Make the type of the IntegerLiteral for bitfield paddings an actual integer, and initialise its TypeSourceInfo. The initialisation fixes a crash when using pre-compiled preambles with C++ code-completion. From Erik Verbruggen! Fixes PR10511. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136786 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
fc4b191b07df309d95aefae39f4cf7c456c91afa |
03-Aug-2011 |
John McCall <rjmccall@apple.com> |
In ARC, don't try to reclaim the result of a call to performSelector unless done in a context where the value is used retained. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136769 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
9e6a1caf18565849cc7bec265bcb0b8af4e1d93a |
02-Aug-2011 |
Chris Lattner <sabre@nondot.org> |
disable array bounds overflow warning for cases where an array has a single element. This disables the warning in cases where there is a clear bug, but this is really rare (who uses arrays with one element?) and it also silences a large class of false positive issues with C89 code that is using tail padding in structs. A better version of this patch would detect when an array is in a tail position in a struct, but at least patch fixes the huge false positives that are hitting postgres and other code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136724 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
39997fc2b8d300a85ead0a7d687964c6e63a8110 |
02-Aug-2011 |
Benjamin Kramer <benny.kra@googlemail.com> |
Make helper functions static. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136679 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
67e29334f2b1affe7a634d492b1db8ce0eb2f1b7 |
02-Aug-2011 |
Richard Trieu <rtrieu@google.com> |
Fix formatting of SemaExpr.cpp, mainly fixing lines greater than 80 characters. No functional change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136678 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
7898005b35f8ee5c639e1247ce56b63004b86b03 |
02-Aug-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c: reverse patch for // rdar://9818354 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136658 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
f78c4e57122dad4430329135b966dfc241a6425b |
30-Jul-2011 |
Douglas Gregor <dgregor@apple.com> |
Introduce a Fix-It for the "missing sentinel" warning, adding an appropriate sentinel at the end of the argument list. Also, put the sentinel warnings under -Wsentinel. Fixes <rdar://problem/8764236>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136566 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
d2d8be6a27d0ef73d46039604682f7890e1cc3e0 |
30-Jul-2011 |
Douglas Gregor <dgregor@apple.com> |
Add code completion to produce "else" blocks after an "if" statement. Fixes <rdar://problem/9229438>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136564 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
e42447021239015db97202fb04c304d82e84135f |
30-Jul-2011 |
Douglas Gregor <dgregor@apple.com> |
When producing code completion results for variadic macros, fold the variadic bit (", ..." or ", args...") into the prior placeholder, like we do with functions and methods. Fixes <rdar://problem/9740808>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136563 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
6fa14dde4ce536c4b09f9b52cad5471682ec6fd3 |
30-Jul-2011 |
Douglas Gregor <dgregor@apple.com> |
Add the various parameter-passing keywords for Distributed Objects (such as in, inout, byref, and oneway) to code completion results. Fixes <rdar://problem/8844158>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136562 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
0f91c8ccb398be2bd40dc402309bd79737542396 |
30-Jul-2011 |
Douglas Gregor <dgregor@apple.com> |
When performing code completion after at @interface, allow both already-defined and forward-declared results. Already-defined results are fine because they could be the start of a category. Fixes <rdar://problem/9811691>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136559 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
|
4eb7522e70a7212328089f0ef490380a9ba322a3 |
30-Jul-2011 |
Douglas Gregor <dgregor@apple.com> |
When complaining about a non-POD second argument to va_arg, use a special diagnostic for ARC ownership-qualified types. We wouldn't want to expose Objective-C programmers to the term "POD", would we? Fixes <rdar://problem/9772982>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136558 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
9aab1489866a5afe1a8a3267f9ad7124034fd644 |
29-Jul-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
Fix an inconsistency in Sema::ConvertArgumentsForCall in that the callee note diagnostic was not emitted in the case where there were too few arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136437 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
fefe91e6017321aa7db431b94cb3615f6c97da7a |
29-Jul-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c: warn if implementation of a method in category masks an existing method in its primary class, class extensions, and primary class's non-optional protocol methods; as primary class, or one of its subclass's will implement this method. This warning has potential of being noisy so it has its own group. // rdar://7020493 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136426 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
d5612a235fdd5df145c485c6ac489fcfbf7120d3 |
28-Jul-2011 |
Anna Zaks <ganna@apple.com> |
Add a fixit for removal of unused label. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136389 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
db33e14661c7a118a2d9a777ae69c0ecaa036e1e |
28-Jul-2011 |
Caitlin Sadowski <supertri@google.com> |
Added basic parsing for all remaining attributes, thread safety analysis. This includes checking that the attributes are applied in the correct contexts and with the correct number of arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136383 91177308-0d34-0410-b5e6-96231b3b80d8
ttributeList.cpp
emaDeclAttr.cpp
|
6722155dfe056e2c3dfbacbcaffae04dea0c2be0 |
28-Jul-2011 |
Anna Zaks <ganna@apple.com> |
Add */& mismatch fixit generation to the Sema::DiagnoseAssignmentResult(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136379 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprCXX.cpp
|
6e4a3f5c59664af13e02e9bb58c2810b830e3b96 |
28-Jul-2011 |
Douglas Gregor <dgregor@apple.com> |
Make the deserialization of Sema::PendingInstantiations lazy. At this point, ASTReader::InitializeSema() has very little interesting work, *except* issues stemming from preloaded declarations. That's something we'll still need to cope with. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136378 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
f3546eeef1eed4661b77b93b91a29be1bf5f7d0b |
28-Jul-2011 |
Anna Zaks <ganna@apple.com> |
Refactor the */& mismatch fixit generation out of SemaOverload and provide a simple conversion checking function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136376 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
emaFixItUtils.cpp
emaOverload.cpp
|
dfe6543e12eca5c79421378b7fa6b3e8fc403e63 |
28-Jul-2011 |
Douglas Gregor <dgregor@apple.com> |
Lazily deserialize Sema::VTableUses. Plus, fix the utterly and completely broken deserialization mapping code we had for VTableUses, which would have broken horribly as soon as our local-to-global ID mapping became interesting. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136371 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
31e37b2d7b4815fdea6a35d49f33005562f0d494 |
28-Jul-2011 |
Douglas Gregor <dgregor@apple.com> |
Make Sema::WeakUndeclaredIdentifiers lazily deserialized. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136368 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDeclAttr.cpp
|
fdde9e719ad75e656a1475a36b06c2f88f0957cc |
28-Jul-2011 |
Caitlin Sadowski <supertri@google.com> |
Added parsing for guarded_var, pt_guarded_var, lockable, scoped_lockable, and no_thread_safety_analysis attributes, all for thread safety analysis git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136364 91177308-0d34-0410-b5e6-96231b3b80d8
ttributeList.cpp
emaDeclAttr.cpp
|
5b9dc7caaef0469babc45dd8e713727a136ce517 |
28-Jul-2011 |
Douglas Gregor <dgregor@apple.com> |
Make Sema::ReferencedSelectors lazily deserialized. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136357 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
ec12ce2f6da44bfc9048772327a3924498099d60 |
28-Jul-2011 |
Douglas Gregor <dgregor@apple.com> |
Make Sema::LocallyScopedExternalDecls lazily deserialized. In theory, we could turn this into an on-disk hash table so we don't load the whole thing the first time we need it. However, it tends to be very, very small (i.e., empty) for most precompiled headers, so it isn't all that interesting. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136352 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
a126f17ca83b985300c1f65cee647bea108db657 |
28-Jul-2011 |
Douglas Gregor <dgregor@apple.com> |
Switch Sema::DynamicClasses over to LazyVector git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136317 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
d58a0a55e64a7c410a80e9d6dcd899e61e99cc4d |
28-Jul-2011 |
Douglas Gregor <dgregor@apple.com> |
Switch Sema::ExtVectorDecls over to LazyVector. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136314 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprMember.cpp
|
0129b561a1452bf057f6b18b6a1de815d487ab81 |
27-Jul-2011 |
Douglas Gregor <dgregor@apple.com> |
Turn Sema::DelegatingCtorDecls into a LazyVector. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136273 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
07524039dce5c820f111a1b3f772b4261f004b4a |
27-Jul-2011 |
John McCall <rjmccall@apple.com> |
The lock operand to an @synchronized statement is also supposed to be a full-expression; make it so. In ARC, make sure we retain the lock for the entire protected block. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136271 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
reeTransform.h
|
a2ee20aa9660851080135219cac5b31fbac08b78 |
27-Jul-2011 |
Douglas Gregor <dgregor@apple.com> |
Switch Sema::UnusedFileScopedDecls over to a LazyVector. - Added LazyVector::erase() to support this use case. - Factored out the LazyDecl-of-Decls to RecordData translation in the ASTWriter. There is still a pile of code duplication here to eliminate. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136270 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
a862320972e63349524dc9aa744dec1b95f54ba1 |
27-Jul-2011 |
Douglas Gregor <dgregor@apple.com> |
Introduce a new data structure, LazyVector, which is a vector whose contents are lazily loaded on demand from an external source (e.g., an ExternalASTSource or ExternalSemaSource). The "loaded" entities are kept separate from the "local" entities, so that the two can grow independently. Switch Sema::TentativeDefinitions from a normal vector that is eagerly populated by the ASTReader into one of these LazyVectors, making the ASTReader a bit more like me (i.e., lazy). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136262 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
020972d5d6dc1f3c49839cfbadcccf4cbefb2f4d |
27-Jul-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
Forbid address-space-qualified function types, per TR 18037 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136257 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
29e3ef8df84da298e7553a84276af4909ff6e9eb |
27-Jul-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
Fix TR 18037 citation in SemaType.cpp git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136256 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
5cee1195584fa8672253139c86e922daeda69b9e |
27-Jul-2011 |
Douglas Gregor <dgregor@apple.com> |
Add support for C++0x unicode string and character literals, from Craig Topper! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136210 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDeclAttr.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaInit.cpp
emaStmt.cpp
emaTemplate.cpp
|
990567cb60e8530ba01b41d4e056e32b44b95ec0 |
27-Jul-2011 |
John McCall <rjmccall@apple.com> |
Clean up the analysis of the collection operand to ObjC for-in statements; specifically, make sure to close over any temporaries or cleanups it might require. In ARC, this has implications for the lifetime of the collection, so emit it with a retain and release it upon exit from the loop. rdar://problem/9817306 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136204 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
reeTransform.h
|
dfb6ae1d8d114772bd91b7079c7e4bf4b517e63c |
27-Jul-2011 |
Francois Pichet <pichet2000@gmail.com> |
In Microsoft mode, if we are within a templated function and we can't resolve Identifier during BuildCXXNestedNameSpecifier, then extend the SS with Identifier. This will have the effect of resolving Identifier during template instantiation. The goal is to be able to resolve a function call whose nested-name-specifier is located inside a dependent base class. class C { public: static void foo2() { } }; template <class T> class A { public: typedef C D; }; template <class T> class B : public A<T> { public: void foo() { D::foo2(); } }; Note that this won't work if the NestedNameSpecifier refers to a type. This fixes 1 error when parsing the MSVC 2010 standard headers file with clang. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136203 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
|
ef8c79c52200e4f7c32f8ef2744c1557b7f3f3ea |
27-Jul-2011 |
Eli Friedman <eli.friedman@gmail.com> |
Re-fix r136172 so it isn't an error; apparently, some people are fond of their undefined behavior. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136183 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
191591336f639dad1504e863733fb831645c1644 |
27-Jul-2011 |
Jeffrey Yasskin <jyasskin@google.com> |
This patch implements as much of the narrowing conversion error specified by [dcl.init.list] as is possible without generalized initializer lists or full constant expression support, and adds a c++0x-compat warning in C++98 mode. The FixIt currently uses a typedef's basename without qualification, which is likely to be incorrect on some code. If it's incorrect on too much code, we should write a function to get the string that refers to a type from a particular context. The warning is currently off by default. I'll fix LLVM and clang before turning it on. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136181 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
e33f643230738400f0bf5503a87d886e9bc635de |
27-Jul-2011 |
Eli Friedman <eli.friedman@gmail.com> |
Diagnose trying to delete a pointer to an abstract class with a non-virtual destructor. PR10504. I'm not completely sure the standard allows us to reject this, but if it doesn't, it should. :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136172 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
e52c91478a144f913019591ee1839e1846345f71 |
27-Jul-2011 |
Eli Friedman <eli.friedman@gmail.com> |
A couple minor issues with Sema for delete: 1. Attempting to delete an expression of incomplete class type should be an error, not a warning. 2. If someone tries to delete a pointer to an incomplete class type, make sure we actually emit the delete expression after we warn. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136161 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
473506bd9dfd84944c2c5ca2c2a38814f46febc6 |
26-Jul-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
In ARC we emit an error when compiling: @interface Foo : NSObject @property (readonly) id myProp; @end @implementation Foo @synthesize myProp; @end t.m:9:13: error: ARC forbids synthesizing a property of an Objective-C object with unspecified storage attribute @synthesize myProp; ^ which is fine, we want the ownership of the synthesized ivar to be explicit. But we should _not_ emit an error for the following cases, because we can get the ownership either from the declared ivar or from the property type: @interface Foo : NSObject { __weak id _myProp1; id myProp2; } @property (readonly) id myProp1; @property (readonly) id myProp2; @property (readonly) __strong id myProp3; @end @implementation Foo @synthesize myProp1 = _myProp1; @synthesize myProp2; @synthesize myProp3; @end  rdar://9844006. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136155 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
2760455396abd72f0842122170dfab6126c46891 |
26-Jul-2011 |
Kaelyn Uhrain <rikka@google.com> |
Revert r136046 while fixing handling of e.g. &foo[index_one_past_size] git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136113 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExpr.cpp
|
8eaefdc6aed76e26619caffed030a57438280897 |
26-Jul-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Provide fixit for static use of objective-c type in few more places and in each instance, fix up the type to the expected type. // rdar://9603056 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136103 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
a0651c5f5d1c8928d3ae062435ed9cf0aa0d04ba |
26-Jul-2011 |
Benjamin Kramer <benny.kra@googlemail.com> |
Eliminate a bunch of temporary strings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136092 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
0a47d69af8bda945352997af3da4687a3356096a |
26-Jul-2011 |
Douglas Gregor <dgregor@apple.com> |
Add new libclang API, clang_codeCompleteGetObjCSelector(), which provides the partial Objective-C selector used in a code completion. From Connor Wakamo! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136084 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
2ad63cf7146268a336b5a931f626adaa8a5150f0 |
26-Jul-2011 |
Douglas Gregor <dgregor@apple.com> |
When we decide not to rebuild an instantiated C++ 'new' expression that allocates an array of objects with a non-trivial destructor, be sure to mark the destructor is "used". Fixes PR10480 / <rdar://problem/9834317>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136081 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
da8b24961acfbeff47f585109b7559ba60e574cb |
26-Jul-2011 |
Douglas Gregor <dgregor@apple.com> |
Objective-C++ ARC: When performing template argument deduction for a lifetime-qualified template parameter, ensure that the deduced template argument is a lifetime type. Fixes <rdar://problem/9828157>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136078 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
108f756bebd991eaa980cfb9994353612a2e5ff6 |
26-Jul-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Cleanup the stray comments and variables I could dig out of Sema to refer to 'expansion' instead of 'instantiation'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136060 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaChecking.cpp
emaType.cpp
|
b48f7c059e74cd5395ca542c1a96be16e42f3d80 |
26-Jul-2011 |
Kaelyn Uhrain <rikka@google.com> |
Expand array bounds checking to work in the presence of unary & and *, and to work with pointer arithmetic in addition to array indexing. The new pointer arithmetic porition of the array bounds checking can be turned on by -Warray-bounds-pointer-arithmetic (and is off by default). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136046 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExpr.cpp
|
22f7bb7e7742bd65e903ef4c4a738d9e01e5d08c |
26-Jul-2011 |
Kaelyn Uhrain <rikka@google.com> |
Test commit git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136044 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
dcf1011876d8a472aeb05617c1a84c3d74fbd7ce |
25-Jul-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c: Provide a 'fixit' when class was used to declare a static object. // rdar://9603056 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135970 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
430d7a1a621a126a9ffe442ad8987ba02b46dae9 |
25-Jul-2011 |
Douglas Gregor <dgregor@apple.com> |
Added clang_getCursorReferenceNameRange to libclang to to retrieve parts of a cursor reference, from Erik Verbruggen! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135920 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
402785357ab053dd53f4fdd858b9630a5e0f8bad |
25-Jul-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Mechanically rename SourceManager::getInstantiationLoc and FullSourceLoc::getInstantiationLoc to ...::getExpansionLoc. This is part of the API and documentation update from 'instantiation' as the term for macros to 'expansion'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135914 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDeclCXX.cpp
|
eee3ef177a171c06f826c331e7a9e256d01eaeb0 |
24-Jul-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc: clang should warn if redeclaration of methods declared in protocol in the class qualified by the protocol have type conflicts. To reduce amount of noise, this is done when class is implemented. // rdar://9352731 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135890 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
bf6e3179eaf66b3eca43cbdbd09b71db40fa85fc |
23-Jul-2011 |
Douglas Gregor <dgregor@apple.com> |
Tests for explicit conversion operators, along with a fix to avoid considering explicit conversion operators when determining surrogate functions. Fixes PR10453. Note that there are a few test cases where Clang is still wrong because it does not implement DR899; see PR10456. Patch by Jonathan Sauer! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135857 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
2d3ba4f5a923a90c3fc290ddfba5e36c2d0a9b46 |
23-Jul-2011 |
Chris Lattner <sabre@nondot.org> |
Move ArrayRef to LLVM.h and eliminate now-redundant qualifiers, patch by Jon Mulder! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135855 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
5f9e272e632e951b1efe824cd16acb4d96077930 |
23-Jul-2011 |
Chris Lattner <sabre@nondot.org> |
remove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports them into the clang namespace. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135852 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
ttributeList.cpp
odeCompleteConsumer.cpp
elayedDiagnostic.cpp
umpDiagnostics.cpp
ema.cpp
emaAccess.cpp
emaCXXCast.cpp
emaChecking.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprMember.cpp
emaExprObjC.cpp
emaInit.cpp
emaLookup.cpp
emaOverload.cpp
emaStmt.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaTemplateVariadic.cpp
emaType.cpp
|
0ad92314852c4349685946997ca0967a32ccdb99 |
22-Jul-2011 |
David Majnemer <david.majnemer@gmail.com> |
kill a FIXME in IsIntegralPromotion IsIntegralPromotion should consider the signedness of FromType when calculating promotions. This, as of now, cannot be exercised on any platform so there is no corresponding test. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135803 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
dc7c5ad7a15914b7ae24f31f18a20ad2f8ecd0bc |
22-Jul-2011 |
John McCall <rjmccall@apple.com> |
Document the existing objc_precise_lifetime attribute. Introduce and document a new objc_returns_inner_pointer attribute, and consume it by performing a retain+autorelease on message receivers when they're not immediately loaded from an object with precise lifetime. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135764 91177308-0d34-0410-b5e6-96231b3b80d8
ttributeList.cpp
emaDeclAttr.cpp
|
d837c0dc361a000b951593eaaa80c46b73d15b1d |
22-Jul-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Move duplicate uninitialized warning suppression into the AnalysisBasedWarnings Sema layer and out of the Analysis library itself. This returns the uninitialized values analysis to a more pure form, allowing its original logic to correctly detect some categories of definitely uninitialized values. Fixes PR10358 (again). Thanks to Ted for reviewing and updating this patch after his rewrite of several portions of this analysis. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135748 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
da6d976b0f2470bb3f854913bc3af3245845ad60 |
22-Jul-2011 |
John McCall <rjmccall@apple.com> |
Move this ObjCImplementationDecl member function into libAST where it belongs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135746 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
6c2c250db1e2d0138bbfaadbbec3118db7e8a8c9 |
22-Jul-2011 |
John McCall <rjmccall@apple.com> |
In Objective-C, pull arbitrary attributes from overridden methods, including indirectly overridden methods like those declared in protocols and categories. There are mismatches that we would like to diagnose but aren't yet, but this is fine for now. I looked at approaches that avoided doing this lookup unless we needed it, but the infer-related-result-type checks were doing it anyway, so I left it with the same fast-path check for no previous declartions of that selector. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135743 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclObjC.cpp
|
db8264e4c5ffd7af6fbad4ca4306bd382bb02691 |
22-Jul-2011 |
Jordy Rose <jediknil@belkadan.com> |
Add a const overload for ObjCInterfaceDecl::all_declared_ivar_begin. This was previously not-const only because it has to lazily construct a chain of ivars the first time it is called (and after the chain is invalidated). In practice, all the clients were just const_casting their const Decls; all those now-unnecessary const_casts have been removed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135741 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
527eec86ce96695a7198073e574bf4a184848d24 |
22-Jul-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c: Any use of @synthesize or @dynamic lexically after a method (or C function) implementation will be rejected with a compilation error in ARC mode, and a compiler warning otherwise. This may cause breakage in non-arc (and arc) tests which don't expect warning/error. Feel free to fix the tests, or reverse the patch, if I am unavailable. // rdar://9818354 - WIP git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135740 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
feb4fa165c5e8c40ffc8b1b655cc3c8071862b20 |
21-Jul-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Add FixIt hint for missing 'id' type. // rdar://9615045 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135685 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
aab24a616de59c543d78d7636f22fb786053fefa |
21-Jul-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc - Diagnose missing method return type specifier under a warning flag. // rdar://9615045 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135681 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
4110e1399bf940317cee58d6a48a92f7b7a4ce54 |
21-Jul-2011 |
Eric Christopher <echristo@apple.com> |
Speculatively revert 135649 to bring back the g++ testing bots. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135668 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
bc5cb8a5fe2b88f917d47ceb58b53696a121e57e |
21-Jul-2011 |
Ted Kremenek <kremenek@apple.com> |
Simplify passing of CFGBuildOptions around for AnalysisContext. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135666 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
5254161b269829b74e7a9379b1bdfa27de72d7cc |
21-Jul-2011 |
Richard Trieu <rtrieu@google.com> |
Remove warning for conditional operands of differend signedness from -Wsign-compare. Cases that previously warn on this will have a different warning emitted from -Wsign-conversion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135664 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
e081a61bb0dc546fd623bf259435d17c9a4ea0d5 |
21-Jul-2011 |
Douglas Gregor <dgregor@apple.com> |
New libclang API to expose container type for code completion, from Connor Wakamo! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135651 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
98c6bda3be11b78a10026f142a399aa1918900f2 |
21-Jul-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
When copping out on a friend template declaration, be sure to mark its access specifier as public. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135649 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
ffe9edd45f26873d58e7ddf79d403dd8072b748b |
21-Jul-2011 |
Anna Zaks <ganna@apple.com> |
Addressing code review comments for commit 135509 - Add FixItHints in case a C++ function call is missing * or & operators on git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135643 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
f2dd68fb37a62571a4985c8dd05310ac90d07ef0 |
21-Jul-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc-arc: Fixes a crash @throw'ing an objc message. // pr10411 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135638 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
909bcb37c4bc1ea1a62d505881defc3c3ba0eca3 |
20-Jul-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
arc-objc++: Issue an arc specific diagnostic when overload resolution fails because of lifetime differences of parameter and argument type. // rdar://9790531 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135593 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
9d102547dc44d064b40473a5a5166a8bb0dec99a |
20-Jul-2011 |
Logan Chien <loganchien@google.com> |
Merge with clang upstream r135574 (Jul 20th 2011) Change-Id: Ib6cc2ba08a63e4cf8febc05fb6e3f2ca58f1d71d
|
686775deca8b8685eb90801495880e3abdd844c2 |
20-Jul-2011 |
Chris Lattner <sabre@nondot.org> |
now that we have a centralized place to do so, add some using declarations for some common llvm types: stringref and smallvector. This cleans up the codebase quite a bit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135576 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
0ff6f8f038f32d85c32fd984673cea51ef737b22 |
20-Jul-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Replace r134583's fix for PR10290 with one which also works for non-value-dependent cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135543 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
b89fe6b04c5b8a2d080c1c5605b72f809fc9ee68 |
19-Jul-2011 |
Anna Zaks <ganna@apple.com> |
Add FixItHints in case a C++ function call is missing * or & operators on one/several of it's parameters (addresses http://llvm.org/PR5941). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135509 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
0c8e5a0f70cbdb800d939c1807d05f380b2854d4 |
19-Jul-2011 |
Ted Kremenek <kremenek@apple.com> |
Reduce -Wuninitialized time by 22% (on sqlite) by removing the recursive AST crawl. This is accomplished by forcing the needed expressions for -Wuninitialized to always be CFGElements in the CFG. This allows us to remove a fair amount of the code for -Wuninitialized. Some fallout: - AnalysisBasedWarnings.cpp now specifically toggles the CFGBuilder to create a CFG that is suitable for -Wuninitialized. This is a layering violation, since the logic for -Wuninitialized is in libAnalysis. This can be fixed with the proper refactoring. - Some of the source locations for -Wunreachable-code warnings have shifted. While not ideal, this is okay because that analysis already needs some serious reworking. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135480 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
b5f65475d25b67f87e368daa1583b762af7e2e45 |
18-Jul-2011 |
Chris Lattner <sabre@nondot.org> |
Use the new llvm::TinyPtrVector class, which implements exactly what ShadowMapEntry was. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135368 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
99d3594a56fb8e6900611ede7330aae61e924ec4 |
17-Jul-2011 |
Nowar Gu <nowar100@gmail.com> |
Merge upstream to r135359 at Sun. 17th July 2011.
|
12efd57ee474c06880a7434ece21a39ac3f34e24 |
16-Jul-2011 |
Benjamin Kramer <benny.kra@googlemail.com> |
Zero this struct in a way that neither depends on the size of the struct nor triggers warnings from GCC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135351 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
57080fbac1ccce702255423335d52e81bcf17b6b |
16-Jul-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Remove a gcc warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135348 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
174cba922331b896949d02d8b1a05f1998ed98e1 |
16-Jul-2011 |
Nowar Gu <nowar100@gmail.com> |
Merge upstream to r135344 at Sat. 16th July 2011.
|
1e159bc43cf6575a415dbe8deb7fc49611002ffe |
16-Jul-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Fix a typo. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135328 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
61b4bc80e943578ae855810918a1dc9697dbd15b |
16-Jul-2011 |
Tanya Lattner <tonic@nondot.org> |
This handles the missing cases of opencl vector literals. Test cases provided by Anton Lokhmot. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135322 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaInit.cpp
|
3e1ef7849845a9e7bf79156bbb8a2c26d77a1d2e |
15-Jul-2011 |
Jeffrey Yasskin <jyasskin@google.com> |
Use the new APFloat::convertToInt(APSInt) function to simplify uses of convertToInt(integerParts*) and make them more reliable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135279 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
5b8968cc599eb6100bb73ae87be9d6cd2577ac9e |
15-Jul-2011 |
Douglas Gregor <dgregor@apple.com> |
Store bracket locations for array subscript expressions, from Erik Verbruggen! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135275 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
reeTransform.h
|
91ae6b43b3a294243698cdb544dd7a18efa4c7a8 |
15-Jul-2011 |
Douglas Gregor <dgregor@apple.com> |
When creating a property in a class extension, make sure to check its attributes. Fixes <rdar://problem/9561076>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135273 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
4e9272de54094da012d49990acaf06553369d6ec |
15-Jul-2011 |
John McCall <rjmccall@apple.com> |
Restore the C-style cast hack for enum template arguments, which is required given the current setup for template argument deduction substitution validation, and add a test case to make sure we don't break it in the future. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135262 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
91a5755ad73c5dc1dfb167e448fdd74e75a6df56 |
15-Jul-2011 |
John McCall <rjmccall@apple.com> |
Create a new expression node, SubstNonTypeTemplateParmExpr, to represent a fully-substituted non-type template parameter. This should improve source fidelity, as well as being generically useful for diagnostics and such. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135243 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateInstantiate.cpp
reeTransform.h
|
e5adf59d3a2699752d4981f03927459a38b2df18 |
15-Jul-2011 |
Richard Trieu <rtrieu@google.com> |
Remove warnings of constant operands of logical operators from template instantiations. Upon instantiation of template, value-dependent parameters are replaced by equivalent literals, so code like: template<unsigned int A, unsigned int B> struct S { int foo() { int x = A && B; } } will not warn on A && B on every instantiation. This will still warn on other cases inside templates, which will be caught on checking the template definition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135222 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
12ce0a085f89f07c76bf034aa6b838ef50542241 |
15-Jul-2011 |
Rafael Espindola <rafael.espindola@gmail.com> |
Revert 135177 to fix PR10363. Revert "For C++11, do more checking of initializer lists up-front, enabling some subset of the final functionality. C just leaves the function early. C++98 runs through the same code path, but has no changed functionality either." This reverts commit ac420c5053d6aa41d59f782caad9e46e5baaf2c2. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135210 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
00fe761849278180b0d73f276e468cf4c54ff2ad |
15-Jul-2011 |
John McCall <rjmccall@apple.com> |
Teach -Wconversion, -Wsign-compare etc. about division and remainder. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135208 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
ac420c5053d6aa41d59f782caad9e46e5baaf2c2 |
14-Jul-2011 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
For C++11, do more checking of initializer lists up-front, enabling some subset of the final functionality. C just leaves the function early. C++98 runs through the same code path, but has no changed functionality either. This is a first baby step towards supporting generalized initializer lists. This also removes an aggregate test case that was just plain wrong, assuming that non-aggregates couldn't be initialized with initializer lists in C++11 mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135177 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
3b80232b50c29b245e674f5aa02047b408e41018 |
14-Jul-2011 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Remove InitializationSequence::ReferenceBinding, the last redundant sequence kind. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135175 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
3a348c86ffaebd3ba8bd9bbae342b6e9f5f62cd7 |
14-Jul-2011 |
Douglas Gregor <dgregor@apple.com> |
Add a hackaround to avoid the crash in PR10355. However, our recovery is still terrible here because typo correction is not behaving well in the presence of overloaded functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135128 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
87c1f1f7c400deb2eb40d4599a40006072fb948c |
14-Jul-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR8800: When building a conversion to A& using a member operatorA&(), do not require A to be a complete type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135101 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
90ebed0734fac9b464c9bdff53fbf85a86b27f32 |
13-Jul-2011 |
Douglas Gregor <dgregor@apple.com> |
Add 'mutable' to the function declarator chunk, to be used when parsing lambda expressions, from John Freeman! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135090 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
emaDecl.cpp
emaType.cpp
|
1255aaf10285ca60f236b4fe7c326b629b5cf788 |
13-Jul-2011 |
Douglas Gregor <dgregor@apple.com> |
Fix an incorrect namespace typo-correction diagnostic, from Kaelyn Uhrain! Fixes PR10318. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135086 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
84ff0fccb180098b70504c03c3072a19e6d573af |
13-Jul-2011 |
John McCall <rjmccall@apple.com> |
Enforce access control for the destructor in a new[] expression and mark it as used. Otherwise, we can fail to instantiate or validate the destructor, which can lead to crashes in IR gen like PR10351. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135073 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
4c91d89453c4a540d9ad697ceae89c8ef6049a6b |
13-Jul-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
With -Wselector, don't warn about unimplemented optional method used in @selector expression because, well, their implementation is optional. // rdar://9545564 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135057 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
48218c60d6b53b7880917d1366ee716dec2145ca |
13-Jul-2011 |
John McCall <rjmccall@apple.com> |
In debugger mode, make ObjC message sends to unknown selectors return __unknown_anytype, and rewrite such message sends correctly. I had to bite the bullet and actually add a debugger support mode for this one, which is a bit unfortunate, but there really isn't anything else I could imagine doing; this is clearly just debugger-specific behavior. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135051 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprObjC.cpp
|
8beb6a2426b5a6b79ecf019316d9fbd30755e087 |
13-Jul-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc++: Some level of covariance is allowed in ObjC properties. Make it also available in ObjC++ propeties. Use common code for objc and objc++ so they don't diverge. // rdar://9740328 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135050 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
862ff87c0d306af8dfdbe7ac59f181a5815546e5 |
13-Jul-2011 |
John McCall <rjmccall@apple.com> |
Make the integer-range analysis recognize ^= correctly, and (while I'm at it) teach it to grok the results of simple assignments. The first is PR10336. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135034 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
e7003b72e691c4d83ba5516c58bccc2f2a4b3fe0 |
13-Jul-2011 |
Douglas Gregor <dgregor@apple.com> |
Eliminate an incomplete/incorrect attempt to provide support for C++0x unrestricted unions, which ended up attempting to initialize objects in a union (which CodeGen isn't prepared for). Fixes PR9683. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135027 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
c286f3835eb6001c61664cef5d610dfaf80a6e9b |
13-Jul-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc++: Some level of covariance is allowed in ObjC properties. Make it also available in ObjC++ propeties. // rdar://9740328 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135001 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
98a5403ecf1d2b60ae8cbf43e54194bd762cacaa |
12-Jul-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Fix a bug where a local variable named 'self' is causing implicit ivar accesses to go through the 'self' variable rather than the real 'self' for the method. // rdar://9730771 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134992 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaLookup.cpp
emaType.cpp
|
d248619cd1a5e13bb8fb19e97e3e923d792bfea3 |
12-Jul-2011 |
Benjamin Kramer <benny.kra@googlemail.com> |
Pop block scope after reading from it. Found by valgrind. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134983 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
701d1e77aca7e86348386fdeadcd56ca650f95ad |
12-Jul-2011 |
Hans Wennborg <hans@hanshq.net> |
Fix typo correction crash on overloaded functions, pr10283. It would be cool if we could do overload resolution to suggest the right function, but at least this fixes the crashing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134976 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaLookup.cpp
|
79e6bd379773447a74cc3e579d9081e4c5cb6d63 |
12-Jul-2011 |
Douglas Gregor <dgregor@apple.com> |
Centralize the getCanonicalType() calls in the Itanium C++ mangling code so that they only occur in a single place. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134961 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclObjC.cpp
emaType.cpp
|
0a68dc7f04be1542ce249ff4adb169453698ad91 |
12-Jul-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[ARC] Complain about property without storage attribute when @synthesizing it, not at its declaration. For this sample: @interface Foo @property id x; @end we get: t.m:2:1: error: ARC forbids properties of Objective-C objects with unspecified storage attribute @property id x; ^ 1 error generated. The error should be imposed on the implementor of the interface, not the user. If the user uses a header of a non-ARC library whose source code he does not have, we are basically asking him to go change the header of the library (bad in general), possible overriding how the property is implemented if he gets confused and says "Oh I'll just add 'copy' then" (even worse). Second issue is that we don't emit any error for 'readonly' properties, e.g: @interface Foo @property (readonly) id x; // no error here @end @implementation Foo @synthesize x; // no error here too @end We should give an error when the implementor is @synthesizing a property which doesn't have any storage specifier; this is when the explicit specifier is important, because we are going to create an ivar and we want its ownership to be explicit. Related improvements: -OBJC_PR_unsafe_unretained turned out to not fit in ObjCPropertyDecl's bitfields, fix it. -For properties of extension classes don't drop PropertyAttributesAsWritten values. -Have PropertyAttributesAsWritten actually only reflect what the user wrote rdar://9756610. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134960 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
56aeb40b1ca136cfd68fdbaf87f971eaf1c7a4af |
12-Jul-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Style tweak to the more idiomatic 'assert(!bad_state())'. Patch by Caitlin Sadowski. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134938 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
1731e202b268bfcd883710e2b10fe44a869bbcb7 |
12-Jul-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Hoist the logic for checking the number of arguments to an attribute into a static helper. Original patch by Caitlin Sadowski, style tweaks by me. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134937 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
46d37c10404097eed7c173b17e52693edcb66486 |
11-Jul-2011 |
Eli Friedman <eli.friedman@gmail.com> |
Add diagnostic for constructs like "va_arg(l, float)" which have undefined behavior. PR10201. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134926 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
4e7c7f2b78ac3930e45f00626ef6acf08b3f80ca |
11-Jul-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc-arc: Diagnose when captured variable in block literals require destruction and there is possibility of that without construction. Thanks Johnm for review and suggestions offline. // rdar://9535237. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134906 91177308-0d34-0410-b5e6-96231b3b80d8
umpDiagnostics.cpp
emaExpr.cpp
|
15be9b0e50f9eed41d4b16e344c9050ed5197c3a |
11-Jul-2011 |
Douglas Gregor <dgregor@apple.com> |
Don't complain about missing return statements for naked functions. Fixes <rdar://problem/9731999>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134897 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
cdb8076dd9cfb975a1bcb3e7cb58a59648c35af0 |
11-Jul-2011 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Fixed PR10243. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134892 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
54cf341bd4145e5e31f91c5777fcdaf3f2400537 |
08-Jul-2011 |
Benjamin Kramer <benny.kra@googlemail.com> |
Initialize all the AnalysisBasedWarnings statistics to zero. Found by valgrind. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134733 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
5b4a40a9d740d9025c16fa2f34c80a96906051c3 |
08-Jul-2011 |
Benjamin Kramer <benny.kra@googlemail.com> |
Remove unused variable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134731 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
82007c3a3f60ce2299c74333a881e4fdfc2135ce |
08-Jul-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc++-arc: more diagnosis of converting a weak-unavailable object to a __weak object type. // rdar://9732636 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134706 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaExpr.cpp
emaExprCXX.cpp
|
59e7c56806590a80c06b70a2d76888744b9ff9aa |
08-Jul-2011 |
Francois Pichet <pichet2000@gmail.com> |
Random cleanup: - fix a comment. - Remove an unnecessary { } block. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134690 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
7a084ec568f8336ec6f10011d0118a6b19e253cb |
08-Jul-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc++-arc: diagnose assignment/cast of a weak-unavailable object to a __weak object/type. // rdar://9732636. One item is yet todo. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134655 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaExpr.cpp
emaExprObjC.cpp
|
04e5a2509d1eed48cc0c7115c52089bef35b36af |
07-Jul-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc-arc: diagnose assignment/cast of a weak-unavailable object to a __weak object/type. // rdar://9732636. This is objc side of things. objc++ side tbd. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134624 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
3da626b4f38eb0350de960d71271ca77af7a9cc8 |
07-Jul-2011 |
Douglas Gregor <dgregor@apple.com> |
Introduce a new libclang aPI function, clang_codeCompleteGetContexts(), that provides the client with information about the context in which code completion has occurred and what kinds of entities make sense as completions at that point. Patch by Connor Wakamo! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134615 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
|
7e5e5f4cc36fe50f46ad76dca7a266434c94f475 |
07-Jul-2011 |
John McCall <rjmccall@apple.com> |
In ARC, reclaim all return values of retainable type, not just those where we have an immediate need of a retained value. As an exception, don't do this when the call is made as the immediate operand of a __bridge retain. This is more in the way of a workaround than an actual guarantee, so it's acceptable to be brittle here. rdar://problem/9504800 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134605 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExprCXX.cpp
emaExprObjC.cpp
|
e4f22adc862ca3e689c5cefa06dc52c480236805 |
07-Jul-2011 |
Nick Lewycky <nicholas@mxc.ca> |
In an in-class initialization, defer checks for value-dependent initialization expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134583 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
3ea4c49709c5bba5f8b16c6ceb725d9b9a1c48c6 |
07-Jul-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Based on comments from Chris, switch to using CFG::getNumBlockIDs() rather than a computed std::distance(). At some point I had convinced myself that these two were different; but as far as I can tell on re-exampination they aren't, and the number of block IDs is actually just a count of the blocks in the CFG. While this removes the primary motivation for guarding all of this with CollectStats, I have a patch coming up that will almost certainly make it important again. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134552 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
bca01b46850f867b2f4137f25c882022b58f8471 |
07-Jul-2011 |
Douglas Gregor <dgregor@apple.com> |
Properly implement the scope restriction on the NRVO for throw-expressions, such that we don't consider the NRVO when the non-volatile automatic object comes from outside the innermost try scope (C++0x [class.copymove]p13). In C++98/03, our ASTs were incorrect but it didn't matter because IR generation doesn't actually apply the NRVO here. In C++0x, however, we were moving from an object when in fact we should have copied from it. Fixes PR10142 / <rdar://problem/9714312>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134548 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaStmt.cpp
reeTransform.h
|
7263feeb367ab55af7e9a6fd701148b1b8264dba |
06-Jul-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Some code cleanup of r134522 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134529 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
742352a3984aeef9ecf911be23e673e97b34595f |
06-Jul-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc-arc: Support objc_arc_weak_unavailable on those classes which are incompatible with weak references. // rdar://9693477 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134522 91177308-0d34-0410-b5e6-96231b3b80d8
ttributeList.cpp
emaDeclAttr.cpp
emaType.cpp
|
c41b878b24bf9619d5351b05d7088221dfbe9447 |
06-Jul-2011 |
Douglas Gregor <dgregor@apple.com> |
Don't try to type-check a copy construction of an exception declaration with dependent type. Fixes PR10232 / <rdar://problem/9700653>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134515 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
5d98994c7749312a43ce6adf45537979a98e7afd |
06-Jul-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Build up statistics about the work done for analysis based warnings. Special detail is added for uninitialized variable analysis as this has serious performance problems than need to be tracked. Computing some of this data is expensive, for example walking the CFG to determine its size. To avoid doing that unless the stats data is going to be used, we thread a bit into the Sema object to track whether detailed stats should be collected or not. This bit is used to avoid computations whereever the computations are likely to be more expensive than checking the state of the flag. Thus, counters are in some cases unconditionally updated, but the more expensive (and less frequent) aggregation steps are skipped. With this patch, we're able to see that for 'gcc.c': *** Analysis Based Warnings Stats: 232 functions analyzed (0 w/o CFGs). 7151 CFG blocks built. 30 average CFG blocks per function. 1167 max CFG blocks per function. 163 functions analyzed for uninitialiazed variables 640 variables analyzed. 3 average variables per function. 94 max variables per function. 96409 block visits. 591 average block visits per function. 61546 max block visits per function. And for the reduced testcase in PR10183: *** Analysis Based Warnings Stats: 98 functions analyzed (0 w/o CFGs). 8526 CFG blocks built. 87 average CFG blocks per function. 7277 max CFG blocks per function. 68 functions analyzed for uninitialiazed variables 1359 variables analyzed. 19 average variables per function. 1196 max variables per function. 2540494 block visits. 37360 average block visits per function. 2536495 max block visits per function. That last number is the somewhat scary one that indicates the problem in PR10183. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134494 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
ema.cpp
|
19f74acdf8842ceece578b7307884f5ba22d7f59 |
06-Jul-2011 |
Rafael Espindola <rafael.espindola@gmail.com> |
Use attributes from the definition (if available) when instantiating functions. Fixes PR10272. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134491 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
c8fc90a854b4ccba21c85884676a80334159dd94 |
06-Jul-2011 |
John McCall <rjmccall@apple.com> |
When tree-transforming an expression sequence, always flag expanded variadic argument pack expansions as having changed, rather than doing it for each changed expansion, which leaves out zero-argument packs with catastrophic consequences. Fixes PR10260. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134483 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
9dc71d2fddcd283e07d45f3894c8559e2f7dd9a7 |
06-Jul-2011 |
John McCall <rjmccall@apple.com> |
Fixed enum types can be complete without actually being valid to use as scope specifiers; diagnose the attempt, rather than letting it go to an assert. The rest of PR10264. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134479 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
emaCXXScopeSpec.cpp
|
9f084a3166b684573ba49df28fc5792bc37d92e1 |
06-Jul-2011 |
John McCall <rjmccall@apple.com> |
Change the driver's logic about Objective-C runtimes: abstract out a structure to hold inferred information, then propagate each invididual bit down to -cc1. Separate the bits of "supports weak" and "has a native ARC runtime"; make the latter a CodeGenOption. The tool chain is still driving this decision, because it's the place that has the required deployment target information on Darwin, but at least it's better-factored now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134453 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
emaType.cpp
|
9670e179a67d868e171feac44fb8f9e2f108c5e8 |
06-Jul-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc-arc: enforce performSelector rules in rejecting retaining selectors passed to it, and unknown selectors causing potential leak. // rdar://9659270 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134449 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
emaExprObjC.cpp
|
5cbe101b502e06d16bc77df45a27ce8bc13f33c8 |
05-Jul-2011 |
Douglas Gregor <dgregor@apple.com> |
Look through parenthesized declarators when determining whether an instantiated function template was written with a prototype or via some kind of typedef. Fixes PR10273 / <rdar://problem/9723679>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134426 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
9a30c9946e898e595eb71f23dc9a60303428998b |
05-Jul-2011 |
Douglas Gregor <dgregor@apple.com> |
ActOnCXXConditionDeclaration should take into account that ActOnDeclarator can return NULL. Fixes PR10270, from Hans Wennborg! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134416 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
c5bb9d4b661ce5b13ba1dec2bce7a25fb45f95a0 |
05-Jul-2011 |
Benjamin Kramer <benny.kra@googlemail.com> |
Initialize member. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134403 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
3242ee01d43c6b6f5db968cd2c82e5d18d71283c |
04-Jul-2011 |
Anders Carlsson <andersca@mac.com> |
Remove unused parameter from ActOnDeclarator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134377 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
3c54415a4e1db09b210a466469c72d2582ce1d83 |
02-Jul-2011 |
Nowar Gu <nowar100@gmail.com> |
Merge upstream to r134305 at Sat. 2nd July 2011.
|
25af091c5548f85e38dee5c8bfc1748efc06f88c |
02-Jul-2011 |
Nick Lewycky <nicholas@mxc.ca> |
Fix a typo, remove a tab, canonicalize some spacing. No functional change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134305 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
8ba44264e05fe0012ecfb7bac28b171b5a50dde3 |
02-Jul-2011 |
Douglas Gregor <dgregor@apple.com> |
When producing -Wuninitialized Fix-Its for pointers, prefer " = NULL" over "= 0". Fixes <rdar://problem/9714386>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134302 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
1b03c8719e2e45cf2769430335d7e71f18e6634a |
02-Jul-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Move the Sema argument to all of the Sema-using helper functions in SemaDeclAttr to the first argument. This makes them follow the very consistent policy elsewhere in Sema for helper functions. Original patch by Caitlin Sadowski, with some tweaking by me. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134290 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
d309c8195cd89fef9ed13507f7ee9ac70561cebb |
02-Jul-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Rename static helpers to use 'camelCaseNames' per the new style recommendations before adding more of them. Patch by Caitlin Sadowski. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134289 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
87c44604325578b8de07d768391c1c9432404f5a |
02-Jul-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Mechanical rename of 'd' Decl pointer parameters to 'D'. This is more conventional in the rest of Clang's codebase, and closer to the current style recommendations. It also makes the code more internally consistent as FD, VD, etc are used frequently for particular decl variables. Patch by Caitlin Sadowski. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134288 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
28445f0b62f6aed851ff87ce64d9b19200d3211f |
02-Jul-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
-Fix mistake in ASTContext::getInnerObjCOwnership noticed by Doug -Remove unnecessary 'return'. -Remove unnecessary 'if' check (llvm_unreachable make sure attrStr will be non-null) -Add a test of transferring ownership to a reference cast type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134285 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
05d4876a64865e34366b58fc8a6848c3cde895d9 |
02-Jul-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Fix the warning that is emitted when an ownership attribute is applied incorrectly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134278 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
a8349f5e60d1b5b0e658195a60d385b56ed440ec |
02-Jul-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Use transferARCOwnershipToDeclaratorChunk in inferARCWriteback, no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134277 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
1c73dcbe1f1921bad8311cfb5089d30b4bd75b66 |
02-Jul-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Fix assertion hit in inferARCWriteback. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134276 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
0a85183be6930571f3af8e5a976d24c3f95e5b25 |
02-Jul-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[ARC] When casting from a pointer to an objective-c object with known ownership, if the cast type has no ownership specified, implicitly "transfer" the ownership of the cast'ed type to the cast type: id x; (NSString**)&x; // Casting as (__strong NSString**). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134275 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
707f101d3302b76ee01e8ca29b1a61f081137b9f |
02-Jul-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
-Remove Sema::ActOnCastOfParenListExpr and move most of its functionality to newly introduced Sema::BuildVectorLiteral. -Make Sema::ActOnCastExpr handle a vector initializer both when the cast'ed expression is a ParenListExpr and when it is a ParenExpr. -Ultimately make Sema::ActOnParenOrParenListExpr independent of what the cast type was. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134274 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
31862ba5ea70b1f2c81d03f8a0100b61cd6f06f6 |
02-Jul-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[ARC] When casting from a pointer to an objective-c object with known ownership, if the cast type has no ownership specified, implicitly "transfer" the ownership of the cast'ed type to the cast type: id x; static_cast<NSString**>(&x); // Casting as (__strong NSString**). This currently only works for C++ named casts, C casts to follow. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134273 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaType.cpp
|
8cfa57b348d4d5a58d92764a60280bf88e4e49ae |
02-Jul-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Break Sema::GetTypeForDeclarator in 2 functions, one for DeclSpec processing and another for the rest. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134272 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
17b6399f8461c5b7e1c6f367b0a0dde49f921240 |
02-Jul-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Introduce Declarator::ObjCCatchContext, this will result in correct error for 'auto' in obj-c catch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134271 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
07f4a06c402a2ccdd9eae7a3d710990b22040001 |
01-Jul-2011 |
Douglas Gregor <dgregor@apple.com> |
When adding boolean keywords for typo correction, add either "bool" or "_Bool" (depending on dialect), but not both, since they have the same edit distance from "Bool". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134263 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
304e233921bcd3b55f68c6e8a2960630edf17ff0 |
01-Jul-2011 |
Richard Trieu <rtrieu@google.com> |
Fix for PR7410. Allow functions in a derived class that improperly overwrite a virtual function in the base class to be inserted into the derived class function list to prevent extra errors every time the derived class is used. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134251 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
c89edf5aaa08683f4afcf61a7a1d183c08b76498 |
01-Jul-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix AST representations of alias-declarations which define tag types. Inside classes, the tag types need to have an associated access specifier, and inside function definitions, they need to be included in the declarations of the DeclStmt. These issues manifested as assertions during template instantiation, and also in a WIP constexpr patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134250 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
561f81243f665cf2001caadc45df505f826b72d6 |
01-Jul-2011 |
Douglas Gregor <dgregor@apple.com> |
Introduce the notion of instantiation dependence into Clang's AST. A type/expression/template argument/etc. is instantiation-dependent if it somehow involves a template parameter, even if it doesn't meet the requirements for the more common kinds of dependence (dependent type, type-dependent expression, value-dependent expression). When we see an instantiation-dependent type, we know we always need to perform substitution into that instantiation-dependent type. This keeps us from short-circuiting evaluation in places where we shouldn't, and lets us properly implement C++0x [temp.type]p2. In theory, this would also allow us to properly mangle instantiation-dependent-but-not-dependent decltype types per the Itanium C++ ABI, but we aren't quite there because we still mangle based on the canonical type in cases like, e.g., template<unsigned> struct A { }; template<typename T> void f(A<sizeof(sizeof(decltype(T() + T())))>) { } template void f<int>(A<sizeof(sizeof(int))>); and therefore get the wrong answer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134225 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
ea4aba0e97ca71369a0f6e287443b670cf5c353f |
30-Jun-2011 |
John McCall <rjmccall@apple.com> |
Perform lvalue-to-rvalue conversions on both operands of ->* and the RHS of .*. Noticed by Enea Zaffanella! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134170 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
ca0d0d4a0d6ecd256d4bf8c1a0dc183a83119833 |
30-Jun-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Improve the wording of the warning when returning a value from a constructor or destructor. Patch by Hans Wennborg. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134138 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
146060435c3efce95c95a092c7a1eb651cfb9ae0 |
30-Jun-2011 |
John McCall <rjmccall@apple.com> |
Preserve that a TemplateName was arrived at by substituting for a template template parameter. Uses to follow. I've also made the uniquing of SubstTemplateTemplateParmPacks use a ContextualFoldingSet as a minor space efficiency. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134137 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateInstantiate.cpp
|
a8581b9ca06e6ad504af2e28c0798520364f7f1b |
30-Jun-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Fix an obvious typo in an attribute's diagnostics. Patch by Caitlin Sadowski. Unfortunately, this attribute doesn't seem to have a single test. It is only mentioned in comments in one test, and as a string literal in a copy of some Clang code checked in as a test for the Indexer. =[ It dates from 2009 r74280 as part of OpenCL 1.0. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134136 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
54001c1e6a87b792b0711b822def2b1bfe1ad4a1 |
29-Jun-2011 |
Douglas Gregor <dgregor@apple.com> |
Check for deprecated/unavailable/etc attributes on fields that are initialized via initializer lists. Fixes <rdar://problem/9694686>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134099 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
e12a11f26b3ae5fca1178d415800b852d8d780ac |
29-Jun-2011 |
Douglas Gregor <dgregor@apple.com> |
When redeclaring a local extern in the same scope, make sure that we replace the existing declaration appropriately. Patch by Jordy Rose, fixes PR10013 / <rdar://problem/9584157>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134097 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
55620531ebdc775788a49f63fc1344242b6aa0db |
29-Jun-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Fix non-determinism in selecting between equal-length names which refer to the same declaration when correcting typos. This is done by essentially sorting the corrections as they're added. Original patch by Kaelyn Uhrain, but modified for style and correctness by accounting for more than just the textual spelling. This still is a bit of a WIP hack to make this deterministic. Kaelyn (and myself) are working on a more principled solution going forward. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134038 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
9af7e8e0cb15b41da930e481bbc3b927ad95f78f |
28-Jun-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Fix an invalid use of ::back() on an newly emptied vector. Also tighten up several places where we never expect to have NULL pointers to assert early. This fixes a valgrind error within CorrectTypo, but not the non-determinism. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134032 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
de31fd7eeebdc64fb043463e7f515dab8eccac8d |
28-Jun-2011 |
Eric Christopher <echristo@apple.com> |
Split out logic for valid clobbers and valid inline asm registers. Fixes rdar://9281377 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134016 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
2ecc28a77207a5d24422956b3bc38d386209ab73 |
28-Jun-2011 |
Douglas Gregor <dgregor@apple.com> |
Dynamically allocate the StringMaps used in typo correction so that we don't rely on the existence of a copy constructor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134009 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
d8bba9c15230d2b1b3893e272106aa79efc50251 |
28-Jun-2011 |
Douglas Gregor <dgregor@apple.com> |
Add support for C++ namespace-aware typo correction, e.g., correcting vector<int> to std::vector<int> Patch by Kaelyn Uhrain, with minor tweaks + PCH support from me. Fixes PR5776/<rdar://problem/8652971>. Thanks Kaelyn! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134007 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprMember.cpp
emaExprObjC.cpp
emaInit.cpp
emaLookup.cpp
emaTemplate.cpp
emaTemplateVariadic.cpp
|
0b8c98f3ddf83adcb9e9d98b68ce38e970cdee73 |
28-Jun-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Introduce Declarator::CXXNewContext and remove 'AutoAllowedInTypeName' parameter from Sema::GetTypeForDeclarator. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133987 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaType.cpp
|
d3880f8458bb6a03818ee01f758c32f945de3eaa |
28-Jun-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Centralize all checks for a C++ tag definition inside a typename in Sema::GetTypeForDeclarator and remove its 'OwnedDecl' out parameter. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133986 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExprCXX.cpp
emaType.cpp
|
3215398dc9dac2be19a9fc1df929e6b7d83eafca |
28-Jun-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Centralize the check for a tag definition in a Declarator::PrototypeContext inside GetTypeForDeclarator. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133985 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclObjC.cpp
emaType.cpp
|
db7abf78dedc2ef6ccb42b3dac6ab330fe2ea469 |
28-Jun-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Remove the call to GetTypeForDeclarator in Sema::ActOnCXXConditionDeclaration. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133984 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaType.cpp
|
6326e05fe8c2ff92b65b4759a91e45fad5ef886f |
28-Jun-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Provide fix-it for '.' <-> '->' for Objective-C ivar/property access. // rdar://7811841 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133970 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprMember.cpp
emaExprObjC.cpp
|
c03fa498b9598fe88ef8fb97315f27d09e56aa50 |
28-Jun-2011 |
John McCall <rjmccall@apple.com> |
ARC writeback isn't supposed to apply to local indirect pointers, only to pointers to locals. But it should work inside blocks, too. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133969 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
e6d134b244cd666c47a3d2dd78f82ff0824188bd |
27-Jun-2011 |
John McCall <rjmccall@apple.com> |
Fix PR10204 in a better way. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133943 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
68fe96adf787abd1e98016da0f38e26644faf7b9 |
27-Jun-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Handle nonnull attribute with optional argument number on functions with arguments of transparent unions type. // rdar://9584012 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133941 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
d0e8b782787638bcc9c57022e47c28d3529f02d4 |
27-Jun-2011 |
Douglas Gregor <dgregor@apple.com> |
When instantiating a C++ "new" expression, don't fake source locations for the '(' and ')' around the initializer unless we actually have an initializer. Fixes PR10197, an issue where we were value-initializing rather than default-initializing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133913 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
6628969c3e3886b68d8a0051df7e222aa50ef118 |
27-Jun-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Cleanup a fixme by using a specific diagnostic for subscripting a pointer to void. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133912 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ae19806d2cae48b3ba8160fe5914b6436e51cf62 |
27-Jun-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Fix missing braces around two statements that were intended to be part of a single if block. This is really annoying to track down and test. Silly changes to the test case caused it to stop showing up. I wish there were a more concrete way of asserting that a note attaches to the intended diagnostic. This fixes PR10195. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133907 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
13b21be065e9feb0759303bd51b8e8653130f0fb |
27-Jun-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Factor out (some of) the checking for invalid forms of pointer arithmetic into a couple of common routines. Use these to make the messages more consistent in the various contexts, especially in terms of consistently diagnosing binary operators with invalid types on both the left- and right-hand side. Also, improve the grammar and wording of the messages some, handling both two pointers and two (different) types. The wording of function pointer arithmetic diagnostics still strikes me as poorly phrased, and I worry this makes them slightly more awkward if more consistent. I'm hoping to fix that with a follow-on patch and test case that will also make them more helpful when a typedef or template type parameter makes the type completely opaque. Suggestions on better wording are very welcome, thanks to Richard Smith for some initial help on that front. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133906 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
2ced044c34311d8e6301f2b4566f4b612bc8b628 |
27-Jun-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix PR10187: when diagnosing a two-phase-lookup-related failure, don't assert that any names we find are valid candidates for the call. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133898 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
1ab0d90af489b5441d0bf25338d420ddae3ece74 |
25-Jun-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix a couple more issues related to r133854: When performing semantic analysis on a member declaration, fix the check for whether we are declaring a function to check for parenthesized declarators, declaration via decltype, etc. Also fix the semantic check to not treat FuncType* as a function type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133862 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
emaDeclCXX.cpp
|
555f57e3549fb5cc963a2ce38180c4f3643a6f95 |
25-Jun-2011 |
Douglas Gregor <dgregor@apple.com> |
When deciding how to parse "= something" as part of a member declaration, determine whether the declaration will end up declaring a function using semantic criteria (e.g., it will have function type) rather than purely syntactic criteria (e.g., it has the form of a function declarator). Fixes <rdar://problem/9670557>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133854 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
|
831fb9622581fc3b777848e6b097a0cb23d124de |
25-Jun-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc-arc/mrc: Allow ns_returns_not_retained attribute on properties to turn off warning on those properties which follow Cocoa naming convention for retaining objects and yet they were not meant for such purposes. Also, perform consistancy checking for declared getters of such methods. // rdar://9636091 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133849 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaObjCProperty.cpp
|
327126ee3d2faad9314b2633974eefc672f73b79 |
24-Jun-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
No need to warn if 'unavailable' method/property is not implemented. // rdar://9651605 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133819 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
emaObjCProperty.cpp
|
a7bf7bbdb1f89c35a09bc525c6862525ae82778f |
24-Jun-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Only do delayed diagnostics if there were no errors when parsing the decl. Fixes crash in http://llvm.org/PR10109 & rdar://9584039. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133816 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
921c14322977253a60dcb171f45e468c95fe41f8 |
24-Jun-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc-arc: Check on a variety of unsafe assignment of retained objects. // rdar://9495837 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133806 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExpr.cpp
|
e458fdab69ecec734726ad0089b1a4d7131aa5c0 |
24-Jun-2011 |
Jay Foad <jay.foad@gmail.com> |
Fix unused label warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133790 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
c39b6bc958982171b45c658389840a6241739a5e |
24-Jun-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
This patch started as an attempt to fix up the horrid naming conventions. I then discovered a typo in the using declaration bit in LookupSpecialMember. This led to discovering [namespace.udecl]p15, which clang implements incorrectly. Thus I've added a comment and implemented the code consistently with the rest of clang - that is incorrectly. And because I don't want to include tests of something incorrect, I've ripped the test out. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133784 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
b8b0313e84700b5c6d597b3be4de41c97b7550f1 |
24-Jun-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Rename objc_lifetime -> objc_ownership, and modify diagnostics to talk about 'ownership', not 'lifetime'. rdar://9477613. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133779 91177308-0d34-0410-b5e6-96231b3b80d8
ttributeList.cpp
umpDiagnostics.cpp
emaChecking.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaExpr.cpp
emaExprCXX.cpp
emaObjCProperty.cpp
emaOverload.cpp
emaType.cpp
reeTransform.h
|
a81397323cc8475ef8243f938118a9c231fb18ff |
24-Jun-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
When forming a cycle in objc's inheritance hierarchy, diagnose it properly and don't throw clang into an infinit loop. // rdar://9653341 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133773 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
cf5abc7ba032bd35158e4d75b0bc92a482fc67e8 |
23-Jun-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Support for catching objc pointer objects in c++ catch-statement in fragile abi mode and some other cleanups. // rdar://8940528 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133747 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
b9b4b789ebd28d6fde1c42de820b036ffaf95162 |
23-Jun-2011 |
Eli Friedman <eli.friedman@gmail.com> |
Fix Sema::CheckVectorOperands so that it doesn't try to insert a cast expression into the LHS of a compound assignment. Fixes compound assignment of various "compatible" vector types, including NEON-vector and gcc-vector types. <rdar://problem/9640356> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133737 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprCXX.cpp
|
c3ca14d13741889a9b924d0ca32e818f07a9834a |
23-Jun-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Remove multiple use of weak_import attribute on same declaration. Templatize dropAttr for general use. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133724 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
3e66003c1f03bf734efbd0f8eea35784a2d78d66 |
23-Jun-2011 |
Nowar Gu <nowar100@gmail.com> |
Merge upstream to r133721, Fri. 24th Jun.
|
8785d115ebaf1a850f5e581e4acd2dbfb2b843cb |
23-Jun-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Remove weak_import attribute on new declaration. // rdar://9538608 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133721 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
9b32f495d0bdd804e30634cc1c230b6f18536cee |
23-Jun-2011 |
Nowar Gu <nowar100@gmail.com> |
Fix source list of Android.mk.
ndroid.mk
|
7062281f240ef9c4fb343614fb2406532307c4a5 |
23-Jun-2011 |
Nowar Gu <nowar100@gmail.com> |
Merge upstream to r133678 at Thu. 23th Jun 2011.
|
2b1ad8b42bbbe00a1845e566f52f1941b8dbc725 |
23-Jun-2011 |
Douglas Gregor <dgregor@apple.com> |
Move all of Sema's member-access-related checking out of SemaExpr.cpp and into a new file, SemaExprMember.cpp, bringing SemaExpr.cpp just under 10,000 lines of code (ugh). No functionality change, although I intend to do some refactoring of this code to address PR8368 at some point in the "near" future. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133674 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
emaExpr.cpp
emaExprMember.cpp
|
572bbec2e0e23f684108e3a410a67c8c60ff9179 |
23-Jun-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Allow unavailable function calls inside unavailable functions in C++/ObjC++ as well. rdar://9660196 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133672 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
4cc12c6e47a200cf166ac21efc09dd033f34c9b2 |
23-Jun-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Clean up the heart of the caching code and miss fewer edge cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133671 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
4f0845ec62d5fb8be5d07adc09c54944ab952e5c |
23-Jun-2011 |
Douglas Gregor <dgregor@apple.com> |
Check for placeholders early on in Sema::CreateUnaryExprOrTypeTraitExpr() rather than recursing in some cases. Fixes <rdar://problem/9659191>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133663 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ab183dff7ed681f7140a8e32510c4f619b791d2e |
23-Jun-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Fix a think-o that amazingly didn't show up until I started writing implicit move tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133655 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
d543130a3009a350017e2e411ea43bb3e5459b96 |
23-Jun-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Issue warning if weak_import attribute is added to an already declared variable and ignore it. // rdar://9538608 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133654 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
9d96bce991048fd2337cf058ec6a6a722207cbf2 |
22-Jun-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Alloa catching Objective-C id's being thrown with C++ throw in Darwin's fragile abi mode. // rdar://8940528 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133639 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
0d9106fc97cde979a995e26b18bcd2643f8afb55 |
22-Jun-2011 |
Manuel Klimek <klimek@google.com> |
Changes ParenListExpr to always require a type. Removes dead code found in the process. Adds a test to verify that ParenListExprs do not have NULL types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133637 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExpr.cpp
emaInit.cpp
|
b27c7a199baaf691c724951a1bf3e6df9dcf5b6d |
22-Jun-2011 |
Douglas Gregor <dgregor@apple.com> |
Fix the starting location of the Fix-It note for suspicious precedence issues between a bitwise operator and a comparison operator. Fixes <rdar://problem/9637759>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133630 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
1d441ee69aaf3b3afa4521d05df934c5c7ea5f62 |
22-Jun-2011 |
Douglas Gregor <dgregor@apple.com> |
When instantiating a function template declaration that was expressed via a typedef of a function, make sure to synthesize parameter declarations. Fixes PR9654 / <rdar://problem/9257497>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133628 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
8295b7b51b13add75518bb9e2d9db00711a20166 |
22-Jun-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc-arc: Allow unbridged cast of retainable object to integral as it is not transferring ownership.. // rdar://9619861 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133622 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
d7b23167763f43d3e76b0de26141b1e52613ee3c |
22-Jun-2011 |
Douglas Gregor <dgregor@apple.com> |
When binding a reference to an Automatic Reference Counting temporary, retain/release the temporary object appropriately. Previously, we would only perform the retain/release operations when the reference would extend the lifetime of the temporary, but this does the wrong thing across calls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133620 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
b4b7b5034bb8304ed03416635bf64c75c39889fc |
22-Jun-2011 |
Douglas Gregor <dgregor@apple.com> |
Give MaterializeTemporaryExpr the exact type of the lvalue it binds to, including cv-qualifications. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133618 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
25a767651d14db87aa03dd5fe3e011d877dd4100 |
22-Jun-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Introduce DelayedCleanupPool useful for simplifying clean-up of certain resources that, while their lifetime is well-known and restricted, cleaning them up manually is easy to miss and cause a leak. Use it to plug the leaking of TemplateIdAnnotation objects. rdar://9634138. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133610 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
|
431a1cbd3dc5267247b0d66a4e65d51ef307fdcf |
22-Jun-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Actually, you know, fix the problem. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133604 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
4dba7b56d4551b7e03e20eeb7f45e5c962baa20c |
22-Jun-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Avoid making assumption that this is either a CXXMethodDecl or a FunctionTemplateDecl. I'm not quite sure what else it could be, though, and would appreciate some insight. This ought to fix the broken builds git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133600 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
1ccbc546d01d0ee2bce5d1e3de0888c9c6d65f35 |
22-Jun-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Ensure that we delete implict copy members when explicit move members are also present. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133593 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
661c67a9227708056850403847a10395308705e5 |
22-Jun-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Attempt to reapply this patch for caching copy assignment operator lookup. Previously, it was breaking self-host, but it's been a week and a half and I can't reproduce, so I need to see if it's still failing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133581 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaLookup.cpp
|
e3499cae8e5323ac553ad56977bf1cd42b9a5a35 |
22-Jun-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix PR10168: don't warn for unused non-dependent variables in both the template definition and each instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133580 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
cd6f36693ed40cef8c8639c04438d865187c1f73 |
22-Jun-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
First part of PR9968: the __range variable in a dependent C++11 for-range statement is implicitly used by that statement. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133572 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
a72a12f3baed07f2663e48c5fc3b670c68dffe0c |
22-Jun-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Fix some grammar nits in the comments from Nick. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133571 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
9d5353cfb15e387a6e17da289f5da651530d827a |
22-Jun-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Revert r133526 which re-orders the suggestions for -Wparentheses on ?: operators. There is a consistent design of having the "silence the warning" option first. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133570 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
c8505ad9182c3ddcfda42bee250b2c32dd1f3219 |
21-Jun-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc-arc: Add support for unbridged cast of __builtin___CFStringMakeConstantString and CF typed function calls with explicit cf_returns_retained/cf_returns_not_retained attributes. // rdar://9544832 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133535 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
06269424e7a1a9fc2574abe26db9dc6621fcf3d7 |
21-Jun-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
^cat^cast^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133529 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
cccd6debd98a253c9e7ce0619ac701b3cf2cf0a3 |
21-Jun-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Add comment before CheckObjCARCConversion is called on Expr value not getting changed by this call. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133527 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
1b132906ad580755e501ad0b3862e2d5a34106d1 |
21-Jun-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Switch the order of the notes for the parentheses suggested in the case of: a + b ? x : y. In our testing of this flag we've yet to hit a single case where the existing precedence was correct, so we should suggest grouping the ?: first. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133526 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
af9751747b098d77052cb71f1e648f29cfbadcc1 |
21-Jun-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc-arc: CodeGen part of unbridged cast of CF types. // rdar://9474349 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133525 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaExprObjC.cpp
|
03e80030515c800d1ab44125b9052dfffd1bd04c |
21-Jun-2011 |
Douglas Gregor <dgregor@apple.com> |
Introduce a new AST node describing reference binding to temporaries. MaterializeTemporaryExpr captures a reference binding to a temporary value, making explicit that the temporary value (a prvalue) needs to be materialized into memory so that its address can be used. The intended AST invariant here is that a reference will always bind to a glvalue, and MaterializeTemporaryExpr will be used to convert prvalues into glvalues for that binding to happen. For example, given const int& r = 1.0; The initializer of "r" will be a MaterializeTemporaryExpr whose subexpression is an implicit conversion from the double literal "1.0" to an integer value. IR generation benefits most from this new node, since it was previously guessing (badly) when to materialize temporaries for the purposes of reference binding. There are likely more refactoring and cleanups we could perform there, but the introduction of MaterializeTemporaryExpr fixes PR9565, a case where IR generation would effectively bind a const reference directly to a bitfield in a struct. Addresses <rdar://problem/9552231>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133521 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaInit.cpp
reeTransform.h
|
65aa6885818d4b4eea2e5a9d12085b2398148662 |
21-Jun-2011 |
Jay Foad <jay.foad@gmail.com> |
Make more use of llvm::StringRef in various APIs. In particular, don't use the deprecated forms of llvm::StringMap::GetOrCreateValue(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133515 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprObjC.cpp
|
4857947d18a7d0d0c250892fc5597ec0aecc9823 |
21-Jun-2011 |
NAKAMURA Takumi <geek4civic@gmail.com> |
De-Unicode-ify in comments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133501 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
1522a7c35e9872c5767721350fc8050be5b14fd2 |
20-Jun-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
objc-arc: allow explicit unbridged casts if the source of the cast is a message sent to an objc method (or property access) // rdar://9474349 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133469 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
33f46e22b7fc3b75c34b6d892790f80869da0300 |
20-Jun-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Warn for un-parenthesized '&' inside '|' (a & b | c), rdar://9553326. Patch by Henry Mason with tweaks by me. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133453 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ab27d6ea7b4ce2762a16905281de796db32bb6f2 |
20-Jun-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
llvm-gcc treats a tentative definition with a previous (or follow up) extern declaration with weak_import as an actual definition. make clang follows this behavior. // rdar://9538608 llvm-gcc treats an extern declaration with weak_import git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133450 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
ae0bafa229d076a0fb90b5aeccea7e3039c58751 |
20-Jun-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Fix a problem with the diagnostics of invalid arithmetic with function pointers I found while working on the NULL arithmetic warning. We here always assuming the LHS was the pointer, instead of using the selected pointer expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133428 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
1567a8ba8daaaa91a5de3c23026c9c19de017bd1 |
20-Jun-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Move away from the poor "abstraction" I added to Type. John argued effectively that this abstraction simply doesn't exist. That is highlighted by the fact that by using it we were papering over a more serious error in this warning: the fact that we warned for *invalid* constructs involving member pointers and block pointers. I've fixed the obvious issues with the warning here, but this is confirming an original suspicion that this warning's implementation is flawed. I'm looking into how we can implement this more reasonably. WIP on that front. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133425 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
6af966266235cae3287d50f1a10072bc48759ba0 |
20-Jun-2011 |
Francois Pichet <pichet2000@gmail.com> |
Remove more unnecessary #include <llvm/ADT/SmallVector.h> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133418 91177308-0d34-0410-b5e6-96231b3b80d8
ypeLocBuilder.h
|
bc8d7f9fd4346cfcc285868be32b74e019a40f01 |
20-Jun-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Restructure the API in Type based on a conversation with Richard Smith. This makes 'isPointerLikeType' a little less confusing, and pulls the decay check into a separate interface that is much more clear and concrete. Also, just implement these as logical wrappers around other predicates. Having a switch based implementation isn't likely to be necessary. We can try to optimize them later if they show up on a profile. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133405 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
2af68e4761ed30181540dafb5572993daffa4910 |
19-Jun-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Add test cases for false positives on -Wnull-arithmetic from Richard Trieu, and fix them by checking for array and function types as well as pointer types. I've added a predicate method on Type to bundle together the logic we're using here: isPointerLikeType(). I'd welcome better names for this predicate, this is the best I came up with. It's implemented as a switch to be a touch lighter weight than all the chained isa<...> casts that would result otherwise. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133383 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
18e0461ad72dcf6ec93cd3b1df7bf1b5a30b10b7 |
18-Jun-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Accept no-return stripping conversions for pointer type arguments after deducing template parameter types. Recently Clang began enforcing the more strict checking that the argument type and the deduced function parameter type (after substitution) match, but that only consideres qualification conversions. One problem with this patch is that we check noreturn conversions and qualification conversions independently. If a valid conversion would require *both*, perhaps interleaved with each other, it will be rejected. If this actually occurs (I'm not yet sure it does) and is in fact a problem (I'm not yet sure it is), there is a FIXME to implement more intelligent conversion checking. However, this step at least allows Clang to resume accepting valid code we're seeing in the wild. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133327 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaTemplateDeduction.cpp
|
4020caec546d221170072d2388b57d151cb26111 |
18-Jun-2011 |
Douglas Gregor <dgregor@apple.com> |
Objective-C++ ARC: eliminate the utterly unjustified loophole that silently dropped ownership qualifiers that were being applied to ownership-qualified, substituted type that was *not* a substituted template type parameter. We now provide a diagnostic in such cases, and recover by dropping the added qualifiers. Document this behavior in the ARC specification. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133309 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
ypeLocBuilder.h
|
e559ca1672ecef59345a928af0a6809b09282d2c |
18-Jun-2011 |
Douglas Gregor <dgregor@apple.com> |
Objective-ARC++: infer template type arguments of ownership-unqualified retainable object type as __strong. This allows us to write, e.g., std::vector<id> and we'll infer that the vector's element types have __strong ownership semantics, which is far nicer than requiring: std::vector<__strong id> Note that we allow one to override the ownership qualifier of a substituted template type parameter, e.g., given template<typename T> struct X { typedef __weak T type; }; X<id> is treated the same as X<__strong id>. At instantiation type, the __weak in "__weak T" overrides the (inferred or specified) __strong on the template argument type, so that we can still provide metaprogramming transformations. This is part of <rdar://problem/9595486>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133303 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateDeduction.cpp
reeTransform.h
ypeLocBuilder.h
|
ed3b2565696098af2b05b37ad3a747a1078b9df4 |
17-Jun-2011 |
Eli Friedman <eli.friedman@gmail.com> |
Add a minor hack to avoid using isNullPointerConstant on a hot path. Fixes -O0 compile-time regressions from r133196. rdar://9629775 . git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133290 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
12189f573f5dafb7fa33e8dc32ff06cd6fd35963 |
17-Jun-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Don't emit 'unavailable' errors inside an unavailable function. rdar://9623855. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133264 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
c99f0ec89fd9782cfafd14d7b1b0a80151eab24a |
17-Jun-2011 |
Douglas Gregor <dgregor@apple.com> |
Fix refactoro, silencing an MSVC warning. Thanks, Francois. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133257 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
71c482c76c67ad4240757c4e319ffdb72272b8ee |
17-Jun-2011 |
John McCall <rjmccall@apple.com> |
Initialize a couple of variables to shut GCC up. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133246 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
7acddacc921cd0b3f813443a8641eeddb82dfbd4 |
17-Jun-2011 |
John McCall <rjmccall@apple.com> |
Objective-C fast enumeration loop variables are not retained in ARC, but they should still be officially __strong for the purposes of errors, block capture, etc. Make a new bit on variables, isARCPseudoStrong(), and set this for 'self' and these enumeration-loop variables. Change the code that was looking for the old patterns to look for this bit, and change IR generation to find this bit and treat the resulting variable as __unsafe_unretained for the purposes of init/destroy in the two places it can come up. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133243 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaStmt.cpp
|
9a636e8403287af0d4db8fe5bf49dee719f5b754 |
17-Jun-2011 |
Douglas Gregor <dgregor@apple.com> |
Extend the deduced/actual argument type checking of C++ [temp.deduct.call]p4 to the deduction performed for 'auto', finishing the fix for PR9233. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133239 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
b7edc4f372f1abe6c422ea711a99f9906a7464da |
17-Jun-2011 |
Douglas Gregor <dgregor@apple.com> |
Factor the checking of the deduced argument type against the actual argument type for C++ [temp.deduct.call]p4 out of Sema::FinishTemplateArgumentDeduction(). No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133237 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
0f9dc86a14068e04e0d2cc6b4ff15eca571236ce |
17-Jun-2011 |
Douglas Gregor <dgregor@apple.com> |
When an explicit specialization has a storage specifier, error if that storage specifier is different from the storage specifier on the template. If that storage specifier is the same, then we only warn. Thanks to John for the prodding. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133236 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
751ec9be961888f14342fb63b39bf8727f0dee49 |
17-Jun-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement proper support for generating code for compound literals in C++, which means: - binding the temporary as needed in Sema, so that we generate the appropriate call to the destructor, and - emitting the compound literal into the appropriate location for the aggregate, rather than trying to emit it as a temporary and memcpy() it. Fixes PR10138 / <rdar://problem/9615901>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133235 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
51d7cdd4bfd11e0eeac55517419d0ebba0abb4cb |
17-Jun-2011 |
Douglas Gregor <dgregor@apple.com> |
Downgrade the error complaining about presence of a storage class specifier on an explicit specialization to a warning, since neither EDG nor GCC diagnose this code as ill-formed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133232 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
b77115d7b988f55f961e24129a62f20dfd066a94 |
17-Jun-2011 |
John McCall <rjmccall@apple.com> |
When synthesizing implicit copy/move constructors and copy/move assignment operators, don't make an initializer or sub-operation for zero-width bitfields. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133221 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
8d5e18c69e007f5d0f447b4a716088589a827857 |
17-Jun-2011 |
Douglas Gregor <dgregor@apple.com> |
Check for placeholder expressions before promoting an argument passed through an ellipsis. Fixes <rdar://problem/9623945>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133219 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
856d3798af7c2f7251e4a295f3da7a09ce4c62ab |
17-Jun-2011 |
John McCall <rjmccall@apple.com> |
Be sure to try a final ARC-production even in Objective-C++. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133215 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
emaStmt.cpp
|
6c91615e5d67d59e752037beb475c4b827431172 |
17-Jun-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
For the purpose of @encode'ing, accept 'void' type (even though it is incomplete type) because gcc says so. // rdar://9622422 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133208 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
3e95ba94fd34c5f6420c57d7732f601875074681 |
16-Jun-2011 |
Richard Trieu <rtrieu@google.com> |
Add a new warning when a NULL constant is used in arithmetic operations. The warning will fire on cases such as: int x = 1 + NULL; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133196 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
16cd4b744ada95eedeca6d90702739f0262309d4 |
16-Jun-2011 |
Douglas Gregor <dgregor@apple.com> |
Allow comparison between block pointers and NULL pointer constants. Fixes PR10145. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133179 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
707a23e8b87410332b55bb4534fa1c799edef38a |
16-Jun-2011 |
Douglas Gregor <dgregor@apple.com> |
Teach the warning about non-POD memset/memcpy/memmove to deal with the __builtin_ versions of these functions as well as the normal function versions, so that it works on platforms where memset/memcpy/memmove are macros that map down to the builtins (e.g., Darwin). Fixes <rdar://problem/9372688>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133173 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
b1f7d2496a2916cfad17633e403151dd09118821 |
16-Jun-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
arc: diagnose dereferencing a __weak pointer which may be null at any time. // rdar://9612030 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133168 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
16c8f9d68ae6d302083763d4733e728634717dec |
16-Jun-2011 |
Nowar Gu <nowar100@gmail.com> |
Merge upstream to r133163 at Fri. 17th Jun 2011.
|
dbfb371e297794e827ad2e5b33b45fafbfc46b29 |
16-Jun-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement the consistency checking for C++ [temp.deduct.call]p3, which checks that the deduced argument type for a function call matches the actual argument type provided. The only place we've found where the consistency checking should actually cause template argument deduction failure is due to qualifier differences that don't fall into the realm of qualification conversions (which are *not* checked when we initially perform deduction). However, we're performing the full checking as specified in the standard to ensure that no other cases exist. Fixes PR9233 / <rdar://problem/9039590>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133163 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
000d428347f352979e0f6dffcf0a64e73af0a2b5 |
16-Jun-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Rework the warning for 'memset(p, 0, sizeof(p))' where 'p' is a pointer and the programmer intended to write 'sizeof(*p)'. There are several elements to the new version: 1) The actual expressions are compared in order to more accurately flag the case where the pattern that works for an array has been used, or a '*' has been omitted. 2) Only do a loose type-based check for record types. This prevents us from warning when we happen to be copying around chunks of data the size of a pointer and the pointer types for the sizeof and source/dest match. 3) Move all the diagnostics behind the runtime diagnostic filter. Not sure this is really important for this particular diagnostic, but almost everything else in SemaChecking.cpp does so. 4) Make the wording of the diagnostic more precise and informative. At least to my eyes. 5) Provide highlighting for the two expressions which had the unexpected similarity. 6) Place this diagnostic under a flag: -Wsizeof-pointer-memaccess This uses the Stmt::Profile system for computing #1. Because of the potential cost, this is guarded by the warning flag. I'd be interested in feedback on how bad this is in practice; I would expect it to be quite cheap in practice. Ideas for a cheaper / better way to do this are also welcome. The diagnostic wording could likely use some further wordsmithing. Suggestions welcome here. The goals I had were to: clarify that its the interaction of 'memset' and 'sizeof' and give more reasonable suggestions for a resolution. An open question is whether these diagnostics should have the note attached for silencing by casting the dest/source pointer to void*. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133155 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
5546e69729b9f195afd0410948e013206618b717 |
16-Jun-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Skip both character pointers and void pointers when diagnosing bad argument types for mem{set,cpy,move}. Character pointers, much like void pointers, often point to generic "memory", so trying to check whether they match the type of the argument to 'sizeof' (or other checks) is unproductive and often results in false positives. Nico, please review; does this miss any of the bugs you were trying to find with this warning? The array test case you had should be caught by the array-specific sizeof warning I think. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133136 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
0f4c4c4445b194db6a086ea91ec8e7af963a456c |
16-Jun-2011 |
John McCall <rjmccall@apple.com> |
Weaken the type-matching rules for methods that return aggregates when complaining about mismatches in the global method pool. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133123 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
f0b60d6a945b907f890e0bbc2aa02b5aa2bc62e3 |
16-Jun-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Refactor parentheses suggestion notes to have less code duplication and be more consistent in how parenthesized ranges which hit macros are handled. Also makes the code significantly shorter, and the diagnostics when macros are present a bit more useful. Pair programmed w/ Matthew. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133122 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
43bc78dd447ade24e254fdb2ed5d7a2b0995818c |
16-Jun-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Cleanup the parameter naming style. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133120 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
f85e193739c953358c865005855253af4f68a497 |
16-Jun-2011 |
John McCall <rjmccall@apple.com> |
Automatic Reference Counting. Language-design credit goes to a lot of people, but I particularly want to single out Blaine Garst and Patrick Beard for their contributions. Compiler implementation credit goes to Argyrios, Doug, Fariborz, and myself, in no particular order. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133103 91177308-0d34-0410-b5e6-96231b3b80d8
ttributeList.cpp
elayedDiagnostic.cpp
umpDiagnostics.cpp
ema.cpp
emaCXXCast.cpp
emaChecking.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaInit.cpp
emaObjCProperty.cpp
emaOverload.cpp
emaStmt.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaType.cpp
reeTransform.h
ypeLocBuilder.h
|
4ac01401b1ec602a1f58c217544d3dcb5fcbd7f1 |
15-Jun-2011 |
Douglas Gregor <dgregor@apple.com> |
Eliminate a 'default' case in template argument deduction, where we were just punting on template argument deduction for a number of type nodes. Most of them, obviously, didn't matter. As a consequence of this, make extended vector types (via the ext_vector_type attribute) actually work properly for several important cases: - If the attribute appears in a type-id (i.e, not attached to a typedef), actually build a proper vector type - Build ExtVectorType whenever the size is constant; previously, we were building DependentSizedExtVectorType when the size was constant but the type was dependent, which makes no sense at all. - Teach template argument deduction to handle ExtVectorType/DependentSizedExtVectorType. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133060 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaTemplateDeduction.cpp
emaType.cpp
|
bf60a8c1de6397bc6b940c841dc74febb32ba568 |
15-Jun-2011 |
Douglas Gregor <dgregor@apple.com> |
Eliminate an unnecessary include. FIXMEs -=1 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133056 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
383041d31ca14cdf87865ccac6e6f9821d40f61a |
15-Jun-2011 |
Douglas Gregor <dgregor@apple.com> |
When performing substitution of default template template parameters before the template parameters have acquired a proper context (e.g., because the enclosing context has yet to be built), provide empty parameter lists for all outer template parameter scopes to inhibit any substitution for those template parameters. Fixes PR9643 / <rdar://problem/9251019>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133055 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateInstantiate.cpp
|
b30cd4a09bbf0adfa644b957a2b28fe31c5d45e4 |
15-Jun-2011 |
Douglas Gregor <dgregor@apple.com> |
Don't add redundant FormatAttr, ConstAttr, or NoThrowAttr attributes, either imlicitly (for builtins) or explicitly (due to multiple specification of the same attributes). Fixes <rdar://problem/9612060>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133045 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
|
1454cb952b76a7dc441f2ae1b7f8d998a54a23cf |
15-Jun-2011 |
Douglas Gregor <dgregor@apple.com> |
Properly implement C++0x [stmt.dcl]p3, which requires a scope to be protected in the case where a variable is being initialized by a trivial default constructor but has a non-trivial destructor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133037 91177308-0d34-0410-b5e6-96231b3b80d8
umpDiagnostics.cpp
|
cf739927f9b00c801867f620b04b79e3259c311f |
15-Jun-2011 |
Nico Weber <nicolasweber@gmx.de> |
Warn on "void f(int a[10]) { sizeof(a); }" git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133036 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
fa821380182f00eddfa536280b5a103c59e5c1c4 |
15-Jun-2011 |
Ted Kremenek <kremenek@apple.com> |
Sema: show shift result in hexadecimal Change the output for -Wshift-overflow and -Wshift-sign-overflow to an unsigned hexadecimal. It makes more sense for looking at bits than a signed decimal does. Also, change the diagnostic's wording from "overrides" to "sets". This uses a new optional argument in APInt::toString() that adds the '0x' prefix to hexademical numbers. This fixes PR 9651. Patch by nobled@dreamwidth.org! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133033 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
74da19fc3a52d7e3005eeb7a7833859da84fd12a |
15-Jun-2011 |
Douglas Gregor <dgregor@apple.com> |
Introduce a -cc1-level option to turn off related result type inference, to be used (only) by the Objective-C rewriter. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133025 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
e4a1c64700304459ac436fe29cb498f2da3b6194 |
14-Jun-2011 |
Nico Weber <nicolasweber@gmx.de> |
Warn on memset(ptr, 0, sizeof(ptr)). Diagnostic wording by Jordy Rose. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132996 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
e1eed38733ed47d44f9d8c7731817c411eaf4141 |
14-Jun-2011 |
Chris Lattner <sabre@nondot.org> |
when compiling in a GNU mode (e.g. gnu99) treat VLAs with a size that can be folded to a constant as constant size arrays. This has slightly different semantics in some insane cases, but allows us to accept some constructs that GCC does. Continue to be pedantic in -std=c99 and other modes. This addressed rdar://8733881 - error "variable-sized object may not be initialized"; g++ accepts same code git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132983 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
24c38e1ff057ce49c866294bf486444255e18f31 |
14-Jun-2011 |
Chris Lattner <sabre@nondot.org> |
fix rdar://9204520 - Accept int(0.85 * 10) as an initializer in a class member as an extension. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132980 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
0adde128d96a73864569516e684faa570e3c0333 |
14-Jun-2011 |
David Majnemer <david.majnemer@gmail.com> |
Properly diagnose using abstract and incomplete types in va_arg - Move a test from test/SemaTemplate/instantiate-expr-3.cpp, it did not belong there - Incomplete and abstract types are considered hard errors git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132979 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b792b30ce3d31e3eb3cfee3321238cf3cc2165b0 |
14-Jun-2011 |
Chris Lattner <sabre@nondot.org> |
fix rdar://9546171 - -Wshorten-64-to-32 shouldn't warn on vector bitcasts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132975 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
eca3ed7490300ae31dab178d11d70953e96a9e4e |
14-Jun-2011 |
Eli Friedman <eli.friedman@gmail.com> |
Make __gnu_inline__ functions in gnu99 mode work the same way as inline functions in gnu89 mode in terms of redefinitions. rdar://9559708 . git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132953 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
4c4efee6d3113f20b41efaeec08934332d2ea40e |
13-Jun-2011 |
Douglas Gregor <dgregor@apple.com> |
Eliminate the -f[no]objc-infer-related-result-type flags; there's no reason to allow the user to control these semantics through a flag. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132919 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
05a2e9459baa92ab0b739fc31411660ca9d9ec99 |
13-Jun-2011 |
Douglas Gregor <dgregor@apple.com> |
Document CheckObjCMethodOverrides git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132917 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
db11b0187bafe77263036eafc3977fa5da3bcf1a |
13-Jun-2011 |
David Majnemer <david.majnemer@gmail.com> |
Give a diagnostic when using non-POD types in a va_arg git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132905 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
5fc99f3cb7a18f5306b4ed6f58f1a397e7fb7696 |
13-Jun-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Fix a broken index left over from before this function was converted to handle memcpy and memmove. Spotted by Nico. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132902 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
c2cdd5354aba8d6a74c45231829f3bbbbfeb2781 |
12-Jun-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Don't assert on initialized typedef declarations in classes: struct { typedef int A = 0; }; According to the C++11 standard, this is not ill-formed, but does not have any ascribed meaning. We can't reasonably accept it, so treat it as ill-formed. Also switch C++ from an incorrect 'fields can only be initialized in constructors' diagnostic for this case to C's 'illegal initializer (only variables can be initialized)' git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132890 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
7a614d8380297fcd2bc23986241905d97222948c |
11-Jun-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Implement support for C++11 in-class initialization of non-static data members. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132878 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaExceptionSpec.cpp
emaExpr.cpp
emaExprCXX.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
reeTransform.h
|
27f45236005d9dd2bbbfeb1682eb349cb8b6998b |
11-Jun-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Add code completetion code for the new 'atomic' attribute keyword in objc property decl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132877 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
8cf0d22420eab58b8b434fa5d3a6e83c63ddefdd |
11-Jun-2011 |
Douglas Gregor <dgregor@apple.com> |
Fix order of operands for the warning about incompatible Objective-C pointer assignment in C++. This was a longstanding problem spotted by Jordy Rose. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132873 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
926df6cfabf3eaa4afc990c097fa4619b76a9b57 |
11-Jun-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement Objective-C Related Result Type semantics. Related result types apply Cocoa conventions to the type of message sends and property accesses to Objective-C methods that are known to always return objects whose type is the same as the type of the receiving class (or a subclass thereof), such as +alloc and -init. This tightens up static type safety for Objective-C, so that we now diagnose mistakes like this: t.m:4:10: warning: incompatible pointer types initializing 'NSSet *' with an expression of type 'NSArray *' [-Wincompatible-pointer-types] NSSet *array = [[NSArray alloc] init]; ^ ~~~~~~~~~~~~~~~~~~~~~~ /System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:72:1: note: instance method 'init' is assumed to return an instance of its receiver type ('NSArray *') - (id)init; ^ It also means that we get decent type inference when writing code in Objective-C++0x: auto array = [[NSMutableArray alloc] initWithObjects:@"one", @"two",nil]; // ^ now infers NSMutableArray* rather than id git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132868 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaInit.cpp
emaStmt.cpp
|
45937ae10a0f70f74508165aab4f2b63e18ea747 |
11-Jun-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Restore 'atomic' as an attribute of objc properties. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132866 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
e5df885367b9e122ac11c89ddfbc62375695cdab |
10-Jun-2011 |
Nowar Gu <nowar100@gmail.com> |
Merge upstream to r132843 at Fri. 10th Jun 2011.
|
3bde0ce7a18d2513ebe286df67baa32700fd3d6b |
10-Jun-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
This change is breaking selfhost. Revert it until I have more time to study it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132843 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaLookup.cpp
|
53e669f4bd617dc4df1b1850bcd3998d7680bdc5 |
10-Jun-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Implement caching of copy assignment operator lookup. I believe, upon, careful review, that this code causes us to incorrectly handle exception specifications of copy assignment operators in C++03 mode. However, we currently do not seem to properly implement the subtle distinction between copying of members and bases made by implicit copy constructors and assignment operators in C++03 - namely that they are limited in their overload selection - in all cases. As such, I feel that committing this code is correct pending a careful review of our implementation of these semantics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132841 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaLookup.cpp
|
c530d1758cef1acc596f2ec905665da534e66d29 |
10-Jun-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Implement caching for copy constructors in similar situations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132835 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaLookup.cpp
|
b320e0c322fb71d6235ebca9ec22940a97bdcdc7 |
10-Jun-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Implement caching of default constructors on the resolution table. This isn't yet used for the less controlled environments of initialization. Also a few random text fixups. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132833 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaDeclCXX.cpp
emaLookup.cpp
|
bbf34c024398e7bae825686dcff4c3b901ec9f89 |
10-Jun-2011 |
Richard Trieu <rtrieu@google.com> |
Made changes to how 'struct'/'class' mismatches are handled in -Wmismatched-tags. - Removed fix-it hints from template instaniations since changes to the templates are rarely helpful. - Changed the caret in template instaniations from the class/struct name to the class/struct keyword, matching the other warnings. - Do not offer fix-it hints when multiple declarations disagree. Warnings are still given. - Once a definition is found, offer a fix-it hint to all previous declarations with wrong tag. - Declarations that disagree with a previous definition will get a fix-it hint to change the declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132831 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
reeTransform.h
|
2f072b442879b8bba8c5dea11d7c61bedb1924ae |
09-Jun-2011 |
Hans Wennborg <hans@hanshq.net> |
Handle overloaded operators in ?: precedence warning This is a follow-up to r132565, and should address the rest of PR9969: Warn about cases such as int foo(A a, bool b) { return a + b ? 1 : 2; // user probably meant a + (b ? 1 : 2); } also when + is an overloaded operator call. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132784 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b92003b3d8d6128be3daa0b3f40a042a08545644 |
08-Jun-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Remove 'atomic' as a property attribute keyword. It is not a sanctioned keyword and is assumed as default. // rdar://8790791 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132753 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
af9cddfda10802f948e9d4b44ebded1ec749de21 |
08-Jun-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
Modify a diagnostic introduced in r132612 to emit QualTypes directly This fixes a memory error on FreeBSD (and is the right thing to do in any case). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132750 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
361d380eef53bd2ac3d5efbfea1636e1f8fbdd8d |
08-Jun-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Fix a bunch more notes that were emitted even when the diagnostic they were intended for was suppressed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132746 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
45cad4adb802b818211b1c697f550d3bf1e98e51 |
08-Jun-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Fix a regression in the two-phase lookup diagnostics that switching the namespace set algorithm (re-)introduced. We may not have seen the 'std' namespace, but we should still suggested associated namespaces. Easy fix, but a bit annoying to test. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132744 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
175df89a9794271669ec347c8c842a99271cbfce |
07-Jun-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
More coherent diagnostic when a stack variable is declared __weak objc-gc mode. // rdar://9666091. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132731 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
305435867ccb14db1c3937a7f91945c42739b980 |
07-Jun-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Catch the memory leak in a bucket git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132700 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
89b9f10cca9e2812b3e7943d3150fe6c9028bbe4 |
06-Jun-2011 |
Douglas Gregor <dgregor@apple.com> |
Diagnose the condition in C++ [temp.expl.spec]p16 that prohibits specializing a member of an unspecialized template, and recover from such errors without crashing. Fixes PR10024 / <rdar://problem/9509761>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132677 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplate.cpp
|
74d487e085c1555fb694c7ddf58315ae5e1bbecd |
06-Jun-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Richard Smith was correct about how the sets should be computed for this. My suggestion assumed a viable erase method for iterators on SmallPtrSet. This patch restores his original pattern. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132673 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
f50e88a793dd5bc7073c717fec78912e3234e95a |
06-Jun-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix PR10053: Improve diagnostics and error recovery for code which some compilers incorrectly accept due to a lack of proper support for two-phase name lookup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132672 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
7491c499e826682e128a400038361ebcbde30eec |
05-Jun-2011 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Drop most of InitializationSequence::SequenceKind's values. They didn't really contain any information that the step array didn't contain too. This makes debugging dumps a bit less informative, but probably not significantly so. The advantage is that the redundancy is gone, so the code is easier to understand. ReferenceBinding is still there, because it is used in some unclear code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132667 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
d695d6bb7323672e29dbb1556a3dafde3d3b2732 |
05-Jun-2011 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Remove more references to FailedSequence. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132666 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
383616cd2e61131a534afd9364ef53f643e1f834 |
05-Jun-2011 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Remove all references to InitializationSequence::FailedSequence from outside SemaInit.cpp. Replace them with the boolean conversion or the new Failed() function. This is a first step towards removing InitializationSequence::SequenceKind. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132664 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaInit.cpp
emaStmt.cpp
|
4ae5b7208ef72dec2a79d3d1c602cb47e9750d69 |
05-Jun-2011 |
Douglas Gregor <dgregor@apple.com> |
Identity and non-identity standard conversion sequences can be compared even when one is a reference binding and the other is not (<rdar://problem/9173984>), but the definition of an identity sequence does not involve lvalue-to-rvalue adjustments (PR9507). Fix both inter-related issues. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132660 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
bc3e64f37fe2c68ab4bfcedf6f428e0198f2e349 |
05-Jun-2011 |
Douglas Gregor <dgregor@apple.com> |
Allow block returns in C++ with the form return <expression> ; in blocks with a 'void' result type, so long as <expression> has type 'void'. This follows the rules for C++ functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132658 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
6a576ab708d3aa7d40e5d867ab1de5d3cb507553 |
05-Jun-2011 |
Douglas Gregor <dgregor@apple.com> |
When inferring the result type of a block based on a return statement with a type-dependent expression, infer the placeholder type 'Context.DependentTy' to indicate that this is just a placeholder. Fixes PR9982 / <rdar://problem/9486685>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132657 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
308742c87e2311c3f349092e5b823c3821e61b10 |
04-Jun-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Reimplement r132572 on top of a FoldingSet, thus hopefully solving both the self-host failures and Chandler's concerns. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132622 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
61eee0ca33b29e102f11bab77c8b74cc00e2392b |
04-Jun-2011 |
Tanya Lattner <tonic@nondot.org> |
Add support for builtin astype: __builtin_astype(): Used to reinterpreted as another data type of the same size using for both scalar and vector data types. Added test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132612 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
reeTransform.h
|
352697a87bca664356f21a838b162084013625ea |
04-Jun-2011 |
Douglas Gregor <dgregor@apple.com> |
Expose @synthesize and @dynamic via their own cursor kinds in libclang. Fixes <rdar://problem/9537904>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132603 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
c5c9b538de70124a57bee0adbfdd7853a582176e |
03-Jun-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Revert r132572 to figure out why it broke selfhost and clean it up as suggested by Chandler. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132593 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
8fd7722fce4e4f9549897699ec3a4c752613b214 |
03-Jun-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Begin implementing a cache of special member lookups. Currently only destructors are implemented but other special members are on the way, which is where the real benefits of this will be visible. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132572 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
9cfdae3144fc004cf203b05288f4dab49097ce7b |
03-Jun-2011 |
Hans Wennborg <hans@hanshq.net> |
Warn about missing parentheses for conditional operator. Warn in cases such as "x + someCondition ? 42 : 0;", where the condition expression looks arithmetic, and has a right-hand side that looks boolean. This (partly) addresses http://llvm.org/bugs/show_bug.cgi?id=9969 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132565 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
a08fcb8105bf53f3640ad17f61bdcde2d8ace78a |
03-Jun-2011 |
Hans Wennborg <hans@hanshq.net> |
Make -Wignored-qualifiers point to the first ignored qualifier. In code such as "char* volatile const j()", Clang warns that "volatile const" will be ignored. Make it point to the first ignored qualifier, and simplify the code a bit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132563 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
36f255c324d37dd8e0e5ab2e026814e8396a05aa |
03-Jun-2011 |
Douglas Gregor <dgregor@apple.com> |
Improve the instantiation of static data members in Sema::RequireCompleteExprType() a bit more, setting the point of instantiation if needed, and skipping explicit specializations entirely. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132547 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
ab01add3825bff91bbed5f1cd4d5652ae1383148 |
03-Jun-2011 |
Francois Pichet <pichet2000@gmail.com> |
Revert r132544. Accidental commit. I got confused with the Tortoise SVN menu. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132546 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplate.cpp
|
696df647c22b4bc632c68777eca1f667ae5dcad4 |
03-Jun-2011 |
Francois Pichet <pichet2000@gmail.com> |
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132544 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplate.cpp
|
c7f532f9b8e934a0a284d15a739333372e979f61 |
03-Jun-2011 |
Nowar Gu <nowar100@gmail.com> |
Merge upstream to r132540 at Fri. 3rd Jun 2011.
|
3f0556d8fb5f792e19cc79055a19fc7a0830533a |
03-Jun-2011 |
Francois Pichet <pichet2000@gmail.com> |
Correctly revert r131347: function explicit specialization at class scope. I'll try to implement this functionality again soon. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132536 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
929f0135ab60166202f52e0dd19835c0490d792a |
03-Jun-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Clean up the "non-POD memaccess" stuff some. This adds a properly named diagnostic group to cover the cases where we have definitively bad behavior: dynamic classes. It also rips out the existing support for POD-based checking. This didn't work well, and triggered too many false positives. I'm looking into a possibly more principled way to warn on the fundamental buggy construct here. POD-ness isn't the critical aspect anyways, so a clean slate is better. This also removes some silliness from the code until the new checks arrive. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132534 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
f15748a28c8443eef2924ef83689c358c661e9c5 |
03-Jun-2011 |
Douglas Gregor <dgregor@apple.com> |
When performing template argument deduction given a function argument of incomplete array type, attempt to complete the array type. This was made much easier by Chandler's addition of RequireCompleteExprType(), which I've tweaked (slightly) to improve the consistency of the DeclRefExpr. Fixes PR7985. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132530 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
|
8735b294a257a07ca158c28094d7324f0adf889a |
03-Jun-2011 |
Douglas Gregor <dgregor@apple.com> |
When checking the instantiation of a default template argument against the template parameter, perform the checking as a "specified" template argument rather than a "deduced" template argument; the latter implies stricter type checking that is not permitted for default template arguments. Also, cleanup our handling of substitution of explicit template arguments for a function template. We were actually performing some substitution of default arguments at this point! Fixes PR10069. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132529 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateDeduction.cpp
|
fb3f4aad0436a9c40e9130598162150890c405b5 |
02-Jun-2011 |
Rafael Espindola <rafael.espindola@gmail.com> |
Implement -fgnu89-inline. Fixes PR10041. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132460 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
3f828d1710df819c1dd84c4782166b10f8d18b56 |
02-Jun-2011 |
Douglas Gregor <dgregor@apple.com> |
Tweak code completions for Objective-C Key-Value Observing. The +keyPathsForValuesAffecting<Key> completion was mislabeled as an instance method, and +automaticallyNotifiesObserversOf<Key> was missing entirely. Fixes <rdar://problem/9516762>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132452 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
58f14c012e5d739b09532bb12645dc161f88cfcf |
02-Jun-2011 |
Francois Pichet <pichet2000@gmail.com> |
Fix 80-column violation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132447 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
95ea45072a46ba3c85fc588aed15509a1a0900ed |
02-Jun-2011 |
Douglas Gregor <dgregor@apple.com> |
Fix an incorrect warning about explicit template specializations for nested types, from Michael Han! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132431 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
3617e198aa89d4aa0921343a22b96823a63f8a58 |
01-Jun-2011 |
Douglas Gregor <dgregor@apple.com> |
The expression in a noexcept exception-specification is a constant-expression, and, therefore, an unevaluated operand. Make it so. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132400 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
17e37c7959d60d8bfcbc8cb5630d3101ae583be5 |
01-Jun-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement comparisons between nullptr and Objective-C object pointers. Fixes PR10052. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132397 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
8d7946151cd15c0e7c34250c122d59b2f5027999 |
01-Jun-2011 |
Nick Lewycky <nicholas@mxc.ca> |
Even a return statement of an expression with a dependent type in a void function might need to clean up its temporaries. Fixes PR10057. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132390 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
b4746036322385bf27d33ec1fc3c82a8bb3d1e58 |
01-Jun-2011 |
Francois Pichet <pichet2000@gmail.com> |
Microsoft friend acting as a forward declaration; try#2. Now only 2 lines. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132387 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
5aecb786a32d321e8d3462cd49e50092e8d55cd3 |
01-Jun-2011 |
Francois Pichet <pichet2000@gmail.com> |
Revert 132332 (Microsoft friend as a forward declaration), John McCall pointed out a better/simpler way to do it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132369 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
eea06c609b73afc7bcfdf3e101efb8d9e7b3560c |
31-May-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Ensure we enter an unevaluated context when instantiating a noexcept expression. Fixes bug raised by hhinnant to cfe-dev git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132350 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
fa6e63a06bf6d6bd10c6dfd38966adf4160bf979 |
31-May-2011 |
Francois Pichet <pichet2000@gmail.com> |
Recreate the DeclContext before adding the implicit friend forward declaration. This should fix the asserting buildbot. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132333 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
8adc227de934e23c72eb8d9abf5c0e3dfffec131 |
31-May-2011 |
Francois Pichet <pichet2000@gmail.com> |
For compatibility with MSVC, a friend declaration also act as a forward declaration if the tag name is not already declared. The tag name is declared in the next outermost non record scope. Example: class A { friend class B; B* b; }; B* global_b; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132332 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
8155910a192dafa423d6b932b7d127d48e4641e8 |
31-May-2011 |
Nick Lewycky <nicholas@mxc.ca> |
Whenever we instantiate a static data member, make sure to define any new vtables! Fixes PR10020 This also allows us to revert the part of r130023 which added a big loop around the template instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132331 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaTemplateInstantiateDecl.cpp
|
0683a1418b28b289eca4cb602ac69780f9e0a609 |
31-May-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Expand the coverage of the warning for constants on the RHS of logical operands: return f() || -1; where the user meant to write '|'. This bootstraps without any additional warnings. Patch by Richard Trieu. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132327 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
1838ca5618bc6c84ca3d13d84717bf32d9862bb3 |
29-May-2011 |
Richard Trieu <rtrieu@google.com> |
Add a new warning on NULL pointer constant to integer conversion. This path was reviewed by Chandler Carruth at http://codereview.appspot.com/4538074/ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132297 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
e72c55b9a11be9f00fa3f66f7ad6b73b2814e963 |
29-May-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Fix a regression in the source locations for unary trait expressions. I tried to use an assert to prove that I could remove each of the arguments I did, but ended up writing my assert with inverted logic. Doh! Reported by Xi Wang on cfe-dev. I have manually verified the source locations and ranges for these using -ast-dump. I tried writing a test case that would catch these, but these expressions aren't exposed in the c-index-test's token annotation utility. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132284 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
reeTransform.h
|
43c9791207a2bd7cef8b17e9bfc4dd87db21690f |
28-May-2011 |
Nowar Gu <nowar100@gmail.com> |
Merge upstream r132249 at Sat. 28th. May 2011.
|
9787f9bc5aa45ee153ce5a2d0b18b1d8c660219e |
28-May-2011 |
Douglas Gregor <dgregor@apple.com> |
Clean up a C++0x/C++03 conditional check. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132229 91177308-0d34-0410-b5e6-96231b3b80d8
umpDiagnostics.cpp
|
f61103ef335fb273a98c1389e6fddaf796feb4b3 |
27-May-2011 |
Douglas Gregor <dgregor@apple.com> |
Clean up my changes to jump-diagnostic handling for local variables of class type (or array thereof), eliminating some redundant checks (thanks Eli!) and adding some tests where the behavior differs in C++98/03 vs. C++0x. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132218 91177308-0d34-0410-b5e6-96231b3b80d8
umpDiagnostics.cpp
emaDecl.cpp
|
f996e051d9953550982b57132daad8a5e3f7bd65 |
27-May-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Add assertions to verify that we are not trying to instantiate a nontemplate in Sema::InstantiateTemplateDecl. This should make the issue in PR10026 more visible, although it's not going to fix it because something is violating this precondition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132208 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
e413516d0ed61ef9e2ff706bcc00480adca947c4 |
27-May-2011 |
Douglas Gregor <dgregor@apple.com> |
Update the jump-scope checker for local variables with initializers, so that it looks at the initializer of a local variable of class type (or array thereof) to determine whether it's just an implicit invocation of the trivial default constructor. Fixes PR10034. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132191 91177308-0d34-0410-b5e6-96231b3b80d8
umpDiagnostics.cpp
|
855f41963e545172a935d07b4713d079e258a207 |
27-May-2011 |
Richard Trieu <rtrieu@google.com> |
Add an additional check for null pointer before accessing PatternDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132175 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
e4d645cbe073042d8abc1a4eb600af4ff7a8dffb |
27-May-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Enhance Clang to start instantiating static data member definitions within class templates when they are necessary to complete the type of the member. The canonical example is code like: template <typename T> struct S { static const int arr[]; static const int x; static int f(); }; template <typename T> const int S<T>::arr[] = { 1, 2, 3 }; template <typename T> const int S<T>::x = sizeof(arr) / sizeof(arr[0]); template <typename T> int S<T>::f() { return x; } int x = S<int>::f(); We need to instantiate S<T>::arr's definition to pick up its initializer and complete the array type. This involves new code to specially handle completing the type of an expression where the type alone is insufficient. It also requires *updating* the expression with the newly completed type. Fortunately, all the other infrastructure is already in Clang to do the instantiation, do the completion, and prune out the unused bits of code that result from this instantiation. This addresses the initial bug in PR10001, and will be a step to fleshing out other cases where we need to work harder to complete an expression's type. Who knew we still had missing C++03 "features"? git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132172 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaType.cpp
|
f968d8374791c37bc464efd9168c2d33dd73605f |
27-May-2011 |
Douglas Gregor <dgregor@apple.com> |
Objective-C doesn't consider the use of incomplete types as method parameter types to be ill-formed. However, it relies on the completeness of method parameter types when producing metadata, e.g., for a protocol, leading IR generating to crash in such cases. Since there's no real way to tighten down the semantics of Objective-C here without breaking existing code, do something safe but lame: suppress the generation of metadata when this happens. Fixes <rdar://problem/9123036>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132171 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
42ec65df778ec3faa7a7fb73caa2bca2422a0e67 |
26-May-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Extract two more methods from the unary type trait checking. These provide re-usable forms of the rest of the custom validation done here. Still no functionality changed here. With this it should be possible to have an expression-centric code path and a type-centric code path which don't duplicate logic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132118 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e2250304ca0a809693a48f84b7e886f55d004df4 |
26-May-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Remove a no longer relevant comment. It was just repeating the information in the previous comment which was preserved and moved with the vec_step implementation code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132117 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
df1f377cae15c9607539cbcb5b8c9f4f0cf7d7d8 |
26-May-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Extract the vec_step trait operand checking to a stand alone function. It has little overlap with other traits' requirements, so the resulting code is actually simpler. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132116 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
9d342d0121531bcbd2410f600a751dc85993bdee |
26-May-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Add a convenience interface for checking expression arguments to unary traits which uses the information embedded in the expression. Use this to simplify several interfaces which repeated information embedded in the expression through explicit arguments. I added an assertion that the only extra piece of data to come in from the parser matches what is stored in the expression. No functionality change intended here. Also cleaned up the doxygen comments for some of these methods and some formatting oddities. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132115 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
reeTransform.h
|
9ae60d54e4454192384933f3020968ea5c8c3540 |
26-May-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Implement a new warning for when adding a default argument to a method makes it into a special member function. This is very bad and can lead to all sorts of nastiness including implicit member functions violating the One Definition Rule. This should probably be made ill-formed in a later version of the standard, but for now we'll just warn. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132104 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
82713174914bdb927a254c5ee188e35fd79c4948 |
26-May-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Update our diagnostics to properly account for move operations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132096 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaOverload.cpp
|
dfab854e6855dad076c0207b29859d452e398437 |
26-May-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Fix a minor thinko that leads to a crash if PatternDecl is null but Pattern is not. Thanks Nick for catching this! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132089 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
ffe37fdda5b4b4f162a45155c30d9f60ce110c12 |
25-May-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Implement a little bit of cleanup and a lot more of the base work behind implicit moves. We now correctly identify move constructors and assignment operators and update bits on the record correctly. Generation of implicit moves (declarations or definitions) is not yet supported. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132080 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
ca63c200346c0ca9e00194ec6e34a5a7b0ed9321 |
25-May-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Implement a new type node, UnaryTransformType, designed to represent a type that turns one type into another. This is used as the basis to implement __underlying_type properly - with TypeSourceInfo and proper behavior in the face of templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132017 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
emaDecl.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateVariadic.cpp
emaType.cpp
reeTransform.h
|
6f0074ae2f466bae9f415da268d61a2dc1fabe26 |
24-May-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Add new warning that warns when invoking 'delete' on a polymorphic, non-final, class without a virtual destructor. Patch by Matthieu Monrocq! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131989 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
63fe6814f339df30b8463b39995947cbdf920e48 |
24-May-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement the initial part of C++0x [expr.const]p2, which specifies that the unevaluated subexpressions of &&, ||, and ? : are not considered when determining whether the expression is a constant expression. Also, turn the "used in its own initializer" warning into a runtime-behavior warning, so that it doesn't fire when a variable is used as part of an unevaluated subexpression of its own initializer. Fixes PR9999. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131968 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
848afb0c1ff4571ca7a21927ecc2699ea2e7429a |
24-May-2011 |
Nowar Gu <nowar100@gmail.com> |
Merge upstream to r131958 at Tue. 24th May 2011.
|
1f8f2d52ff3712770a49f318a687b0c8b0ada9d0 |
24-May-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Fix a bug in -Wundefined-reinterpret-cast where we failed to look through sugared types when testing for TagTypes. This was the actual cause of the only false positive in Clang+LLVM. Next evaluation will be over a much larger selection of code including large amounts of open source code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131957 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
0f161593b36584ec447e5268dbed2953489854d8 |
24-May-2011 |
Francois Pichet <pichet2000@gmail.com> |
MSVC doesn't do any validation regarding exception specification. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131950 91177308-0d34-0410-b5e6-96231b3b80d8
emaExceptionSpec.cpp
|
2545ce1c76236c2277b90dbd4f7d01ef13fe0823 |
24-May-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Delete the extraneous return statement that was causing my earlier issues and also add a test. We should now handle defaulted members of templates properly. No comment as to whether or not this also holds for templated functions, but defaulting those is kind of insane. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131938 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
cd10dec673680fd18a2e5a27646173780c059d32 |
24-May-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Implement explicit specialization of explicitly-defaulted constructors. The general out-of-line case (including explicit instantiation mostly works except that the definition is being lost somewhere between the AST and CodeGen, so the definition is never emitted. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131933 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
|
eb88ae5f9acdd17ec76fb83e151a77e25e4e8f31 |
23-May-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Correctly propagate defaultedness across template instantiation. This fixes PR9965, but we're not out of the water yet, as we do not successfully handle out-of-line definitions, due to my utter misunderstanding of how we manage templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131920 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
|
b2ee8305f878259613b65d0f96a03f7f852977ea |
23-May-2011 |
Francois Pichet <pichet2000@gmail.com> |
Emulate a MSVC bug where if during an using declaration name lookup, the declaration found is unaccessible (private) and that declaration was bring into scope via another using declaration whose target declaration is accessible (public) then no error is generated. Example: class A { public: int f(); }; class B : public A { private: using A::f; }; class C : public B { private: using B::f; }; Here, B::f is private so this should fail in Standard C++, but because B::f refers to A::f which is public MSVC accepts it. This fixes 1 error when parsing MFC code with clang. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131896 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaDeclCXX.cpp
|
93104c10653cf03a3eb5996a1650a9a9e25e0811 |
22-May-2011 |
Douglas Gregor <dgregor@apple.com> |
Add an assertion to tell us when we're going off the deep end trying to determine outer template arguments lists for template parameters. This is actually the problem behind PR9643, which I have yet to figure out how to fix. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131822 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
84ee2eeec9f63e4938bafd060105fa4f0c9cd89b |
22-May-2011 |
Douglas Gregor <dgregor@apple.com> |
Audit and finish the implementation of C++0x nullptr, fixing two minor issues along the way: - Non-type template parameters of type 'std::nullptr_t' were not permitted. - We didn't properly introduce built-in operators for nullptr ==, !=, <, <=, >=, or > as candidate functions . To my knowledge, there's only one (minor but annoying) part of nullptr that hasn't been implemented: catching a thrown 'nullptr' as a pointer or pointer-to-member, per C++0x [except.handle]p4. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131813 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaTemplate.cpp
|
9625e44c0252485277a340746ed8ac950686156f |
22-May-2011 |
Douglas Gregor <dgregor@apple.com> |
It's considered poor form to create references to the overloaded function type. Educate template argument deduction thusly, fixing PR9974 / <rdar://problem/9479155>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131811 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
emaType.cpp
|
930a9abb7eb171d706c9e17a27bbcd267f0d9b3d |
21-May-2011 |
Douglas Gregor <dgregor@apple.com> |
Fix our handling of the warning when one tries to pass a non-POD/non-trivial object throuugh a C-style varargs. The warning itself was default-mapped to error, but can be downgraded, but we were treating it in Sema like a hard error, silently dropping the call. Instead, treat this problem like a warning, and do what the warning says we do: abort at runtime. To do so, we fake up a __builtin_trap() expression that gets evaluated as part of the argument. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131805 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e885e188b25dc218132402d1f48fb35e175bfb2e |
21-May-2011 |
Douglas Gregor <dgregor@apple.com> |
Diagnose the presence of storage-class-specifiers on explicit instantiations and specializations. Fixes <rdar://problem/9126453> and PR8700. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131802 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplate.cpp
|
4337dc776074ac0143b49823890303f952d3d9ae |
21-May-2011 |
Douglas Gregor <dgregor@apple.com> |
Teach Sema::ActOnUninitializedDecl() not to try to interpret when one should use a constructor to default-initialize a variable. InitializationSequence knows the rules for default initialization, better. Fixes <rdar://problem/8501008>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131796 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
5e9ebb3c0fb554d9285aa99c470abdf283272bd9 |
21-May-2011 |
Douglas Gregor <dgregor@apple.com> |
A few more is(Un)signedIntegerType/is(Un)signedOrEnumerationType cleanups. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131793 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
0fd228d48bbf05d08d9b408023d7c8ddb681bc91 |
21-May-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement C++0x semantics for passing non-POD classes through varargs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131792 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e3406826db726960ede77dd18361eb327d30c108 |
20-May-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Add a missing case for default constructor deletion. This case is tested by the fact that the modified test produces significatly worse diagnostics. That's on the list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131759 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
575a1c9dc8dc5b4977194993e289f9eda7295c39 |
20-May-2011 |
Douglas Gregor <dgregor@apple.com> |
Introduce Type::isSignedIntegerOrEnumerationType() and Type::isUnsignedIntegerOrEnumerationType(), which are like Type::isSignedIntegerType() and Type::isUnsignedIntegerType() but also consider the underlying type of a C++0x scoped enumeration type. Audited all callers to the existing functions, switching those that need to also handle scoped enumeration types (e.g., those that deal with constant values) over to the new functions. Fixes PR9923 / <rdar://problem/9447851>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131735 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaDecl.cpp
emaStmt.cpp
emaTemplate.cpp
|
b7ec906b189f71ab35825bdb60fb1f6c4c40880b |
20-May-2011 |
Douglas Gregor <dgregor@apple.com> |
Downgrade the error about re-opening an inline namespace as non-inline to a warning, since apparently libstdc++'s debug mode does this (and we can recover safely). Add a Fix-It to insert the "inline", just for kicks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131732 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
fc92137eee708b632c00a9b0934ff87aeae234a5 |
20-May-2011 |
Douglas Gregor <dgregor@apple.com> |
Diagnose unexpanded parameter packs in return statements. This manifested in a crash with blocks in PR9953, but it was a ticking time bomb for normal functions, too. Fixes PR9953. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131731 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
reeTransform.h
|
4926d832aa2f0af9d7c00633727d49e7967eb978 |
20-May-2011 |
Douglas Gregor <dgregor@apple.com> |
Clean up two comments git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131727 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
7dfd96fd5f4e63071f5d4f684e9f0e1928d226c7 |
20-May-2011 |
Nowar Gu <nowar100@gmail.com> |
Merge upstream to r131722 at Fri. 20th May 2011.
|
a0448264c7da395ca9416c6570bc43a7f49e436b |
20-May-2011 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Fix PR9941 for out-of-line template destructors too. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131722 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExceptionSpec.cpp
|
1e55e91a257c4ddd4364656b048a3c345c366804 |
20-May-2011 |
Matt Beaumont-Gay <matthewbg@google.com> |
Undo enough of r131143 to make private copy ctor diags say "copy constructor" again git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131706 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
42bef03a0f0462a95eb66b9e63feab0bf596134d |
19-May-2011 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Fix PR9941 again, this time for templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131640 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
db5d44b775c60166074acd184ca9f1981c10c2a7 |
19-May-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Implement __underlying_type for libc++. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131633 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
emaDecl.cpp
emaTemplateVariadic.cpp
emaType.cpp
|
0ee33912f8ec3453856c8a32ed2c2e8007bed614 |
19-May-2011 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Reapply r121528, fixing PR9941 by delaying the exception specification check for destructors until the class is complete and destructors have been adjusted. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131632 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaExceptionSpec.cpp
|
493ff72fa7c7b43ab5a8edddb5762d7b745bb2ab |
18-May-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
After consultation with doug, revert r131515. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131574 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
1d78032167c2f2d470e4270aadcb07ff71e6c7e1 |
18-May-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Revert r121528 as it breaks a simple testcase, which leads to, among other things, libcxx not building. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131573 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
0320a1d7b3305d1aef36ee68b77bebe170e1d30a |
18-May-2011 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implement implicit exception specifications of destructors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131528 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
71a682f98a1e79c84e95e45f94041bcd7a694ef5 |
18-May-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Implement an additional fix for infinite recursion of deleted special member functions by making sure that they're on the record before checking for deletion. Also make sure source locations are valid to avoid crashes. Unfortunately, the declare-all-implicit-members approach is still required in order to ensure that dependency loops do not result in incorrectly deleting functions (since they are to be deleted at the declaration point per the standard). Fixes PR9917 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131520 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
d02fec890e147a7726410108d4b1d74a842fc9ff |
18-May-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Force declaration of implicit members in C++0x mode. I hear at least one person crying out in anguish, but it's unfortunately necessary to avoid infinite loops with mutually dependent constructors trying to call each other and determine if they are deleted. It might be possible to go back to the old behavior if we can implement part-of-file lookups efficiently, or if a solution is discovered by which we can safely detect and avoid infinite recusion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131515 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
be63122e65ea06010c4ce06a77276bcb29a575b6 |
17-May-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Fix some minor bugs and add a lot more test cases for defaulted constructors, including two more FIXMEs (one of which I don't actually understand). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131487 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
6ee6cf6a13e4047a78ce61951870c6605a7260f0 |
17-May-2011 |
Nowar Gu <nowar100@gmail.com> |
Merge upstream to r131450 at Tue. 17th May 2011.
|
1f2f384eb7d0ea368819fe9cc4cc20a4b337ebea |
17-May-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Implement some tests for defaulted constructors. To do this I had to suppress an error we were previously emitting on valid union code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131440 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
cf34e757b968f1fa7965cab1464212ade4d9f991 |
17-May-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Implement the new C++0x rules for non-trivial things in unions so that my defaulted constructor tests stop yelling at me about them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131432 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
714c992099b3b9442759f29038bb3f2c5a59a23d |
15-May-2011 |
Douglas Gregor <dgregor@apple.com> |
When checking a set of template parameter lists against a nested-name-specifier, re-evaluate the nested-name-specifier as if we were entering that context (which we did!), so that we'll resolve a template-id to a particular class template partial specialization. Fixes PR9913. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131383 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
emaTemplate.cpp
|
7d16627081caede9691a6f46b796da4073ac14ad |
15-May-2011 |
John McCall <rjmccall@apple.com> |
The array-size operand to a new-expression is not necessarily a size_t. It can be larger, it can be smaller, it can be signed, whatever. Handle all the crazy cases with grace and spirit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131378 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
3b5904ba83fc9b968b1cd6f1ce78d01bfd6e8686 |
14-May-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Emit an error when trying to @encode an incomplete type. There are APIs, e.g. [NSValue valueWithBytes:objCType:], which use the encoding to find out the size of an object pointed to by a pointer. Make things safer by making it illegal to @encode incomplete types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131364 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
e1e96a6201168c232a06ec81685f948e05fddd39 |
14-May-2011 |
Francois Pichet <pichet2000@gmail.com> |
Revert 131347. It asserts if the specialization in within a class template: template<class U> struct X1 { template<class T> void f(T*); template<> void f(int*) { } }; Won't be so simple. I need to think more about it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131362 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplate.cpp
|
509f048825d309ca84db136abee32da0c6acffc0 |
14-May-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Make sure we actually generate defaulted copy constructors; caught by Howard Hinnant. Thanks! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131349 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
1fa8028d9ff5de64f8b9d55731ca83a2d3423a77 |
14-May-2011 |
Francois Pichet <pichet2000@gmail.com> |
In Microsoft mode, allow template function explicit specialization at class scope. Necessary to parse MFC and MSVC standard lib code. Example: struct X { template<class T> void f(T) { } template<> void f(int) { } } git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131347 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplate.cpp
|
1804174e1591bf59118f317775b48edd0382c3f0 |
14-May-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR9908: Fix the broken fix for PR9902 to get the template argument lists in the right order. Also, don't reject alias templates in all ElaboratedTypes: some ElaboratedTypes do not correspond to elaborated-type-specifiers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131342 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
reeTransform.h
|
0c115a16d479c7cda12c66bceb3782fd45177481 |
14-May-2011 |
Nowar Gu <nowar100@gmail.com> |
Fix Android.mk.
ndroid.mk
|
2b188085eccf741a9520ba86f1e6e32d0e0cd3f2 |
14-May-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
What I hope to be an implementation of defaulted copy assignment operators. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131338 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExpr.cpp
|
7f410191f344dc26aa926de6593fdacaad9fd1a7 |
14-May-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
More progress towards defaulted copy assignment git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131337 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
30de05c228d5d38dbfdeeeb598cb960646bf998a |
14-May-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Start implementing defaulted copy assignment git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131336 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
d01d2b2de449d68e6c44d99a12c0c1fc53222113 |
14-May-2011 |
Nowar Gu <nowar100@gmail.com> |
Merge upstream to r131335 at Sat. 14th May 2011.
|
daebfef4b8c035d139f4b7d6f75be02b7a2c6218 |
13-May-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Fix copy constructor deletion detection with array types. This fixes PR9910 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131309 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
819e9bfe398bd556f43ca1f0c24d1b3fa21f41ef |
13-May-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
refactor CheckForwardProtocolDeclarationForCircularDependency returns 'true' on detecting protocol cycles. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131297 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
49634cf3b9b0c3da2aedc3bdefbf331bce167239 |
13-May-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Defaulting copy constructors now works reasonably well. One more special member to go git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131287 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExpr.cpp
|
18c8339978dabbf1517bfcc4898e8b8c8069283c |
13-May-2011 |
Douglas Gregor <dgregor@apple.com> |
Teach the template parameter dependency checker used when matching template parameter lists to scope specifiers for friend declarations about injected class name types. Fixes the g++.dg/template/memfriend5.C regression in the GCC testsuite. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131272 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
feb375d31b7e9108b04a9f55b721d5e0c793a558 |
13-May-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Implement the __is_trivially_copyable type trait git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131270 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
2be7e90b81509204b99b7bbf9753ad17b894a12a |
13-May-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Implement defaulting of destructors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131260 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExprCXX.cpp
emaInit.cpp
|
cb45a0f42964ab5fa1474b25abcc1ae3a8bd0ab8 |
13-May-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Hrm git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131259 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
|
96b69a7305e20c98f1a3e2e7cd52e2d6c5d53835 |
13-May-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
After issuing diagnostics on circular protocol list, don't build circular AST in protocol's protocol list when user code has introduced it. Indexer and other clients may crash. // rdar://9221614 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131254 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
e4246a633b13197634225971b25df0cbdcec0c5d |
12-May-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Properly parse the 'default' and 'delete' keywords. They are actually grammatically considered definitions and parsed accordingly. This fixes the outstanding bugs regarding defaulting functions after their declarations. We now really nicely diagnose the following construct (try it!) int foo() = delete, bar; Still todo: Defaulted functions other than default constructors Test cases (including for the above construct) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131228 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
1e23865d0e148a3951a9b418e57b7e0762dc3098 |
12-May-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Make it so that we actually generate definitions for explicitly defaulted default constructors. As it happens, making sure that we handle out-of-line defaulted functions properly will involved making sure that we actually parse them correctly, so that's coming after. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131224 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExpr.cpp
emaInit.cpp
|
ca46d131aa40ae953d719b096cb951b385787445 |
12-May-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Implement deletion of explicitly defaulted default constructors. We still don't parse out-of-line defaults correctly, which is needed to get the full effect out of this patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131223 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
8a29bc047a374df2464869b55581c24def68c2ec |
12-May-2011 |
Nick Lewycky <nicholas@mxc.ca> |
Fix crasher spotted in IWYU. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131222 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
640c63cf4db3847b9d59878e9e5372332e2cd141 |
12-May-2011 |
Nick Lewycky <nicholas@mxc.ca> |
Fix typo in comment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131212 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
aff37b48f1362dd29cc481dadebf07900ce79248 |
12-May-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix PR9902: correctly substitute alias templates within the template in which they are defined: provide an empty list of arguments for each containing template context during substitution. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131211 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
7822ee3ef9f0d5cfd289258614ac31be70097449 |
12-May-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement CWG1170, which makes access-control errors into template argument deduction failures. Only implemented in C++0x, since this is a significant change in behavior from C++98/03. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131209 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
175c5bb2b09217df71319cb3d58b3c511fd04138 |
12-May-2011 |
Douglas Gregor <dgregor@apple.com> |
When checking for the necessary 'template<>' headers based on the nested of an out-of-line declaration, only require a 'template<>' header for each enclosing class template that hasn't been previously specialized; previously, we were requiring 'template<>' for enclosing class templates and members of class templates that hadn't been previously specialized. Fixes <rdar://problem/9422013>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131207 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
a6bff2caf90d769e0b6bfe59c3e7f16ef8402e5a |
12-May-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Commit some missing changes to the previous patch. This means we get C++0x jump-across-intializer semantics correct. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131204 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
cdee3fee8ca4df7fb9179f29cc3ba96ac4fd0f95 |
12-May-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Implement implicit deletion of default constructors. Yes, I'm aware that the diagnostics are awful. Tests to follow. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131203 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaLookup.cpp
|
30aff5b794599fac45cd8716412caf32f29ccb7e |
12-May-2011 |
Francois Pichet <pichet2000@gmail.com> |
In Microsoft mode, allow conversion from pointer to integral type no matter what size the integral type is. Necessary to parse MFC code. Example: void f(char *ptr) { char var = (char)ptr; } git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131201 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
1de85338543dd6228eb518185e385d94d377f4cb |
11-May-2011 |
John McCall <rjmccall@apple.com> |
Teach CFG building how to deal with CXXMemberCallExprs and BoundMemberTy, then teach -Wreturn-type to handle the same. Net effect: we now correctly handle noreturn attributes on member calls in the CFG. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131178 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
6a24747beed797b2f1184c66ca45beb4db20eb08 |
11-May-2011 |
Francois Pichet <pichet2000@gmail.com> |
In Microsoft mode, allow pure specifier (=0) on inline functions declared at class scope. This removes 2 errors when parsing MFC code with clang Example: class A { virtual void f() = 0 { } } git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131175 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
4da89c87b2b6ca31f1015ec19aae65a02971ea9a |
11-May-2011 |
John McCall <rjmccall@apple.com> |
Use a heralded conversion to bool in inline-asm constraints. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131170 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
f961ea5716867b5e426fb2136edd6d1f04c3a7ca |
10-May-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Re-do R131114 without breaking code. I've edited one diagnostic which would print "copy constructor" for copy constructors and "constructor" for any other constructor. If anyone is extremely enamored with this, it can be reinstated with a simple boolean flag rather than calling getSpecialMember, which is inappropriate. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131143 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaDecl.cpp
emaDeclCXX.cpp
|
c840649ed5acccf68e1bc5a9d22f2ea017074586 |
10-May-2011 |
Douglas Gregor <dgregor@apple.com> |
Reimplement Sema::MatchTemplateParametersToScopeSpecifier() based on the semantic context referenced by the nested-name-specifier rather than the syntactic form of the nested-name-specifier. The previous incarnation was based on my complete misunderstanding of C++ [temp.expl.spec]. The latest C++0x working draft clarifies the requirements here, and this rewrite is intended to follow that. Along the way, improve source location information in the diagnostics. For example, if we report that a specific type needs or doesn't need a 'template<>' header, we dig out that type in the nested-name-specifier and highlight its range. Fixes: PR5907, PR9421, PR8277, PR8708, PR9482, PR9668, PR9877, and <rdar://problem/9135379>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131138 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaTemplate.cpp
|
680404e0d91ac67c91097af6c62bc92f1fba5965 |
10-May-2011 |
Rafael Espindola <rafael.espindola@gmail.com> |
Revert 131114. This fixes PR9884. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131126 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
001cad932380419c6fbfecbeec63e0579f5ecbf3 |
10-May-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Further implement defaulting constructors. Focus is on default constructors for the time being. Currently the exception specification and prototype are processed correctly. Codegen might work but in all likelihood doesn't. Note that due to an error, out-of-line defaulting of member functions is currently impossible. It will continue to that until I muster up the courage to admit that I secretly pray to epimetheus and that I need to rework the way default gets from Parse -> Sema. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131115 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
a780da70f74ab09ed1f91c1e992abf850e5268ea |
10-May-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
The last of the trivial constructor changes, make CXXSpecialMember reflect our new, more accurate AST. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131114 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
7604f64a865bdba86c05cab76bcd47fd10372eb8 |
10-May-2011 |
Douglas Gregor <dgregor@apple.com> |
Ignore const/volatile/restrict qualifiers on anonymous structs and unions. Fixes PR8326. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131109 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
93b6bceb0f009942e8a9e97d8c5c316ad10338f2 |
09-May-2011 |
Douglas Gregor <dgregor@apple.com> |
Extend the tag-ambiguity hack I committed in r130810 for tag definitions to also include tag declarations. Fixes PR8151. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131102 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
37b8c9ee7cf2b4d5ce3ccd3be1fcadd18a783a57 |
09-May-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Clean up trivial default constructors now. hasTrivialDefaultConstructor() really really means it now. Also implement a fun standards bug regarding aggregates. Doug, if you'd like, I can un-implement that bug if you think it is truly a defect. The bug is that non-special-member constructors are never considered user-provided, so the following is an aggregate: struct foo { foo(int); }; It's kind of bad, but the solution isn't obvious - should struct foo { foo (int) = delete; }; be an aggregate or not? Lastly, add a missing initialization to FunctionDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131101 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaLookup.cpp
|
c056c1792eac0717640f1f48b3739cc9a98ee413 |
09-May-2011 |
Douglas Gregor <dgregor@apple.com> |
When determining whether we need to instantiate a function type, also consider whether any of the parameter types (as written, prior to decay) are dependent. Fixes PR9880 and <rdar://problem/9408413>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131099 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
023df37c27ee8035664fb62f206ca58f4e2a169d |
09-May-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Rename "hasTrivialConstructor" to "hasTrivialDefaultConstructor" and modify the semantics slightly to accomodate default constructors (I hope). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131087 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
|
a8ef3ac9fa7637fad33d52614794b92e2261d65b |
09-May-2011 |
Francois Pichet <pichet2000@gmail.com> |
Allow implicit conversion from function pointer to void* in Microsoft mode. Necessary to parse MFC code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131076 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
8db75a2b9c963a3bc0bf928e711353552f4fef79 |
08-May-2011 |
Francois Pichet <pichet2000@gmail.com> |
Look at all the record redeclaration when looking for a uuid attribute. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131066 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
377e1bd6853118c5b1718503569e5179c40f09b7 |
08-May-2011 |
Douglas Gregor <dgregor@apple.com> |
Relax the conversion rules for Objective-C GC qualifiers a bit by allowing __weak and __strong to be added/dropped as part of implicit conversions (qualification conversions in C++). A little history: GCC lets one add/remove/change GC qualifiers just about anywhere, implicitly. Clang did roughly the same before, but we recently normalized the semantics of qualifiers across the board to get a semantics that we could reason about (yay). Unfortunately, this tightened the screws a bit too much for GC qualifiers, where it's common to add/remove these qualifiers at will. Overall, we're still in better shape than we were before: we don't permit directly changing the GC qualifier (e.g., __weak -> __strong), so type safety is improved. More importantly, we're internally consistent in our handling of qualifiers, and the logic that allows adding/removing GC qualifiers (but not adding/removing address spaces!) only touches two obvious places. Fixes <rdar://problem/9402499>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131065 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
00c93a10c3504b77dad4467766bfca3248defbfb |
07-May-2011 |
Richard Trieu <rtrieu@google.com> |
Patch for PR 7409 - only error on definition of invalid typedefs. Suppress errors for additional uses of this invalid typedef. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131043 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
010157f9dbce11706c96229cf17f1da9e2a39d73 |
07-May-2011 |
Douglas Gregor <dgregor@apple.com> |
When checking for a prior declaration of the name of a namespace, skip any names that aren't in the appropriate identifier namespaces. Fixes an embarrassing bug where we give a redefinition error due to an Objective-C category (<rdar://problem/9388207>). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131036 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
bb85f8edca8103aa10e4b2f4a6fcc3a251b0ea03 |
06-May-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Per Richard's suggestion, rename DefLoc to DefaultLoc where it appears. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131018 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
1e862693c63067ae467b0b3884c44f753cd6e821 |
06-May-2011 |
Francois Pichet <pichet2000@gmail.com> |
Add support for Microsoft __if_exists and __if_not_exists construct inside function definition. Allow to include or exclude code depending on if a symbol exists or not. Just like a #ifdef but for C/C++ symbols. More doc: http://msdn.microsoft.com/en-us/library/x7wy9xh3(v=VS.100).aspx Support at class and namespace scopes will be added later. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131014 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
10620eb5164e31208fcbf0437cd79ae535ed0559 |
06-May-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Modify some deleted function methods to better reflect reality: - New isDefined() function checks for deletedness - isThisDeclarationADefinition checks for deletedness - New doesThisDeclarationHaveABody() does what isThisDeclarationADefinition() used to do - The IsDeleted bit is not propagated across redeclarations - isDeleted() now checks the canoncial declaration - New isDeletedAsWritten() does what it says on the tin. - isUserProvided() now correct (thanks Richard!) This fixes the bug that we weren't catching void foo() = delete; void foo() {} as being a redefinition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131013 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
2174d4c11c1544a6729637790637b765e35b67a3 |
06-May-2011 |
Anders Carlsson <andersca@mac.com> |
Warn when trying to call a pure virtual member function in a class from the class constructor/destructor. Fixes PR7966. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130982 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
fe2695eec167b28578825576863228f86b392f24 |
06-May-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Do defaulted constructors properly. Explictly defaultedness is correctly reflected on the AST, but there are no changes to how that affects the definition of functions or much else really. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130974 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
5f802e51406664ca9b6e0d57fc7ce37ea97a1c65 |
06-May-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Revert r130912 in order to approach defaulted functions from the other direction and not introduce things in the wrong place three different times. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130968 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
|
3e4c6c4c79a03f5cb0c4671d7c282d623c6dc35e |
05-May-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Implement support for C++0x alias templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130953 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
reeTransform.h
|
ff365592d1878c0e454f288e30613664a72cff4c |
05-May-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
When instantiating a block expression, the instantiated blockScopeInfo's CapturesCXXThis field need get set as well. // rdar://9362021. John M. please review. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130930 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
4b81cde48b8b56c219e8d665884f5f33139b5eca |
05-May-2011 |
Douglas Gregor <dgregor@apple.com> |
When providing code completions for an Objective-C property access, also include methods with zero-argument selectors. Implements <rdar://problem/9048332>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130922 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
ad7ec12ef2edbadb85a3754f0395ef2f06d4256c |
05-May-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Implement some framework for defaulted constructors. There's some unused stuff for now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130912 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
|
9389ddc29ec60931e4dc418541ba3470b6b9fbe0 |
05-May-2011 |
Matt Beaumont-Gay <matthewbg@google.com> |
Look through block pointers and ObjC object pointers git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130906 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
439d3c3d76f858df5f25239f2a70f04312eacb5b |
05-May-2011 |
Douglas Gregor <dgregor@apple.com> |
With invalid overloaded operators, we can get into funny cases where the overloading of member and non-member functions results in arity mismatches that don't fit well into our overload-printing scheme. This only happens for invalid code (which breaks the arity invariants for these cases), so just suppress the diagnostic rather than inventing anything new. Fixes <rdar://problem/9222009>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130902 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
c1598700010cea9364a58a65e967b0b56361b6aa |
05-May-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Change cycle detection to be based off of a warning flag. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130898 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDeclCXX.cpp
|
e74c25c5c0375004bd84945bda53c3a96f443da8 |
05-May-2011 |
Douglas Gregor <dgregor@apple.com> |
When adding KVC code completions, keep track of all of the selectors that we've previously seen, both in declared methods and from previous KVC completions, to eliminate duplicates. Fixes <rdar://problem/9162207>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130890 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
ebcbe1d3dc7d4f0c1f540a632fa0684dd0a857d5 |
05-May-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
there i fixed it Increase robustness of the delegating constructor cycle detection mechanism. No more infinite loops on invalid or logic errors leading to false results. Ensure that this is maintained correctly accross serialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130887 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
bd61e341d6efb9b3eaee97e48f98876af128349c |
05-May-2011 |
Douglas Gregor <dgregor@apple.com> |
Clean up Sema::BuildCXXNestedNameSpecifier()'s creation of TypeLoc information. Rather than looking at the declaration kind to figure out what TypeLoc to build, look at the type; it makes so much more sense. Fixes <rdar://problem/9086649>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130882 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
|
c9366ba8fff6461a5b7f0fd2626d1bce3e98e629 |
05-May-2011 |
Matt Beaumont-Gay <matthewbg@google.com> |
Implement Sema::isExprCallable. We can use this to produce nice diagnostics (and try to fixit-and-recover) in various cases where we might see "MyFunction" instead of "MyFunction()". The changes in SemaExpr are an example of how to use isExprCallable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130878 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaExpr.cpp
|
c7469374548b06e50aa8b4d41bf1a35338e9b358 |
04-May-2011 |
Douglas Gregor <dgregor@apple.com> |
When converting an integral template argument value to a non-type template parameter of type 'bool', force the value to be zero or one. Fixes <rdar://problem/9169404>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130873 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
fe57eef44cc80e5bb51e4f484835be08b8d84256 |
04-May-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Implement a better version of delegating constructor cycle detection. This is more efficient as it's all done at once at the end of the TU. This could still get expensive, so a flag is provided to disable it. As an added bonus, the diagnostics will now print out a cycle. The PCH test is XFAILed because we currently can't deal with a note emitted in the header and I, being tired, see no other way to verify the serialization of delegating constructors. We should probably address this problem /somehow/ but no good solution comes to mind. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130836 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDeclCXX.cpp
|
fa74c2344addf92826c938758fb4dc612a004eb9 |
04-May-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Ensure that delegating constructor loop detection uses canonical declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130821 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
61c6c4415d0f73bd033128ac85f054a0211e7c42 |
04-May-2011 |
Douglas Gregor <dgregor@apple.com> |
When tag lookup finds something ambiguous, and we're defining a new tag, filter out those ambiguous names that we found if they aren't within the declaration context where this newly-defined tag will be visible. This is basically a hack, because we really need to fix the lookup of tag declarations in this case to not find things it shouldn't. However, it's better than what we had before, and it fixes <rdar://problem/9168556>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130810 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
b76af9c969558b4484be87933e89e76e7ee87e21 |
04-May-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Ensure that destructors are properly inovked when an exception leaves the body of a delegating constructor call. This means that the delegating constructor implementation should be complete and correct, though there are some rough edges (diagnostic quality with the cycle detection and using a deleted destructor). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130803 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
01aacc024673e84181ae687ff1c65ab65e10571a |
03-May-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Move the AST modifications to after the cycle detection in lib/Sema/SemaDeclCXX.cpp to avoid getting stuck in an infinite loop. See the comment for more explanation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130788 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
06bc9eb9908e42696775b395b290827bde468c8b |
03-May-2011 |
Douglas Gregor <dgregor@apple.com> |
Extend -Wnon-pod-memset to also encompass memcpy() and memmove(), checking both the source and the destination operands, renaming the warning group to -Wnon-pod-memaccess and tweaking the diagnostic text in the process. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130786 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
d49bd5515b89bedc57c3d1d3be457e4340dbdb1d |
03-May-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Fix delegating constructors stylistic issues. Material bugfixes to come this afternoon. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130782 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
2a053a33707eba9e642adedb557b1a6aace103b5 |
03-May-2011 |
Douglas Gregor <dgregor@apple.com> |
Separate the -Wnon-pod-memset warnings into two separate warnings: - a default-on warning for pointers to dynamic classes (= classes with vtables) - a default-off warning for other non-POD types git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130781 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
0f4be74ff0273e505d383f89174ef539828424ed |
03-May-2011 |
Chandler Carruth <chandlerc@gmail.com> |
When parsing a template friend declaration we dropped the template parameters on the floor in certain cases: class X { template <typename T> friend typename A<T>::Foo; }; This was parsed as a *non* template friend declaration some how, and received an ExtWarn. Fixing the parser to actually provide the template parameters to the freestanding declaration parse triggers the code which specifically looks for such constructs and hard errors on them. Along the way, this prevents us from trying to instantiate constructs like the above inside of a outer template. This is important as loosing the template parameters means we don't have a well formed declaration and template instantiation will be unable to rebuild the AST. That fixes a crash in the GCC test suite. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130772 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
e452c78072156c14cd9998733e3b4b28b6fc7fd7 |
03-May-2011 |
Douglas Gregor <dgregor@apple.com> |
Only check the use of memset() if we're refering to a C function named 'memset' with external linkage. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130770 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
1dd986dff9ddfbec687975700770bb377988e9ed |
03-May-2011 |
Richard Trieu <rtrieu@google.com> |
Added an assert to IntegerLiteral to ensure that the integer type passed in has the same size as the APInt passed in. Also, updated the comments around IntegerLiteral. Changed the integer type that range-based for-loops used. Switched to pointer difference type, which satisfies the new assert in IntegerLiteral. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130739 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
7193b3ee1abf4997c3c46486c43e70f3221d3ef3 |
02-May-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Don't abuse reinterpret cast to do something the API of PointerUnion provides proper support for. This was caught by -Wundefined-reinterpret-cast, and I think a reasonable case for it to warn on. Also use is<...> instead of dyn_cast<...> when the result isn't needed. This whole thing should probably switch to using UsuallyTinyPtrVector. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130707 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
f4bbbf0aaf741cc7d014e2cf059670a6756f8cbd |
02-May-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Add a warning for when reinterpret_cast leads to undefined behavior, patch by Richard Trieu! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130703 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaExpr.cpp
|
e099c00a065c3a43706b8da71cfe655ff7a2c1c6 |
02-May-2011 |
Nick Lewycky <nicholas@mxc.ca> |
Remove redeclaration of Invalid. The code that set this to true was updating an Invalid that was never read from again, causing non-type-template-parms to be marked valid when in fact they weren't. This was caught by GCC 4.6's -Wunused-but-set-variable warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130680 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
b79bf1db7adc8ed3172ee89db04428b65bf40693 |
02-May-2011 |
Nick Lewycky <nicholas@mxc.ca> |
Remove unused variable, but keep function call with side-effect. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130678 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
7079886ab5a9df450ed773419f0ae81f8404e2aa |
02-May-2011 |
John McCall <rjmccall@apple.com> |
Revise the representation of parameter scope data so that the scope depth overlaps with the ObjCDeclQualifier, dropping memory usage back to previous levels. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130671 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
3aa8140bde5b9bedf13e46ec0a668daa54814196 |
02-May-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Add an optional field attached to a DeclRefExpr which points back to the Decl actually found via name lookup & overload resolution when that Decl is different from the ValueDecl which is actually referenced by the expression. This can be used by AST consumers to correctly attribute references to the spelling location of a using declaration, and otherwise gain insight into the name resolution performed by Clang. The public interface to DRE is kept as narrow as possible: we provide a getFoundDecl() which always returns a NamedDecl, either the ValueDecl referenced or the new, more precise NamedDecl if present. This way AST clients can code against getFoundDecl without know when exactly the AST has a split representation. For an example of the data this provides consider: % cat x.cc namespace N1 { struct S {}; void f(const S&); } void test(N1::S s) { f(s); using N1::f; f(s); } % ./bin/clang -fsyntax-only -Xclang -ast-dump x.cc [...] void test(N1::S s) (CompoundStmt 0x5b02010 <x.cc:5:20, line:9:1> (CallExpr 0x5b01df0 <line:6:3, col:6> 'void' (ImplicitCastExpr 0x5b01dd8 <col:3> 'void (*)(const struct N1::S &)' <FunctionToPointerDecay> (DeclRefExpr 0x5b01d80 <col:3> 'void (const struct N1::S &)' lvalue Function 0x5b01a20 'f' 'void (const struct N1::S &)')) (ImplicitCastExpr 0x5b01e20 <col:5> 'const struct N1::S' lvalue <NoOp> (DeclRefExpr 0x5b01d58 <col:5> 'N1::S':'struct N1::S' lvalue ParmVar 0x5b01b60 's' 'N1::S':'struct N1::S'))) (DeclStmt 0x5b01ee0 <line:7:3, col:14> 0x5b01e40 "UsingN1::;") (CallExpr 0x5b01fc8 <line:8:3, col:6> 'void' (ImplicitCastExpr 0x5b01fb0 <col:3> 'void (*)(const struct N1::S &)' <FunctionToPointerDecay> (DeclRefExpr 0x5b01f80 <col:3> 'void (const struct N1::S &)' lvalue Function 0x5b01a20 'f' 'void (const struct N1::S &)' (UsingShadow 0x5b01ea0 'f'))) (ImplicitCastExpr 0x5b01ff8 <col:5> 'const struct N1::S' lvalue <NoOp> (DeclRefExpr 0x5b01f58 <col:5> 'N1::S':'struct N1::S' lvalue ParmVar 0x5b01b60 's' 'N1::S':'struct N1::S')))) Now we can tell that the second call is 'using' (no pun intended) the using declaration, and *which* using declaration it sees. Without this, we can mistake calls that go through using declarations for ADL calls, and have no way to attribute names looked up with using declarations to the appropriate UsingDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130670 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
fb44de956f27875def889482b5393475060392af |
02-May-2011 |
John McCall <rjmccall@apple.com> |
Store a parameter index and function prototype depth in every parameter node and use this to correctly mangle parameter references in function template signatures. A follow-up patch will improve the storage usage of these fields; here I've just done the lazy thing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130669 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
cope.cpp
emaDecl.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
d6efe9b66fce943ada47100e90237e710c4716fe |
01-May-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Remove a stale comment, it no longer applied after my cleanups. Also fix several misspellings in my comments. I cannot spell, and cannot even be trusted to ask my editor how to spell apparently. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130662 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
aaf147be3cc7403d8f7889d363421bb291ef23f2 |
01-May-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Move several more type traits' implementations into the AST. A few were already present in the AST, and I added the ones that weren't. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130655 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
cec0ced5bd3de14d7cebbc1a240618282c91f656 |
01-May-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Switch __is_scalar to use the isScalarType predicate rather than duplicating its logic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130654 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
af5a3c6af37a16b0ca686e6af994010b0b3785dd |
01-May-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Have the array type traits build an expression with type 'size_t' instead of 'int'. The Embarcadero spec says 'unsigned int', not 'int'. That's what 'size_t' is on Windows, but for Clang using a 'size_t' that can be larger than int seems more appropriate. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130653 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
f7ef00048d0a3f6079d82e00a9a8dba92179b9a8 |
01-May-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Remove an inapplicable and completely out of place comment. The type is in fact 'bool'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130652 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
d064c70bc63ad742d11625e485c1dc1631f6e303 |
01-May-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Remove more dead code for emitting diagnostics. The callers of these functions already precluded dependent types from reaching them. Also change one of the callers to not error when a trait is applied to a dependent type. This is a perfectly reasonable pattern, and both Unary and Binary type traits already support dependent types (by populating the AST with a nonce value). Remove the actual diagnostic, since these aren't errors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130651 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
06207f6f5f248f678498d61d6dbb36774b7fe5ae |
01-May-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Simplify the flow of some of the array type trait code. Completely remove a switch which selected between the same two types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130649 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
4aa0af346b7bb37548078dfab728d28d7776aff3 |
01-May-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Convert the expression trait evaluation to a static function and a switch with any default case. This both warns when an enumerator is missing and asserts if a value sneaks through despite the warning. While in there fix a bunch of coding style issues with this code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130648 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
83f563cc10d6265be395b608323ec52e3370915c |
01-May-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Remove the default case from the unary type trait evaluation function, adding an unreachable annotation. Remarkably this one was already enumarting every trait. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130647 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
73e0a91c9130a048dfb0928643b9cde1f838b87d |
01-May-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Mark that this function ends in a covering switch statement with every case returning a value. Silences a GCC warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130644 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
98fa94d2564057555c4a12e8737b8371700cf6e4 |
01-May-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Remove the type traits UTT_IsLvalueExpr and UTT_IsRvalueExpr. As might be surmised from their names, these aren't type traits, they're expression traits. Amazingly enough, they're expression traits that we have, and fully implement. These "type" traits are even parsed from the same tokens as the expression traits. Luckily, the parser only tried the expression trait parsing for these tokens, so this was all just a pile of dead code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130643 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
059ce0d92eb5a7da900ae735dc0a2ea3d64f4b0b |
01-May-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Fully implement delegating constructors! As far as I know, this implementation is complete but might be missing a few optimizations. Exceptions and virtual bases are handled correctly. Because I'm an optimist, the web page has appropriately been updated. If I'm wrong, feel free to downgrade its support categories. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130642 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaInit.cpp
|
ccb4ecf9b11d7b652515780253253db976d0447f |
01-May-2011 |
Chandler Carruth <chandlerc@gmail.com> |
More cleanup of the type traits implementation. 1) Moved the completeness checking routine above the evaluation routine so the reader sees that we do in fact check for complete types when necessary. 2) Remove the FIXME comment about not doing this. 3) Make the arguments to the evaluate function agree in order with those to the completeness checking function. 4) Completely specify the enumerators for the completeness checking function rather than relying on a default. 5) Remove a check for the Borland language to only require complete types in a few places. Borland's own documentation doesn't agree with this: some of the previously unspecified traits *do* require a complete type, some don't. 6) Correctly split the traits which do not require complete types from those that do, clarifying comments and citations to the standard or other documentation where relevant. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130641 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
c41d6b57f3a42fbe29e33b73e670b398fade4718 |
01-May-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Order the type traits according to the standard's listing of unary type traits where possible. For the rest, group them and add some documentation regarding their origins. No functionality change intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130639 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
28eeb384d6910b897f3cef846f2232b9235fca59 |
01-May-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Begin cleaning up type trait expression implementations and settling on a single pattern for implementing each. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130638 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
09e2c524a18435211cfbc2fb355f91e1ac43ea89 |
01-May-2011 |
John McCall <rjmccall@apple.com> |
Improve the documentation for the two ObjCDeclQualifiers so that I stop considering whether I can compress them. :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130633 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
b7efff4bae117604f442bb6859c844f90b15f3ff |
01-May-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Switch the interface name for both TemplateTypeParmType and SubstTemplateTypeParmType to be 'getIdentifier' instead of 'getName' as it returns an identifier. This makes them more consistent with the NamedDecl interface. Also, switch back to using this interface to acquire the indentifier in TypePrinter.cpp. I missed this in r130628. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130629 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateVariadic.cpp
|
4fb86f8c4585e53c21c847ad3de9e3b2de123cd9 |
01-May-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Re-applies the patch first applied way back in r106099, with accompanying fixes to make it work today. The core of this patch is to provide a link from a TemplateTypeParmType back to the TemplateTypeParmDecl node which declared it. This in turn provides much more precise information about the type, where it came from, and how it functions for AST consumers. To make the patch work almost a year after its first attempt, it needed serialization support, and it now retains the old getName() interface. Finally, it requires us to not attempt to instantiate the type in an unsupported friend decl -- specifically those coming from template friend decls but which refer to a specific type through a dependent name. A cleaner representation of the last item would be to build FriendTemplateDecl nodes for these, storing their template parameters etc, and to perform proper instantation of them like any other template declaration. They can still be flagged as unsupported for the purpose of access checking, etc. This passed an asserts-enabled bootstrap for me, and the reduced test case mentioned in the original review thread no longer causes issues, likely fixed at somewhere amidst the 24k revisions that have elapsed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130628 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
769d0cc72b1831785596d0e76f327bdb887823be |
30-Apr-2011 |
Douglas Gregor <dgregor@apple.com> |
When comparing parameters of reference-to-qualified type during partial ordering of function templates, use a simple superset relationship rather than the convertibility-implying isMoreQualifiedThan/compatibilyIncludes relationship. Fixes partial ordering between references and address-space-qualified references. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130612 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
eb65a108bd1eb613ed2a9ebfdbd73a9c872f0309 |
30-Apr-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Extract a function to impose the completeness requirement on unary type trait arguments. Reflow the logic to use early exit instead of a complex condition expression. Switch to a switch for acting on different type traits and add a bunch of the recently implemented type traits here. This fixes one of the regressions with the new __is_standard_layout trait to again require a complete type. It also fixes some latent bugs in other traits that never did impose this despite the standard requiring it. However, all these bugs were hidden for non-borland systems where the default is to require a complete type. It's unclear to me what the best approach here is: providing an explicit lists for the ones requiring complete types only w/ Borland and using a default for the rest, or forcing this switch to enumerate the traits and make it clear which way each one goes. I'm still working on cleaning up the tests so that they actually catch this, a much more comprehensive update to the tests will come once I've worked through the bugs I'm finding via inspection. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130604 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
636a617cc6021a4366380b3ce673f4472f3d99db |
30-Apr-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Hoist all of the type-specific trait logic for __is_standard_layout into a Type method isStandardLayoutType, to keep our user API matching the type trait builtins as closely as possible. Also, implement it in terms of other Type APIs rather than in terms of other type traits. This models the implementation on that of isLiteralType and isTrivialType. There remain some common problems with these traits still, so this is a bit of a WIP. However, we can now fix all of these traits at the same time and in a consistent manner. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130602 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
a8225449421e8c1e996a7c48300521028946482a |
30-Apr-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Completely re-implement the core logic behind the __is_standard_layout type trait. The previous implementation suffered from several problems: 1) It implemented all of the logic in RecordType by walking over every base and field in a CXXRecordDecl and validating the constraints of the standard. This made for very straightforward code, but is extremely inefficient. It also is conceptually wrong, the logic tied to the C++ definition of standard-layout classes should be in CXXRecordDecl, not RecordType. 2) To address the performance problems with #1, a cache bit was added to CXXRecordDecl, and at the completion of every C++ class, the RecordType was queried to determine if it was a standard layout class, and that state was cached. Two things went very very wrong with this. First, the caching version of the query *was never called*. Even within the recursive steps of the walk over all fields and bases the caching variant was not called, making each query a full *recursive* walk. Second, despite the cache not being used, it was computed for every class declared, even when the trait was never used in the program. This probably significantly regressed compile time performance for edge-case files. 3) An ASTContext was required merely to query the type trait because querying it performed the actual computations. 4) The caching bit wasn't managed correctly (uninitialized). The new implementation follows the system for all the other traits on C++ classes by encoding all the state needed in the definition data and building up the trait incrementally as each base and member are added to the definition of the class. The idiosyncracies of the specification of standard-layout classes requires more state than I would like; currently 5 bits. I could eliminate one of the bits easily at the expense of both clarity and resilience of the code. I might be able to eliminate one of the other bits by computing its state in terms of other state bits in the definition. I've already done that in one place where there was a fairly simple way to achieve it. It's possible some of the bits could be moved out of the definition data and into some other structure which isn't serialized if the serialized bloat is a problem. That would preclude serialization of a partial class declaration, but that's likely already precluded. Comments on any of these issues welcome. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130601 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
43fa33b4bedc28d2faa17d678ad1f40eb42817a1 |
29-Apr-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Relax the non-POD memset warning to use the less restrictive C++11 definition of POD. Specifically, this allows certain non-aggregate types due to their data members being private. The representation of C++11 POD testing is pretty gross. Any suggestions for improvements there are welcome. Especially the name 'isCXX11PODType()' seems truly unfortunate. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130492 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
a343a415035aba553a5c21fad8fba6a6db83e0f9 |
29-Apr-2011 |
Francois Pichet <pichet2000@gmail.com> |
r130381 follow up: accept __uuidof expression for template argument reference. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130491 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
f79a71908d6f28cb2bc0c081d9a801ed14d61d82 |
29-Apr-2011 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Add a decl update when a static data member of a class template is instantiated in a different PCH than its containing class. Otherwise we get double definition errors. Fixes a Boost.MPL problem that affects Boost.Accumulators and probably a lot more of Boost. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130488 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
f8b1771677743d24c7391305cad8853c513ec0f8 |
28-Apr-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Don't waste memory if the initializer expression is empty. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130420 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
a6ce3e6513f56e4d46399da9e35a3165b097f59e |
28-Apr-2011 |
Douglas Gregor <dgregor@apple.com> |
When determining whether two types are reference-compatible, check non-CVR qualifiers as well as CVR qualifiers. For example, don't allow a reference to an integer in address space 1 to bind to an integer in address space 2. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130411 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
11f98d0691312f70be40315438666dafb09c458a |
28-Apr-2011 |
Francois Pichet <pichet2000@gmail.com> |
Update r130381 to check for UO_AddrOf. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130384 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
a97d24f2ca50f318f62a6cf2a621e7842dd63b4a |
28-Apr-2011 |
Francois Pichet <pichet2000@gmail.com> |
Support &__uuidof(type) as a non type template argument. This idiom is used everywhere in MFC/COM code and as such this patch removes hundreds of errors when parsing MFC code with clang. Example: template <class T, const GUID* g = &__uuidof(T)> class ComTemplate { }; typedef ComTemplate<struct_with_uuid, &__uuidof(struct_with_uuid)> COM_TYPE; Of course this is just parsing support. Trying to use this in CodeGen will generate: error: cannot yet mangle expression type CXXUuidofExpr git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130381 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
642a75f883e644bcfbb82e7af0313776ad1ce33c |
28-Apr-2011 |
John McCall <rjmccall@apple.com> |
When block-capturing a variable with a non-trivial destructor, make sure to mark the destructor. This normally isn't required, because the destructor should have been marked as part of the declaration of the local, but it's necessary when the variable is a parameter because it's the call sites that are responsible for those destructors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130372 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
cf5664114eb75c6a5fef2bed1c0f0d0fb19debc9 |
28-Apr-2011 |
John Wiegley <johnw@boostpro.com> |
A few corrections to type traits that missed the last checkin git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130371 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
1d59f7f8fb39fa44ddbb6e2abd321af863b1f55b |
28-Apr-2011 |
Ted Kremenek <kremenek@apple.com> |
Convert assertion in memset checking to a runtime check (because real code may provide a deviant definition of memset). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130368 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
28bbe4b8acc338476fe0825769b41fb32b423c72 |
28-Apr-2011 |
John Wiegley <johnw@boostpro.com> |
Parsing/AST support for Structured Exception Handling Patch authored by Sohail Somani. Provide parsing and AST support for Windows structured exception handling. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130366 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
reeTransform.h
|
61d0b6baf47cf411f6c0f6ddb4acffcfeec724f1 |
28-Apr-2011 |
Douglas Gregor <dgregor@apple.com> |
More cleanup of template argument deduction and its handling of non-CVR qualifiers. We can now properly match address-space--qualified references during template argument deduction. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130365 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
21ff2e516b0e0bc8c1dbf965cb3d44bac3c64330 |
28-Apr-2011 |
John Wiegley <johnw@boostpro.com> |
Implementation of Embarcadero array type traits Patch authored by John Wiegley. These are array type traits used for parsing code that employs certain features of the Embarcadero C++ compiler: __array_rank(T) and __array_extent(T, Dim). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130351 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
reeTransform.h
|
a459cc26f6c895ae48742a36203f753cea8b3e91 |
28-Apr-2011 |
Douglas Gregor <dgregor@apple.com> |
Clean up the handling of non-CVR qualifiers in template argument deduction. The good news is that address spaces are a lot less broken in this regard than I'd expected. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130346 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
20c0da7787c9a7d2529e42a4a91d777778595d74 |
28-Apr-2011 |
John Wiegley <johnw@boostpro.com> |
t/clang/type-traits Patch authored by John Wiegley. These type traits are used for parsing code that employs certain features of the Embarcadero C++ compiler. Several of these constructs are also desired by libc++, according to its project pages (such as __is_standard_layout). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130342 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
134cb4442d6205e0226944ead4c7ede425fba206 |
27-Apr-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Heh, funny thing, 'void' isn't a POD type. Nice of us to suggest it to silence this warning. ;] Fixed that obvious bug and added a bit more testing as well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130318 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
7ccc95bceebb2d1c8fbe277c9e33bde7dc1ccbb1 |
27-Apr-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Add a warning (-Wnon-pod-memset) for calls to memset() with a destination pointer that points to a non-POD type. This can flag such horrible bugs as overwriting vptrs when a previously POD structure is suddenly given a virtual method, or creating objects that crash on practically any use by zero-ing out a member when its changed from a const char* to a std::string, etc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130299 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
d46a1125d43bcfd47fbd1206ebd1226863549390 |
27-Apr-2011 |
John McCall <rjmccall@apple.com> |
Diagnose attempts to implicitly instantiate a template before it is fully defined. Somehow this escaped notice for a very long time. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130298 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
b7d98d35ea723624345f06e5895ddce2e0388ef0 |
27-Apr-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
If a null statement was preceded by an empty macro keep its instantiation source location in NullStmt. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130289 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
3b887354b1b667c97d070ddc67b5354353c4c07b |
27-Apr-2011 |
Douglas Gregor <dgregor@apple.com> |
Extend Sema::ClassifyName() to support C++, ironing out a few issues in the classification of template names and using declarations. We now properly typo-correct the leading identifiers in statements to types, templates, values, etc. As an added bonus, this reduces the number of lookups required for disambiguation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130288 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplate.cpp
|
27766d2501259c7b12b1056e0c491a927b304e10 |
27-Apr-2011 |
Douglas Gregor <dgregor@apple.com> |
Improve diagnostics for typo correction via Sema::ClassifyName(), by looking at the context and the correction and using a custom diagnostic. Also, enable some Fix-It tests that were somewhat lamely disabled. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130283 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f5307514ee48978b5e17e42542e111afee4ce62b |
27-Apr-2011 |
John McCall <rjmccall@apple.com> |
FixOverloadedFunctionReference needs to rebuild member accesses of instance methods to have bound-member type. Fixing that broke __unknown_anytype, which I've in turn fixed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130266 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaOverload.cpp
|
0f7b3dcece1475130e2946d66dbe3075059b31f7 |
27-Apr-2011 |
Douglas Gregor <dgregor@apple.com> |
When comparing Objective-C pointers during overload resolution to determine which is a better conversion to "void*", be sure to perform the comparison using the safe-for-id ASTContext::canAssignObjCInterfaces() rather than the asserts-with-id ASTContext::canAssignObjCInterfaces(). Fixes <rdar://problem/9327203>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130259 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
028ea4bf0c643e0e2a8fa086c28beb0d5b594ba7 |
27-Apr-2011 |
Douglas Gregor <dgregor@apple.com> |
When computing Objective-C pointer conversions in C++, retain the qualifiers (e.g., GC qualifiers) on the type we're converting from, rather than just blindly adopting the qualifiers of the type we're converting to or dropping qualifiers altogether. As an added bonus, properly diagnose GC qualifier mismatches to eliminate a crash in the overload resolution failure diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130255 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
864c041e118155c2b1ce0ba36942a3da5a4a055e |
26-Apr-2011 |
John McCall <rjmccall@apple.com> |
Make yet another placeholder type, this one marking that an expression is a bound member function, i.e. something of the form 'x.f' where 'f' is a non-static member function. Diagnose this in the general case. Some of the new diagnostics are probably worse than the old ones, but we now get this right much more universally, and there's certainly room for improvement in the diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130239 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaExpr.cpp
emaExprCXX.cpp
emaOverload.cpp
emaStmt.cpp
|
c1a0a73c1fad684dd23e9aade02c4e00dbaeaee6 |
26-Apr-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Add ms_struct attribute on record typee (and ignore it for now) - wip. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130224 91177308-0d34-0410-b5e6-96231b3b80d8
ttributeList.cpp
emaAttr.cpp
emaDecl.cpp
emaDeclAttr.cpp
|
8a285ae6fc4926cc4e419025eec63e2d6696e13f |
26-Apr-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Emit a -Wnull-dereference warning for "*null" not just "*null = something". Addresses rdar://9269271. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130207 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
abdd3b3861a8a5f971ea8fbcb42a9fb179b0a57d |
26-Apr-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
For the warnings related to -Wparentheses, display first the note about how to silence the warning and any other suggestion after that. Related to rdar://9300260. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130169 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
865dd8c8fe65d7743cfbc412316e59e6c149624d |
25-Apr-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
'extern' variables in functions don't shadow externs in global scope. Fixes rdar://8883302, this time for C++ as well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130157 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
223de2497fdaacf3a6b0a123c12265ca837abf19 |
25-Apr-2011 |
Chris Lattner <sabre@nondot.org> |
fix PR9474, a crash with -fshort-enum and C++ templates: when instantiating the enum decl, we need to use an integer type the same size as the enumerator, which may not be the promoted type with packed enums. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130148 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
reeTransform.h
|
62c9258f4a71569a66d805fc7776526a2c76b34e |
25-Apr-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Recognize gcc's ms_struct pragma (and ignore for now). This is wip. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130138 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaAttr.cpp
|
621c92a582546e2fa5ae28cf8b7e14d5a60fab11 |
25-Apr-2011 |
Douglas Gregor <dgregor@apple.com> |
Minor tweak to avoid having to dig through canonical types multiple times when checking a qualification conversion git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130136 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
ec385cf3c73434e42d03c321b05100ca64e0c90d |
25-Apr-2011 |
Douglas Gregor <dgregor@apple.com> |
When Sema::ClassifyName() finds an invalid ivar reference, return an invalid expression rather than the far-more-generic "error". Fixes a mild regression in error recovery uncovered by the GCC testsuite. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130128 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
552622067dc45013d240f73952fece703f5e63bd |
25-Apr-2011 |
John Wiegley <johnw@boostpro.com> |
t/clang/expr-traits Patch authored by David Abrahams. These two expression traits (__is_lvalue_expr, __is_rvalue_expr) are used for parsing code that employs certain features of the Embarcadero C++ compiler. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130122 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
reeTransform.h
|
a47317bbeef839ef86323e3feacd9962ca9c383a |
25-Apr-2011 |
Eli Friedman <eli.friedman@gmail.com> |
PR4304: Add warning for designators in strict c89 mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130117 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
58a2cd8c0d52e710cbcc57a67eac7b51b0b831c4 |
24-Apr-2011 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Synthesizing the definition of an implicit member is an AST modification, so notify any mutation listeners of it. This fixes a crasher in chained PCH, where an implicit destructor in a PCH gets a definition in a chained PCH, which is then lost. However, any further use of the destructor would cause its definition to be regenerated in the final file, hiding the bug. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130103 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDeclCXX.cpp
|
312eadb832cab4497a069409954500d8192b8f0d |
24-Apr-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement a new identifier-classification scheme where Sema performs name lookup for an identifier and resolves it to a type/expression/template/etc. in the same step. This scheme is intended to improve both performance (by reducing the number of redundant name lookups for a given identifier token) and error recovery (by giving Sema a chance to correct type names before the parser has decided that the identifier isn't a type name). For example, this allows us to properly typo-correct type names at the beginning of a statement: t.c:6:3: error: use of undeclared identifier 'integer'; did you mean 'Integer'? integer *i = 0; ^~~~~~~ Integer t.c:1:13: note: 'Integer' declared here typedef int Integer; ^ Previously, we wouldn't give a Fix-It because the typo correction occurred after the parser had checked whether "integer" was a type name (via Sema::getTypeName(), which isn't allowed to typo-correct) and therefore decided to parse "integer * i = 0" as an expression. By typo-correcting earlier, we typo-correct to the type name Integer and parse this as a declaration. Moreover, in this context, we can also typo-correct identifiers to keywords, e.g., t.c:7:3: error: use of undeclared identifier 'vid'; did you mean 'void'? vid *p = i; ^~~ void and recover appropriately. Note that this is very much a work-in-progress. The new Sema::ClassifyName is only used for expression-or-declaration disambiguation in C at the statement level. The next steps will be to make this work for the same disambiguation in C++ (where functional-style casts make some trouble), then push it further into the parser to eliminate more redundant name lookups. Fixes <rdar://problem/7963833> for C and starts us down the path of <rdar://problem/8172000>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130082 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
emaTemplate.cpp
|
89ebaed91cca7fd296ec7804e4e9fb68949c1d0e |
23-Apr-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
"note" location of forward class used as receiver of a 'deprecated' selector in the diagnostics for the selector. // rdar://9309223 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130062 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaExpr.cpp
emaExprObjC.cpp
|
4a47e8d35dc1778ef7e428d9edd7676be67e725f |
23-Apr-2011 |
Francois Pichet <pichet2000@gmail.com> |
Remove unnecessary const away cast in LateTemplateParserCallback. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130058 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
b7e9589bce9852b4db9575f55ac9137572147eb5 |
23-Apr-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Implement basic __is_trivial type-trait support, enough to close PR9472. This introduces a few APIs on the AST to bundle up the standard-based logic so that programmatic clients have access to exactly the same behavior. There is only one serious FIXME here: checking for non-trivial move constructors and move assignment operators. Those bits need to be added to the declaration and accessors provided. This implementation should be enough for the uses of __is_trivial in libstdc++ 4.6's C++98 library implementation. Ideas for more thorough test cases or any edge cases missing would be appreciated. =D git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130057 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
f1cc1d0efddc40a76ab70b074792dcd7e5ca4315 |
23-Apr-2011 |
Jay Foad <jay.foad@gmail.com> |
Like the coding standards say, do not use "using namespace std". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130054 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
81ef3e664d8ae250fbb68b2b6ccdeebb6c13ede5 |
23-Apr-2011 |
John McCall <rjmccall@apple.com> |
Diagnose C++ abstract parameters for Objective-C methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130045 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
e5e3d31dab0de2dcbf8da94177da74fe95509d2a |
23-Apr-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Exhaust the cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130043 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
bb29d1ba8b0895e3923c724f49845636f35b4bde |
23-Apr-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Don't allow reinterpret_cast to reference of vector element and property expression. Thanks goes to Eli Friedman! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130036 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
d4a0caf78e7c18e7aca65fbfd799a6c024ff51fb |
23-Apr-2011 |
Francois Pichet <pichet2000@gmail.com> |
Correctly emit a diagnostic for multiple templated function definitions in -flate-template-parsing mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130030 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
b464a5b18916b467ed884d07f9e34295d39cec0a |
23-Apr-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
reinterpret_cast to reference of a bit-field is not allowed. Fixes rdar://9202628 & http://llvm.org/PR9564. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130024 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
788440378c442562497c09610939cbe6218ab43d |
23-Apr-2011 |
Douglas Gregor <dgregor@apple.com> |
At the end of the translation unit, defining a vtable can introduce new templates that need to be instantiated and vice-versa. Iterate until we've instantiated all required templates and defined all required vtables. Fixed PR9325 / <rdar://problem/9055177>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130023 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
|
8387e2a41eef6fa17fb140a18c29b6eee9dd2b8a |
23-Apr-2011 |
Francois Pichet <pichet2000@gmail.com> |
Add -fdelayed-template-parsing option. Using this option all templated function definitions are parsed at the end of the translation unit only if it is required by an actual instantiation. As such all the symbols of the TU are available during name lookup. Using this flag is necessary for compatibility with Microsoft template code. This also provides some parsing speed improvement. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130022 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
64089cece350472c04b420c497ae391443353325 |
23-Apr-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Fixes an instance method meta-data generation bug in ObjC NeXt runtime where method pointer registered in metadata belongs to an unrelated method. Ast part of this fix, I turned at @end missing warning (for class implementations) into an error as we can never be sure that meta-data being generated is correct. // rdar://9072317 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130019 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
4bada2e3f20a3c76f5493e3163eafc02258c5902 |
22-Apr-2011 |
Francois Pichet <pichet2000@gmail.com> |
Do not return true from MergeFunctionDecl for a warn_static_non_static warning in Microsoft mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130010 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
a61aedc48efae959d951d2aadadbac3e6d49acc5 |
22-Apr-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
For -Wlogical-op-parentheses, point at '&&', not '||'. Fixes rdar://9125333. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130009 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
cfe38c4db48f188db3f48dc48030d8be6f6e3e03 |
22-Apr-2011 |
Chandler Carruth <chandlerc@gmail.com> |
I concur with DPG here. This does indeed apply in 0x mode. Added test cases that demonstrates exactly why this does indeed apply in 0x mode. If isPOD is currently broken in 0x mode, we should fix that directly rather than papering over it here. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130007 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
b65abda449dfb17aba39794be6ce41111d40fda0 |
22-Apr-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Don't enter a qualified scope for an invalid decl. Fixes assertion later on. rdar://9122937 & http://llvm.org/PR9459 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130006 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
e36bca6f2abd868b9ae68ff1c0d691de7520ca8c |
22-Apr-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
In IsUserDefinedConversion try to recover from RequireCompleteType returning true. Fixes an assertion later on, rdar://9122862 & http://llvm.org/PR9460. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130000 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
cf320c6388c90f1938c264e87d77a0e43946e2c3 |
22-Apr-2011 |
Francois Pichet <pichet2000@gmail.com> |
For consistency, change suffix from war_ to warn_ for some Microsoft warnings I introduced lately. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129986 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaExceptionSpec.cpp
|
2e510a0c0f7afa7951aa19c65a06c2da579535a8 |
22-Apr-2011 |
Francois Pichet <pichet2000@gmail.com> |
Downgrade error "static declaration of 'foo' follows non-static declaration" to a warning in Microsoft mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129985 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
34f52d14742914bbaa975ce7de45957cccf256bc |
22-Apr-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Fix crashing rdar://9122854 & http://llvm.org/PR9461. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129967 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
bb9b80c308d7d3f758886243c7145404a50c66cf |
21-Apr-2011 |
Richard Trieu <rtrieu@google.com> |
Add a fixit suggest for missing case keywords inside a switch scope. For instance, in the following code, 'case ' will be suggested before the '1:' switch (x) { 1: return 0; default: return 1; } git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129943 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
3e8dc2ac8926dfbebd8f2f6b74ceba4befccd4d2 |
21-Apr-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Use the ArrayFiller to fill out "holes" in the array initializer due to designated initializers, avoiding to create separate Exprs for each one. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129933 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
4423ac0282acb8ba801eb05b38712438dc0c1e3e |
21-Apr-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
For double data[20000000] = {0}; we would blow out the memory by creating 20M Exprs to fill out the initializer. To fix this, if the initializer list initializes an array with more elements than there are initializers in the list, have InitListExpr store a single 'ArrayFiller' expression that specifies an expression to be used for value initialization of the rest of the elements. Fixes rdar://9275920. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129896 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
109ec1b05664e35e710785314c12552307f39a7d |
20-Apr-2011 |
Douglas Gregor <dgregor@apple.com> |
Fix a crash-on-invalid involving non-identifier names in a member access expression that appears to be a property reference. Fixes <rdar://problem/8985943>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129865 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
db57a4cdb0a6abf3239f3a794a900ce312c5887b |
19-Apr-2011 |
Daniel Dunbar <daniel@zuster.org> |
ADT/Triple: Switch to using .isOSDarwin() predicate. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129823 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
|
6b6b42aed07726178f61954ac6e51f47da00275c |
19-Apr-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
We regard a function as 'unused' from the codegen perspective, so our warnings diverge from gcc's unused warnings which don't get emitted if the function is referenced even in an unevaluated context (e.g. in templates, sizeof, etc.). Also, saying that a function is 'unused' because it won't get codegen'ed is somewhat misleading. - Don't emit 'unused' warnings for functions that are referenced in any part of the user's code. - A warning that an internal function/variable won't get emitted is useful though, so introduce -Wunneeded-internal-declaration which will warn if a function/variable with internal linkage is not "needed" ('used' from the codegen perspective), e.g: static void foo() { } template <int> void bar() { foo(); } test.cpp:1:13: warning: function 'foo' is not needed and will not be emitted static void foo() { } ^ Addresses rdar://8733476. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129794 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaExpr.cpp
emaTemplateInstantiateDecl.cpp
|
b403d6d746239095a2c7bac958c924d92434e2b4 |
18-Apr-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix PR9741. The implicit declarations created for range-based for loops weren't being added to the DeclContext (nor were they being marked as implicit). Also, the declarations were being emitted in the wrong order when building the CFG. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129700 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
e84260513dc9fc17904c30c9400c5862a2d7fcb8 |
18-Apr-2011 |
Douglas Gregor <dgregor@apple.com> |
When providing code completions of ivar names for a property implementation such as @synthesize Prop1 = Give priority to ivars whose type matches or closely matches the property type (as we do for several other kinds of results). Additionally, if there is an ivar with the same name as the property, or differs only due to a _ prefix or suffix, give that ivar a priority bump. Finally, verify that this search is properly returning ivars within class extensions and implementations (<rdar://problem/8488854>). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129699 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
aa490cb6a70e7ff0335bdc4c88619e00ff0dab25 |
18-Apr-2011 |
Douglas Gregor <dgregor@apple.com> |
When producing code completion results for the Objective-C property implementation @synthesize <property> = also produce a completion for a to-be-synthesized ivar named _<property>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129697 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
32ac00d05b3e12bb155f95dfcede7e66ab26c234 |
16-Apr-2011 |
Richard Trieu <rtrieu@google.com> |
Testing my commit access. A few whitespace changes to Sema/SemaCXXCast.cpp. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129629 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
5272adfe7066c4847b7339a75777252de64e79c2 |
16-Apr-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Enforce nonnull __attribute__ on Objective-C method calls. // rdar://9287695 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129615 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
f9af524b818f7a6f0ed812334482a5d657b2ff5b |
15-Apr-2011 |
Douglas Gregor <dgregor@apple.com> |
For the purposes of overload resolution, consider a conversion from an Objective-C pointer to void* as a "conversion to void*". This allows us to prefer an Objective-C object pointer conversion to a superclass object pointer over an Objective-C object pointer conversion to cv-void*. Fixes PR9735. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129603 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
5666d36cce566b59be271670364794de9803af04 |
15-Apr-2011 |
Douglas Gregor <dgregor@apple.com> |
Forbid the use of C++ new/delete to allocate/free objects within an address space. I could see that this functionality would be useful, but not in its current form (where the address space is ignored): rather, we'd want to encode the address space into the parameter list passed to operator new/operator delete somehow, which would require a bunch more semantic analysis. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129593 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
d4c5f84bbed2ecb5ddd0f0e8316c553b2084772a |
15-Apr-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement appropriate semantics for C++ casting and conversion when dealing with address-space- and GC-qualified pointers. Previously, these qualifiers were being treated just like cvr-qualifiers (in some cases) or were completely ignored, leading to uneven behavior. For example, const_cast would allow conversion between pointers to different address spaces. The new semantics are fairly simple: reinterpret_cast can be used to explicitly cast between pointers to different address spaces (including adding/removing addresss spaces), while static_cast/dynamic_cast/const_cast do not tolerate any changes in the address space. C-style casts can add/remove/change address spaces through the reinterpret_cast mechanism. Other non-CVR qualifiers (e.g., Objective-C GC qualifiers) work similarly. As part of this change, I tweaked the "casts away constness" diagnostic to use the term "casts away qualifiers". The term "constness" actually comes from the C++ standard, despite the fact that removing "volatile" also falls under that category. In Clang, we also have restrict, address spaces, ObjC GC attributes, etc., so the more general "qualifiers" is clearer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129583 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
eefa76e29e9f4a6c01e8c1e8d2f1a1d34a98817c |
15-Apr-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Allow shadowin of 'self' in objc methods in cases where stand-alone ivar can be looked up in shadowed object. To fix gcc compatibility breakage. // rdar://9284603 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129576 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
162e1c1b487352434552147967c3dd296ebee2f7 |
15-Apr-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Support for C++11 (non-template) alias declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129567 91177308-0d34-0410-b5e6-96231b3b80d8
umpDiagnostics.cpp
emaAccess.cpp
emaCXXScopeSpec.cpp
emaChecking.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
argetAttributesSema.cpp
reeTransform.h
|
5bf47f7d3469a53a1b95b255a49d3d7cc66acd9d |
15-Apr-2011 |
Benjamin Kramer <benny.kra@googlemail.com> |
Fix mismatched delete. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129564 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
831efaeb4ba2c0939db6eeb77229d9e47dd03c9c |
15-Apr-2011 |
Ted Kremenek <kremenek@apple.com> |
Improve diagnostics on GNU attributes by warning about attributes that should have no arguments or parameters. Patch by Michael Han! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129560 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
fc8f0e14ad142ed811e90fbd9a30e419e301c717 |
15-Apr-2011 |
Chris Lattner <sabre@nondot.org> |
fix a bunch of comment typos found by codespell. Patch by Luis Felipe Strano Moraes! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129559 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaObjCProperty.cpp
|
f111d935722ed488144600cea5ed03a6b5069e8f |
15-Apr-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
C1X: implement generic selections As an extension, generic selection support has been added for all supported languages. The syntax is the same as for C1X. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129554 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExpr.cpp
reeTransform.h
|
efdf988611c1eb02770643cd3fabd5df2f579353 |
15-Apr-2011 |
Douglas Gregor <dgregor@apple.com> |
When we transform a C++ exception declaration (e.g., for template instantiation), be sure to add the transformed declaration into the current DeclContext. Also, remove the -Wuninitialized hack that works around this bug. Fixes <rdar://problem/9200676>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129544 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
ad762fcdc16b9e4705b12b09d92b8c026212b906 |
15-Apr-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Add support for C++0x's range-based for loops, as specified by the C++11 draft standard (N3291). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129541 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaLookup.cpp
emaOverload.cpp
emaStmt.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
5da3c08728d3d1091f4f3fa01f9d813a45d150f5 |
14-Apr-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Match pointer of compatible vection types. // rdar://9208404 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129536 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
3e64d56185f0bf7dbd536c1b3ecbc853c22a9184 |
14-Apr-2011 |
Douglas Gregor <dgregor@apple.com> |
When determining the "usage" type of a declaration for the purposes of code completion, look through block pointer and function pointer types to the result type of the block/function. Fixes <rdar://problem/9282583>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129535 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
414d8967e1d760ea1e19a4aca96b13777a8cf8c5 |
14-Apr-2011 |
Anton Korobeynikov <asl@math.spbu.ru> |
Implement ARM pcs attribute. Basically it's another way of calling convention selection (AAPCS or AAPCS+VFP), similar to fastcall / stdcall / whatevercall seen on x86. In particular, all library functions should always be AAPCS regardless of floating point ABI used. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129534 91177308-0d34-0410-b5e6-96231b3b80d8
ttributeList.cpp
emaDeclAttr.cpp
emaType.cpp
|
dde5557e87e1163ad792471e0bdbb2cd17894576 |
14-Apr-2011 |
Eli Friedman <eli.friedman@gmail.com> |
Re-fix r129481 and r129465 properly. Nulls fixits shouldn't be dropped in DiagnosticBuilder::AddFixItHint: they will be dropped along with any other (possibly valid) fixits later. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129495 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
0d8dc460ae02e29d0b2abb4d6d093736e2f920ea |
14-Apr-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
When creating an implicit member expression through a qualified-id, check that the class named by the nested-name-specifier is same or base of the class in which the member expression appears. It seems we also had an ill-formed test case, mon dieu! Fixes rdar://8576107. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129493 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b8fc45f8d0fdcc7908590115942d425bf4a924f1 |
14-Apr-2011 |
Anders Carlsson <andersca@mac.com> |
In C++, when initializing an array from a pascal string, it's OK if the array is 1 element smaller than the string, because we can just strip off the last null character. This matches GCC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129490 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
3e2193ce5feb2feb092e5ae615e85148e06e9fd2 |
14-Apr-2011 |
Anders Carlsson <andersca@mac.com> |
Add a flag to StringLiteral to keep track of whether the string is a pascal string or not. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129488 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprObjC.cpp
|
6027461b6c4d1567a8d7533ad97ccf81bd2b9500 |
14-Apr-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Issue the 2nd fixit even if fix-it hint is supressed. // rdar://9091893 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129481 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
81ab3cfcf2f312e82c51e58a1fce8e85e9fe59c3 |
13-Apr-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
No fixit hint for builtin expressions which are defined in a macro. // rdar://9091893 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129465 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
42151d5ba957841a15ffda0fac71cd7cb653d45e |
13-Apr-2011 |
Axel Naumann <Axel.Naumann@cern.ch> |
From Vassil Vassilev: Give external source's last resort lookup a chance, even if an identifier could resolve to a builtin. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129438 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
3441a520c63a5609abdd35614753a6059ac134fc |
13-Apr-2011 |
Francois Pichet <pichet2000@gmail.com> |
Still not used to put the * next to the variable name. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129426 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
6943e9befee204becfae55de1298b3d5fee87934 |
13-Apr-2011 |
Francois Pichet <pichet2000@gmail.com> |
In Microsoft mode, within class scope, if a CXXScopeSpec's type is equal to the type of one of the base classes then downgrade the missing typename error to a warning. Up to now this is the only case I found where MSVC doesn't require "typename" at class scope. Really strange! This fixes 1 error when parsing the MSVC 2008 header files. Example: template<class T> class A { public: typedef int TYPE; }; template<class T> class B : public A<T> { public: A<T>::TYPE a; // no typename required because A<T> is a base class. }; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129425 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
b8f17abf30a9aab6382c84a758fd6679a8b5583a |
13-Apr-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Redeclaration of 'self' should be flagged in objective-c instead of crashing in IRgen. // rdar://9154582. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129412 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ec3310a1e371cc3bfc0f2c355767d1b6653357f2 |
12-Apr-2011 |
Douglas Gregor <dgregor@apple.com> |
Don't suggest dynamic_cast or typeid as code completion results when RTTI is disabled. Similarly, don't suggest throw or try as code completion results when C++ exceptions are disabled. Fixes <rdar://problem/9193560>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129346 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
f25760e17af1167c6fcf24e1ea8e3fcbd0386702 |
12-Apr-2011 |
Douglas Gregor <dgregor@apple.com> |
Objective-C++: The global namespace is an associated namespace of an Objective-C pointer type. Fixes <rdar://problem/9142559>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129339 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
755d8497e39071aa24acc173ff07083e3256b8f8 |
12-Apr-2011 |
John McCall <rjmccall@apple.com> |
After some discussion with Doug, we decided that it made a lot more sense for __unknown_anytype resolution to destructively modify the AST. So that's what it does now, which significantly simplifies some of the implementation. Normal member calls work pretty cleanly now, and I added support for propagating unknown-ness through &. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129331 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
379b5155b4566f63679e1da6b0ceb5fdfa2aec6d |
11-Apr-2011 |
John McCall <rjmccall@apple.com> |
More __unknown_anytype work. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129269 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
575b374fdbfc2c2224fd3047ac11ffc4b8db9ae5 |
11-Apr-2011 |
Anders Carlsson <andersca@mac.com> |
Remove CK_DynamicToNull. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129265 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
bc34b1d7f4f371bfdebf68d66086f54586d68abe |
11-Apr-2011 |
Eli Friedman <eli.friedman@gmail.com> |
PR9669: implement correct checking for [dcl.init.string]p2. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129260 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
7d99bc37e77157523e3bfbc6c077842b74e6690f |
10-Apr-2011 |
Anders Carlsson <andersca@mac.com> |
As a first step towards fixing PR9641, add a CK_DynamicToNull cast kind which represents a dynamic cast where we know that the result is always null. For example: struct A { virtual ~A(); }; struct B final : A { }; struct C { }; bool f(B* b) { return dynamic_cast<C*>(b); } git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129256 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
fb8721ce4c6fef3739b1cbd1e38e3f1949462033 |
10-Apr-2011 |
John McCall <rjmccall@apple.com> |
Simplify calling CheckPlaceholderExpr, converge on it in a few places, and move a vector-splat check to follow l-value conversion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129254 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaExpr.cpp
emaExprCXX.cpp
emaType.cpp
|
f65076ebf5e8bc5ae7b77fe3c3a65dc5db8d763f |
10-Apr-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Enhance the diagnostic for literal float -> int conversions to suggest rewriting the literal when the value is integral. It is not uncommon to see code written as: const int kBigNumber = 42e5; Without any real awareness that this is no longer an ICE. The note helps automate and ease the process of fixing code that violates the warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129243 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
8cf9049185c72dc453ebb946d39420f3f78dec76 |
10-Apr-2011 |
Francois Pichet <pichet2000@gmail.com> |
Refactor 129240 to merge the old default argument into the new parameter. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129242 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
8d051e00ad674754d476cc1fa0442da0bc47b2c8 |
10-Apr-2011 |
Francois Pichet <pichet2000@gmail.com> |
MSVC accepts that default parameters be redefined for member functions of template class. The new value is ignored. This fixes 1 error when parsing MSVC 2010 header files with clang. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129240 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
a5fc472b353b88be3b4981da946fb01f5a5cc0c6 |
10-Apr-2011 |
John McCall <rjmccall@apple.com> |
Fix a bunch of major problems with __unknown_anytype and properly test for them. The only major missing feature is references. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129234 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
emaExpr.cpp
emaTemplateVariadic.cpp
emaType.cpp
|
2eba7abeab4abddd28644200397f8a1d5badccdd |
09-Apr-2011 |
Logan Chien <tzuhsiang.chien@gmail.com> |
Merge with clang upstream r129173 (Apr 8th 2011) Upstream Revision git-id: 0ff32595e4b92c5bdee78946b39f9e990b20cc90 svn-id: 129173
|
a49218e17bcbb1acde0245773173e2c0c42f4f19 |
09-Apr-2011 |
Eli Friedman <eli.friedman@gmail.com> |
PR8369: make __attribute((regparm(0))) work correctly. Original patch by pageexec@freemail.hu, tweaks by me. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129206 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
emaType.cpp
|
b6006696358572a668d6de773af8f550e54259bf |
09-Apr-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Clean up the bool conversion warning. Group it with other conversion warnings, and make its text appropriate for constant bool expressions other than 'false'. This should finish off PR9612. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129205 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
88f0aed95d2a0faf3cad66af2dc54596495a7d41 |
09-Apr-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Add support for warning on general null pointer expressions of boolean type rather than just the literal 'false'. This begins fixing PR9612, but the message is now wrong. WIP, the cleanup of the messaging is next. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129204 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
23aa9c8ca0bc441aab2a38a4c9fc7a1c9e9ac16a |
09-Apr-2011 |
Chris Lattner <sabre@nondot.org> |
add a __sync_swap builtin to fill out the rest of the __sync builtins. Patch by Dave Zarzycki! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129189 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
429bb276991ff2dbc7c5b438828b9b7737cb15eb |
08-Apr-2011 |
John Wiegley <johnw@boostpro.com> |
Use ExprResult& instead of Expr *& in Sema This patch authored by Eric Niebler. Many methods on the Sema class (e.g. ConvertPropertyForRValue) take Expr pointers as in/out parameters (Expr *&). This is especially true for the routines that apply implicit conversions to nodes in-place. This design is workable only as long as those conversions cannot fail. If they are allowed to fail, they need a way to report their failures. The typical way of doing this in clang is to use an ExprResult, which has an extra bit to signal a valid/invalid state. Returning ExprResult is de riguour elsewhere in the Sema interface. We suggest changing the Expr *& parameters in the Sema interface to ExprResult &. This increases interface consistency and maintainability. This interface change is important for work supporting MS-style C++ properties. For reasons explained here <http://lists.cs.uiuc.edu/pipermail/cfe-dev/2011-February/013180.html>, seemingly trivial operations like rvalue/lvalue conversions that formerly could not fail now can. (The reason is that given the semantics of the feature, getter/setter method lookup cannot happen until the point of use, at which point it may be found that the method does not exist, or it may have the wrong type, or overload resolution may fail, or it may be inaccessible.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129143 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaCXXCast.cpp
emaChecking.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaInit.cpp
emaOverload.cpp
emaStmt.cpp
emaTemplate.cpp
emaType.cpp
reeTransform.h
|
737d5447b5d20633992ee5388eca5270c28c8ae7 |
07-Apr-2011 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
In C++ the argument of logical not should always be bool. Added missing implicit cast for scalars. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129066 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaExpr.cpp
emaExprCXX.cpp
|
1de4d4e8cb2e9c88809fea8092bc6e835a5473d2 |
07-Apr-2011 |
John McCall <rjmccall@apple.com> |
Basic, untested implementation for an "unknown any" type requested by LLDB. The idea is that you can create a VarDecl with an unknown type, or a FunctionDecl with an unknown return type, and it will still be valid to access that object as long as you explicitly cast it at every use. I'm still going back and forth about how I want to test this effectively, but I wanted to go ahead and provide a skeletal implementation for the LLDB folks' benefit and because it also improves some diagnostic goodness for placeholder expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129065 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaExpr.cpp
|
96b4adce3bd41a33e3f1d98dc4e74046585f6dce |
06-Apr-2011 |
Anders Carlsson <andersca@mac.com> |
Wide Pascal strings should be of type wchar_t[] and not unsigned char[]. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129017 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
759abb4d9ec14ae32104a9677b60f0542b60d1d8 |
06-Apr-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Fix lookup for class messages sent to qualified-class types such that protocols are seached first. Fixes // rdar://9224670 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129016 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
0c959fc7f1e1006f44eae6fdb5b659eb12bf8ddc |
06-Apr-2011 |
Nowar Gu <nowar100@gmail.com> |
Add some source files into Android.mk.
ndroid.mk
|
9a7319305fc25222b91d585dfa056c8cdbac8434 |
06-Apr-2011 |
Nowar Gu <nowar100@gmail.com> |
Merge upstream until 2011.04.05.
|
262d50e1dcf529317da193ad585c11c16281a7ac |
05-Apr-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Simplify the tracking of when to issue a fixit hint, making the helper function more clear and obvious in behavior. Add some comments documenting the behavior of the primary diagnostic helper. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128901 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
64fb959beb3a0ecb84a58e6ff82660a7a669f7b8 |
05-Apr-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Separate the logic for issuing the initialization fixit hint from the diagnostic emission. The fixit hint, when suggested, typically has nothing to do with the nature or form of the reference. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128899 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
4c4983bbd2904670a25c840b07600f14efbafd7f |
05-Apr-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Begin refactoring the uninitialized warning code that I uglied up. This extracts a function to handle the emission of the diagnostic separately from the walking over the set of uninitialized uses. Also updates the naming used within this extracted function to be a bit more consistent with the rest of Clang's naming patterns. The next step will be breaking this apart so that we can go through different functions rather than tracking so many boolean variables. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128898 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
b414c4fae51c5792d3074b4b78fc8737b1d8387c |
05-Apr-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Fix PR9624 by explicitly disabling uninitialized warnings for direct self-init: int x = x; GCC disables its warnings on this construct as a way of indicating that the programmer intentionally wants the variable to be uninitialized. Only the warning on the initializer is turned off in this iteration. This makes the code a lot more ugly, but starts commenting the surprising behavior here. This is a WIP, I want to refactor it substantially for clarity, and to determine whether subsequent warnings should be suppressed or not. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128894 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
9f6494687c05fe1d334af76408ee056b5f80e027 |
05-Apr-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Cleanup the style of some of this code prior to functional changes. I think this moves the code in the desired direction of the new style recommendations (and style conventional in Clang), but if anyone prefers the previous style, or has other suggestions just chime in and I'll follow up. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128878 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
e1b02e00d851389415a5b7a1398de26c382887c6 |
05-Apr-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Refactor one helper function to merely forward to another so that there is a single implementation. No functionality change intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128877 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
d40066b0fb883839a9100e5455e33190b9b8abac |
05-Apr-2011 |
Ted Kremenek <kremenek@apple.com> |
Fix PR 9626 (duplicated self-init warnings under -Wuninitialized) with numerous CFG and UninitializedValues analysis changes: 1) Change the CFG to include the DeclStmt for conditional variables, instead of using the condition itself as a faux DeclStmt. 2) Update ExprEngine (the static analyzer) to understand (1), so not to regress. 3) Update UninitializedValues.cpp to initialize all tracked variables to Uninitialized at the start of the function/method. 4) Only use the SelfReferenceChecker (SemaDecl.cpp) on global variables, leaving the dataflow analysis to handle other cases. The combination of (1) and (3) allows the dataflow-based -Wuninitialized to find self-init problems when the initializer contained control-flow. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128858 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
emaDecl.cpp
|
6f41715df2c6a31c0c3ab3088b8cd18a3c8321b8 |
04-Apr-2011 |
Ted Kremenek <kremenek@apple.com> |
-Wuninitialized: use "self-init" warning when issue uninitialized values warnings from the dataflow analysis that include within the initializer of a variable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128843 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
5360c921a91dc43b442f069ba86d7b9df66362fc |
04-Apr-2011 |
Ted Kremenek <kremenek@apple.com> |
-Wuninitialized: don't issue fixit for initializer if a variable declaration already has an initializer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128838 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
5862f0e1ac29c5af8089b4bf119fd4493f6ab58c |
04-Apr-2011 |
Ted Kremenek <kremenek@apple.com> |
When emitting a "too many arguments to function call..." error, also include a note with a location for the function prototype. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128833 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
d593190132244b0194d480ec3e55f94f369c8863 |
04-Apr-2011 |
Eli Friedman <eli.friedman@gmail.com> |
PR9615: make sure we destroy any temporaries returned by operator->. I'm pretty sure this is the right fix, but I would appreciate it if someone else would double-check. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128806 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
2166948cc721b138b3aaf4358d28ec2dada22901 |
02-Apr-2011 |
Nico Weber <nicolasweber@gmx.de> |
Make -Wheader-hygiene not complain about USING_NAMESPACE_THROUGH_MACRO in a non-header file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128780 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
f445debe3a6825e6528655db0906ce4fa41240ea |
01-Apr-2011 |
csmon <csmon@csmon-desktop.(none)> |
Merge branch 'upstream' into logan-fastforward-20110320
|
a35d5d7700b519d713039afd31477e95e2da7aa7 |
01-Apr-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Fix an error in TreeTransform where we failed to copy the TemplateName's location into a TemplateSpecializationTypeLoc. These were found using a hand-written program to inspect every source location in TemplateSpecializationTypeLocs and Valgrind. I don't know of any way to test them in Clang's existing test suite sadly. Example code that triggers the ElaboratedType case: template <typename T> struct X1 { template <typename U> struct X1_1 { int x; }; }; template <typename T, typename U> struct X2 { typename X1<T>::template X1_1<U> B; }; X2<char, int> x2; The other fix was simply spotted by inspection. I audited all constructions of [Dependent]TemplateSpecializationTypeLocs in TreeTransform.h, and the rest set the TemplateNameLoc properly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128702 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
ce0682ff4647b885d41847b0f97918504282c2e8 |
31-Mar-2011 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Make ChainedIncludesSource an ExternalSemaSource, otherwise initialization of the ASTReader is incomplete, leading to errors like not realizing std::type_info is already defined. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128664 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
61750f2bed7f5c0e440318841e3be385920b22f3 |
30-Mar-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
de-sugared when accessing property reference type. Add a test case for synthesize ivar. // rdar://9070460 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128554 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaObjCProperty.cpp
|
fc5c8fc5ff02fb4ae2d4cf693d2ceabd1d8a1845 |
29-Mar-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Fix an unused variable warning in release builds and make the assert-less codepath marginally more efficient. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128472 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
b613cd6862a80126666c46a41de36c1ba7704c2e |
29-Mar-2011 |
Francois Pichet <pichet2000@gmail.com> |
Accept __declspec(dllimport) for function defined at class scope in Microsoft mode. This fixes a bunch of errors when compiling MSVC header files with the -DDLL flag. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128457 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
90434238b7edfc806437f1d40742a60ff92fbf6a |
29-Mar-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Fix a bug in how we were resolving the address of overloaded functions when the resolution took place due to a single template specialization being named with an explicit template argument list. In this case, the "resolution" doesn't take into account the target type at all, and therefore can take place for functions, static member functions, and *non-static* member functions. The latter weren't being properly checked and their proper form enforced in this scenario. We now do so. The result of this last form slipping through was some confusing logic in IsStandardConversion handling of these resolved address-of expressions which eventually exploded in an assert. Simplify this logic a bit and add some more aggressive asserts to catch improperly formed expressions getting into this routine. Finally add systematic testing of member functions, both static and non-static, in the various forms they can take. One of these is essentially PR9563, and this commit fixes the crash in that PR. However, the diagnostics for this are still pretty terrible. We at least are now accepting the correct constructs and rejecting the invalid ones rather than accepting invalid or crashing as before. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128456 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
170a6a229b6cb0c411be5edaa587a1b1436bd147 |
29-Mar-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Don't do the checks of Sema::DiagnoseEqualityWithExtraParens() on type-dependent expressions. Fixes rdar://9027658. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128437 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
14086764e340267e17803d0f8243070ffae2c76e |
29-Mar-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Implements property of reference types. Adding an executable test to llvm test suite. // rdar://9070460. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128435 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprObjC.cpp
emaObjCProperty.cpp
|
6305f721247f13707d9858b17d5696c1e3428a78 |
28-Mar-2011 |
Anton Yartsev <anton.yartsev@gmail.com> |
refactoring git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128427 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b460210fe0dec08971edfe33c294323cf79cb894 |
28-Mar-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Also 'self' in blocks need be handled specially. // rdar://9181463 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128410 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
3334b0b13ad3bf568a16cda29434b18d084f6dcb |
28-Mar-2011 |
Matt Beaumont-Gay <matthewbg@google.com> |
Fix PR9572 and neighboring lurking crashers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128401 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
1d71cbf21ad8882192d0d88a76f0243b7cf490c9 |
27-Mar-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Reduce indentation using early exits and add a couple of comments. No functionality changed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128396 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
f2d74cc083e1a83838acf99d2e1ca260d1c54742 |
27-Mar-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
'self' is objective-c's 'self' objc pointer only in an objc method. Fixes // rdar://9181463 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128389 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
7870b133ac7b03bd53388f51250d009325f43399 |
27-Mar-2011 |
Anton Yartsev <anton.yartsev@gmail.com> |
AltiVec vector comparison logic now affect only vectors of fundamental AltiVec vector types. It fixes bug 9347. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128381 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
a7689efa25bf54452c758c672bd1a5608d5757cc |
27-Mar-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Diagnose uninitialized uses of a variable within its own initializer. This is basically the same idea as the warning on uninitialized uses of fields within an initializer list. As such, it is on by default and under -Wuninitialized. Original patch by Richard Trieu, with some massaging from me on the wording and grouping of the diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128376 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d06fea8580658470f92fb5d0d3d7ab5b475728dc |
27-Mar-2011 |
Anton Yartsev <anton.yartsev@gmail.com> |
supported: AltiVec vector initialization with a single literal according to PIM section 2.5.1 - after initialization all elements have the value specified by the literal git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128375 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaExpr.cpp
|
9172aa685f3a1cbf991a2c1cd40905e4d64bfdf6 |
26-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
Improve -Wheader-hygiene to warn about using directives inside linkage specifications within the global scope, from Elliot Glaysher. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128352 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
077f490d0a514dcc448475f33f799934252b85a7 |
26-Mar-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
More coherent diagnostic attempting to assign to a member of a const object returned from an objective-c message: // rdar://9005189 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128348 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
da57f3eeab7b7f7f6e6788956f0a0d9adf196a7d |
26-Mar-2011 |
Benjamin Kramer <benny.kra@googlemail.com> |
Make helpers static. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128339 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
emaTemplate.cpp
|
4421d2b341d041df44013769f23c306308bbab83 |
26-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
On Mac OS X, the presence of an 'availability' attribute for that platform implies default visibility. To achieve these, refactor our lookup of explicit visibility so that we search for both an explicit VisibilityAttr and an appropriate AvailabilityAttr, favoring the VisibilityAttr if it is present. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128336 91177308-0d34-0410-b5e6-96231b3b80d8
emaAttr.cpp
|
b53e417ba487f4193ef3b0485b420e0fdae643a2 |
26-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
Extend the new 'availability' attribute with support for an 'unavailable' argument, which specifies that the declaration to which the attribute appertains is unavailable on that platform. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128329 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
2234873111009eb8655d63362cedc422eb9fc517 |
26-Mar-2011 |
John McCall <rjmccall@apple.com> |
Allow GC qualifiers to be added/removed by conversions from/to void* without a warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128328 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
379246d29b1c7ef2659beadf41b4cb79806c0e63 |
26-Mar-2011 |
John McCall <rjmccall@apple.com> |
Don't warn about the 'extern' in 'extern "C"' on a tag decl. This is usually useless, but not always. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128326 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
7ea21937de6f849a7f44f10549c3d69c5a8cb3f3 |
26-Mar-2011 |
John McCall <rjmccall@apple.com> |
Properly move attributes to the decl spec when applying them there. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128324 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
1d20927fd0a08c26ef0e86e26f42073fd582ff77 |
25-Mar-2011 |
Anders Carlsson <andersca@mac.com> |
Fixup comments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128280 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
8a29ba0d66bce99014651f1e3351aef6c3361d3f |
25-Mar-2011 |
Anders Carlsson <andersca@mac.com> |
Remove the last of ClassVirtSpecifiers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128279 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
|
2c3ee54e51d835a35bbf781c69e17f39e2ba0480 |
25-Mar-2011 |
Anders Carlsson <andersca@mac.com> |
Get rid of handling of the 'explicit' keyword from class-head. We still parse it though, although that will change shortly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128277 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
b1f39680a2e3bce508dba0600665860e5ba5fb70 |
25-Mar-2011 |
Anders Carlsson <andersca@mac.com> |
Remove 'new' from virt-specifier since it's going to be removed in the next C++0x draft git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128271 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
|
909a70d8a185f701c20bacc3c76f8f5979cbbc7c |
25-Mar-2011 |
Nick Lewycky <nicholas@mxc.ca> |
Apply the nonnull attribute to constructor expressions too. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128253 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDeclCXX.cpp
|
1d2de76c75fc1ac870c6df84c5368206c00d9a5e |
24-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
Minor fix in the injection of labels, since we want to look at the redeclaration context of each declaration in the identifier chain. Should fix Linux self-host git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128210 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
0b7e678a11ece4288dc01aebb5b17e5eef8f8d2d |
24-Mar-2011 |
John McCall <rjmccall@apple.com> |
Insomniac refactoring: change how the parser allocates attributes so that AttributeLists do not accumulate over the lifetime of parsing, but are instead reused. Also make the arguments array not require a separate allocation, and make availability attributes store their stuff in augmented memory, too. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128209 91177308-0d34-0410-b5e6-96231b3b80d8
ttributeList.cpp
eclSpec.cpp
emaDecl.cpp
emaType.cpp
|
fa7b8ced6f3318879b39f44b5ace8346e979826e |
24-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
Fix the insertion of label declarations into the identifier chain in the case where we only have a single identifier with that name in the chain. Fixes PR9463 for real this time. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128208 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
|
2b32dad701ef3e666e3b9cea02e1d094a1078c6f |
24-Mar-2011 |
Anders Carlsson <andersca@mac.com> |
Add a new warning for exit-time destructors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128188 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
c05a94b7accd4035bf5d5897c434c445b22da855 |
24-Mar-2011 |
John McCall <rjmccall@apple.com> |
Call out ObjC parameter types as a different kind of declarator context from a normal type-spec, just for completeness. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128185 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
d97f558f48865aa96e7bdf9c1c9315790c3d77c9 |
23-Mar-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Support for Transparent unions used as overloadable function parameter. // rdar:// 9129552 and PR9406. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128159 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaOverload.cpp
|
29233802236f7fe1db20e00eca4f5cc8f3f64ade |
23-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
Teach DelayedDiagnostic to copy its string, rather than hope that the string itself lives longer than the DelayedDiagnostic. Fixes a recent use-after-free regression due to my availability attribute work. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128148 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
elayedDiagnostic.cpp
emaDeclAttr.cpp
|
def863192f83d8033e1833b48ae8119a65dfc7c8 |
23-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
Ignore weak_import on Objective-C property and method declarations on all platforms, not just darwin. Fixes the regression in this test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128147 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
0a0d2b179085a52c10402feebeb6db8b4d96a140 |
23-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement a new 'availability' attribute, that allows one to specify which versions of an OS provide a certain facility. For example, void foo() __attribute__((availability(macosx,introduced=10.2,deprecated=10.4,obsoleted=10.6))); says that the function "foo" was introduced in 10.2, deprecated in 10.4, and completely obsoleted in 10.6. This attribute ties in with the deployment targets (e.g., -mmacosx-version-min=10.1 specifies that we want to deploy back to Mac OS X 10.1). There are several concrete behaviors that this attribute enables, as illustrated with the function foo() above: - If we choose a deployment target >= Mac OS X 10.4, uses of "foo" will result in a deprecation warning, as if we had placed attribute((deprecated)) on it (but with a better diagnostic) - If we choose a deployment target >= Mac OS X 10.6, uses of "foo" will result in an "unavailable" warning (in C)/error (in C++), as if we had placed attribute((unavailable)) on it - If we choose a deployment target prior to 10.2, foo() is weak-imported (if it is a kind of entity that can be weak imported), as if we had placed the weak_import attribute on it. Naturally, there can be multiple availability attributes on a declaration, for different platforms; only the current platform matters when checking availability attributes. The only platforms this attribute currently works for are "ios" and "macosx", since we already have -mxxxx-version-min flags for them and we have experience there with macro tricks translating down to the deprecated/unavailable/weak_import attributes. The end goal is to open this up to other platforms, and even extension to other "platforms" that are really libraries (say, through a #pragma clang define_system), but that hasn't yet been designed and we may want to shake out more issues with this narrower problem first. Addresses <rdar://problem/6690412>. As a drive-by bug-fix, if an entity is both deprecated and unavailable, we only emit the "unavailable" diagnostic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128127 91177308-0d34-0410-b5e6-96231b3b80d8
ttributeList.cpp
odeCompleteConsumer.cpp
emaDeclAttr.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaObjCProperty.cpp
emaOverload.cpp
|
4f38f414b8676ea43439d6ad3315e32042d315cb |
23-Mar-2011 |
John McCall <rjmccall@apple.com> |
Fix an error with the declaration of block parameters that depend on previous block parameters that crept in as part of my captures work a month or so ago. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128121 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ac4df2454d5462c3bf5f369d65c3ad651100fa40 |
23-Mar-2011 |
John McCall <rjmccall@apple.com> |
Warn about unused declaration-specifiers on tag declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128118 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
97d2d2e368d3ead34d83c328383711c7dabab60a |
22-Mar-2011 |
Logan Chien <tzuhsiang.chien@gmail.com> |
Merge with clang upstream r127980 (Mar 20th 2011)
|
850d3b304b69b40c0292d433743aba82f3add4a8 |
22-Mar-2011 |
John McCall <rjmccall@apple.com> |
Apply Jonathan Sauer's proposed solution to PR9519. Thanks! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128075 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
b995e04b90f07c75178dbcbf71c9735876787185 |
22-Mar-2011 |
Ted Kremenek <kremenek@apple.com> |
Remove crash recovery cleanups from TypeLocBuilder. They were a bit error prone, only hit in rare cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128058 91177308-0d34-0410-b5e6-96231b3b80d8
ypeLocBuilder.h
|
84950c7fec2b056a424125997cb90451a3c83194 |
21-Mar-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Fix an objc++ diagnostic initializing objc pointers. // rdar:// 9139947 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128013 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
80558d2db10a96eada4d8fb79949b3263b44652b |
20-Mar-2011 |
David Chisnall <csdavec@swan.ac.uk> |
Fix Objective-C++ exceptions (GNU runtime). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127980 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
8e02635c9c276720a1e6f926b33303a53cebe9c7 |
18-Mar-2011 |
Logan Chien <tzuhsiang.chien@gmail.com> |
Merge with clang upstream r127869 (Mar 18th 2011)
|
148f1f7936afd718bac7be95089e77673e43f16f |
20-Mar-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
Only objects are declared const by a constexpr specifier, per C++0x [dcl.constexpr]p9 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127967 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
eedd4670b2eb7e4d67d11b2f26ed1ad304b70596 |
20-Mar-2011 |
Francois Pichet <pichet2000@gmail.com> |
Downgrade err_mismatched_exception_spec to a ExtWarning in Microsoft mode. MSVC doesn't do any validation on exception specifications. This remove 1 error when parsing MSVC stl lib with clang. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127961 91177308-0d34-0410-b5e6-96231b3b80d8
emaExceptionSpec.cpp
|
6ad6e95b451103feda0847965e5ab2ecfbd3fbd8 |
19-Mar-2011 |
Ted Kremenek <kremenek@apple.com> |
Recovery memory from TypeLocBuilders during crashes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127932 91177308-0d34-0410-b5e6-96231b3b80d8
ypeLocBuilder.h
|
af13d5b25b360e698cc1cf1055ad7d14e008e505 |
19-Mar-2011 |
Ted Kremenek <kremenek@apple.com> |
Rename class 'CFGReachabilityAnalysis' to 'CFGReverseBlockReachabilityAnalysis'. This rename serves two purposes: - It reflects the actual functionality of this analysis. - We will have more than one reachability analysis. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127930 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
207f4d8543529221932af82836016a2ef066c917 |
18-Mar-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
Add support for language-specific address spaces. On top of that, add support for the OpenCL __private, __local, __constant and __global address spaces, as well as the __read_only, _read_write and __write_only image access specifiers. Patch originally by ARM; language-specific address space support by myself. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127915 91177308-0d34-0410-b5e6-96231b3b80d8
ttributeList.cpp
emaDeclAttr.cpp
emaType.cpp
|
d6a49bb69fadcb04119433278c808797a87d2d31 |
18-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
Add an opt-in -Wheader-hygiene, which current diagnoses the use of global using directives in C++ headers, from Elliot Glaysher! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127881 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
b0a2fcc1e9f621157361341b2aa3b7c780978040 |
18-Mar-2011 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Defined friend functions are *implicitly* inlined, unless the inline specifier occurs explicitly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127877 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
7f0a915eb546d353071be08c8adec155e5d9a0dc |
18-Mar-2011 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Fixed inconsistency when adding TemplateParameterListsInfo. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127876 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaTemplate.cpp
|
a085da86242c9b8e3466f8cf6f4397e9f248fd20 |
17-Mar-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix PR9488: 'auto' type substitution can fail (for instance, if it creates a reference-to-void type). Don't crash if it does. Also fix an issue where type source information for the resulting type was being lost. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127811 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaTemplateDeduction.cpp
|
c5e43c19ddb40b8a1371291f73ae66fe54951ca5 |
17-Mar-2011 |
Ted Kremenek <kremenek@apple.com> |
Don't construct two CFGs just to run -Wuninitialized. While this causes new warnings to be flagged under -Wconditional-uninitialized, this is something we can improve over time. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127802 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
0daaf32723ac78549c507c2a68a5300502703673 |
16-Mar-2011 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Use ElaboratedType also for C. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127755 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
emaType.cpp
|
eef7ac5837ef3e0682ac0973121fff8edaa46ca4 |
16-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
Detect attempts to provide a specialization of a function within a dependent scope and produce an error (rather than crashing). Fixes PR8979. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127749 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
db2eae639d3b7ed61ceb56890b73168517ef57f1 |
16-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
Clean up our handling of template-ids that resolve down to a single overload, so that we actually do the resolution for full expressions and emit more consistent, useful diagnostics. Also fixes an IRGen crasher, where Sema wouldn't diagnose a resolvable bound member function template-id used in a full-expression (<rdar://problem/9108698>). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127747 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprCXX.cpp
emaOverload.cpp
|
60b3e38d421cab497de1c62c06be6a6a5f321edf |
16-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
Don't indescriminately print overload candidates when we have invalid operands to a binary expression; it doesn't make sense in all contexts. The right answer would be to see if the user forgot at (). Fixes <rdar://problem/9136502>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127740 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
eed5ddc25539e14de11888ec69007217e777c02a |
16-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
Allow function calls to dereferenced member pointers of pointer-to-function type. Fixes <rdar://problem/9065289>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127739 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
250e7a74d5a23db5bd7202ecb0bb4a8fef6016b4 |
16-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
When we're inserting a synthesized label declaration for a forward-looking "goto" statement, make sure to insert it *after* the last declaration in the identifier resolver's declaration chain that is either outside of the function/block/method's scope or that is declared in that function/block/method's specific scope. Previously, we could end up inserting the label ahead of declarations in inner scopes, confusing C++ name lookup. Fixes PR9491/<rdar://problem/9140426> and <rdar://problem/9135994>. Note that the crash-on-invalid PR9495 is *not* fixed. That's a separate issue. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127737 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
emaDecl.cpp
|
db9e9e61f8311d8852bd15730f78e56f3ffa0508 |
15-Mar-2011 |
Ted Kremenek <kremenek@apple.com> |
Remove warning for null characters in CFString literals. Clang handles them just fine, and GCC 4.2 doesn't warn here either. We added this warning back in 2007 when we were comparing against GCC 4.0. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127704 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
0c06944f5ef31cc6356e30da2971fa5439c4c8ef |
15-Mar-2011 |
Ted Kremenek <kremenek@apple.com> |
Don't warn about null characters in Objective-C format string literals. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127703 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
d8f2e8ed63072ec5a1a8329aa772ae940f1dc3bc |
15-Mar-2011 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
More robust check for the special C++0x operator new workaround. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127692 91177308-0d34-0410-b5e6-96231b3b80d8
emaExceptionSpec.cpp
|
99439d474e7cb48497a2da4c35f70cdc1d5b153f |
15-Mar-2011 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implement a hack to work around the changing exception specification of operator new in C++0x. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127688 91177308-0d34-0410-b5e6-96231b3b80d8
emaExceptionSpec.cpp
|
4eb7f69515c059c64e87ed32cdbeb743ec6ec03d |
15-Mar-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Don't poke into redefined 'id' type looking for a property declaration as this results in a confusing error message, instead of message related to missing property declaration. // rdar://9106929 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127682 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
76709bf816e5e1b70b859bb607cf3ee91db12b76 |
15-Mar-2011 |
Ted Kremenek <kremenek@apple.com> |
Split warnings from -Wuninitialized-experimental into "must-be-initialized" and "may-be-initialized" warnings, each controlled by different flags. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127669 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
f7bafc77ba12bb1beb665243a0334cd81e024728 |
15-Mar-2011 |
Ted Kremenek <kremenek@apple.com> |
Split warnings from -Wuninitialized-experimental into "must-be-initialized" and "may-be-initialized" warnings, each controlled by different flags. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127666 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
6f34213f8d6ae8c77685b53664527e39bfaaca3b |
15-Mar-2011 |
Ted Kremenek <kremenek@apple.com> |
Rename UninitializedValuesV2 to UninitializedValues. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127657 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
7cbc558ffda5877ec4d2e432534e3d3d4ac10050 |
14-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
When synthesizing a label declaration based on a goto statement that cannot yet be resolved, be sure to push the new label declaration into the right place within the identifier chain. Otherwise, name lookup in C++ gets confused when searching for names that are lexically closer than the label. Fixes PR9463. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127623 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
emaDecl.cpp
|
56fb926c93786739cfd0867e7ada31ace3bda946 |
14-Mar-2011 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implement instantiation of noexcept spec and add a test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127603 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
8999fe1bc367b3ecc878d135c7b31e3479da56f4 |
14-Mar-2011 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Make deallocation functions implicitly noexcept in C++0x. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127596 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExprCXX.cpp
emaType.cpp
|
069a6da34a86c97ffe78c379da246fc8116daaff |
14-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
-fwritable-strings should silence warnings about the deprecated string -literal to char* conversion. Make it so. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127586 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
8026f6d82f7fa544bc0453714fe94bca62a1196e |
13-Mar-2011 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Instead of storing an ASTContext* in FunctionProtoTypes with computed noexcept specifiers, unique FunctionProtoTypes with a ContextualFoldingSet, as suggested by John McCall. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127568 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExceptionSpec.cpp
emaExprCXX.cpp
|
90ba78c64d0c24cfbc1bf88728db9775d44d7f9f |
12-Mar-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Place duplicate argument declaration in in method prototypes under the -Wduplicate-method-arg and turn it off by default. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127552 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
f9c32eb0f80f991cbb3fc3e403759f39929f7994 |
12-Mar-2011 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Revert "Disable delegating constructors for 2.9" It is only meant for the release branch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127544 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
9d0af360ec510c06967afd7a23b202ce5bad7301 |
12-Mar-2011 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Disable delegating constructors for 2.9 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127543 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
caa35e4bbfccaaa6c4d69f29b3f1a8b544b3645e |
12-Mar-2011 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Revert "Disable inherited constructors for 2.9." It is only meant for the release branch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127542 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
a808c544f9df4d17cb189ba6aa167478cf17ad4a |
12-Mar-2011 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Disable inherited constructors for 2.9. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127541 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
60618fa7f88d5162bb5b40988b6b38d4d75d6fc6 |
12-Mar-2011 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Propagate the new exception information to FunctionProtoType. Change the interface to expose the new information and deal with the enormous fallout. Introduce the new ExceptionSpecificationType value EST_DynamicNone to more easily deal with empty throw specifications. Update the tests for noexcept and fix the various bugs uncovered, such as lack of tentative parsing support. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127537 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaExceptionSpec.cpp
emaExprCXX.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
|
796aa443ab5ed036f42ef33fed629e1b4b34871b |
12-Mar-2011 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Forgotten part of previous commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127536 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
emaDeclCXX.cpp
emaExceptionSpec.cpp
emaExpr.cpp
emaType.cpp
reeTransform.h
|
06dec892b5300b43263d25c5476b506c9d6cfbad |
12-Mar-2011 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Renamed OffsetOfNode::getRange to getSourceRange for uniformity. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127534 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
fadb53b351977ca7f99a9a613596cba6531979a3 |
12-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
Fixes for some more expressions containing function templateids that should be resolvable, from Faisal Vali! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127521 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaExpr.cpp
emaOverload.cpp
|
5a5b38f4afaf4f203b96a11ba79890c7cd4cc4b8 |
12-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
When we're determining whether to complain about a conversion from one enumeration type to another in C, classify enumeration constants as if they had the type of their enclosing enumeration. Fixes <rdar://problem/9116337>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127514 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
d078bd2e02bd4e6661fe06645d98280a2a5a3e8c |
12-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
Don't ask if a depenendent CXXRecordDecl has any dependent bases unless we already know that it has a definition. Fixes PR9449/<rdar://problem/9115785>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127512 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
f4f7cb814f8537606754b9eb8848094196e73214 |
11-Mar-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
OpenCL: if double precision floating point constant encountered without cl_khr_fp64, warn and cast to single precision git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127476 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
f4e3cfbe8abd124be6341ef5d714819b4fbd9082 |
11-Mar-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
Add support for the OpenCL vec_step operator, by generalising and extending the existing support for sizeof and alignof. Original patch by Guy Benyei. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127475 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDeclCXX.cpp
emaExpr.cpp
reeTransform.h
|
1e15394853bfae25112d9cc6b445504905e1f34a |
11-Mar-2011 |
Rafael Espindola <rafael.espindola@gmail.com> |
Fix PR9453 by not trying to print a warning about ignored qualifiers in conversion functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127460 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
34d6f9344d6b562b4642a882519dd82431db4163 |
11-Mar-2011 |
John McCall <rjmccall@apple.com> |
When comparing a null pointer and something else, always cast the null pointer instead of the other operand. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127458 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ef9ff88f54ff26ac9782d98a34b74aa424149be1 |
10-Mar-2011 |
Ted Kremenek <kremenek@apple.com> |
Profiling showed that 'CheckImplicitConversions' was very slow because of the call to getSpellingLoc(). On 'aes.c' in the LLVM test suite, this function was consuming 7.4% of -fsyntax-only time. This change fixes this issue by delaying the check that the warning would be issued within a system macro by as long as possible. The main negative of this change is now the logic for this check is done in multiple places in this function instead of just in one place up front. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127425 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
c57c17dced5fb16a83a2ffb2b7e8c148df69ba5a |
10-Mar-2011 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Avoid do drop outer template parameter lists on the floor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127404 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaTemplate.cpp
|
91ce2c4484e56cdc8068cebaaf2bb42362b0e1a6 |
10-Mar-2011 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Fixed class type generation for MemberPointerType. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127401 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
0d28d360b5559abda755e50b855ba5e59727d9cd |
10-Mar-2011 |
Ted Kremenek <kremenek@apple.com> |
When doing reachability analysis for warnings issued under DiagRuntimeBehavior, don't construct a ParentMap or CFGStmtMap. Instead, create a small set of Stmt* -> CFGBlock* mappings during CFG construction for only the statements we care about relating to the diagnostics we want to check for reachability. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127396 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
975cc644d5d9dafdb4060aa31c9753d0554e1308 |
10-Mar-2011 |
Daniel Dunbar <daniel@zuster.org> |
Revert r127206 "Detect attempts to provide a specialization of a function within a...", it appears to cause us to reject various valid codes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127373 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
27569b0f3e1b27f609a2e104b39bad077850e210 |
09-Mar-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Property setter/getter must be looked up in property type's list of protocols as well. // rdar://9078584 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127367 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
61478065fbcafcf5295bb0fb796c9a92f2d861e0 |
09-Mar-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Lookup selector in protocol list of qualified objc type to avoid a bogus warning. // rdar:// 9072298 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127355 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
emaStmt.cpp
|
ba877adeb49ed6dc17f27fa3a3bcd0cca713fd68 |
09-Mar-2011 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Fixed InnerLocStart. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127330 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExprCXX.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
d271e4b0c6c42a0e670226e697963df427e35a56 |
07-Mar-2011 |
Logan Chien <tzuhsiang.chien@gmail.com> |
Apply changes to merge with clang upstream (6th Mar 2011)
ndroid.mk
|
27d70656d3ce7c9e030b6dea468cfc96687010d5 |
09-Mar-2011 |
Logan Chien <tzuhsiang.chien@gmail.com> |
Merge with clang upstream (Nov 6th 2011)
|
eecf5fa12d5426637c47d7072f0c193a8d7ff68b |
09-Mar-2011 |
John McCall <rjmccall@apple.com> |
Add a bit to ParmVarDecl indicating whether the parameter undergoes K&R-style default argument promotion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127313 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
15987970eeaa1842c29ec8797affd1c1dea05585 |
08-Mar-2011 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Fixed isEmbeddedInDeclarator flag loading. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127285 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
02b0d651ecd6a4d5171dd0208c0c570c3d7103b7 |
08-Mar-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Warn on usage of unavailable objc 'class' in varienty of cases. // rdar://9092208 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127257 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExprObjC.cpp
|
f52516038ab5d0b1b90a6dd32f46b7d6dabd04c8 |
08-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
Teach libclang's token-annotation logic about context-sensitive keywords for Objective-C+ and C++0x. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127253 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
|
a2026c96d3935e7909e049ad9096762844544ed6 |
08-Mar-2011 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Fixed source range for StaticAssertDecl and LinkageSpecDecl. Fixed source range for declarations using postfix types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127251 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
|
acba90f30876b4140b738f0d3dd0e50724053a96 |
08-Mar-2011 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Fixed NamespaceDecl source range. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127242 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
ff676cb48fe8bf7be2feaa251dc7c5fb15af4730 |
08-Mar-2011 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Fixed source range for all DeclaratorDecl's. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127225 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaObjCProperty.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
36784e78bcce1dbaf35f94a655394e348b4d9ac7 |
08-Mar-2011 |
John Wiegley <johnw@boostpro.com> |
Removed trailing whitespace as a test commit git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127223 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
834e3f6c77d9ac03997a3f0c56934edcf406a355 |
08-Mar-2011 |
John McCall <rjmccall@apple.com> |
Fix my earlier commit to work with escaped newlines and leave breadcrumbs in case we want to make a world where we can check intermediate instantiations for this kind of breadcrumb. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127221 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaExpr.cpp
emaType.cpp
|
2792fa5115c5de7cbe11d99d23663c569bfb4cae |
08-Mar-2011 |
John McCall <rjmccall@apple.com> |
objc_gc wants a pointer type, not a function type; give it a more appropriate diagnostic. Also, these attributes are commonly written with macros which we actually pre-define, so instead of expanding the macro location, refer to the instantiation location and name it using the macro loc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127219 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
d45e4b767458104d7e842e253cd03df01ccba3f4 |
08-Mar-2011 |
John McCall <rjmccall@apple.com> |
Update the check for a NULL macro to use Preprocessor::getSpelling(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127217 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
db93fdee6c5a24e86ee5ed8c1d3b597e17d5893b |
08-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
Detect attempts to provide a specialization of a function within a dependent scope and produce an error (rather than crashing). Fixes PR8979. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127206 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d97cec3deb6e34f0f9d4f5f8ec11b28e44812727 |
07-Mar-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
g++ is more permissive regarding flexible arrays. It will accept flexible array in union and also as the sole element of a struct/class. Fixes rdar://9065507. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127171 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
cc20945c787a56abe418947fc6a2c520bcec66c0 |
07-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
Support explicit template specialization and instantiation for members of a C++0x inline namespace within enclosing namespaces, as noted in C++0x [namespace.def]p8. Fixes <rdar://problem/9006349>, a libc++ failure where Clang was rejected an explicit specialization of std::swap (since libc++ puts it into an inline, versioned namespace std::__1). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127162 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
emaDecl.cpp
|
944cdae86ecb2ab5deda96804099bd28f6a6cd39 |
07-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
When rebuilding a dependent template specialization type to another dependent template specialization type, make sure to set the keyword location. Fixes some valgrind issues introduced in r127150. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127159 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
0a0367a479e2ad204a97f87ed72f18209169b775 |
07-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
When transforming a dependent template specialization type, make sure to set the source-location information for the template arguments to the *transformed* source-location information, not the original source-location information. Fixes <rdar://problem/8986308> (a libc++ SFINAE issue) and the Boost.Polygon failure. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127150 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
353ee246e754e38db9b738240d18f1ecf2bb389b |
07-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
Produce a diagnostic for unused overloaded expressions, from Faisal Vali! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127148 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
fd9c42ed22fb4f7f865f7d8f8848df84ddf8262c |
06-Mar-2011 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Used a nicer cast. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127134 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
2553eaf4a6b9ca9ca59383287cdfef2a5c9fca83 |
06-Mar-2011 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Improved type source location for long long type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127132 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
|
eff1dbec93999bfc5406eb861efd8add9de23633 |
06-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
We may fail to map a declaration in a template to its instantiated declaration because of interesting ordering dependencies while instantiating a class template or member class thereof. Complain, rather than asserting (+Asserts) or silently rejecting the code (-Asserts). Fixes the crash-on-invalid in PR8965. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127129 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
3c52a218f41f091a17582d037663594d2b8dc708 |
06-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
Fix copy-and-paste typo in the transformation of Microsoft __uuidof expressions, from Eric Niebler via John Wiegley git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127123 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
a868c3799b739781db325c1bd2c6afd182bc9bd6 |
06-Mar-2011 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Completed source ranges fixes for all classes inheriting from TypeDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127120 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplateInstantiateDecl.cpp
|
344577e6b58f42d18dc8118c8903b49a85dc005e |
06-Mar-2011 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Fixed TypedefDecl and TemplateTypeParameter source range. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127119 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDecl.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiateDecl.cpp
|
8b5b4099c61a136e9a1714c4d8a593febe942268 |
06-Mar-2011 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Reinstate r127112, "Propagate new-style exception spec information to ExtProtoInfo.", this time with the missing header. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127118 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExceptionSpec.cpp
emaExprCXX.cpp
emaLookup.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
|
5453d93ab8668f2d9d0bc02182695b02d207e32d |
06-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
When performing template argument deduction for a non-reference conversion function when we're binding the result to a reference, drop cv-qualifiers on the type we're referring to, since we should be deducing a type that can be adjusted (via cv-qualification) to the requested type. Fixes PR9336, and the remaining Boost.Assign failure. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127117 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
708a86690469474f0a8149abca71aa4c62bf9710 |
06-Mar-2011 |
NAKAMURA Takumi <geek4civic@gmail.com> |
Revert r127112, "Propagate new-style exception spec information to ExtProtoInfo." It seems missing "clang/Basic/ExceptionSpecificationType.h". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127115 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExceptionSpec.cpp
emaExprCXX.cpp
emaLookup.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
|
06bfa84588658d721094f383d6950e75100c4c4c |
05-Mar-2011 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Propagate new-style exception spec information to ExtProtoInfo. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127112 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExceptionSpec.cpp
emaExprCXX.cpp
emaLookup.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
|
6e5d319b671dbb0ecf70619834aa23c853d17621 |
05-Mar-2011 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Propagate new-style exception spec information to Declarator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127111 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
emaDecl.cpp
emaType.cpp
|
5875038f5c333b8bd013f62950281618d08e36a8 |
05-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
When substituting in for a template name, do not produce a qualified template name as the result of substitution. The qualifier is handled separately by the tree transformer, so we would end up in an inconsistent state. This is actually the last bit of PR9016, and possibly also fixes PR8965. It takes Boost.Icl from "epic fail" down to a single failure. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127108 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
6784304db526cde59046d613c4175ce2caf93e44 |
05-Mar-2011 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Fixed LabelDecl source range and cleaned creation code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127094 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
c494f77363f057dd8619fec4e885c4f80e3d1b66 |
05-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
When determining template instantiation arguments within a function template (not a specialization!), use the "injected" function template arguments, which correspond to the template parameters of the function template. This is required when substituting into the default template parameters of template template parameters within a function template. Fixes PR9016. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127092 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
0b4bcb639a9aab9c466a9e6d6e61b3bd1bb36d68 |
05-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
When transforming a substituted template type parameter, try to transform the type that replaces the template type parameter. In the vast majority of cases, there's nothing to do, because most template type parameters are replaced with something non-dependent that doesn't need further transformation. However, when we're dealing with the default template arguments of template template parameters, we might end up replacing a template parameter (of the template template parameter) with a template parameter of the enclosing template. This addresses part of PR9016, but not within function templates. That's a separate issue. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127091 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
b6ab6c1ca733fda2302a1c5066bdfc6218c89e41 |
05-Mar-2011 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Improved MemberPointerType source locations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127085 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
reeTransform.h
|
fbe599465021a37b2275af93466064ba08c06a68 |
05-Mar-2011 |
Matt Beaumont-Gay <matthewbg@google.com> |
Much to my surprise, OverloadExprs can also point to function template decls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127061 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
26cd44da98f3c5293243020b4cdfa7f49f68d1be |
05-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
When diagnostics are suppressed (e.g., because of code completion), don't trigger the ExprTemplates.empty() check at the end of a function body git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127046 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
cb710a4df50b79659399f0722ea29e90251ea834 |
04-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
Diagnose destructor templates. Fixes PR7904. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127042 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
7ec1873d694cf870264694d2b61219a03492bc30 |
04-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
When clearing a LookupResult structure, clear out the naming class, too. Fixes PR7900. While I'm in this area, improve the diagnostic when the type being destroyed doesn't match either of the types we found. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127041 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
6cd9d4aa13c2145c8b4398453974515b734bfe42 |
04-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
Teach Sema::ActOnCXXNestedNameSpecifier and Sema::CheckTemplateIdType to cope with non-type templates by providing appropriate errors. Previously, we would either assert, crash, or silently build a dependent type when we shouldn't. Fixes PR9226. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127037 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
emaTemplate.cpp
|
a93fc9f053bae84cf7c2a04ea6b1b26e0ea44d8f |
04-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
After an error of any kind has occurred, don't assert when attempting to find the instantiated declaration within a template instantiation fails to do so. It's likely that the original instantiation got dropped due to instantiation failures, which doesn't actually break the invariants of the AST. This eliminates a number of crash-on-invalid failures, e.g., PR9300. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127030 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
b710722d2348cd0945d2b4f02062c7f685146eb0 |
04-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
Patch up several Sema::FindInstantiatedDecl() callers, so that they'll properly cope with NULL return values. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127024 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
087eb5a2d3c7988eb7c440cd86cc7479e57d5dc0 |
04-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
When constructing source-location information for a DependentTemplateSpecializationType during tree transformation, retain the NestedNameSpecifierLoc as it was used to translate the template name, rather than reconstructing it from the template name. Fixes PR9401. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127015 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
9a299e0575ce235f491014627c7267e2d2cd73de |
04-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
Make sure to put template parameters into their owning template's DeclContext once we've created it. This mirrors what we do for function parameters, where the parameters start out with translation-unit context and then are adopted by the appropriate DeclContext when it is created. Also give template parameters public access and make sure that they don't show up for the purposes of name lookup. Fixes PR9400, a regression introduced by r126920, which implemented substitution of default template arguments provided in template template parameters (C++ core issue 150). How on earth could the DeclContext of a template parameter affect the handling of default template arguments? I'm so glad you asked! The link is Sema::getTemplateInstantiationArgs(), which determines the outer template argument lists that correspond to a given declaration. When we're instantiating a default template argument for a template template parameter within the body of a template definition (not it's instantiation, per core issue 150), we weren't getting any outer template arguments because the context of the template template parameter was the translation unit. Now that the context of the template template parameter is its owning template, we get the template arguments from the injected-class-name of the owning template, so substitution works as it should. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127004 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
abfb4059e5c4c5ce35649f328d6917b1b6c1ba9c |
04-Mar-2011 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Fixed source range for function template specializations. template <class T> void foo(); template <> void foo<int>(); /* Spec 1 */ template <> void foo<int>(); /* Spec 2 */ If we look at the main location of the first explicit specialization (Spec 1) it can be seen that it points to the name of the *second* explicit specialization (Spec 2), which is a redeclaration of Spec1. Hence, the source range obtained for Spec1 is not only inaccurate, but also invalid (the end location comes before the start location). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127002 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
c54061a679d8db4169438b2f97f81e3f443c6a25 |
04-Mar-2011 |
Benjamin Kramer <benny.kra@googlemail.com> |
Move private structs into anonymous namespaces. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126997 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
14aa2175416f79ef17811282afbf425f87d54ebf |
04-Mar-2011 |
John McCall <rjmccall@apple.com> |
Make AttributedTypes for GC-qualified types and fix some miscellaneous bugs with such types. Not sure this is quite how I want the desugaring and a.k.a. logic to go, but it suffices. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126986 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
0266aa37802a486e65f9259014bb60848fc4be23 |
03-Mar-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
-Woverloaded-virtual shouldn't warn for static functions. Fixes rdar://9083431 & http://llvm.org/PR9396. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126966 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
b46ae3964ba02535276c71332396e9a7bad2dfa5 |
03-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
Fix PR9390 in not one, but two ways: 1) When we do an instantiation of the injected-class-name type, provide a proper source location. This is just plain good hygiene. 2) When we're building a NestedNameSpecifierLoc from a CXXScopeSpec, only return an empty NestedNameSpecifierLoc if there's no representation. Both problems contributed to the horrible test case in PR9390 that I couldn't reduce down to something palatable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126961 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
emaTemplateInstantiateDecl.cpp
|
203548ba4b72e7e59320d352afc1eb0b5ab131de |
03-Mar-2011 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Fixed source range for LabelDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126952 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
emaStmt.cpp
|
48b89590f61575cbf365ba996a2bd1ba1561a4ab |
03-Mar-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Don't emit unused warning for deleted functions. Fixes rdar://8365684 & http://llvm.org/PR9391. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126950 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
55a9637969260ca7eb66011732094b33f049c52a |
03-Mar-2011 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Removed left brace location from LinkageSpecDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126945 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
5f6bcbebedb85ee745cbd9a3ca51ca8c766a6117 |
03-Mar-2011 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Fixed end source location for LinkageSpecDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126943 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
21e006e51a7f9889f55f5bc7b3ca8b50d17571ec |
03-Mar-2011 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Fixed source range for FileScopeAsmDecl. Others source range fixes will follow. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126939 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
67714230a191bc3c01f33378f34f34ef377991a6 |
03-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
When we use the default template arguments of a template template parameter, save the instantiated default template arguments along with the explicitly-specified template argument list. That way, we prefer the default template template arguments corresponding to the template template parameter rather than those of its template template argument. This addresses the likely direction of C++ core issue 150, and fixes PR9353/<rdar://problem/9069136>, bringing us closer to the behavior of EDG and GCC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126920 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
reeTransform.h
|
c5aff4497e5bfd7523e00b87560c1a5aa65136cc |
03-Mar-2011 |
Ted Kremenek <kremenek@apple.com> |
Teach CFGImplicitDtor::getDestructorDecl() about arrays of objects with destructors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126910 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
1e284a703c627d0614032190cf60392af7565289 |
02-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
Remove cruft git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126888 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
0a9beb52baa6c990d45d638a177d9456e650282a |
02-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
Force CaseStmt to store its child statements in source-code order, which is important for libclang's token-annotation and where's-my-cursor functionality. Fixes <rdar://problem/9004439>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126887 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
c9f8f5a726bbb562e4b2d4b19d66e6202dcb2657 |
02-Mar-2011 |
Ted Kremenek <kremenek@apple.com> |
Introduce CFGImplicitDtor::isNoReturn() to query whether a destructor actually returns. Use this for -Wreturn-type to prune false positives reported in PR 6884. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126875 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
6ebe66417437b76e520c9a3231a0bbb30bac08cc |
02-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
Eliminate an unnecessary TemporaryBase object from TreeTransform git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126857 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
044526fe99692343b7770895bdd73f394cc815e4 |
02-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
Kill off the TreeTransform::TransformDependentTemplateSpecializationType() with poor source-location information handling. All of the CXXScopeSpec::MakeTrivial() and NestedNameSpecifierLocBuilder::MakeTrivial() callers actually make sense now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126856 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
d11050fa37c50546dcb795d0cd99ca7384d3929b |
02-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
Eliminate TreeTransform::RebuildNestedNameSpecifier(), all four of them, which are no longer used. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126855 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
21e2e60fc02b5172e3da38f887b9f611d59afcd6 |
02-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
Eliminate an unnecessary use of CXXScopeSpec::MakeTrivial. We have proper nested-name-specifier source-location information in DependentTemplateSpecializationTypeLocs now git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126854 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
9151c11836f5fbb36cedfe4d22df7e00e77a1d42 |
02-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
Kill off TreeTransform::TransformNestedNameSpecifier() in favor of the source-location-preserving TreeTransform::TranformNestedNameSpecifierLoc(). No functionality change: the victim had no callers (that themselves had callers) anyway. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126853 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
reeTransform.h
|
1d752d7d68359fd8f7701585d4658aa70e129261 |
02-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
Kill off the TreeTransform::TransformTemplateName overload that has poor source-location information. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126852 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateInstantiate.cpp
reeTransform.h
|
b71d821d64af88749fc9860fd43a5164d8d819c8 |
02-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
Kill off one of the TreeTransform::TransformTypeInObjectScope() overloads (the one with the poor source-location information). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126851 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
fd4ffebd8e8e77346e70dfbc2d72dd673ebd7c6d |
02-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
Start migrating TreeTransform's TransformTemplateName over to version that preserve source-location information. This commit adds more redundancy than it removes; WIP. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126849 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
reeTransform.h
|
b6744efecba58792cce20d2d7b9ee39927c5422e |
02-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
Push nested-name-specifier source location information into template template arguments. I believe that this is the last place in the AST where we were storing a source range for a nested-name-specifier rather than a proper nested-name-specifier location structure. (Yay!) There is still a lot of cleanup to do in the TreeTransform, which doesn't take advantage of nested-name-specifiers with source-location information everywhere it could. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126844 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateDeduction.cpp
reeTransform.h
|
883cc2ca5ff06d7f1d89a9ab24a2da37f095243b |
02-Mar-2011 |
John McCall <rjmccall@apple.com> |
Don't hard-code these constants, or at least don't hard-code them so hard. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126841 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
bdc49d360f98c1194d50b8bbb24885bf8d4c1ac4 |
02-Mar-2011 |
John McCall <rjmccall@apple.com> |
Pretty up the wrong-number-of-arguments-for-attribute diagnostic by using a custom plural form. Split out the range diagnostics as their own message. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126840 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
d5313b0bbf3948fe7c63bf46a7da330c96d07309 |
02-Mar-2011 |
John McCall <rjmccall@apple.com> |
Provide an attribute, objc_method_family, to allow the inferred family of an Objective-C method to be overridden on a case-by-case basis. This is a higher-level tool than ns_returns_retained &c.; it lets users specify that not only does a method have different retain/release semantics, but that it semantically acts differently than one might assume from its name. This in turn is quite useful to static analysis. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126839 91177308-0d34-0410-b5e6-96231b3b80d8
ttributeList.cpp
emaDeclAttr.cpp
|
6292c86d6a027e94e6394389d044265d8544fa5a |
02-Mar-2011 |
Shih-wei Liao <sliao@google.com> |
Merge "Fix PR8625 and correctly interpret member-calls to static members when producing warnings."
|
21cf9770acb9de06c54289b9266f5948ae6592ab |
02-Mar-2011 |
Shih-wei Liao <sliao@google.com> |
Merge "Re-work the handling of implicit 'this' arguments and silly GCC-style attribute argument indexes. This handles the offsets in a consistent manner for all of the attributes which I saw working with these concepts. I've also added tests for the attribute that motivated this: nonnull."
|
e05b5fd8bef9f2ee1379bbf1b94abde2c89da685 |
02-Mar-2011 |
Shih-wei Liao <sliao@google.com> |
Merge "Improve diagnostic for calling non-const method on const object. Fixes rdar://7743000"
|
e52e3c3380a571d449422ead558337abe0b4b70f |
02-Mar-2011 |
Shih-wei Liao <sliao@google.com> |
Merge "Kill CK_Unknown and flesh out the documentation for the existing CastKinds."
|
751c539902cbabe6767371770cce8a54d85e9082 |
02-Mar-2011 |
Shih-wei Liao <sliao@google.com> |
Merge "Kill off the remaining places which generate CK_Unknown casts."
|
30aaf442cd6161653c1bdd440a0fa87ea0378ab5 |
02-Mar-2011 |
Shih-wei Liao <sliao@google.com> |
Merge "Add an ExternalASTSource hook to complete a type on demand."
|
c043b86e565d76f0119c4b214d37fe64115ce212 |
02-Mar-2011 |
Shih-wei Liao <sliao@google.com> |
Merge "Add support for "neon_vector_type" and "neon_polyvector_type" attributes to create the special Neon vector types. These are intended to be used in Clang's version of <arm_neon.h> to define special Neon vector types that will be mangled according to ARM's ABI."
|
5fe3feceba498eb0ede0d5a3a39cb4da74b3f218 |
02-Mar-2011 |
Shih-wei Liao <sliao@google.com> |
Merge "Fix a comment typo."
|
db1c88bbdd8ab80940d40b65ff1b3f9ca2629f5f |
02-Mar-2011 |
Shih-wei Liao <sliao@google.com> |
Merge "Add a new expression kind, OpaqueValueExpr, which is useful for certain internal type-checking procedures as well as for representing certain implicitly-generated operations. Uses to follow."
|
0403ba5e5c98a15fc2fdb1391b4392522b6a8c1c |
02-Mar-2011 |
Shih-wei Liao <sliao@google.com> |
Merge "Implement C++0x [temp.func.order]p3 (aka DR532) properly. In particular, we only add the implement object parameter type if only one of the function templates is a non-static member function template."
|
e51b533ffe62791a53151224e86b8623cf549a2c |
02-Mar-2011 |
Shih-wei Liao <sliao@google.com> |
Merge "Yes, vector conversions are bitcasts."
|
ca34b8f06d560b4f604934d57b2ad311c4228e32 |
02-Mar-2011 |
Shih-wei Liao <sliao@google.com> |
Merge "Assorted work leading towards the elimination of CK_Unknown."
|
fc5395a116a4e92548f99875f5d82786c5ff82ba |
02-Mar-2011 |
Shih-wei Liao <sliao@google.com> |
Merge "Add a few more complex-related cast kinds that arise due to arbitrary implicit conversions; the last batch was specific to promotions. I think this is the full set we need. I do think dividing the cast kinds into floating and integral is probably a good idea."
|
9a9a3b6a98739e8a34cab6f3ba8dae36cfbedfaf |
02-Mar-2011 |
Shih-wei Liao <sliao@google.com> |
Merge "When complaining about ambiguous overload resolution for a unary or binary operator, provide the types."
|
b638eb0a43f636d7250c14156e9fb8c4a243b1ef |
02-Mar-2011 |
Shih-wei Liao <sliao@google.com> |
Merge "When we're type-checking the result of calling a conversion function (while computing user conversion sequences), make sure that a result of class type is a complete class type. Had we gone through ActOnCallExpr, this would have happened when we built the CallExpr."
|
38cf267adf22762494a72c82791a491f4ecb6db3 |
02-Mar-2011 |
Shih-wei Liao <sliao@google.com> |
Merge "Introduce five new cast kinds for various conversions into and between complex types."
|
7f10664133668045bf1bd7143b9cba7ffabc07f7 |
02-Mar-2011 |
Shih-wei Liao <sliao@google.com> |
Merge "Bring UsualArithmeticConversionsType back into Sema and cast the operands appropriately. There are a lot of missing complex-related cast kinds."
|
2744794e880a8044e4504e954950e0d78c499f83 |
02-Mar-2011 |
Shih-wei Liao <sliao@google.com> |
Merge "Pre-compute all possible usual-arithmetic-conversions results for the promoted arithmetic types for which builtin operator candidates are emitted. A few of these need further analysis."
|
637fef403db809a36b1df56c67d65c3afc0e8429 |
02-Mar-2011 |
Shih-wei Liao <sliao@google.com> |
Merge "Store the list of arithmetic types as a static array of member pointers instead of copying them all out at the start. Not a significant optimization."
|
1472d24d9345f42fb9b4ddee26126599acde930f |
02-Mar-2011 |
Shih-wei Liao <sliao@google.com> |
Merge "Introduce a null-to-pointer implicit cast kind."
|
77f3cdcd7c6bdcf200ecd5e1e6f70995353c889f |
02-Mar-2011 |
Shih-wei Liao <sliao@google.com> |
Merge "Implement C++ [over.match.funcs]p4 as it concerns partial ordering of function templates. Fixes PR8130."
|
fb0388833beb30d33c0ab391b6f6c56a5a79c2a2 |
02-Mar-2011 |
Shih-wei Liao <sliao@google.com> |
Merge "Replace one hack with a different hack: strip out the ObjectType parameters to the Transform*Type functions and instead call out the specific cases where an object type and the unqualified lookup results are important. Fixes an assert and failed compile on a testcase from PR7248."
|
5a63c889b79fa0227b72c9ac95bb7f663cdaf47c |
02-Mar-2011 |
Shih-wei Liao <sliao@google.com> |
Merge "When performing initialization of a copy of a temporary object, use direct-initialization (rather than copy-initialization) to initialize the temporary, allowing explicit constructors. Fixes PR8342."
|
c310b4640e64f8148dd1a87e6f7455ba5d7737f8 |
02-Mar-2011 |
Shih-wei Liao <sliao@google.com> |
Merge "Undo a refactor-o and base the bitfield-truncation warning on the uncoerced value. Also, whitelist bool bitfields, which aren't really a truncation."
|
a8708b28645ae32fbbc67bd9e9b44f6669fde3e1 |
02-Mar-2011 |
Shih-wei Liao <sliao@google.com> |
Merge "Extend the bitfield-truncation warning to initializations. rdar://problem/8652606"
|
26497bfe1759d9003b7ae10734293e7c061e7aa2 |
02-Mar-2011 |
Shih-wei Liao <sliao@google.com> |
Merge "Unnest; no functionality change."
|
2098ce232181fe5579f58e9d4dfd1f5bdead3c7c |
02-Mar-2011 |
Shih-wei Liao <sliao@google.com> |
Merge "Adding couple of Block API, a bug fix and a test change, all for blocks. wip."
|
7469ec8c297a98c214831c178b010a0f530be8bd |
02-Mar-2011 |
Shih-wei Liao <sliao@google.com> |
Merge "When -Wconversion computes the range of a type, it uses the (bit-)range of the enumerators rather than the actual expressible range. This is great when dealing with opaque *values* of that type, but when computing the range of the type for purposes of converting *into* it, it produces warnings in cases we don't care about (e.g. enum_t x = 500;). Divide the logic into these two cases and use the more conservative range for targets. "
|
026ae918949e2b3a1eddb04a534b72ed50621830 |
02-Mar-2011 |
Shih-wei Liao <sliao@google.com> |
Merge "Add a variant of GCC-style vector types for ARM NEON. NEON vector types need to be mangled in a special way to comply with ARM's ABI, similar to some of the AltiVec-specific vector types. This patch is mostly just renaming a bunch of "AltiVecSpecific" things, since they will no longer be specific to AltiVec. Besides that, it just adds the new "NeonVector" enum."
|
a552d061088897329a579c322f445af73a54c96b |
02-Mar-2011 |
Shih-wei Liao <sliao@google.com> |
Merge "Instantiate class member template partial specialization declarations in the order they occur within the class template, delaying out-of-line member template partial specializations until after the class has been fully instantiated. This fixes a regression introduced by r118454 (itself a fix for PR8001)."
|
ddde70b2aba15cd55b41b70e23b35011acd44ade |
02-Mar-2011 |
Shih-wei Liao <sliao@google.com> |
Merge "Check for duplicate declaration of a property in current and other class extensions. // rdar://7629420"
|
eca5d22c16eb784e5f35ca816fa22e0c0e060417 |
02-Mar-2011 |
John McCall <rjmccall@apple.com> |
Support a new InheritableAttr subclass, InheritableParamAttr, which is used for attributes that are okay to inherit when written on a parameter. Dependent on LLVM r126827. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126828 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclObjC.cpp
|
018591f524ca4f3a1e657d0d0a66eadf9dbd55f6 |
02-Mar-2011 |
John McCall <rjmccall@apple.com> |
Semantic checking for exception specifications should be triggered by whether C++ exceptions are enabled, not exceptions in general. PR9358. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126820 91177308-0d34-0410-b5e6-96231b3b80d8
emaExceptionSpec.cpp
|
406f98f6a5a7bde5707085af8d66204e7e76af45 |
02-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
When we're substituting into a parameter-type-list nested inside the pattern of an expansion, and we have a paramameter that is not a parameter pack, don't suppress substitution of parameter packs within this context. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126819 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
reeTransform.h
|
059101f922de6eb765601459925f4c8914420b23 |
02-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
Push nested-name-specifier source-location information into dependent template specialization types. This also required some parser tweaks, since we were losing track of the nested-name-specifier's source location information in several places in the parser. Other notable changes this required: - Sema::ActOnTagTemplateIdType now type-checks and forms the appropriate type nodes (+ source-location information) for an elaborated-type-specifier ending in a template-id. Previously, we used a combination of ActOnTemplateIdType and ActOnTagTemplateIdType that resulted in an ElaboratedType wrapped around a DependentTemplateSpecializationType, which duplicated the keyword ("class", "struct", etc.) and nested-name-specifier storage. - Sema::ActOnTemplateIdType now gets a nested-name-specifier, which it places into the returned type-source location information. - Sema::ActOnDependentTag now creates types with source-location information. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126808 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaTemplate.cpp
|
94fdffa4a572fc14ac296f5f1aae9db3734c72f1 |
01-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
Push nested-name-specifier source-location information into dependent template specialization types. There are still a few rough edges to clean up with some of the parser actions dropping nested-name-specifiers too early. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126776 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
emaTemplate.cpp
emaType.cpp
reeTransform.h
|
425a31e03a619d50f5f958433fcdc533788e41b7 |
01-Mar-2011 |
Ted Kremenek <kremenek@apple.com> |
Don't warning about shifting by too many bits in dead code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126770 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
3aea4dac830cb03d883a13ab30c28a3a53beca58 |
01-Mar-2011 |
Ted Kremenek <kremenek@apple.com> |
For C++, enhance -Warray-bounds to recursively analyze array subscript accesses in ?: expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126766 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExpr.cpp
emaExprCXX.cpp
|
9e876876afc13aa671cc11a17c19907c599b9ab9 |
01-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
Reinstate the introduction of source-location information for nested-name-speciciers within elaborated type names, e.g., enum clang::NestedNameSpecifier::SpecifierKind Fixes in this iteration include: (1) Compute the type-source range properly for a dependent template specialization type that starts with "template template-id ::", as in a member access expression dep->template f<T>::f() This is a latent bug I triggered with this change (because now we're checking the computed source ranges for dependent template specialization types). But the real problem was... (2) Make sure to set the qualifier range on a dependent template specialization type appropriately. This will go away once we push nested-name-specifier locations into dependent template specialization types, but it was the source of the valgrind errors on the buildbots. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126765 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaType.cpp
reeTransform.h
|
082bf7a47f78ff4a645cea358d70bf45a858b238 |
01-Mar-2011 |
Ted Kremenek <kremenek@apple.com> |
Don't wanr about "negative shifts" in code that is unreachable. Fixes PR 5544. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126762 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
2786864406af0f3ec65b300675c6f3c809c22fd7 |
01-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
Revert r126748, my second attempt at nested-name-specifier source location information for elaborated types. *sigh* git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126753 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaType.cpp
reeTransform.h
|
90566c0e7b61de9bdfdf66f6dee440adb4e5b631 |
01-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement comparison of C++0x scoped enumeration types. Fixes PR9333. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126752 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
fff951371dfc309160a99d423e43a7841aeb35aa |
01-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
When digging into a cv-qualified return type that is a pointer type to diagnose ignored qualifiers on return types, only assume that there is a pointer chunk if the type is *structurally* a pointer type, not if it's a typedef of a pointer type. Fixes PR9328/<rdar://problem/9055428>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126751 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
ef24c4b85e354255240bbbc21772098e6c3f6ae8 |
01-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
When building a type for a typename specifier, check specifically for a dependent template name rather than (indirectly and incorrectly) trying to determine whether we can compute a context for the nested-name-specifier. Fixes a GCC testsuite regression, <rdar://problem/9068589>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126749 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
be38c5f5d8fa7c43c52fafddee054b8fe8c2b964 |
01-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
Reinstate r126737, extending the generation of type-source location information for qualifier type names throughout the parser to address several problems. The commit message from r126737: Push nested-name-specifier source location information into elaborated name types, e.g., "enum clang::NestedNameSpecifier::SpecifierKind". Aside from the normal changes, this also required some tweaks to the parser. Essentially, when we're looking at a type name (via getTypeName()) specifically for the purpose of creating an annotation token, we pass down the flag that asks for full type-source location information to be stored within the returned type. That way, we retain source-location information involving nested-name-specifiers rather than trying to reconstruct that information later, long after it's been lost in the parser. With this change, test/Index/recursive-cxx-member-calls.cpp is showing much improved results again, since that code has lots of nested-name-specifiers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126748 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaType.cpp
reeTransform.h
|
44cd9f9d686dfdb9ad16113c41c2dca1da35a646 |
01-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
Revert r126737, the most recent nested-name-specifier location change, for buildbot breakage. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126746 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaType.cpp
reeTransform.h
|
e34e3f16580c586b032035e2612d12ae4569f21e |
01-Mar-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Move the bool-conversions behind the DiagRuntimeBehavior logic. It's possible for these to show up due to metaprogramming both in unevaluated contexts and compile-time dead branches. Those aren't the bugs we're looking for. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126739 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
239cbb023c8da689e7722f7146914eed9755e368 |
01-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
Push nested-name-specifier source location information into elaborated name types, e.g., "enum clang::NestedNameSpecifier::SpecifierKind". Aside from the normal changes, this also required some tweaks to the parser. Essentially, when we're looking at a type name (via getTypeName()) specifically for the purpose of creating an annotation token, we pass down the flag that asks for full type-source location information to be stored within the returned type. That way, we retain source-location information involving nested-name-specifiers rather than trying to reconstruct that information later, long after it's been lost in the parser. With this change, test/Index/recursive-cxx-member-calls.cpp is showing much improved results again, since that code has lots of nested-name-specifiers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126737 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaType.cpp
reeTransform.h
|
2494dd024b392b8def58bf067cc94b51c214cf77 |
01-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
Push nested-name-specifier source location information into DependentNameTypeLoc. Teach the recursive AST visitor and libclang how to walk DependentNameTypeLoc nodes. Also, teach libclang about TypedefDecl source ranges, so that we get those. The massive churn in test/Index/recursive-cxx-member-calls.cpp is a good thing: we're annotating a lot more of this test correctly now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126729 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplate.cpp
emaType.cpp
reeTransform.h
|
5f791bb44417ecc201ed57a85d0fe02001d8a615 |
01-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
Refactor the construction of nested-name-specifiers with source-location information into a NestedNameSpecifierLocBuilder class, which lives within the AST library and centralize all knowledge of the format of nested-name-specifier location information here. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126716 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
|
e29425bd22fbb9200bbec7b743197b9c6dad3e40 |
28-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
Teach Sema::CheckTypenameType to use nested-name-specifiers with source-location information. We don't actually preserve this information in any of the resulting TypeLocs (yet), so it doesn't matter. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126693 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaTemplate.cpp
reeTransform.h
|
40d96a69c0e1e8c10f92d450c305a7aae696ca9c |
28-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
Push nested-name-specifier location information into DeclRefExpr and MemberExpr, the last of the expressions with qualifiers! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126688 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaOverload.cpp
reeTransform.h
|
4c9be89bb615ec07eb3ed507c8fa9d0baa8a5ad7 |
28-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
Push nested-name-specifier source location information into UnresolvedLookupExpr and UnresolvedMemberExpr. Also, improve the computation that checks whether the base of a member expression (either unresolved or dependent-scoped) is implicit. The previous check didn't cover all of the cases we use in our representation, which threw off source-location information for these expressions (which, in turn, caused some breakage in libclang's token annotation). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126681 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaExpr.cpp
emaOverload.cpp
emaTemplate.cpp
reeTransform.h
|
7c3179cf463c3b3b8c21dbb955f933ba50b74f28 |
28-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
Push nested-name-specifier source location information into CXXDependentScopeMemberExpr, and clean up instantiation of nested-name-specifiers with dependent template specialization types in the process. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126663 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaTemplate.cpp
reeTransform.h
|
a88f09f34e86125ee4e6949a757aaed314012664 |
28-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
Eliminate the last remains of TemplateSpecializationTypes with dependent template names. There is still a lot of redundant code in TreeTransform to cope with TemplateSpecializationTypes, which I'll remove in stages. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126656 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
reeTransform.h
|
15348aeb81285c75b2e92b5bf8d2db3445d147c2 |
28-Feb-2011 |
Anders Carlsson <andersca@mac.com> |
Add a -fcxx-exceptions flag to the frontend, which can be used to enable C++ exceptions, even when exceptions have been turned off using -fno-exceptions. Make the -fobjc-exceptions flag do the same thing, but for Objective-C exceptions. C++ and Objective-C exceptions can also be disabled using -fno-cxx-excptions and -fno-objc-exceptions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126630 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaStmt.cpp
|
aa2187de137e5b809dcbbe14f3b61ae907a3d8aa |
28-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
When we encounter a dependent template name within a nested-name-specifier, e.g., T::template apply<U>:: represent the dependent template name specialization as a DependentTemplateSpecializationType, rather than a TemplateSpecializationType with a dependent TemplateName. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126593 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
reeTransform.h
|
a02411e4d58b1730bea2a990822858ecc31e8eb1 |
27-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
Eliminate a silly little Parse/Sema dance when parsing typename specifiers such as typename T::template apply<U> Previously, we would turn T::template apply<U> into a TemplateSpecializationType. Then, we'd reprocess that TemplateSpecializationType and turn it into either a TemplateSpecializationType wrapped in an ElaboratedType (when we could resolve "apply" to a template declaration) or a DependentTemplateSpecializationType. We now produce the same ASTs but without generating the intermediate TemplateSpecializationType. The end goal here is to avoid generating TemplateSpecializationTypes with dependent template-names, ever. We're not there yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126589 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
053ec969e3023e4b4a666546476ff74e6bfdfd9a |
27-Feb-2011 |
Logan <tzuhsiang.chien@gmail.com> |
Merge with clang upstream Nov 10th 2010.
|
4171766318a2564fbc9a739be0a2851f441c0d29 |
26-Feb-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Implement delegating constructors partially. This successfully performs constructor lookup and verifies that a delegating initializer is the only initializer present. This does not perform loop detection in the initialization, but it also doesn't codegen delegating constructors at all, so this won't cause runtime infinite loops yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126552 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaInit.cpp
|
8e10f3b9cc1db43645bbc2999eb163af8997d468 |
26-Feb-2011 |
John McCall <rjmccall@apple.com> |
Provide a bit saying that a builtin undergoes custom type-checking, then don't let calls to such functions go down the normal type-checking path. Test this out with __builtin_classify_type and __builtin_constant_p. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126539 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExpr.cpp
|
5e24f2a4ad3a3623349f058e99c7c71e1c8d705f |
25-Feb-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Sprinkle optional text of the "unavailable' attribute where ever such attribute causes an error diagnostic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126509 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaOverload.cpp
|
00cf3cc2718671aa48e8da264a523b0058a8591e |
25-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
Push nested-name-specifier source location information into DependentScopeDeclRefExpr. Plus, give NestedNameSpecifierLoc == and != operators, since we're going to need 'em elsewhere. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126508 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
reeTransform.h
|
25ca421a6049350a2748c8fd0c19a052eba6ae99 |
25-Feb-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Remove the FIXME I introduced last night, and pull the logic for marking selected overloads into the callers. This allows a few callers to skip it altogether (they would have anyways because they weren't interested in successful overloads) or defer until after further checks take place much like the check required for PR9323 to avoid marking unused copy constructors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126503 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
|
2b982b778d265c337af5d1b4c74ce49479cbda7d |
25-Feb-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Print optional message for attr(unavailable) in C++ mode. // rdar://9046492 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126499 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
f3db29fff6a583ecda823cf909ab7737d8d30129 |
25-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
Push nested-name-specifier source-location information into pseudo-destructor expressions. Also, clean up some template-instantiation and type-checking issues with pseudo-destructors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126498 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
reeTransform.h
|
0cfaf6a270ecd0f5c7e541a8047c87948317548b |
25-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
Push nested-name-specifier source location information into namespace aliases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126496 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
|
db9924191092b4d426cc066637d81698211846aa |
25-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
Push nested-name-specifier source location information into using directives. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126489 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
|
7e384943ac136f6c2ea55c309108b83939cd4c21 |
25-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
Switch a few CXXScopeSpec::MakeTrivial() calls over to appropriate NestedNameSpecifierLoc handling. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126486 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaTemplate.cpp
|
5149f37cfc736d03233bf92b5ba7c6e866c6647b |
25-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
Maintain nested-name-specifier source-location information through instantiation of using declarations (all three forms). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126485 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
30028234f38945981ebf9c8a2cb915fc2f9a63a4 |
25-Feb-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Rough fix for PR9323 that prevents Clang from marking copy constructor declarations as referenced when in fact we're not going to even form a call in the AST. This is significant because we attempt to allow as an extension classes with intentionally private and undefined copy constructors to have temporaries bound to references, and so shouldn't warn about the lack of definition for that copy constructor when the class is internal. Doug, John wasn't really satisfied with the presence of overloading at all. This is a stop-gap and there may be a better solution. If you can give me some hints for how you'd prefer to see this solved, I'll happily switch things over. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126480 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
emaOverload.cpp
|
2d9f5fa1bcbde31b83c79027c3f1da2d64e3b1fe |
25-Feb-2011 |
John McCall <rjmccall@apple.com> |
Formatting, etc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126475 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
c22b5fff39a7520207f165fb16a27a34b944bd9c |
25-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
Use NestedNameSpecifierLoc within out-of-line variables, function, and tag definitions. Also, add support for template instantiation of NestedNameSpecifierLocs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126470 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
dc355713be51fcb4ee52d9fd6b4548ceff47fadf |
25-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
Update UsingDecl, UnresolvedUsingTypenameDecl, and UnresolvedUsingValueDecl to use NestedNameSpecifierLoc rather than the extremely-lossy NestedNameSpecifier/SourceRange pair it used to use, improving source-location information. Various infrastructure updates to support NestedNameSpecifierLoc: - AST/PCH (de-)serialization - Recursive AST visitor - libclang traversal (including the first tests of this functionality) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126459 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
b43e8ad893706a2499c4901b8f5cb289553d66b1 |
25-Feb-2011 |
Ted Kremenek <kremenek@apple.com> |
Don't warn about using PredefinedExprs as format string literals. These never can be a real security issue. Fixes PR 9314. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126447 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
c34348a7ef1a6b3f92a644a227953800cd1f9947 |
24-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
Retain complete source-location information for C++ nested-name-specifiers throughout the parser, and provide a new class (NestedNameSpecifierLoc) that contains a nested-name-specifier along with its type-source information. Right now, this information is completely useless, because we don't actually store the source-location information anywhere in the AST. Call this Step 1/N. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126391 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
emaCXXScopeSpec.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
f8291a190cc6765630312911f441d9e23564eda2 |
24-Feb-2011 |
Axel Naumann <Axel.Naumann@cern.ch> |
From Vassil Vassilev: Add an interface for last resort, unqualified lookup. It can provide results for unqualified lookup when Sema fails to find anything itself. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126387 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
1d6ab7af99a1fc059a6aa5da083640c1d94b07f7 |
24-Feb-2011 |
Chris Lattner <sabre@nondot.org> |
compute the integer width, not the memory width here. We want to know that _Bool is 1 bit, not 8. This fixes an assertion on the testcase, which is PR9304 and rdar://9045501. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126368 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
951bbb2a6d9641ea11a6fe81cba429152a055b7c |
24-Feb-2011 |
Chris Lattner <sabre@nondot.org> |
rework processing of unavailable and deprecated attributes to avoid unneeded allocation of an empty StringLiteral when these don't have a message. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126364 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
14aba76042e041b2c5e439bf4ae353a0a3c7fd73 |
24-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
Teach NestedNameSpecifier to keep track of namespace aliases the same way it keeps track of namespaces. Previously, we would map from the namespace alias to its underlying namespace when building a nested-name-specifier, losing source information in the process. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126358 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
emaCXXScopeSpec.cpp
emaTemplate.cpp
emaType.cpp
reeTransform.h
|
9ddba32f25c0315cd3a6c7b63e0275b27cc1d973 |
24-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
Tweak the CXXScopeSpec API a bit, so that we require the nested-name-specifier and source range to be set at the same time. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126347 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExprCXX.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
2e4c34ac53d08633b9473df921db4c7e4c9cd577 |
24-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
Teach CXXScopeSpec to handle the extension of a nested-name-specifier with another component in the nested-name-specifiers, updating its representation (a NestedNameSpecifier) and source-location information (currently a SourceRange) simultaneously. This is groundwork for adding source-location information to nested-name-specifiers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126346 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
emaCXXScopeSpec.cpp
reeTransform.h
ypeLocBuilder.h
|
6c3c3f53b32288f0be38e010c96da271f264f2ad |
24-Feb-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Handle value dependent LHS as well as RHS. Test both of these, they don't seem to have been covered by our tests previously. This should fix bootstrap failure. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126345 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
21206d5e3167d5e8066c005c1773afc80ff50ae6 |
24-Feb-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Implement a warning for known shift overflows on constant shift expressions. Consider the code: int64_t i = 10 << 30; This compiles fine, but most developers expect it to produce the value for 10 gigs, not -2 gigs. This is actually undefined behavior because the LHS is a signed integer type. The warning is currently gated behind -Wshift-overflow. There is a special case where only the sign bit is overridden that gets a custom error message and is by default ignored. This case is much less likely to cause observed buggy behavior, it's just undefined behavior according to the spec. This warning can be enabled with -Wshift-sign-overflow. Original patch by Oleg Slezberg, with style tweaks and some correctness fixes by me. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126342 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
9e060ca641a1f845cecb3371b3a3018d306a5198 |
24-Feb-2011 |
Ted Kremenek <kremenek@apple.com> |
Fix bogus -Warray-bounds warning involving 'array[true]' reported in PR 9296. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126341 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
d067c07c6cbf099b25aba38bcb66f38e79d0c420 |
23-Feb-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Fix the behavior of -Wignored-qualifiers on return type qualifiers in several ways. We now warn for more of the return types, and correctly locate the ignored ones. Also adds fix-it hints to remove the ignored qualifiers. Fixes much of PR9058, although not all of it. Patch by Hans Wennborg, a couple of minor style tweaks from me. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126321 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
729b853f4bfa83e53c638a06a9dccf83b4e1f720 |
23-Feb-2011 |
Anders Carlsson <andersca@mac.com> |
Don't give an error for 'try' and 'throw' if they occur in system headers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126303 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaStmt.cpp
|
0423fc6149c9f11e8892ed903a5b68133797fba5 |
23-Feb-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
Sema: diagnose kernel calls to non-global functions git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126292 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
351ba91eaa6d30e523587b2d7ed676a5172c6e56 |
23-Feb-2011 |
Ted Kremenek <kremenek@apple.com> |
Enhance Sema::DiagRuntimeBehavior() to delay some diagnostics to see if the related code is reachable. This suppresses some diagnostics that occur in unreachable code (e.g., -Warray-bound). We only pay the cost of doing the reachability analysis when we issue one of these diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126290 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
ema.cpp
emaExpr.cpp
emaStmt.cpp
|
283a358aecb75e30fcd486f2206f6c03c5e7f11d |
23-Feb-2011 |
Ted Kremenek <kremenek@apple.com> |
Have IdempotentOperationsChecker pull its CFGStmtMap from AnalysisContext. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126288 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
ema.cpp
|
3ed6fc08a9cd293d012fa49ab2a615e618d7c3fa |
23-Feb-2011 |
Ted Kremenek <kremenek@apple.com> |
Issue AnalysisBasedWarnings as part of calling Sema::PopBlockOrFunctionScope(). No real functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126287 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
ema.cpp
emaDecl.cpp
emaExpr.cpp
|
762696fff298627b72b63dbb0becf57f689801ca |
23-Feb-2011 |
Ted Kremenek <kremenek@apple.com> |
Update Sema::DiagRuntimeBehavior() to take an optional Stmt* to indicate the code the diagnostic is associated with. This Stmt* is unused, but we will use it shortly for pruning diagnostics associated with unreachable code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126286 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExpr.cpp
emaStmt.cpp
|
b70369cae98590c03cad0cd0d6c8f94c4e0e55c4 |
23-Feb-2011 |
Ted Kremenek <kremenek@apple.com> |
Change -Warray-bounds logic to use DiagRuntimeBehavior in preparation for using basic dataflow to suppress warnings on unreachable array bounds checks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126285 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
406c38e8c1f105acfd438f94dfbc17af817aa4a5 |
23-Feb-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix PR9276: We were missing the checks for auto deducing to different types in the same declaration group in the template instantiation case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126279 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
reeTransform.h
|
65b34d7bc314c7d4b448164e1a889311bd30b375 |
23-Feb-2011 |
Matt Beaumont-Gay <matthewbg@google.com> |
Clean up the error recovery at the bottom of Sema::LookupMemberExpr. This mostly just shuffles various possibilities for recovery into a more straightforward order, but also unifies a couple of diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126266 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
7019186f3c05539698b589a59729b0adfb8ea0a1 |
23-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
When checking for abstract types, don't crash when we have a FunctionProtoTypeLoc with NULL function parameter types, which can occur in invalid code. Fixes PR9247 / <rdar://problem/9037911>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126262 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
cd9ec3b4fb3d042f89aa5b572de7df3ef9ee4a80 |
22-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement the GNU C extension which permits the initialization of an array from a constant array compound literal. Fixes PR9261. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126230 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
284cc8d8a90ae6558e0a4b60b7dc1ddcfd220758 |
22-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
Warn about implicit conversions between values of different, named enumeration types. Fixes <rdar://problem/8559831>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126183 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
8110f04b39fd028496dd6bf9e3a78278c3e0a6ad |
22-Feb-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
In Objective-C, there are no trailing return types, so don't produce diagnostics suggesting they are missing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126174 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
e7397c6a1bb2b205c5fe678e26199eb26d22e38e |
22-Feb-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix a few auto-related issues: * 'auto' was being rejected on abstract-declarators with trailing return types and on typedefs with trailing return types. 'auto' is always allowed in these cases. This was found while testing the fix for PR 9278. * A very poor diagnostic was being issued for auto (f() -> int): "return type must be 'auto', not 'auto'". This is closely related to PR 9060. * Trailing return type handling was happening slightly too late, resulting in the checks for functions returning arrays and functions returning functions being missed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126166 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
21761c8378a493c32ab0f7d2b8880986a0ba73a3 |
22-Feb-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Warn when type modifiers on objc method declarations in protocols do not match with method implementation. // rdar://7076235 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126162 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
ddc83f9255834217f0559b09ff75a1c50b8ce457 |
22-Feb-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
C++0x's deduced auto is illegal in typedefs. This actually rules out too much, since it also catches typedefs for pointers to functions with trailing return types: typedef auto (*F)() -> int; Fix for that (and the same issue in all abstract-declarators) to follow shortly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126153 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
935f0f01c1ed3c2052b797ac035d57a85b78adc4 |
21-Feb-2011 |
Chris Lattner <sabre@nondot.org> |
add one more case of mismatched input/output constraints. When the mismatch is due to a larger input operand that is a constant, truncate it down to the size of the output. This allows us to accept some cases in the linux kernel and elsewhere. Pedantically speaking, we generate different code than GCC, though I can't imagine how it would matter: Clang: movb $-1, %al frob %al GCC: movl $255, %eax frob %al git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126148 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
f0c4d28020fb13fdbf7d6fccfab1b7b6a118ad0e |
21-Feb-2011 |
Chris Lattner <sabre@nondot.org> |
more code restructuring, no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126146 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
ca57b4b7658a031b74cda5ac504311998be8e343 |
21-Feb-2011 |
Chris Lattner <sabre@nondot.org> |
split the iteration loop out to a helper function, no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126145 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
4605c4f305dcf9a00baf120ba6e7c0a4f1e7bdc4 |
21-Feb-2011 |
Chris Lattner <sabre@nondot.org> |
fix a comment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126143 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
483b9f3bc05c5409e2c6643f1c9d91e21c8ff9d2 |
21-Feb-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Tweaks to C++0x deduced auto type support: * Flag indicating 'we're parsing this auto typed variable's initializer' moved from VarDecl to Sema * Temporary template parameter list for auto deduction is now allocated on the stack. * Deduced 'auto' types are now uniqued. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126139 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaTemplateDeduction.cpp
|
77efc680156bc28d3c0d2e70f156904f91328b21 |
21-Feb-2011 |
John McCall <rjmccall@apple.com> |
Don't warn about static const integral data members with in-line constant initializers just because they don't have a proper out-of-line definition. Such code is technically ill-formed but is too common and too unlikely to be a problem to be seriously worth worrying about. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126137 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b0c2301a40a3e54ce7195f11a59d025ef60ebffb |
21-Feb-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Remove warning on future change in ivar lookup rule when doing the property default synthesis. // rdar://9027673. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126128 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
fef8b344ea299a1717cc94486f5df6facf3e337c |
21-Feb-2011 |
John McCall <rjmccall@apple.com> |
Reorganize subelement initialization checking, no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126116 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
ce6c9b7da219c8640a0559f75770cfc6622de083 |
21-Feb-2011 |
John McCall <rjmccall@apple.com> |
Small optimization: avoid redundant checks of whether a type is an array when checking an initialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126115 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
34d49471e0b6386aefdc0f6bd15e4a4876ce5db1 |
21-Feb-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Clean up the tests for warning about unused function results given the appropriate attribute. Add a bit more testing that finds a pretty bad regression (since ~forever) in this warning. Fix it with a nice 2 line change. =] git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126098 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
5e971530928e7432da9f3d8488d3a0fdb67968ed |
20-Feb-2011 |
Benjamin Kramer <benny.kra@googlemail.com> |
Remove unused function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126084 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
6a9505a1d815c27df56a863341f577e01a81a9ba |
20-Feb-2011 |
Daniel Dunbar <daniel@zuster.org> |
Remove a dead variable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126073 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
34b41d939a1328f484511c6002ba2456db879a29 |
20-Feb-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Implement the C++0x deduced 'auto' feature. This fixes PR 8738, 9060 and 9132. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126069 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
reeTransform.h
|
da4b7cf09ebfd4e4098b516081fa9dae2f5c99e0 |
20-Feb-2011 |
Anders Carlsson <andersca@mac.com> |
Add a new ObjCExceptions member variable to LangOptions. This controls whether Objective-C exceptions are enabled or not (they are by default). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126061 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
3e026e323f1bd820fb9c880b1db951c87df94bb4 |
19-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
Don't produce "comparison is always (true|false)" warnings when the comparison itself is a constant expression. Fixes PR7536. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126057 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
e0fd832b076eb5a1e4a4549687af0dbf2ad57181 |
19-Feb-2011 |
Chris Lattner <sabre@nondot.org> |
implement a tiny amount of codegen support for gnu array range designators: allowing codegen when the element initializer is a constant or something else without a side effect. This unblocks enough to let process.c in the linux kernel build, PR9257. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126056 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
b1fba3145392dc0cf54691576a4e6141e5081869 |
19-Feb-2011 |
Anders Carlsson <andersca@mac.com> |
There's no need to return early if we encounter a try/throw and exceptions are disabled. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126053 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaStmt.cpp
|
1be8eec3ddd2a23c19b453c2639226174eb5d4a8 |
19-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
Handle the resolution of a reference to a function template (which includes explicitly-specified template arguments) to a function template specialization in cases where no deduction is performed or deduction fails. Patch by Faisal Vali, fixes PR7505! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126048 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaInit.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
|
7f11d9cf5df1f8ce82af46eabc4ec5cec7d580b0 |
19-Feb-2011 |
Anders Carlsson <andersca@mac.com> |
Disallow try/catch/throw when exceptions are disabled. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126039 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaStmt.cpp
|
d9ea180032eda76a46c099a9aab99512447c326d |
19-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
The member classes of a current instantiation aren't necessarily a current instantiation, even though we have a RecordDecl describing them. Fixes PR9255. Amusingly, I've had this patch sitting around for a month or two because it was "obviously" wrong, but hadn't gotten around to writing a test case to submit the fix :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126038 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
|
f4b793ceb60418b64d3593ba3c8240e3594bff8f |
19-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
Teach the virtual-functions-without-virtual-destructor warning to only warn about polymorphic classes (which have virtual functions) rather than dynamic classes (which are polymorphic or have virtual bases). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126036 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
5f39f706afeb4d4a6f246db1e8cd2da0fb5b7f37 |
19-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
Remove the Fix-It for "main must return 'int'", which is not always correct and is not worth fixing. Fixes PR8396. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126035 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
aef05d71bcceb6f913b1749500863bcd3fed43b6 |
19-Feb-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Use PointerUnion::getAddrOf instead of messing with PointerUnion & reinterpret_cast. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126021 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
15e310a3b970b64a84cb30f0005bc396b4d978cb |
19-Feb-2011 |
John McCall <rjmccall@apple.com> |
Warn about code that uses variables and functions with internal linkage without defining them. This should be an error, but I'm paranoid about "uses" that end up not actually requiring a definition. I'll revisit later. Also, teach IR generation to not set internal linkage on variable declarations, just for safety's sake. Doing so produces an invalid module if the variable is not ultimately defined. Also, fix several places in the test suite where we were using internal functions without definitions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126016 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaExpr.cpp
|
7ef932429ed0edcc5e4bf44e516f5f4be6a8a03f |
19-Feb-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Fix a missed case in the NULL operand to conditional operator diagnostics. Patch by Stephen Hines. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125998 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
45f11b78750590b1b1bcec6746c7639a256ce2a2 |
19-Feb-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Fix PR8767, improve diagnostic wording when allocating an object of an abstract class type. Patch by Stephen Hines, with a wording tweak from Doug applied by me. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125996 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
82214a80c0163e01e4d8dec1426023c89277dbb4 |
19-Feb-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Initial steps to improve diagnostics when there is a NULL and a non-pointer on the two sides of a conditional expression. Patch by Stephen Hines and Mihai Rusu. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125995 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprCXX.cpp
|
5c722c7020b33da57090422b854072258a50b3f0 |
19-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
When code-completing a case statement for a switch on a value of enumeration type, prioritize the enumeration constants and don't provide completions for any other expressions. Fixes <rdar://problem/7283668>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125991 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
|
813d8346529bf094eb2b249648906ba7fd226688 |
18-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
Selector::getIdentifierInfoForSlot() can return NULL values, a fact that was ignored in a few places (most notably, code completion). Introduce Selector::getNameForSlot() for the common case where we only care about the name. Audit all uses of getIdentifierInfoForSlot(), switching many over to getNameForSlot(), fixing a few crashers. Fixed <rdar://problem/8939352>, a code-completion crasher. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125977 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
emaExpr.cpp
|
febb5b884b1bb946b83800cb77cbea0119570d84 |
18-Feb-2011 |
Chris Lattner <sabre@nondot.org> |
fix rdar://9024687, a crash on invalid that we used to silently ignore. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125962 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
16f744beaaa30bf3847740ca8e8beb6f0d3a0b93 |
18-Feb-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Introduce ASTContext::getLogicalOperationType() to return bool or int, depending on language. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125957 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
cd5b306f1b79c8a82fb0bdb4cf353021ea452fed |
18-Feb-2011 |
Chris Lattner <sabre@nondot.org> |
accept and ignore a few things for better OpenBSD compatibility, patch by Amit Kulkarni! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125944 91177308-0d34-0410-b5e6-96231b3b80d8
ttributeList.cpp
emaDeclAttr.cpp
|
1e856d99c52d9e93eab48084c3aca4a59204b94b |
18-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement C++0x [expr.static.cast]p9, which permits explicitly casting a scoped enumeration type to an integral or floating type, properly. There was an over-eager assertion, and it was missing the floating-point case. Fixes PR9107/<rdar://problem/8937402>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125825 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
f58483268995daef120529687813a6c5340ff09d |
18-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
When building a qualified reference to a member of an anonymous struct or union, place the qualifier on the outermost member reference expression, which actually contains the entity name. Fixes PR9188/<rdar://problem/8990184>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125822 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
25b3b849e3ad340b04442707038c86980035765b |
18-Feb-2011 |
Ted Kremenek <kremenek@apple.com> |
Fix assertion failure on -Warray-bounds for 32-bit builds of Clang. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125821 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
8f5667d06a785719691c1139b961411d7f0aedf5 |
18-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
When we're creating an expression for an integral template argument of enumeration type, we were generating an integer literal implicitly casted to the appropriate enumeration type. However, later checks on that expression would strip the implicit cast. This commit tweaks the lame hack, by creating an explicit cast instead of an implicit cast. The right answer is to introduce a SubstNonTypeTemplateParmExpr expression that acts like the substituted result. I'll investigate that soon. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125818 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
4ae493cccbfbf122ec6ebac0e330232c22fa8489 |
18-Feb-2011 |
Chris Lattner <sabre@nondot.org> |
implement basic support for __label__. I wouldn't be shocked if there are bugs from other clients that don't expect to see a LabelDecl in a DeclStmt, but if so they should be easy to fix. This implements most of PR3429 and rdar://8287027 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125817 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
337e550218128e7d922c09bb354fbc71de90c568 |
18-Feb-2011 |
Chris Lattner <sabre@nondot.org> |
Switch labels over to using normal name lookup, instead of their own weird little DenseMap. Hey look, we now emit unused label warnings deterministically, amazing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125813 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDecl.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaLookup.cpp
emaStmt.cpp
|
e476bdce8cf3315c8ce852480503a8acc265bd54 |
18-Feb-2011 |
Chris Lattner <sabre@nondot.org> |
make block bodies handle undefined labels just like functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125799 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
35001ca261f895817916b468379b696d6d45959d |
17-Feb-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Enhance the array bounds checking to work for several other constructs, especially C++ code, and generally expand the test coverage. Logic adapted from a patch by Kaelyn Uhrain <rikka@google.com> and another Googler. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125775 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExprCXX.cpp
|
3406458512c3cdfe2076c46b9aedb4621297efd5 |
17-Feb-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Clean up the style of this function to match the conventions in the rest of Clang, and reflows the code a bit to make it easier to read. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125773 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
c24e4b9ce213c1ea4cb50865ff7901f06dc26d6a |
17-Feb-2011 |
Chris Lattner <sabre@nondot.org> |
add a fixme git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125772 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
57ad37823e198f977cac605dbfbaefb4daf325e9 |
17-Feb-2011 |
Chris Lattner <sabre@nondot.org> |
Step #2/N of __label__ support: keep pushing LabelDecl forward, making them be template instantiated in a more normal way and make them handle attributes like other decls. This fixes the used/unused label handling stuff, making it use the same infrastructure as other decls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125771 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaExpr.cpp
emaStmt.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
d8e54990ade0dd5566f8e3aa2e62def08753d1e9 |
17-Feb-2011 |
Chris Lattner <sabre@nondot.org> |
Inline LocalInstantiationScope::getInstantiationOf into its one client, making room for future hacking. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125770 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
a70062ff988eb1fc4a159e463a2a3de5155b7f6a |
17-Feb-2011 |
Chris Lattner <sabre@nondot.org> |
remove some defensive code: LocalInstantiationScope::getInstantiationOf and findInstantiationOf can never return null, even on invalid code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125769 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
emaTemplateVariadic.cpp
|
2a96bf5e66731bb54dff3e4aadfbbced83377530 |
17-Feb-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Improve diagnostics on missing property decl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125752 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
a5b9332418f25338f118358e27303cd510d54107 |
17-Feb-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Implement a sub-group of -Wconversion: -Wliteral-conversion. This specifically targets literals which are implicitly converted, a those are more often unintended and trivial to fix. This can be especially helpful for diagnosing what makes 'const int x = 1e6' not an ICE. Original patch authored by Jim Meehan with contributions from other Googlers and a few cleanups from myself. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125745 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
56ca35d396d8692c384c785f9aeebcf22563fe1e |
17-Feb-2011 |
John McCall <rjmccall@apple.com> |
Change the representation of GNU ?: expressions to use a different expression class and to bind the shared value using OpaqueValueExpr. This fixes an unnoticed problem with deserialization of these expressions where the deserialized form would lose the vital pointer-equality trait; or rather, it fixes it because this patch also does the right thing for deserializing OVEs. Change OVEs to not be a "temporary object" in the sense that copy elision is permitted. This new representation is not totally unawkward to work with, but I think that's really part and parcel with the semantics we're modelling here. In particular, it's much easier to fix things like the copy elision bug and to make the CFG look right. I've tried to update the analyzer to deal with this in at least some obvious cases, and I think we get a much better CFG out, but the printing of OpaqueValueExprs probably needs some work. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125744 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExpr.cpp
emaExprCXX.cpp
reeTransform.h
|
0aa205765aec0aa5eed672f8e3cade543372edcd |
17-Feb-2011 |
NAKAMURA Takumi <geek4civic@gmail.com> |
Triple::MinGW64 is deprecated and removed. We can use Triple::MinGW32 instead. No one uses *-mingw64. mingw-w64 is represented as {i686|x86_64}-w64-mingw32. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125742 91177308-0d34-0410-b5e6-96231b3b80d8
argetAttributesSema.cpp
|
125b4cb35536e45201f8f2cb19ee620e3ad67c49 |
17-Feb-2011 |
NAKAMURA Takumi <geek4civic@gmail.com> |
Fix whitespace. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125741 91177308-0d34-0410-b5e6-96231b3b80d8
argetAttributesSema.cpp
|
543cb655b174087f6c2d22009934c9fed6c32114 |
17-Feb-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Implement -Wenum-compare, which warns when comparing two enums of different types. We omit the warning when the enum types are anonymous. Unlike GCC, this warning does not distinguish between C++ and C/ObjC for controling whether it is on by default, it is always on by default. Original patch contributed by Richard Trieu (@ Google), I fixed some style issues, and cleaned it up for submission. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125739 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ad8dcf4a9df0e24051dc31bf9e6f3cd138a34298 |
17-Feb-2011 |
Chris Lattner <sabre@nondot.org> |
Step #1/N of implementing support for __label__: split labels into LabelDecl and LabelStmt. There is a 1-1 correspondence between the two, but this simplifies a bunch of code by itself. This is because labels are the only place where we previously had references to random other statements, causing grief for AST serialization and other stuff. This does cause one regression (attr(unused) doesn't silence unused label warnings) which I'll address next. This does fix some minor bugs: 1. "The only valid attribute " diagnostic was capitalized. 2. Various diagnostics printed as ''labelname'' instead of 'labelname' 3. This reduces duplication of label checking between functions and blocks. Review appreciated, particularly for the cindex and template bits. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125733 91177308-0d34-0410-b5e6-96231b3b80d8
umpDiagnostics.cpp
ema.cpp
emaDecl.cpp
emaExpr.cpp
emaStmt.cpp
reeTransform.h
|
6204159b21d88b356015ba3f3e42d40f1887acd6 |
17-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
I will not hold on to temporary StringRefs. I will not hold on to temporary StringRefs. I will not hold on to temporary StringRefs. I will not hold on to temporary StringRefs. I will not hold on to temporary StringRefs. I will not hold on to temporary StringRefs. I will not hold on to temporary StringRefs. I will not hold on to temporary StringRefs. I will not hold on to temporary StringRefs. I will not hold on to temporary StringRefs. I will not hold on to temporary StringRefs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125718 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
26ae5dd9cfc561527eca418571323d90589a4b92 |
17-Feb-2011 |
Matt Beaumont-Gay <matthewbg@google.com> |
Fix PR9025 and add a diagnostic (and sometimes a fixit) for an overloaded function name used as the base of a member expression. Early feedback from Chandler Carruth, and code review from Nick Lewycky. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125714 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
41aadbc530f071fe5ccbfc2560899a4a2e74c057 |
17-Feb-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Improve diagnostics when property names an object type of a forward class. // rdar://8851803 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125699 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
577cdfdb20840350e841a483df630237326126d5 |
17-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement code completion results for the Objective-C Key-Value Coding (KVC) and Key-Value Observing (KVO) protocols. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125696 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
|
c71a2c0ce03ec74391ff2b43b0a966860f23786e |
17-Feb-2011 |
Ted Kremenek <kremenek@apple.com> |
Fix assertion failure in -Warray-bounds on template parameters used as arrays. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125693 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
e996ffd240f20a1048179d7727a6ee3227261921 |
16-Feb-2011 |
John McCall <rjmccall@apple.com> |
Save a copy expression for non-trivial copy constructions of catch variables. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125661 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
8fd0a5dfb025a51f48b7931b95efbf35d3c5dfc3 |
16-Feb-2011 |
Ted Kremenek <kremenek@apple.com> |
Tweak -Warray-bounds diagnostics based on feedback from Chandler. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125649 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
a0125d8520f65aca581378c235384e7affefa1fc |
16-Feb-2011 |
Ted Kremenek <kremenek@apple.com> |
Add trivial buffer overflow checking in Sema. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125640 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExpr.cpp
|
d98abd8c68bd96e111a0bebdb90f38cf2a5632a2 |
16-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
When searching for visible declarations (e.g., for code completion), be sure to look at all of the Objective-C class declarations within a @class. Fixes <rdar://problem/8876207>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125635 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
78bcd9139f4b35be75190446c95614120d9b4c09 |
16-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
When trying to provide a code completion item for a call to "super" in Objective-C, also look in the categories and class extensions of our superclasses. Fixes <rdar://problem/8853540>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125628 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
98d810ee83d4c4bf5d89bbb43829533b84b20ecf |
16-Feb-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Check for deprecated implementation unconditionally. Warning and its note will be ignored in default case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125621 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
8f457004a1fdfc9c70fb52c5bc2e9d4ea6780d8d |
16-Feb-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Fix typo (per Chris's comment). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125619 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
4bfd680597862e437fcba739dce58531d0b15d6e |
15-Feb-2011 |
John McCall <rjmccall@apple.com> |
Handle delayed access in local declarations. PR9229. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125609 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
830072c2de881aadfe0f6efd3baccc9129a77e37 |
15-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
Teach code completion to cope with block types written without a prototype, e.g., ^() rather than ^(void). Fixes <rdar://problem/8875712>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125608 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
afc4578f8e55d4377b291e2325b2e9bc2cd72e89 |
15-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement a special code-completion pattern for "IBAction". Fixes <rdar://problem/8767704>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125604 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
68e3c2eef52701a178fbcc2bb424f31dd4b36931 |
15-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
When code-completing within a list of declaration specifiers, separately handle the case of a local declaration-specifier list, including all types in the set of options. Fixes <rdar://problem/8790735> and <rdar://problem/8662831>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125594 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
39d3e7a26c1969fcb76bceb4ee0a410c60ea5954 |
15-Feb-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
OpenCL: semantic analysis support for cl_khr_fp64 extension git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125588 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
5ac96d5f54a94d57f485de8103eb05a0f19e1c39 |
15-Feb-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Refactoring of code to issue warning on implemented deprecated class and methods in objective-c. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125573 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
b25b295fdfc443bdf060e860a21f6f01d9fbdc18 |
15-Feb-2011 |
John McCall <rjmccall@apple.com> |
Return a declaration to the parser when creating a field in C++ so that the parser will complete the declarator with a valid decl and thus trigger delayed diagnostics for it. It certainly looks like we were intentionally returning null here, but I couldn't find any good reason for it, and there wasn't a comment, so farewell to all that. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125556 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
b1224f69089815fd66b04ae33215b7fba10780aa |
15-Feb-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Warn if method for a deprecated method is implemented. Warn if class for a deprecated class is implemented. Warn if category for a deprecated class is implemented. All under control of -Wdeprecated-implementations. // rdar://8973810. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125545 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
417d39f300da40067600863c2733fdeb513fb4d2 |
15-Feb-2011 |
John McCall <rjmccall@apple.com> |
Don't crash on hierarchy static_casts which appear in variable initializers. PR9221. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125532 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
f5ba7e089daadcd60b0f6e31d932be8bb6045281 |
14-Feb-2011 |
John McCall <rjmccall@apple.com> |
Change the context correctly when instantiating a static data member definition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125517 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
79ab2c8104ef5df233d271560ccc734836738e56 |
14-Feb-2011 |
John McCall <rjmccall@apple.com> |
Provide overload diagnostics when explicit casts involving class types fail. PR8626. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125506 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
eee1d5434ebfa955ffc3c493aecd68bb7b3f4838 |
14-Feb-2011 |
John McCall <rjmccall@apple.com> |
When parsing an out-of-line member function declaration, we must delay access-control diagnostics which arise from the portion of the declarator following the scope specifier, just in case access is granted by friending the individual method. This can also happen with in-line member function declarations of class templates due to templated-scope friend declarations. We were really playing fast-and-loose before with this sort of thing, and it turned out to work because *most* friend functions are in file scope. Making us delay regardless of context exposed several bugs with how we were manipulating delay. I ended up needing a concept of a context that's independent of the declarations in which it appears, and then I actually had to make some things save contexts correctly, but delay should be much cleaner now. I also encapsulated all the delayed-diagnostics machinery in a single subobject of Sema; this is a pattern we might want to consider rolling out to other components of Sema. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125485 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaAccess.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
|
f315fa81eef1977b3457fd7a7d4639e060fe7278 |
14-Feb-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
OpenCL: add support for __kernel, kernel keywords and EXTENSION, FP_CONTRACT pragmas. Patch originally by ARM. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125475 91177308-0d34-0410-b5e6-96231b3b80d8
ttributeList.cpp
emaDeclAttr.cpp
|
321b8179afaf803dcc56b2a19f7b0891a03c92c8 |
14-Feb-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
Move support for "#pragma STDC FP_CONTRACT" to Parser; add Sema actions git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125474 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaAttr.cpp
|
462dae559c2377db365a8da1d84c5400284ebd30 |
13-Feb-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Use hasSameType in one more, hopefully, last place. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125468 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
569bd8f4269df71b2176da940149aa5a959ae25d |
13-Feb-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Some refactoring and using more modern APIs for implementation of co/contra-variance objc++ block pointers. // rdar://8979379. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125467 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
7502c1d3ce8bb97bcc4f7bebef507040bd93b26f |
13-Feb-2011 |
John McCall <rjmccall@apple.com> |
Give some convenient idiomatic accessors to Stmt::child_range and Stmt::const_child_range, then make a bunch of places use them instead of the individual iterator accessors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125450 91177308-0d34-0410-b5e6-96231b3b80d8
umpDiagnostics.cpp
emaChecking.cpp
emaDeclCXX.cpp
|
e3c8c64e7735c3589e1a34e6000c93183a55920c |
12-Feb-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Implement objective-c++'s block pointer type matching involving types which are contravariance in argument types and covariance in return types. // rdar://8979379. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125445 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaOverload.cpp
|
e2f82f71385051ce5abfba317d2f592aa332c588 |
11-Feb-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
Reject forbidden storage class specifiers in OpenCL. Patch by George Russell! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125399 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
emaDecl.cpp
|
b20de817259c2bf500a88b8172347dbcc4765004 |
10-Feb-2011 |
Daniel Dunbar <daniel@zuster.org> |
Fix think-o I committed without testing, shameful. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125299 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
f2d1561d5124cabe14790091fafb68926de58df3 |
10-Feb-2011 |
Daniel Dunbar <daniel@zuster.org> |
Fix a gcc Wuninitialized false positive. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125298 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
74b47f9173ccd2c22686b8fbf9d69852d6f46ac6 |
10-Feb-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
For -Woverloaded-virtual take into account canonical methods. Fixes rdar://8979966 & http://llvm.org/PR9182. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125296 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
886e1606c28e970bb288abf4dbc40feb16822a79 |
10-Feb-2011 |
NAKAMURA Takumi <geek4civic@gmail.com> |
CMake: LLVM_NO_RTTI must be obsolete now! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125275 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
|
7f53253223b29d77f1e9c5c0ce93a19932761b77 |
09-Feb-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Fix scoping of method declarations and issue warning when same parameter name used multiple times. // rdar://8877730 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125229 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
e08ce650a2b02410eddd1f60a4aa6b3d4be71e73 |
09-Feb-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
AST, Sema, Serialization: add CUDAKernelCallExpr and related semantic actions git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125217 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaOverload.cpp
reeTransform.h
|
14b6ba77710d6431794d65c7d58c6f29c3dc956e |
09-Feb-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
AST, Sema, Serialization: keep track of cudaConfigureCall git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125216 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
63c00d7f35fa060c0a446c9df3a4402d9c7757fe |
09-Feb-2011 |
John McCall <rjmccall@apple.com> |
Remove vtables from the Stmt hierarchy; this was pretty easy as there were only three virtual methods of any significance. The primary way to grab child iterators now is with Stmt::child_range children(); Stmt::const_child_range children() const; where a child_range is just a std::pair of iterators suitable for being llvm::tie'd to some locals. I've left the old child_begin() and child_end() accessors in place, but it's probably a substantial penalty to grab the iterators individually now, since the switch-based dispatch is kindof inherently slower than vtable dispatch. Grabbing them together is probably a slight win over the status quo, although of course we could've achieved that with vtables, too. I also reclassified SwitchCase (correctly) as an abstract Stmt class, which (as the first such class that wasn't an Expr subclass) required some fiddling in a few places. There are somewhat gross metaprogramming hooks in place to ensure that new statements/expressions continue to implement getSourceRange() and children(). I had to work around a recent clang bug; dgregor actually fixed it already, but I didn't want to introduce a selfhosting dependency on ToT. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125183 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
76a40219ee5624d78aba167dce02bdbaa930955f |
09-Feb-2011 |
John McCall <rjmccall@apple.com> |
NonTypeTemplateParmDecl is just a DeclaratorDecl, not a VarDecl. Also, reorganize and make very explicit the logic for determining the value kind and type of a referenced declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125150 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
332bb2a2e3cd0a5af85758847a8050ae8ceee5f3 |
08-Feb-2011 |
John McCall <rjmccall@apple.com> |
When checking the 'weak' and 'weakref' attributes, look for non-external linkage rather than the presence of the 'static' storage class specifier. Fixes rdar://problem/8814626. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125126 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
651f86fb6b0f1a251c65a9be6d3fa83e67d5988d |
08-Feb-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
In Sema::CheckShadow, get the DeclContext from the variable that we are checking instead from the Scope; Inner scopes in bodies don't have DeclContexts associated with them. Fixes http://llvm.org/PR9160 & rdar://problem/8966163. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125097 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
1e52dfc648ce0b25ef57ae29ef1b4337d80011ef |
08-Feb-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Support for objextive-c++ use of property-dot syntax as receiver in liu of a class method getter. // rdar://8962253 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125094 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExprCXX.cpp
|
5e6fcd4ba9cc4cab5a6be0a76bca9d51480ea346 |
08-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
Sema::MaybeBindToTemporary() shouldn't treat any expression returning a glvalue as a temporary. Previously, we were enumerating all of the cases that coul return glvalues and might be called with Sema::MaybeBindToTemporary(), but that was gross and we missed the Objective-C property reference case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125070 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
da263795abd39437d73d23fcf34dcd3afc1d7df3 |
08-Feb-2011 |
John McCall <rjmccall@apple.com> |
dgregor accidentally killed this assert, but on investigation, it can fire on invalid code and we don't really care, so kill it harder. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125068 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
8348de33e92b8278a07a7573eb7ad3c166c02b0d |
08-Feb-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Support for objc use of property-dot syntax as receiver in liu of a class method getter. objc++ uses a different code path and is more involved (TBD). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125061 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
6b5a61b6dc400027fd793dcadceeb9da944a37ea |
07-Feb-2011 |
John McCall <rjmccall@apple.com> |
A few more tweaks to the blocks AST representation: - BlockDeclRefExprs always store VarDecls - BDREs no longer store copy expressions - BlockDecls now store a list of captured variables, information about how they're captured, and a copy expression if necessary With that in hand, change IR generation to use the captures data in blocks instead of walking the block independently. Additionally, optimize block layout by emitting fields in descending alignment order, with a heuristic for filling in words when alignment of the end of the block header is insufficient for the most aligned field. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125005 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprObjC.cpp
reeTransform.h
|
683564a7a93c952f1fbe573b55c542418d29d859 |
07-Feb-2011 |
Anton Yartsev <anton.yartsev@gmail.com> |
pre/post ++/-- for AltiVec vectors. (with builtins-ppc-altivec.c failure fixed) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125000 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
8ef6c8cb6c5627240e2339fd7062c9873f821d7e |
05-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
Improve our uniquing of file entries when files are re-saved or are overridden via remapping. Thus, when we create a "virtual" file in the file manager, we still stat() the real file that lives behind it so that we can provide proper uniquing based on inodes. This helps keep the file manager much more consistent. To take advantage of this when reparsing files in libclang, we disable the use of the stat() cache when reparsing or performing code completion, since the stat() cache is very likely to be out of date in this use case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124971 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
f677ea3cc9598d9952ad7ffab5fb322ba4c5be31 |
05-Feb-2011 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Basic implementation of inherited constructors. Only generates declarations, and probably only works for very basic use cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124970 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaOverload.cpp
|
1de34dd8a6932fbb316e35304bf468ddb4a0841b |
05-Feb-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
When the out-of-line definition differs from the declaration in the return type, say "out-of-line definition differ from the declaration in the return type" instead of the silly "functions that differ only in their return type cannot be overloaded". Addresses rdar://7980179. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124939 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
1faa89f9c619e4b2411fab4af7e22ee7a2bd9009 |
05-Feb-2011 |
Anders Carlsson <andersca@mac.com> |
Re-land r124768, with a fix for PR9130. We now emit everything except unused implicit virtual member functions when building the vtable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124935 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
09f57b966c2a6c0a1c8d2e0be9862f6b2c89f9f4 |
05-Feb-2011 |
Ted Kremenek <kremenek@apple.com> |
Don't suggest -Wuninitialized fixits for uninitialized enum types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124924 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
8b789139167d721e3ef1e3d433eabeb351c36fad |
05-Feb-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
-Wselector should warn on implemented selectors only when selector metadata is generated, which is triggered by at least on class implementation. This is to match gcc's behavior. // rdar://8851684. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124909 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
c6ac9c3d754f91d27b1734965e5f1a8e542e8f40 |
04-Feb-2011 |
John McCall <rjmccall@apple.com> |
Assert during instantiation of blocks that we've captured everything that we captured in the dependent case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124887 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
2f9f89c6938a788a904c3be3ae7a64f4297c90a6 |
04-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
Improve our handling of the current instantiation for qualified id-expression, e.g., CurrentClass<T>::member Previously, if CurrentClass<T> was dependent and not complete, we would treat it as a dependent-scoped declaration reference expression, even if CurrentClass<T> referred to the current instantiation. Fixes PR8966 and improves type checking of templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124867 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
46ff3034d14aaa92b530e96480741f3d5d458cb8 |
04-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
Before checking bitfield initialization, make sure that neither the bit-field width nor the initializer value are type- or value-dependent. Fixes PR8712. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124866 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
fdc13a00a0077383eabf6d994de10203568415bb |
04-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
When calling a bound pointer to member function, check the cv-qualifiers on the object against the cv-qualifiers on the member function. Fixes PR8315. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124865 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
461bf2eb82981d00a014409126ef9c3538551a94 |
04-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
Tweak my fix for PR8748, and update the incorrect PR number in the test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124863 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplate.cpp
|
4ee2bb12dcb8f8b543a3581537a4bc5752106ce2 |
04-Feb-2011 |
Ted Kremenek <kremenek@apple.com> |
Downgrade error about attribute 'iboutlet' and 'ibaction' being applied to anything but a instance method to a warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124858 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
d89d86fe4acaa4782b0ed8a684bbc1b32cb48b70 |
04-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
Tighten up the semantics of default template arguments, per C++0x [temp.param]p9 and C++ DR226. Fixes PR8747. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124856 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplate.cpp
|
ee5d21f63714459f39e0be28fec9dbecf0720505 |
04-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
When a function template's template parameter has a default argument, it's okay for the following template parameters to not have default arguments (since those template parameters can still be deduced). Also, downgrade the error about default template arguments in function templates to an extension warning, since this is a harmless C++0x extension. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124855 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
799ef666685d6c97d64d1970a6f68bf7923360c2 |
03-Feb-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Implement -Woverloaded-virtual. The difference with gcc is that it warns if you overload virtual methods only if the method doesn't also override any method. This is to cut down on the number of warnings and make it more useful like reported here: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20423. If we want to warn that not all overloads are overriden we can have an additional warning like -Wpartial-override. -Woverloaded-virtual, unlike gcc, is added to -Wmost. Addresses rdar://8757630. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124805 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
26743b20e4a8c2a986e6453f0c38beba0afef633 |
03-Feb-2011 |
John McCall <rjmccall@apple.com> |
Capture a few implicit references to 'self'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124786 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
5808ce43f8d7e71f5acacc9ca320268c4f37565a |
03-Feb-2011 |
John McCall <rjmccall@apple.com> |
More capturing of 'this': implicit member expressions. Getting that right for anonymous struct/union members led to me discovering some seemingly broken code in that area of Sema, which I fixed, partly by changing the representation of member pointer constants so that IndirectFieldDecls aren't expanded. This led to assorted cleanups with member pointers in CodeGen, and while I was doing that I saw some random other things to clean up. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124785 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprCXX.cpp
|
01de7a44cea9f77cbcda65faad8edc8b48a3b617 |
03-Feb-2011 |
Rafael Espindola <rafael.espindola@gmail.com> |
Revert 124768. This reopens PR99114, but that one at least can be avoided with an #include. PR9130 cannot. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124780 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
aedd9d5ad3cc776fd61457050bcd54cac4c5ea66 |
03-Feb-2011 |
Anders Carlsson <andersca@mac.com> |
Don't try to mark virtual members referenced for classes where the key function is not defined in the current translation unit. Doing so lead to compile errors such as PR9114. Instead, when CodeGen is building the vtable, don't try to emit a definition for functions that aren't marked used in the current translation unit. Fixes PR9114. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124768 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
609e3170841dac81c3b7b6b9eccb9c520e42c9b2 |
03-Feb-2011 |
Ted Kremenek <kremenek@apple.com> |
Based on user feedback, swap -Wuninitialized diagnostics to have the warning refer to the bad use, and the note to the variable declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124758 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
6159d0fe2d40708b5a3caab91c8292253894ebf3 |
02-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
Revert r124704, which uniqued code-completion strings. The space savings of 25% sounds impressive, except that this amounted to only about 360k in our standard "large" completion result set (40,000 results). Since code completion is performance-sensitive, the 4% slowdown due to uniquing outweighs the 360k benefit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124737 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
|
668fdd8578c85aa2692ffdeb7614acabf1aaab25 |
02-Feb-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Don't warn for -Wnon-virtual-dtor for dependent classes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124735 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
469a1eb996e1cb0be54f9b210f836afbddcbb2cc |
02-Feb-2011 |
John McCall <rjmccall@apple.com> |
An insomniac stab at making block declarations list the variables they close on, as well as more reliably limiting invalid references to locals from nested scopes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124721 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExpr.cpp
emaExprCXX.cpp
|
f7275cd4b930e658930b8a319aa06c0168a4720a |
02-Feb-2011 |
Ted Kremenek <kremenek@apple.com> |
Remove redundant check to not warn for warn_equality_with_extra_parens if we are in a macro. This is checked twice. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124714 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e349d2c61256f11180b7112ab592b4ae700f3dcf |
02-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
Unique code-completion strings. On Cocoa.h, this costs us about 4% in speed but saves us about 25% of the memory usage for strings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124704 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
|
40249e7487c3314f185c63302aaad9edde6dfd53 |
02-Feb-2011 |
John McCall <rjmccall@apple.com> |
When diagnosing address-space changes, apply array-to-pointer decay first. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124702 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
dae687575010c9c49a4b552f5eef82cd6279d9ac |
01-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
Create a special allocator class for code completion, so that all of the string copying goes through a single place that can have associated state. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124698 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
|
006ae38a494d6b2389b7c67728705dc8da996754 |
01-Feb-2011 |
Ted Kremenek <kremenek@apple.com> |
Don't warn about extraneous '()' around a comparison if it occurs within a macro. Macros frequently contain extra '()' to make instantiation less error prone. This warning was flagging a ton of times on postgresql because of its use of macros. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124695 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
cf1620a0ef7f6dc71f4fad5c46fbb0a2de6c6308 |
01-Feb-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Don't warn for "if ((a == b))" if the parens came from a macro. Thanks to Fariborz for the hint! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124689 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
a63f6ded17176845615a7b4e3c3d390862b9a842 |
01-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
Provide constant strings for certain common code completion strings, eliminating the need to copy those strings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124683 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
70f233017bd3091137dcfbc00f6b2baea56edba9 |
01-Feb-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
For "if ((a == b))" only warn if 'a' is a modifiable l-value. Caught by John! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124675 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
218937c13ef5b0625a70aad41ca7a92da9278bd2 |
01-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
Allocate CodeCompletionString and all of its components in a BumpPtrAllocator, rather than manually new/delete'ing them. This optimization also allows us to avoid allocating memory for and copying constant strings (e.g., "return", "class"). This also required embedding the priority and availability of results within the code completion string, to avoid extra memory allocation within libclang. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124673 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
|
0e2dc3a1159806c8303b0979be1ce1526cc64ed3 |
01-Feb-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Warn for "if ((a == b))" where the equality expression is needlessly wrapped inside parentheses. It's highly likely that the user intended an assignment used as condition. Addresses rdar://8848646. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124668 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
63b54104700873dc4a5b95b3108052580b5370e7 |
01-Feb-2011 |
Ted Kremenek <kremenek@apple.com> |
Add temporary hack to -Wuninitialize to create a separate CFG (for C++ code) that doesn't include implicit dtors. Implicit dtors confuse the ad hoc path-sensitivity of UninitializedValuesV2.cpp. This isn't the ideal solution, as it will directly impact compile time, but should significantly reduce the noise of -Wuninitialized on some code bases. This immediately "fixes" the false positive reported in PR 9063, although this isn't the right fix in the long run. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124667 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
d880f52be3e4a8ccad92ac31932eeae5e0870a93 |
01-Feb-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement access checking for the "delete" operator. Fixes PR9050, from Alex Miller! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124663 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
cde5a400dbc9655eddf0f383585d3cf67c11c539 |
01-Feb-2011 |
John McCall <rjmccall@apple.com> |
The code trying to assign a typedef to an anonymous tag declaration was extremely rambunctious, both on parsing and on template instantiation. Calm it down, fixing an internal consistency assert on anonymous enum instantiation manglings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124653 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplateInstantiateDecl.cpp
|
65e7a9e0597fdd68caa23d49991f3891e724e5c6 |
01-Feb-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
When initializing struct members, the important thing is that the "initializing" expression is compatible, not having the same type. Fix rdar://8183908 in which compatible vector types weren't initialized properly leading to a crash. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124637 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
86c05f3f28bcf07c97dfb1881686fc43be2f47c2 |
01-Feb-2011 |
John McCall <rjmccall@apple.com> |
Perform the bad-address-space conversions check as part of CheckPointerTypesForAssignment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124632 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaExpr.cpp
|
293a45e724a15fb58b8805a5791f9f3aee769cf6 |
01-Feb-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Improve the diagnostic for -Wcustom-atomic-properties. Suggestion by Fariborz! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124620 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
e4be87eb661ff12524074184f43b9d11d06ad376 |
01-Feb-2011 |
John McCall <rjmccall@apple.com> |
Make Check*PointerTypesForAssignment private and tell them that they're working on canonical types already. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124618 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b6cfa24fe6c7a27e9bbaebc0cd28c857d11d6060 |
31-Jan-2011 |
John McCall <rjmccall@apple.com> |
Slightly reorganize CheckAssignmentConstraints and remove some redundant logic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124615 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
94659e4bdb87534f591ae185812548c42d6efacb |
31-Jan-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Add -Wcustom-atomic-properties which warns if an atomic-by-default property has custom getter or setter. The rationale is that it is highly likely that the user's getter/setter isn't atomically implemented. Off by default. Addresses rdar://8782645. -Wcustom-atomic-properties and -Wimplicit-atomic-properties are under the -Watomic-properties group. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124609 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
395cc3728047b999cafe2a640147a20f1a8d4696 |
31-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement reasonable conversion ranking for Objective-C pointer conversions (<rdar://problem/8592139>) for overload resolution. The conversion ranking mirrors C++'s conversion ranking fairly closely, except that we use a same pseudo-subtyping relationship employed by Objective-C pointer assignment rather than simple checking derived-to-base conversions. This change covers: - Conversions to pointers to a specific object type are better than conversions to 'id', 'Class', qualified 'id', or qualified 'Class' (note: GCC doesn't perform this ranking, but it matches C++'s rules for ranking conversions to void*). - Conversions to qualified 'id' or qualified 'Class' are better than conversions to 'id' or 'Class', respectively. - When two conversion sequences convert to the same type, rank the conversions based on the relationship between the types we're converting from. - When two conversion sequences convert from the same non-id, non-Class type, rank the conversions based on the relationship of the types we're converting to. (note: GCC allows this ranking even when converting from 'id', which is extremeley dangerous). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124591 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
9641fc8e43f53b1ae8ed7742017e0a320d75fa8a |
31-Jan-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Only warn for -Wnon-virtual-dtor for public destructors. Thanks to Benjamin Kramer for the hint! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124585 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
683a81f4373cf1fa9d41a751dca6f7c36125b058 |
31-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement the suggested resolution to core issue 547, extended to also allow ref-qualifiers on function types used as template type arguments. GNU actually allows cv-qualifiers on function types in many places where it shouldn't, so we currently categorize this as a GNU extension. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124584 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
def4e2a405a15eb8381ca305725285d27a4bab65 |
31-Jan-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Warn if the class has virtual methods but non-virtual destructor. Addresses rdar://8756445. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124582 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
36eb5e43bcdbe291da4df696755009ffd6a35ac2 |
31-Jan-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Don't warn that variables in C++ static member functions shadow fields. Fixes rdar://8900456. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124581 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
49a61727986332f2eba61fb2657800d76c5a4bb9 |
31-Jan-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Fix the diagnostic when we are shadowing an external variable and there exists a locally scoped extern with the same name. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124580 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
6684d85e9075e3c1750d911c69a517145a82a410 |
31-Jan-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Diagnose if extern local variable is followed by non-extern and vice-versa. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124579 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
6df96e0756f62edc859d649069daf523536c4221 |
31-Jan-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
'extern' variables in functions don't shadow externs in global scope. Fixes rdar://8883302. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124578 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
43f0a7c8e06e55092b43d4dd46fe09a4d57298e9 |
31-Jan-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
If there were errors, disable 'unused' warnings since they will mostly be noise. Fixes rdar://8736362. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124577 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
6ad5df132a0bcb3f6975362901270be5bf60dc56 |
31-Jan-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Error for use of field from anonymous struct or union should say "invalid use of nonstatic data member" not "call to non-static member function without an object argument". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124576 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
0413db4a26b0a1577b75c2979b0eb21f3490d17a |
31-Jan-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Amazing that there are still issues with the fields of anonymous struct/unions.. Allow taking the address of such a field for a pointer-to-member constant. Fixes rdar://8818236. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124575 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
6d7f8473cd6e967b3676948894ce72472102f9cb |
30-Jan-2011 |
Anders Carlsson <andersca@mac.com> |
When building with optimizations, emit vtables where the key is not in the current translation unit as available_externally. This helps devirtualize the second example in PR3100, comment 18: struct S { S() {}; virtual void xyzzy(); }; inline void foo(S *s) { s->xyzzy(); } void bar() { S s; foo(&s); } This involved four major changes: 1. In DefineUsedVTables, always mark virtual member functions as referenced for non-template classes and class template specializations. 2. In CodeGenVTables::ShouldEmitVTableInThisTU return true if optimizations are enabled, even if the key function is not implemented in this translation unit. We don't ever do this for code compiled with -fapple-kext, because we don't ever want to devirtualize virtual member function calls in that case. 3. Give the correct linkage for vtables where the key function is not defined. 4. Update the linkage for RTTI structures when necessary. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124565 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
d89d30fdd9e3061fb100fb8f976aab5c6cf2c901 |
28-Jan-2011 |
John McCall <rjmccall@apple.com> |
Fix some corner cases in the __is_base_of logic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124505 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
b608b987718c6d841115464f79ab2d1820a63e17 |
28-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Give OpaqueValueExpr a source location, because its source location might be queried in places where we absolutely require a valid location (e.g., for template instantiation). Fixes some major brokenness in the use of __is_convertible_to. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124465 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaExpr.cpp
emaExprCXX.cpp
emaObjCProperty.cpp
|
70a21de5b4c6ca4883ed58093e71e7884d5218fb |
28-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Allow elision of invocations of move constructors from temporary objects. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124455 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
1eee5dc0465c0ab4810e21d365e881152d7f53c0 |
27-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Teach the evaluation of the __is_convertible_to trait to translate access control errors into SFINAE errors, so that the trait provides enough support to implement the C++0x std::is_convertible type trait. To get there, the SFINAETrap now knows how to set up a SFINAE context independent of any template instantiations or template argument deduction steps, and (separately) can set a Sema flag to translate access control errors into SFINAE errors. The latter can also be useful if we decide that access control errors during template argument deduction should cause substitution failure (rather than a hard error) as has been proposed for C++0x. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124446 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaExprCXX.cpp
emaTemplateInstantiate.cpp
|
418df343bb50802586d20aae3b83e2eb44c6c828 |
27-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Separate the access-control diagnostics from other diagnostics that do not have SFINAE behavior. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124441 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
a0506183a4c1340d7b91125fb41280b3b6619cfa |
27-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Document some serious badness in our evaluation of the type traits: we need to be sure we have complete types in many cases git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124428 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
9f3611365d0f2297a910cf246e056708726ed10a |
27-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement the Microsoft __is_convertible_to type trait, modeling the semantics after the C++0x is_convertible type trait. This implementation is not 100% complete, because it allows access errors to be hard errors (rather than just evaluating false). Original patch by Steven Watanabe! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124425 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
63e7d25d2e6036616b42f744fd4a39cd5f911960 |
27-Jan-2011 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Fixed parameter names. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124408 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
b7ee2e5cc999a45ec4fd7b879477816714aabb7e |
27-Jan-2011 |
Jeffrey Yasskin <jyasskin@google.com> |
Revert r124217 because it didn't catch the actual error case it was trying to catch: lock_guard(my_mutex); declares a variable instead of creating a temporary. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124398 91177308-0d34-0410-b5e6-96231b3b80d8
ttributeList.cpp
emaDeclAttr.cpp
emaExprCXX.cpp
|
2a5c45b1ae4406459fbb39cb477951987c59cb0f |
27-Jan-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Allow #pragma unused to be used on global variables like gcc. Fixes rdar://8793832. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124383 91177308-0d34-0410-b5e6-96231b3b80d8
emaAttr.cpp
|
6ec278d1a354517e20f13a877481453ee7940c78 |
27-Jan-2011 |
John McCall <rjmccall@apple.com> |
Do a proper recursive lookup when deciding whether a class's usual deallocation function has a two-argument form. Store the result of this check in new[] and delete[] nodes. Fixes rdar://problem/8913519 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124373 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
dfbb02a16ac8c764b5ba1742450513d6212d2f9f |
27-Jan-2011 |
NAKAMURA Takumi <geek4civic@gmail.com> |
Fix whitespace. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124364 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaInit.cpp
emaLookup.cpp
emaOverload.cpp
emaStmt.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
|
0099530a2288df7c2140dd8992b7310b9f6930a9 |
27-Jan-2011 |
NAKAMURA Takumi <geek4civic@gmail.com> |
7bit-ize. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124363 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaInit.cpp
emaLookup.cpp
emaOverload.cpp
emaStmt.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
|
eb7a779365c08f8f363e679a9f9fa389f22c7982 |
27-Jan-2011 |
Ted Kremenek <kremenek@apple.com> |
Tweak -Wuninitialized fixit for '_Bool' types to be initialized to 0, and C++ 'bool' types to false. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124356 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
2c3af5c0db9ac169dcf464276178a3172a1a5cf4 |
27-Jan-2011 |
Ted Kremenek <kremenek@apple.com> |
Teach -Wuninitialized to suggest "= false" for initializing bool variables. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124352 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
fd1a8fd240c8067e286e3881aac2bd8b700517d3 |
27-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
When we run into a template parameter that should have a default argument but doesn't (because previous template parameters had default arguments), clear out all of the default arguments so that we maintain the invariant that a template parameter has a default argument only if subsequence template parameters also have default arguments. Fixes a crash-on-invalid <rdar://problem/8913649>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124345 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
944aa60777e6ea1015c9423107f7925f6d91f4a0 |
27-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Cope with parenthesized function declarators when emitting a diagnostic about ref-qualifiers where they do not belong. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124344 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
14d0aee957f11b9613fa4312919bec3cc5456a1c |
27-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Fix a horrible bug in our handling of C-style casting, where a C-style derived-to-base cast that also casts away constness (one of the cases for static_cast followed by const_cast) would be treated as a bit-cast rather than a derived-to-base class, causing miscompiles and heartburn. Fixes <rdar://problem/8913298>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124340 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
emaTemplate.cpp
|
b145ee6cc7d7db42ca4351ff3fe91f04e86a2f67 |
26-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement the restriction that a function with a ref-qualifier cannot overload a function without a ref-qualifier (C++0x [over.load]p2). This, apparently, completes the implementation of rvalue references for *this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124321 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
8ec14e605725a87991f622d63f547f877ba59fef |
26-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Handle C-style casts to rvalue reference types that cast away constness. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124319 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
fcab48b626b7ce43625958e857061d721a43a5bc |
26-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Rvalue references for *this: explicitly keep track of whether a reference binding is for the implicit object parameter of a member function with a ref-qualifier. My previous comment, that we didn't need to track this explicitly, was wrong: we do in fact get rvalue-references-prefer-rvalues overloading with ref-qualifiers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124313 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
2c9a03f3b249e4d9d76eadf758a33142adc4d0a4 |
26-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Rvalue references for *this: implement the implicit conversion rules for the implicit object argument to a non-static member function with a ref-qualifier (C++0x [over.match.funcs]p4). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124311 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
57c9f4f278fe15dc4964f2999486ffdbabce635c |
26-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Rvalue references for *this: allow functions to be overloaded based on the presence and form of a ref-qualifier. Note that we do *not* yet implement the restriction in C++0x [over.load]p2 that requires either all non-static functions with a given parameter-type-list to have a ref-qualifier or none of them to have a ref-qualifier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124297 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
e3c7a7ca66c02567543dbb5ec493818e00e8b177 |
26-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Rvalue references for *this: tentative parsing and template argument deduction. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124295 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
6b4df91dc4ed4a3fc78587c49a3ed3df96b65d9c |
26-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Reference qualifiers for *this: implement C++0x [expr.mptr.oper]p6, the restrictions on .* and ->* for ref-qualified pointer-to-member functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124294 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
440a48318c53647d6416bcb1ff1af1452aa5d453 |
26-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Reinstate r124236 (tweaking the rvalue-reference overload resolution rules), now that we've actually have a clean build for me to sully. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124290 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
c938c1668b4fd12af154e965dd935a89e4801a70 |
26-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Rvalue references for *this: - Add ref-qualifiers to the type system; they are part of the canonical type. Print & profile ref-qualifiers - Translate the ref-qualifier from the Declarator chunk for functions to the function type. - Diagnose mis-uses of ref-qualifiers w.r.t. static member functions, free functions, constructors, destructors, etc. - Add serialization and deserialization of ref-qualifiers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124281 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplateDeduction.cpp
emaType.cpp
reeTransform.h
|
5811f5978feaa7b89bd89e174fa7ad077b48413e |
26-Jan-2011 |
Ted Kremenek <kremenek@apple.com> |
Teach -Wreturn-type that destructors can appear after a 'return' in a CFGBlock. This accidentally was working before, but the false assumption that 'return' always appeared at the end of the block was uncovered by a recent change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124280 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
83f51722ed2b8134810cb178f39e44da811de7cd |
26-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Rvalue references for *this: parse ref-qualifiers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124276 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
emaDecl.cpp
emaType.cpp
|
a4356adfd4a79bd63f86e2b30878795ce7b9b0a6 |
26-Jan-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Correct r124242 making sure function chunk that gets diagnosed is really about the block. Clairvoyance by John! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124264 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
d0fbadd012ba0a3a23af7af56837b7ef9b0637ac |
26-Jan-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Tweak the rule for deciding if a provisional ivar is needed in default ivar synthesis. Fixes // rdar://8913053. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124258 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
4d4feead7e240bf24264658b5abb0b88d52ed684 |
26-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Speculatively revert r124236 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124247 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
ce95566b36a4ff16e90507633dad8b7a76572999 |
26-Jan-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Diagnose calling convention attribute incompatibilities. Fixes rdar://8876096. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124244 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
df8dc5d772d23bb760aeeda374c39001d12e4497 |
26-Jan-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Fix infinite loop during error diagnostics. Fixes rdar://8875304. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124243 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
98650449dc769dd6217f183c846dcaf9e6f94930 |
26-Jan-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Change error "function cannot return array type" -> "blocks cannot return array type" when blocks are involved. Addresses rdar://8876238. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124242 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
f39e6a388aaa2f155b46c61e655784b2473218eb |
25-Jan-2011 |
Ted Kremenek <kremenek@apple.com> |
Fix regression in -Wreturn-type caused by not handling all CFGElement kinds. While writing the test case, it turned out that return-noreturn.cpp wasn't actually testing anything since it has the wrong -W flag. That uncovered another regression with the handling of destructors marked noreturn. WIP. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124238 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
b7cd135215501a154eb4f68159f3af020783099e |
25-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Speculatively implement a tweak to the C++0x overload resolution rules for reference binding (C++ [over.rank.ics]p3b1sb4), so that we prefer the binding of an lvalue reference to a function lvalue over the binding of an rvalue reference. This change resolves the ambiguity with std::forward and lvalue references to function types in a way that seems consistent with the original rvalue references proposal. My proposed wording for this change is shown in isBetterReferenceBindingKind(); we'll try to get this change adopted in the C++0x working paper as well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124236 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
c60e13aeff96515d27638129154b1308c15ded3d |
25-Jan-2011 |
Jeffrey Yasskin <jyasskin@google.com> |
Add an attribute to forbid temporary instances of a type. This allows class authors to write class __attribute__((forbid_temporaries)) Name { ... }; when they want to force users to name all variables of the type. This protects people from doing things like creating a scoped_lock that only lives for a single statement instead of an entire scope. The warning produced by this attribute can be disabled by -Wno-forbid-temporaries. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124217 91177308-0d34-0410-b5e6-96231b3b80d8
ttributeList.cpp
emaDeclAttr.cpp
emaExprCXX.cpp
|
48a4ce7d484a448490edfe9e1d47b806cee85f30 |
25-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Fix the ranking of reference bindings during overload resolution (C++0x [over.ics.rank]p3) when one binding is an lvalue reference and the other is an rvalue reference that binds to an rvalue. In particular, we were using the predict "is an rvalue reference" rather than "is an rvalue reference that binds to an rvalue", which was incorrect in the one case where an rvalue reference can bind to an lvalue: function references. This particular issue cropped up with std::forward, where Clang was picking an std::forward overload while forwarding an (lvalue) reference to a function. However (and unfortunately!), the right answer for this code is that the call to std::forward is ambiguous. Clang now gets that right, but we need to revisit the std::forward implementation in libc++. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124216 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
a8c17a5babab35f2db26bf218e7571d1af4afedf |
25-Jan-2011 |
Ted Kremenek <kremenek@apple.com> |
Teach -Wuninitialized-experimental to also warn about uninitialized variables captured by blocks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124213 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
c21c7e9c2cded68f91be15be6847c9649242dc17 |
25-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Teach TemplateSpecializationTypeLoc::initializeArgLocs() to actually generate meaningful [*] template argument location information. [*] Well, as meaningful as possible, given that this entire code path is a hack for when we've lost type-source information. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124211 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaType.cpp
reeTransform.h
|
a5c6c2a84cde5c9b8f8ec0610a9f89ffd54f44ee |
25-Jan-2011 |
Anders Carlsson <andersca@mac.com> |
Don't insert class templates into the DynamicClasses vector. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124201 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDeclCXX.cpp
|
ae201f75e56f33278b2d48396b35bfa74c32af63 |
25-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Be a bit more defensive about setting the temporary base location during template instantiation. This code needs to eventually die, but this little tweak fixes PR8629, where bad location information slipped through to the location of a class template instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124199 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
73b3cf6503f72f054288cf474e1a8c8ae56383c2 |
25-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement the rvalue-reference deduction transformation (from T&& -> T) when taking the address of an overloaded function or matching a specialization to a template (C++0x [temp.deduct.type]p10). Fixes PR9044. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124197 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
88b22a432549e315662f96abe148923c921970cb |
25-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
When performing a glvalue-to-xvalue static_cast that involves a derived-to-base conversion, set the cast kind and base path appropriately. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124189 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
c7ad38168d329d778e884a8b6400bcbed8dc85ee |
25-Jan-2011 |
John McCall <rjmccall@apple.com> |
Add the ns_consumes_self, ns_consumed, cf_consumed, and ns_returns_autoreleased attributes for the benefit of the static analyzer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124174 91177308-0d34-0410-b5e6-96231b3b80d8
ttributeList.cpp
emaDeclAttr.cpp
|
5af1f066230be7571cffb408048479ad0f06f75e |
25-Jan-2011 |
Eric Christopher <echristo@apple.com> |
Revert r124146 for now. It appears to be failing on a few platforms. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124153 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e07ae4ee00baedcfc2c59fb2a7500dbec08371e9 |
24-Jan-2011 |
Anton Yartsev <anton.yartsev@gmail.com> |
pre/post increase/decrease for AltiVec vectors git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124146 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
446e4029c75b651475e9055dc9dd18fbc7b6dabe |
24-Jan-2011 |
Nick Lewycky <nicholas@mxc.ca> |
Enhance the diagnostic for referring to a typedef with an elaborated name to be as useful in a templated context as it is without templates. Fixes PR8755! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124136 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
5505c72695161e2fb55391d1453b82b7adbff923 |
24-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Disallow function template partial specializations, from Hans Wennborg! Fixes PR8295. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124135 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
cb88a1f968c3d4eb451dafb421a8d9578edcbf1a |
24-Jan-2011 |
Anders Carlsson <andersca@mac.com> |
Use attributes for all the override control specifiers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124122 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
8dde14e7f43a4b29e592b3e8e576eb467ddb6c6e |
24-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Re-instate r123977/r123978, my updates of the reference-binding implementation used by overload resolution to support rvalue references. The original commits caused PR9026 and some hard-to-reproduce self-host breakage. The only (crucial!) difference between this commit and the previous commits is that we now properly check the SuppressUserConversions flag before attempting to perform a second user-defined conversion in reference binding, breaking the infinite recursion chain of user-defined conversions. Rvalue references should be working a bit better now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124121 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaTemplate.cpp
|
15e14a289583616e582a23b320933e846a742626 |
23-Jan-2011 |
Anders Carlsson <andersca@mac.com> |
Get rid of [[hiding]], [[override]] and [[base_check]]. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124087 91177308-0d34-0410-b5e6-96231b3b80d8
ttributeList.cpp
emaDecl.cpp
emaDeclAttr.cpp
|
f89e0424b8903438179f4a2f16dddd5e5bdc814e |
23-Jan-2011 |
Anders Carlsson <andersca@mac.com> |
Get rid of the [[final]] C++0x attribute. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124083 91177308-0d34-0410-b5e6-96231b3b80d8
ttributeList.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
|
e00909a6e997ec33d9baa5312e9d27b52a3da770 |
23-Jan-2011 |
Ted Kremenek <kremenek@apple.com> |
Tweak diagnostic: error: no super class declared in @interface for 'XXX' to be: error: 'X' cannot use 'super' because it is a root class The latter explains what the user actually did wrong. Fixes: <rdar://problem/8904409> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124074 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
9577abc63f2c7afe5adf6e4e101ae91d29c3b8a6 |
23-Jan-2011 |
Ted Kremenek <kremenek@apple.com> |
Null initialize a few variables flagged by clang's -Wuninitialized-experimental warning. While these don't look like real bugs, clang's -Wuninitialized-experimental analysis is stricter than GCC's, and these fixes have the benefit of being general nice cleanups. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124072 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplateVariadic.cpp
|
aa23d288be658cca59d2e128954a50e9ada4ef27 |
22-Jan-2011 |
Anders Carlsson <andersca@mac.com> |
Implement [class.derived]p8. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124047 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
7028088b4bce6fa4660232698068d4cc7b0ab698 |
22-Jan-2011 |
Anders Carlsson <andersca@mac.com> |
Mark classes final and/or explicit during class template instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124040 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
dfc2f1035d23e294b298766a3cf51dfe249d53a2 |
22-Jan-2011 |
Anders Carlsson <andersca@mac.com> |
Mark classes as final or explicit. Diagnose when a class marked 'final' is used as a base. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124039 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
cc54d594d4f6509c0e3a8e349e481d9b5d899df6 |
22-Jan-2011 |
Anders Carlsson <andersca@mac.com> |
Parse class-virt-specifier-seqs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124036 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
|
46127a96b6dd6b93aa18d5f7a55bc2db8b52a2c9 |
22-Jan-2011 |
Anders Carlsson <andersca@mac.com> |
More work on ClassVirtSpecifiers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124035 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
|
aa5952c53f6c6a844a22fa2294186e16018b31e1 |
22-Jan-2011 |
Rafael Espindola <rafael.espindola@gmail.com> |
revert r123977 and r123978 to fix PR9026. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124033 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaTemplate.cpp
|
c46bb7d098bf9e9f0258bf2bb97d8f0f7d382288 |
22-Jan-2011 |
Anders Carlsson <andersca@mac.com> |
Start stubbing out a ClassVirtSpecifiers class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124032 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
|
f1602a56f89ac48aa1b5bce42f07ee795e674a6f |
22-Jan-2011 |
Anders Carlsson <andersca@mac.com> |
A member function template cannot be virtual. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124031 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
575d2a30f288ddab2f24a77dfcc71f6f7f808394 |
22-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Update const_cast semantics for rvalue references. Add tests for reinterpret_cast and const_cast using rvalue references. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124007 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
dc843f221c95ed404e681b4d782bc81cba14295b |
22-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Teach static_cast and dynamic_cast about rvalue references. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124006 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
dcfb360f6e1aaab0754a98e1e245c2607c46058a |
21-Jan-2011 |
Ted Kremenek <kremenek@apple.com> |
Provide -Wuninitialized-experimental fixits for floats, and also check if 'nil' is declared when suggesting it for initializing ObjC pointers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124004 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
72dfa27b415b15157a9d1fc33b6ed21f0085bed2 |
21-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
When throwing an elidable object, first try to treat the subexpression as an rvalue per C++0x [class.copy]p33. If that fails, try again with the original subexpression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124002 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
07f402cff25354c5f06f307f19b0c57c09d964bd |
21-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Generalize the NRVO move-construction-based initialization routine. No functionality change git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123996 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
fbb178a0b47fca1b0fb78c5d41198614cf52aa70 |
21-Jan-2011 |
Ted Kremenek <kremenek@apple.com> |
Add basic fixits for -Wuninitialized-experimental to suggest initializations for pointer and ObjC pointer types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123995 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
94b1b4d785bc0f09f6af4be394e59d51f35dda60 |
21-Jan-2011 |
Ted Kremenek <kremenek@apple.com> |
Enhance -Wuninitialized-experimental diagnostics to issue the warning at an uninitialized variable's declaration, but to issue notes at possible uninitialized uses (which could be multiple). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123994 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
cc15f010672a13b38104a32e3cefc7adc07ffbf7 |
21-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement the preference for move-construction over copy-construction when returning an NRVO candidate expression. For example, this properly picks the move constructor when dealing with code such as MoveOnlyType f() { MoveOnlyType mot; return mot; } The previously-XFAIL'd rvalue-references test case now works, and has been moved into the appropriate paragraph-specific test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123992 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
emaStmt.cpp
|
4a46c77813af1241139b81a086b539e4d734cb86 |
21-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
We love parentheses git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123983 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
f5d8f466c3eebaffc51468812bdcbe7f0fe4891a |
21-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Promote the static getNRVOCandidate() function, which computed the NRVO candidate for a return statement, to Sema::getCopyElisionCandidate(), and teach it enough to also determine the NRVO candidate for a throw expression. We still don't use the latter information, however. Along the way, implement core issue 1148, which eliminates copy elision from catch parameters and clarifies that copy elision cannot occur from function parameters (which we already implemented). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123982 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaInit.cpp
emaStmt.cpp
|
b939a1987318f802fd25f89e15ae7d2423161cac |
21-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement core issue 1164, which concerns the partial ordering of f(T&) and f(T&&). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123981 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
b13ede9f440f52ccfce046f1eba98679e9ffc0e6 |
21-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Add test for overload resolution's preference for binding an rvalue reference to an rvalue rather than binding a const-qualified lvalue reference to that rvalue. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123979 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
0baa92292ba26aa4ff1cf202623a2c7dc7c43aaf |
21-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Eliminate an unused variable git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123978 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
68ed68b227c25babfbdd38d9a5b4b423d501951f |
21-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Update the reference-binding implementation used for overload resolution to match the latest C++0x working paper's semantics. The implementation now matching up with the reference-binding implementation used for initialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123977 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaTemplate.cpp
|
2ad746aeb90e86cea7afaf552a02ae3f3b5ec859 |
21-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement the special template argument deduction rule for T&& in a call (C++0x [temp.deduct.call]p3). As part of this, start improving the reference-binding implementation used in the computation of implicit conversion sequences (for overload resolution) to reflect C++0x semantics. It still needs more work and testing, of course. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123966 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaTemplateDeduction.cpp
|
c80e8115278ba1537c8b517a083ecbd0a018b579 |
21-Jan-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
Sema: process non-inheritable attributes on function declarations early This allows us to simplify the handling for the overloadable attribute, removing a number of FIXMEs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123961 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplateInstantiateDecl.cpp
|
60700390a787471d3396f380e0679a6d08c27f1f |
21-Jan-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
Sema: support for processing non-inheritable declaration attributes early git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123960 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
a97d70b7ea9633e8cbf976510d7a9ea66f4ac96c |
21-Jan-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
Generalise support for non-inheritable attributes Inheritable attributes on declarations may be inherited by any later redeclaration at merge time. By contrast, a non-inheritable attribute will not be inherited by later redeclarations. Non-inheritable attributes may be semantically analysed early, allowing them to influence the redeclaration/overloading process. Before this change, the "overloadable" attribute received special handling to be treated as non-inheritable, while all other attributes were treated as inheritable. This patch generalises the concept, while removing a FIXME. Some CUDA location attributes are also marked as non-inheritable in order to support special overloading semantics (to be introduced in a later patch). The patch introduces a new Attr subclass, InheritableAttr, from which all inheritable attributes derive. Non-inheritable attributes simply derive from Attr. N.B. I did not review every attribute to determine whether it should be marked non-inheritable. This can be done later on an incremental basis, as this change does not affect default functionality. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123959 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
fb5d7efc279335bde2cdc0a73da525d6b28201e9 |
21-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Improve the diagnostic that complains about binding an rvalue reference to an lvalue. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123953 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
b2855ad68d93824faf47c09bbef90ba74157f0f4 |
21-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
More work to bring reference binding up to the latest C++0x specification. In particular, an rvalue reference can bind to an initializer expression that is an lvalue if the referent type and the initializer expression type are not reference-related. This is a newer formulation to the previous "rvalue references can never bind to lvalues" rule. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123952 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
564cb06b1f010ab3c5e316ac79ba6cfdd72e9c1d |
21-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
When performing reference binding via a conversion function, perform type checking based on the actual reference type we're trying to bind the result to, rather than stripping the reference. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123950 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
411c25c4512f00e07442e8818d011c7e0902d739 |
21-Jan-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Initialize a variable, found by Ted. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123948 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
8619edd6c5636dcdde75b1151e21029e38592e2f |
21-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Fix a use of uninitialized variables, found by Ted! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123947 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateVariadic.cpp
|
c5db24dfbc860a9fd1501c72f398bf6b6d5b6e0e |
20-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Start refactoring reference binding to more closely match the C++0x working paper's structure. The only functional change here is that we now handling binding to array rvalues, which we would previously reject. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123918 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
2e1c730167d2b978c66558c029d163ffe64b9656 |
20-Jan-2011 |
Anders Carlsson <andersca@mac.com> |
Diagnose when a virtual member function marked final is overridden. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123916 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
69d831645f429d3b806d2ae220aee45ca44f8c6c |
20-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Add some tests for reference-collapsing and referencing binding involving rvalue references, to start scoping out what is and what isn't implemented. In the process, tweak some standards citations, type desugaring, and teach the tentative parser about && in ptr-operator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123913 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
emaType.cpp
|
9eefa229dfb71400a6bbee326420a7f0e2e91f1f |
20-Jan-2011 |
Anders Carlsson <andersca@mac.com> |
When instantiating member functions, propagate whether the member function is marked 'final' and 'override'. Also, call CheckOverrideControl when instantiating member functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123900 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
3ffe183448af7c543a208dd3313a49c83a3ad53e |
20-Jan-2011 |
Anders Carlsson <andersca@mac.com> |
When checking for functions marked override, ignore dependent contexts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123894 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
4ebf1605166e0b6cc967a51429949a0722f79665 |
20-Jan-2011 |
Anders Carlsson <andersca@mac.com> |
Make CheckOverrideControl a member of Sema. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123893 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
9e682d9f567a51f26c3b0673837e23bafdb09c11 |
20-Jan-2011 |
Anders Carlsson <andersca@mac.com> |
Diagnose virtual member functions marked override but not overriding any virtual member functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123888 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
aae5af24f031ad5f17872bd8b27ed5c175c0f90c |
20-Jan-2011 |
Anders Carlsson <andersca@mac.com> |
Only allow virtual member functions to be marked 'override' and 'final'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123882 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
69a87357310260c4b2c5dce2cdcd10c3fd3a0a58 |
20-Jan-2011 |
Anders Carlsson <andersca@mac.com> |
Pass the VirtSpecifiers along to Sema::ActOnCXXMemberDeclarator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123878 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
706df2fb3f00450cea6809c363eee35bfb3e1025 |
20-Jan-2011 |
Rafael Espindola <rafael.espindola@gmail.com> |
Fix PR8884 by skipping transparent contexts. The test is for LikageSpec. I failed to find a case where an enum context would make a difference, but found PR9007 on the way. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123871 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
83eecbefa4931b95231c9f2a61fb7b9b15e00eec |
20-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
When building a user-defined conversion sequence, keep track of the declaration that name lookup actually found, so that we can use it for access checking later on. Fixes <rdar://problem/8876150>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123867 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaOverload.cpp
|
f2ae52605a49e5fc7a581f2c1ae02f1811034578 |
20-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Sema::BuildCXXMemberCallExpr() can fail due to access or ambiguities, so allow it to propagate the failure outward. Fixes the crashing part of <rdar://problem/8876150>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123863 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
|
dfc331e04d4c6a09fb693a15fc5a57d29a198c86 |
20-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Explicitly track the number of call arguments provided when performing overload resolution, so that we only use that number of call arguments for partial ordering. Fixes PR9006, a recent regression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123861 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
5ce5f5221217b64193799c2a4d5aa84432d3fba4 |
19-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Downgrade the "variadic templates are a C++0x feature" error to an ExtWarn. We want variadic templates to be usable in libc++/libstdc++ headers even when we're in C++98/03 mode, since it's the only clean way to implement TR1 <functional>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123852 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
a779d9ca2fdf1247f65de0e6acf2870d8be53ccd |
19-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement basic support for the use of variadic templates and blocks together. In particular: - Handle the use of captured parameter pack names within blocks (BlockDeclRefExpr understands parameter packs now) - Handle the declaration and expansion of parameter packs within a block's parameter list, e.g., ^(Args ...args) { ... }) - Handle instantiation of blocks where the return type was not explicitly specified. (unrelated, but necessary for my tests). Together, these fixes should make blocks and variadic templates work reasonably well together. Note that BlockDeclRefExpr is still broken w.r.t. its computation of type and value dependence, which will still cause problems for blocks in templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123849 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateVariadic.cpp
reeTransform.h
|
6952f1e4256c5b43aee5e98cea4e9b663bd1d413 |
19-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement support for non-type template parameter packs whose type is a pack expansion, e.g., the parameter pack Values in: template<typename ...Types> struct Outer { template<Types ...Values> struct Inner; }; This new implementation approach introduces the notion of an "expanded" non-type template parameter pack, for which we have already expanded the types of the parameter pack (to, say, "int*, float*", for Outer<int*, float*>) but have not yet expanded the values. Aside from creating these expanded non-type template parameter packs, this patch updates template argument checking and non-type template parameter pack instantiation to make use of the appropriate types in the parameter pack. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123845 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
61f438ac38cb7ccd40e77861b19f34553694416f |
19-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
NonTypeTemplateParmDecls always have TypeSourceInfo. There's no sense in pretending otherwise. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123839 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
92c3a04f3ec683f279814b0eb6d6271b3fd3a219 |
19-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Warn about the use of unparenthesized |= in conditionals (which may be a typo for !=). Fixes PR9001, from Hans Wennborg! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123836 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
2998d6b0e6d5476c473f68012a851fe4a0f609c8 |
19-Jan-2011 |
John McCall <rjmccall@apple.com> |
When building the copy expression for a __block variable, make sure there's a respectable point of instantiation. Also, make sure we do this operation even when instantiating a dependently-typed variable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123818 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
3b6575108a5b6d8b92ac3a9a7794bf6c3a210907 |
19-Jan-2011 |
John McCall <rjmccall@apple.com> |
Change the canonical representation of array types to store qualifiers on the outermost array types and not on the element type. Move the CanonicalType member from Type to ExtQualsTypeCommonBase; the canonical type on an ExtQuals node includes the qualifiers on the ExtQuals. Assorted optimizations enabled by this change. getQualifiers(), hasQualifiers(), etc. should all now implicitly look through array types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123817 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
reeTransform.h
|
f4c7371fb1d3cebcfb40abad4537bb82515704ea |
19-Jan-2011 |
John McCall <rjmccall@apple.com> |
Change QualType::getTypePtr() to return a const pointer, then change a thousand other things which were (generally inadvertantly) relying on that. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123814 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaType.cpp
reeTransform.h
|
150e0efec6302fa5a8c3b5c3c4ecf5778d3a29f5 |
19-Jan-2011 |
Logan <tzuhsiang.chien@gmail.com> |
Add build rules for clang executable.
ndroid.mk
|
6e5658dc89671a55a0d0f9514db385d752d6ac08 |
19-Jan-2011 |
NAKAMURA Takumi <geek4civic@gmail.com> |
lib/Sema/SemaExpr.cpp: __null should be LongLongTy on LLP64 Win64. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123791 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
c21fed361c11f13db345cba69101578578d8fb79 |
18-Jan-2011 |
Ted Kremenek <kremenek@apple.com> |
Teach UninitializedValuesV2 to implicitly reason about C++ references by monitoring whether an access to a variable is solely to compute it's lvalue or to do an lvalue-to-rvalue conversion (i.e., a load). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123777 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
e188933adf2cfe2821b8acba2de6d5d152bc246b |
18-Jan-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Properly do a float -> _Complex double conversion, fixes rdar://8875946. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123759 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
62c28c831bbf207cc36e683e7c321fc33bf8928c |
18-Jan-2011 |
John McCall <rjmccall@apple.com> |
Generalize some operations on qualifiers. QualType::getQualifiers() and ::getCVRQualifiers() now look through array types, like all the other standard queries. Also, make a 'split' variant of getUnqualifiedType(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123751 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
dbee3411a22b0dbb03267f5445f7b796104991bb |
18-Jan-2011 |
Francois Pichet <pichet2000@gmail.com> |
Add support for explicit constructor calls in Microsoft mode. For example: class A{ public: A& operator=(const A& that) { if (this != &that) { this->A::~A(); this->A::A(that); // <=== explicit constructor call. } return *this; } }; More work will be needed to support an explicit call to a template constructor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123735 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaOverload.cpp
|
dec0984fce504a39a7f085774fb67cfd9957be58 |
18-Jan-2011 |
Jeffrey Yasskin <jyasskin@google.com> |
Fix warnings found by gcc-4.6, from -Wunused-but-set-variable and -Wint-to-pointer-cast. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123719 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
reeTransform.h
|
22c412060e82dbe577dd8374677219dc68baec87 |
17-Jan-2011 |
Anders Carlsson <andersca@mac.com> |
Handle base and member destructors in CheckFallThrough. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123667 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
b918d0f5d8f147e1e26c34e6cf42a79af2d2ec41 |
17-Jan-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Convert "#pragma unused(...)" into tokens for the parser. This allows us to cache a "#pragma unused" that occurs inside an inline C++ member function. Fixes rdar://8829590&8770988. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123666 91177308-0d34-0410-b5e6-96231b3b80d8
emaAttr.cpp
|
b971dbdb65149a7cf0c046380186d0204e5b411e |
17-Jan-2011 |
Anders Carlsson <andersca@mac.com> |
Change ParseOptionalCXX0XVirtSpecifierSeq to take a VirtSpecifiers struct. Enforce C++[class.mem]p8: A virt-specifier-seq shall contain at most one of each virt-specifier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123611 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
|
0dc5f9aea3597f2ed400dd0c1bf45ebbb4a051f3 |
16-Jan-2011 |
Anders Carlsson <andersca@mac.com> |
Fix a bug where the -Wmissing-noreturn would always treat constructors with base or member initializers as noreturn. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123603 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
2d75bbd36e273f7b958aefc766424220ad158bd9 |
16-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Emit an extension diagnostic for C99 designated initializers that appear in C++ code git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123582 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
9da95e6eefc4b0ca25e18bdab1b703f5c185deab |
16-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Tweak the partial ordering rules for function templates to prefer a non-variadic function template over a variadic one. This matches GCC and the intent of the C++0x wording, in a way that I think is likely to be acceptable to the committee. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123581 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
1aee05d08b2184acadeb36de300e216390780d6c |
15-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Introduce a new kind of TemplateName that captures a substituted template template parameter pack that cannot be fully expanded because its enclosing pack expansion could not be expanded. This form of TemplateName plays the same role as SubstTemplateTypeParmPackType and SubstNonTypeTemplateParmPackExpr do for template type parameter packs and non-type template parameter packs, respectively. We should now handle these multi-level pack expansion substitutions anywhere. The largest remaining gap in our variadic-templates support is that we cannot cope with non-type template parameter packs whose type is a pack expansion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123521 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
reeTransform.h
|
610068c8cd2321f90e147b12cf794e1f840b6405 |
15-Jan-2011 |
Ted Kremenek <kremenek@apple.com> |
Add initial prototype for implementation of -Wuninitialized based on CFG dataflow analysis. WIP. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123512 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
c7793c73ba8a343de3f2552d984851985a46f159 |
15-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Introduce a new expression kind, SubstNonTypeTemplateParmPackExpr, that captures the substitution of a non-type template argument pack for a non-type template parameter pack within a pack expansion that cannot be fully expanded. This follows the approach taken by SubstTemplateTypeParmPackType. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123506 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
reeTransform.h
|
2be29f423acad3bbe39099a78db2805acb5bdf17 |
15-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Teach template template argument pack expansions to keep track of the number of expansions, when we know it, and propagate that information through Sema. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123493 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateInstantiate.cpp
reeTransform.h
|
6a24bfda084f06a0b252b7befe8cbb17fce7f94e |
14-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Handle substitutions into function parameter packs whose patterns contain multiple parameter packs at different levels. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123488 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
689ebfc4fe005591a052f9bc73d462281c12d606 |
14-Jan-2011 |
Ted Kremenek <kremenek@apple.com> |
The variable 'ReusedDecl' is written but never read. Remove this variable (found by clang static analyzer). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123484 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
fe62b0666560adf1e6b35b443eb1a72e006fad2c |
14-Jan-2011 |
Ted Kremenek <kremenek@apple.com> |
The variable 'isTemplateSpecialization' is no longer used; nuke all assignments and its declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123483 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
e6df5f6aa1b1a0bf5d99a5395c11cb2eec152241 |
14-Jan-2011 |
Ted Kremenek <kremenek@apple.com> |
Remove unused store to variable 'Name'. Found by clang static analyzer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123482 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
67fd1251aad51bb80d050b7fa5e506fef0ec8e02 |
14-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Teach PackExpansionExpr to keep track of the number of pack expansions it will expand to, if known. Propagate this information throughout Sema. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123470 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
emaTemplateVariadic.cpp
reeTransform.h
|
07a77b4b1d1fa95930129541eff8b79558f5d80d |
14-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
When we're instantiating a direct variable initializer that has a pack expansion in it, we may end up instantiating to an empty expression-list. In this case, the variable is uninitialized; tweak the instantiation logic to handle this case. Fixes PR8977. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123449 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
cded4f649cd4b7ba7d461c25c6482ef52b8d3a2a |
14-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Keep track of the number of expansions to be produced from a type pack expansion, when it is known due to the substitution of an out parameter pack. This allows us to properly handle substitution into pack expansions that involve multiple parameter packs at different template parameter levels, even when this substitution happens one level at a time (as with partial specializations of member class templates and the signatures of member function templates). Note that the diagnostic we provide when there is an arity mismatch between an outer parameter pack and an inner parameter pack in this case isn't as clear as the normal diagnostic for an arity mismatch. However, this doesn't matter because these cases are very, very rare and (even then) only typically occur in a SFINAE context. The other kinds of pack expansions (expression, template, etc.) still need to support optional tracking of the number of expansions, and we need the moral equivalent of SubstTemplateTypeParmPackType for substituted argument packs of template template and non-type template parameters. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123448 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaTemplateVariadic.cpp
emaType.cpp
reeTransform.h
|
0bc15d92bf98cd01e7904d7fca9895dacc237618 |
14-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Fix a few warnings stemming from my inability to properly fill out switch() statements. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123429 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
c3069d618f4661d923cb1b5c4525b082fce73b04 |
14-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Start implementing support for substitution into pack expansions that involve template parameter packs at multiple template levels that occur within the signatures members of class templates (and partial specializations thereof). This is a work-in-progress that is deficient in several ways, notably: - It only works for template type parameter packs, but we need to also support non-type template parameter packs and template template parameter packs. - It doesn't keep track of the lengths of the substituted argument packs in the expansion, so it can't properly diagnose length mismatches. However, this is a concrete step in the right direction. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123425 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateVariadic.cpp
reeTransform.h
|
c421f546e63b2f85caa1ca0d94d508f99bb871cb |
13-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Only apply the parameter pack matching of C++0x [temp.arg.template]p3 when we're actually matching a template template argument to a template template parameter. Otherwise, use strict matching. Fixes <rdar://problem/8859985> clang++: variadics and out-of-line definitions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123385 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
4f1d282d6f32a419e89ddb56342e2313b0c78bb7 |
13-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Allow us to transform pack expansion expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123349 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
a03478231363c67ea0e1f4bc1bc708e064040e56 |
13-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement C++0x [temp.arg.template]p3, which allows slightly fuzzy matching of variadic template template parameters to template arguments. This paragraph was the subject of ISO C++ committee document N2555: Extending Variadic Template Template Parameters. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123348 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
ab7ddf0e8ad54dd9be8607a683f0810a5192eee2 |
13-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Refactor and simplify Sema::TemplateParameterListsAreEqual. We had a bunch of duplicated checks for parameter pack/non-pack mismatches. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123343 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
1d5d0b9df6d2a3df338bc3e63000536406e7666c |
12-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Add the location of the right parenthesis of a C++ named cast (static_cast, dynamic_cast, reinterpret_cast, or const_cast) to improve source-location information. Fixes PR8960. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123336 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
2fc1bb76e719d0620b4a6e2134413933b21ca6b6 |
12-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Teach TreeTransform how to transform a pack expansion type into another pack expansion type. This can happen when rebuilding types in the current instantiation. Fixes <rdar://problem/8848837> (Clang crashing on libc++ <functional>). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123316 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateVariadic.cpp
reeTransform.h
|
ae278a3a57595349a411f6474938d4dd1b263a0e |
12-Jan-2011 |
John McCall <rjmccall@apple.com> |
Slight bugfix to the attribute-distribution logic for GC attributes. Slight optimization of getObjCGCAttrKind. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123295 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
2432320a996adcfcc5671dd0f309579a2ef2e465 |
12-Jan-2011 |
Francois Pichet <pichet2000@gmail.com> |
Add a comment for r123231. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123291 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
203e6a322ae29d577acafcb1572a57ec16e1e730 |
12-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Add TemplateArgument::CreatePackCopy() to create a new parameter pack in ASTContext-allocated memory, copying the provided template arguments. Use this new routine where we can. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123289 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateDeduction.cpp
|
77d6bb9e223496aa5288294f34e7225d1f65dddc |
11-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement partial ordering of class template partial specializations and function templates that contain variadic templates. This involves three small-ish changes: (1) When transforming a pack expansion, if the transformed argument still contains unexpanded parameter packs, build a pack expansion. This can happen during the substitution that occurs into class template partial specialiation template arguments during partial ordering. (2) When performing template argument deduction where the argument is a pack expansion, match against the pattern of that pack expansion. (3) When performing template argument deduction against a non-pack parameter, or a non-expansion template argument, deduction fails if the argument itself is a pack expansion (C++0x [temp.deduct.type]p22). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123279 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
reeTransform.h
|
5c7bf42ef16dc767615bed10f3b7b3c1265314e1 |
11-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement C++ [temp.func.order]p5 more directly, by passing down the number of explicit call arguments. This actually fixes an erroneous test for [temp.deduct.partial]p11, where we were considering parameters corresponding to arguments beyond those that were explicitly provided. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123244 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
|
2b57aefea762f526405937b3c01901f8e1047edb |
11-Jan-2011 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Added warning about invalid register specification for local variables. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123236 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
a15a5eede90e41ce1bf49ecc42d54895dfd86d15 |
11-Jan-2011 |
Francois Pichet <pichet2000@gmail.com> |
In Microsoft mode, force 64 bit hex integer constants to signed type if the LL or i64 suffix is used. This MSVC behavior. For example: void f(long long){ printf("long long"); } void f(unsigned long long) { printf("unsigned long long"); } int main() { f(0xffffffffffffffffLL); } Will print "long long" using MSVC. This patch also fixes 16 compile errors related to overloading issues when parsing the MSVC 2008 C++ standard lib. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123231 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
483dd2f55ee53bc765123ead3428aa4ad2682cf3 |
11-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Ensure that the result type of an Objective-C class message send is complete. However, if it returns a reference type, don't require the type it refers to to be complete. Fixes <rdar://problem/8807070>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123214 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
21371ea7cf647f4f0f783faac325925cb8febb1c |
11-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
When mapping from a function parameter pack to the set of function parameters it expanded to, map exactly the number of function parameters that were expanded rather than just running to the end of the instantiated parameter list. This finishes the implementation of the last sentence of C++0x [temp.deduct.call]p1. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123213 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
emaTemplateVariadic.cpp
|
7d5c0c1273bdc1cb3dff1cb5a62d07b1439e82c7 |
11-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement the last bullet of [temp.deduct.type]p5 and part of the last sentence of [temp.deduct.call]p1, both of which concern the non-deducibility of parameter packs not at the end of a parameter-type-list. The latter isn't fully implemented yet; see the new FIXME. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123210 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
emaTemplateInstantiateDecl.cpp
|
3cae5c9a79bfd2e27eb44c32b13dfacd2ce5c66f |
10-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement more of C++0x [temp.arg.explicit]p9, allowing extension of pack expansions in template argument lists and function parameter lists. The implementation of this paragraph should be complete *except* for cases where we're substituting into one of the unexpanded packs in a pack expansion; that's a general issue I haven't solved yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123188 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
reeTransform.h
|
0216f8121df32b320cab659d5b703fee50cdfda5 |
10-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Repent for my copy-and-paste sins, factoring out the code that forms argument packs from a set of deduced arguments, then checks that those argument packs match previously-deduced argument packs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123182 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
5429385919a2b6fb3708635b967221705f4b1daf |
10-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Factor out the code to set up template argument deduction for a set of template argument packs. This also ensures that explicitly-specified template arguments get properly represented in those cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123180 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
d3731198193eee92796ddeb493973b7a598b003e |
10-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Work-in-progress implementation of C++0x [temp.arg.explicit]p9, which allows an argument pack determines via explicit specification of function template arguments to be extended by further, deduced arguments. For example: template<class ... Types> void f(Types ... values); void g() { f<int*, float*>(0, 0, 0); // Types is deduced to the sequence int*, float*, int } There are a number of FIXMEs in here that indicate places where we need to implement + test retained expansions, plus a number of other places in deduction where we need to correctly cope with the explicitly-specified arguments when deducing an argument pack. Furthermore, it appears that the RecursiveASTVisitor needs to be auditied; it's missing some traversals (especially w.r.t. template arguments) that cause it not to find unexpanded parameter packs when it should. The good news, however, is that the tr1::tuple implementation now works fully, and the tr1::bind example (both from N2080) is actually working now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123163 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaTemplateVariadic.cpp
reeTransform.h
|
cbb67480094b3bcb5b715acd827cbad55e2a204c |
08-Jan-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Renamed CXXBaseOrMemberInitializer to CXXCtorInitializer. This is both shorter, more accurate, and makes it make sense for it to hold a delegating constructor call. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123084 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaTemplateInstantiateDecl.cpp
|
97fcc4977b21da43ab106607ad472149b7d4785a |
08-Jan-2011 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Check for delegating constructors and (currently) return an error about them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123076 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
eeef924c4fcb79a3bcc8782afce343e641bbcb83 |
08-Jan-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Remove a kludge from analysis based warnings that used to detect temporaries with no-return destructors. The CFG now properly supports temporaries and implicit destructors which both makes this kludge no longer work, and conveniently removes the need for it. Turn on CFG handling of implicit destructors and initializers. Several ad-hoc benchmarks don't indicate any measurable performance impact from growing the CFG, and it fixes real correctness problems with warnings. As a result of turning on these CFG elements, we started to tickle an inf-loop in the unreachable code logic used for warnings. The fix is trivial. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123056 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
65197b4b0c55bb74af0450230d61ee9461223721 |
08-Jan-2011 |
Ted Kremenek <kremenek@apple.com> |
Add semantic checking that the "thousands grouping" prefix in a printf format string is matched with the appropriate conversion specifier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123055 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
91fc73e7ffb1fa1da0276518359d3bd4ed11c843 |
07-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
When instantiating the arguments to an initializer, use the TreeTransform version of TransformExprs() rather than explicit loop, so that we expand pack expansions properly. Test cast coming soon... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123014 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
bd5f9f708aa31920d3bd73aa10fcb5de424c657a |
07-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Fix a valgrind error when transforming function prototypes with function parameter pack expansions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123007 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
12c9c00024a01819e3a70ef6d951d32efaeb9312 |
07-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement substitution of a function parameter pack for its set of instantiated function parameters, enabling instantiation of arbitrary pack expansions involving function parameter packs. At this point, we can now correctly compile a simple, variadic print() example: #include <iostream> #include <string> void print() {} template<typename Head, typename ...Tail> void print(const Head &head, const Tail &...tail) { std::cout << head; print(tail...); } int main() { std::string hello = "Hello"; print(hello, ", world!", " ", 2011, '\n'); } git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123000 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaTemplateVariadic.cpp
reeTransform.h
|
a009b59fc2c550a229b9146aabda8e33fe3a7771 |
07-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Factor out the template transformation of a sequence of function parameters into parameter types, so that substitution of explicitly-specified function template arguments uses the same path. This enables the use of explicitly-specified function template arguments with variadic templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122986 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
reeTransform.h
|
f5c65ffbd7374b6c8d9f1e361041578640cab320 |
06-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement template argument deduction from a call to a function template whose last parameter is a parameter pack. This allows us to form a call to, e.g., template<typename ...Args1, typename ...Args2> void f(std::pair<Args1, Args2> ...pairs); given zero or more instances of "pair". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122973 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaTemplateDeduction.cpp
|
9d156a7b1b2771e191f2f5a45a7b7a694129463b |
06-Jan-2011 |
John McCall <rjmccall@apple.com> |
Introduce an AttributedType, but don't actually use it anywhere yet. The initial TreeTransform is a cop-out, but it's more-or-less equivalent to what we were doing before, or rather what we're doing now and might eventually stop doing in favor of using this type. I am simultaneously intrigued by the possibilities of rebuilding a dependent Attri git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122942 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
0bbacf8d2b3c7a5f19f292f3201e371836445502 |
06-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Fast-path an arity check when performing template argument deduction that compares two parameter-type-lists. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122928 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
c8a16fbb78c0e0ae2d2ebdb00bd6761d9d6714d2 |
06-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Eliminate an unnecessary dance where we tried to cope with the lack of TypeSourceInfo when transforming a function parameter. The callees of this routine already assume that TypeSourceInfo will be present, and we want to always be sure that it exists. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122927 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
603cfb4da2f7ba08a1c3452c2fbf70585b8e7621 |
06-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Initial implementation of function parameter packs. This implementation allows: 1) Declaration of function parameter packs 2) Instantiation of function parameter packs within function types. 3) Template argument deduction of function parameter packs when matching two function types. We're missing all of the important template-instantiation logic for function template definitions, along with template argument deduction from the argument list of a function call, so don't even think of trying to use these for real yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122926 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
reeTransform.h
|
2b77cb803c76d01d2d10a58cec9334e2090cd7c3 |
06-Jan-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Don't warn on missing 'copy' attribute on a 'block' property when it is 'readonly'. // rdar://8820813 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122923 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
7b1cf305c97382676c61ee89cc6d22fc5c26a8ae |
05-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
hasInit() -> hasDefaultArg() git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122905 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
1fe85ea697fb5c85acded3ac0ddbc19f89c2e181 |
05-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Add Decl::isParameterPack(), which covers both function and template parameter packs, along with ParmVarDecl::isParameterPack(), which looks for function parameter packs. Use these routines to fix some obvious FIXMEs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122904 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateVariadic.cpp
|
135ffa7375fb5802b92f42774e02d0e6e4c78e5b |
05-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Propagate the "deduced from array bound" bit when comparing deduced template argument packs. Plus, remove a FIXME that I fixed yesterday. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122903 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
d53e16abd1dcaa2942d5183f48e7f63d0e75b35a |
05-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
When we're converting deduced template arguments to the type of the corresponding template parameter, make sure that prior converted template arguments are available for substitution. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122902 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
b1fa3dc2f914aaa8b5a851c6b5115ec239d20495 |
05-Jan-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Use the proper enum as parameter, instead of unsigned. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122900 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
1d65ebba273e6797902dcfa93964bae5ca0fe8d2 |
05-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Eliminate two "unsupported" errors relating to variadic templates: one for template template argument pack expansions (which was no longer used) and another that was a placeholder for an llvm_unreachable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122898 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
a7fc901a2e39bfe55bfcff5934b2d9fdf9656491 |
05-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Replace the representation of template template argument pack expansions with something that is easier to use correctly: a new template argment kind, rather than a bit on an existing kind. Update all of the switch statements that deal with template arguments, fixing a few latent bugs in the process. I"m happy with this representation, now. And, oh look! Template instantiation and deduction work for template template argument pack expansions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122896 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
reeTransform.h
|
ba68eca7582a62e3e2ff4b0eba1b2b73a6b80895 |
05-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Add semantic analysis for the creation of and an AST representation for template template argument pack expansions. This allows fun such as: template<template<class> class ...> struct apply_impl { /*...*/ }; template<template<class> class ...Metafunctions> struct apply { typedef typename apply_impl<Metafunctions...>::type type; }; However, neither template argument deduction nor template instantiation is implemented for template template argument packs, so this functionality isn't useful yet. I'll probably replace the encoding of template template argument pack expansions in TemplateArgument so that it's harder to accidentally forget about the expansion. However, this is a step in the right general direction. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122890 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateVariadic.cpp
|
b49e41548d2392f1ce5488264a98685d98f90384 |
05-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Update C++ [temp.param]p11 citation to reflect the changes in C++0x. No functionality change git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122878 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
1ed64765624d6f5226dd213e220e038b459972d1 |
05-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement C++0x [temp.param]p11 for non-type and template template parameter packs. Also, the "no template parameters after a template parameter pack" rule only applies to primary class templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122877 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
f457c1a0a46d11623c3d4594b57dff7f5a1151da |
05-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement proper parameter pack matching for non-type template parameters and template template parameters. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122875 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
61c4d28e36cd3f1be392cb77f07436d1fa6b0f9f |
05-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement support for template template parameter packs, e.g., template<template<class> class ...Metafunctions> struct apply_to_each; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122874 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaTemplateVariadic.cpp
|
07fa2fa8b9a0f7982a31e12f4164550d004543ae |
05-Jan-2011 |
John McCall <rjmccall@apple.com> |
Fix the -Asserts build. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122872 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
711c52bb20d0c69063b52a99826fb7d2835501f1 |
05-Jan-2011 |
John McCall <rjmccall@apple.com> |
Refactor the application of type attributes so that attributes from the declaration-specifiers and on the declarator itself are moved to the appropriate declarator chunk. This permits a greatly simplified model for how to apply these attributes, as well as allowing a much more efficient query for the GC attribute. Now all qualifier queries follow the same basic strategy of "local qualifiers, local qualifiers on the canonical type, then look through arrays". This can be easily optimized by changing the canonical qualified-array-type representation. Do not process type attributes as decl attributes on declarations with declarators. When computing the type of a block, synthesize a prototype function declarator chunk if the decl-spec type was not a function. This simplifies the logic for building block signatures. Change the logic which inserts an objc_read_weak on a block literal to only fire if the block has a __weak __block variable, rather than if the return type of the block is __weak qualified, which is not actually a sensible thing to ask. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122871 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaExpr.cpp
emaStmt.cpp
emaType.cpp
reeTransform.h
|
2fdc5e8199e1e239620f2faae88997153703e16f |
05-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Many of the built-in operator candidates introduced into overload resolution require that the pointed-to type be an object type, but we weren't filtering out non-object types. Do so, fixing PR7851. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122853 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaTemplateDeduction.cpp
|
a8311be2b85171e41cc82de12cdb43eaa026ce6e |
05-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Eliminate some completely useless code that attempted to perform some conversions on the substituted non-type template arguments of a class template partial specialization. C++ [temp.class.spec]p8 actually prohibits all of the cases where this code would have fired. Hey, it's better than having to deal with variadic templates here! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122852 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
54c53cca105ed595e12fecf04e415c3712bda936 |
05-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Improve our handling of non-type template parameters in partial specializations. We weren't dealing with any of the cases where the type of the non-type template argument differs from the type of the corresponding template parameter in the primary template. We would think that the template parameter in the partial specialization was not deducible (and warn about it, incorrectly), then fail to convert a deduced parameter to the type of the template parameter in the partial specialization (which may involve truncation, among other things). Fixes PR8905. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122851 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
|
5471cbc0bdbe9d6711907a8c5251daed0155c306 |
04-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Remove an unnecessary FIXME for variadic templates git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122848 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
033a3cad525e5b221ba035ffc3e0abfa1241d90e |
04-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Minor cleanups for template argument deduction in the presence of variadic templates. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122847 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
b9a7d6fb53f2b76df2ef832146a1edb4cb01b9f6 |
04-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Improve the checking of deduced template arguments stored within template argument packs when finishing template argument deduction for a function template git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122843 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
ee8aff06f6a96214731de17b2cb6df407c6c1820 |
04-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement the sizeof...(pack) expression to compute the length of a parameter pack. Note that we're missing proper libclang support for the new SizeOfPackExpr expression node. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122813 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateVariadic.cpp
reeTransform.h
|
bb03f5dbc23fb9aa1dfdf6a1dfdb192aa56b6b1c |
04-Jan-2011 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Prefer getAs<ComplexType> rather than cast<ComplexType> on canonical type. Suggestion by Douglas Gregor! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122807 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
9f7a6eeee441bcbb1b17208cb3abd65a0017525a |
04-Jan-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Implement -Wself-assign, which warns on code such as: int x = 42; x = x; // Warns here. The warning avoids macro expansions, templates, user-defined assignment operators, and volatile types, so false positives are expected to be low. The common (mis-)use of this code pattern is to silence unused variable warnings, but a more idiomatic way of doing that is '(void)x;'. A follow-up to this will add a note and fix-it hint suggesting this replacement in cases where the StmtExpr consists precisely of the self assignment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122804 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b2b5cc0cf908d516a107d373db963f692449a8a8 |
04-Jan-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Enhance the diagnostic for negative array sizes to include the declaration name of the array when present. This ensures that a poor-man's C++03 static_assert will include the user error message often embedded in the name. Update all the tests to reflect the new wording, and add a test for the name behavior. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122802 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
3fb9e4b89f72823f162096086f0f964e6dcf66d6 |
04-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement pack expansion of base initializers, so that we can initialize those lovely mixins that come from pack expansions of base specifiers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122793 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
f90b27ad077c3339b62befc892382845339f9490 |
03-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement pack expansions whose pattern is a base-specifier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122782 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplateInstantiate.cpp
emaTemplateVariadic.cpp
|
0fe5397b26695926a835fa99eceb7fc879b307af |
03-Jan-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
When in code-completion, skip obj-c method bodies for speed up. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122781 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
7a21fd45d4f04643cbfb5df96a01f84bc6d3dd14 |
03-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Properly rebuild pack expansions whose pattern is a non-type template argument. As part of this, be more careful when determining if there are any parameter packs that cannot be expanded. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122776 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateVariadic.cpp
reeTransform.h
|
bacb9493770ff19cfd8f7bc46a075f14b4d08159 |
03-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Unwrap template argument packs when checking the template arguments of a class template partial specialiation, and look through pack expansions when checking the conditions of C++0x [temp.class.spec]p8. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122774 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
925910d488051cbd4e38f350c1e9d69c473f09a0 |
03-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Diagnose the presence of unexpanded parameter packs within class template partial specialization arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122769 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateVariadic.cpp
|
dcaa1ca0b475dfa887e1d061678a1e3501288510 |
03-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement support for pack expansions in initializer lists and expression lists. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122764 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
ef9d09c4699a2a61d6f28b59b7583b2b28c0a531 |
03-Jan-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Fix PR8841 by checking for both semantic and lecical dependent contexts. This prevents -Wunused-function from firing on friend function definitions inside of class templates for example. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122763 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
aa165f8458b51c546bebff947343e1a36f3594cb |
03-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Refactor the tree transform's many loops over sets of expressions (transforming each in turn) into calls into one central routine (TransformExprs) that transforms a list of expressions. This refactoring is preparatory work for pack expansions whose in an expression-list. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122761 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
e776f88430eb77ce8d58f2e6ec10da1383b71de8 |
03-Jan-2011 |
Fariborz Jahanian <fjahanian@apple.com> |
Guard lazy synthesis of provisional ivars under the new -fobjc-default-synthesize-properties flag. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122757 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaObjCProperty.cpp
|
be230c36e32142cbdcdbe9c97511d097beeecbab |
03-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Implement support for pack expansions whose pattern is a non-type template argument (described by an expression, of course). For example: template<int...> struct int_tuple { }; template<int ...Values> struct square { typedef int_tuple<(Values*Values)...> type; }; It also lays the foundation for pack expansions in an initializer-list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122751 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
emaTemplateVariadic.cpp
reeTransform.h
|
6b9109e9d5446f213b12d2a6b76495bffb06b794 |
03-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
When we attempt to create a built-in that involves a library type we don't have access to (e.g., fprintf, which needs the library type FILE), fail with a warning and forget about the builtin entirely. Previously, we would actually provide an error, which breaks autoconf's super-lame checks for fprintf, longjmp, etc. Fixes PR8316. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122744 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaLookup.cpp
|
a96022c365a183f89ea81fa3f294ee7f436556b9 |
02-Jan-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
Funciton -> Function git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122709 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
743b82bf3c500de45715498dbf25f0fb39e71462 |
02-Jan-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
Unkown -> Unknown git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122708 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaExpr.cpp
|
8595a0ced701415d5194d9bdd6b47b5de6fce504 |
02-Jan-2011 |
Francois Pichet <pichet2000@gmail.com> |
Remove obsolete comments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122686 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
baf86955a9a390f2643a1ea9806832eb4a92f716 |
01-Jan-2011 |
Rafael Espindola <rafael.espindola@gmail.com> |
Produce a better error message for invalid register names. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122670 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f57258bb96799957085080027a9c9eefe36c3417 |
31-Dec-2010 |
Francois Pichet <pichet2000@gmail.com> |
MSVC doesn't require an accessible copy-constructor when binding a temporary class object to a const-reference. Note: this is not a C++0x behavior change, it was already like that in MSVC 2003. This fixes a compile error when parsing MSVC header files with clang. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122644 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
4b0766f95883b7c5ffc1953f1d02d348f157c811 |
28-Dec-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Canonicalize types before possible cast. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122592 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
6915c529dbb43073dad148c2e83a1c56bfcc05c8 |
27-Dec-2010 |
Francois Pichet <pichet2000@gmail.com> |
More __uuidof validation: 1. Do not validate for uuid attribute if the type is template dependent. 2. Search every class declaration and definition for the uuid attribute. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122578 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
7f040a9d817cd1c72b565e92abff473510bf9e1d |
24-Dec-2010 |
John McCall <rjmccall@apple.com> |
Refactor how we collect attributes during parsing, and add slots for attributes on array and function declarators. This is pretty far from complete, and I'll revisit it later if someone doesn't beat me to it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122535 91177308-0d34-0410-b5e6-96231b3b80d8
ttributeList.cpp
eclSpec.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaType.cpp
|
6e4e17de3df88ead7eaf51b3503a6be1718438c0 |
24-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Fix a thinko in a helper routine for template argument deduction that caused an assertion when dealing with non-type template parameter packs. Add some tests for deduction and instantiation of non-type template parameter packs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122534 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
85374738e40a3b5bf078d05787e8fa96fa63c2d0 |
24-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Non-type template parameter packs cannot have default arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122533 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
56bc9832bc8f80604bfddc2c93f81537df6930a1 |
24-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
When instantiating a non-type template parameter pack, be sure to extract the appropriate argument from the argument pack (based on the current substitution index, of course). Simple instantiation of pack expansions involving non-type template parameter packs now works. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122532 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
emaTemplateVariadic.cpp
|
10738d36b150aa65206890c1c845cdba076e4200 |
24-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Add an AST representation for non-type template parameter packs, e.g., template<typename T, unsigned ...Dims> struct multi_array; along with semantic analysis support for finding unexpanded non-type template parameter packs in types, expressions, and so on. Template instantiation involving non-type template parameter packs probably doesn't work yet. That'll come soon. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122527 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
emaTemplateVariadic.cpp
emaType.cpp
|
a8bc8c9e9ba5bffebde00340786fe8542469c435 |
23-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement parsing of function parameter packs and non-type template parameter packs (C++0x [dcl.fct]p13), including disambiguation between unnamed function parameter packs and varargs (C++0x [dcl.fct]p14) for cases like void f(T...) where T may or may not contain unexpanded parameter packs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122520 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplate.cpp
emaTemplateVariadic.cpp
emaType.cpp
|
c32647d111e516593b9ba242cad7b8ff4016c155 |
23-Dec-2010 |
Ted Kremenek <kremenek@apple.com> |
Add -fobjc-default-synthesized-properties flag to allow us to explicitly control whether or not Objective-C properties are default synthesized. Currently this feature only works when using the -fobjc-non-fragile-abi2 flag (so there is no functionality change), but we can now turn off this feature without turning off all the features coupled with -fobjc-non-fragile-abi2. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122519 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
b9c6631941619fb8c74f1056fbc56270629201c1 |
23-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Reimplement the comparison of a class template partial specialization's template arguments against the primary template's template arguments using the obvious, correct method of checking the injected-class-name type (C++ [temp.class.spec]p9b3). The previous incarnation of this comparison attempted to use its own formulation of the injected-class-name, which is redudant and, with the introduction of variadic templates, became wrong (again). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122508 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
ea6c96f63a45b4ffdcdf9824a9cf31a32825c0f6 |
23-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement the part of C++0x [temp.arg.explicit]p3 that pertains to parameter packs. In particular, a parameter pack not otherwise deduced is deduced to an empty parameter pack. The C++0x wording here is a bit unfortunate; this should really only apply to function templates, and it mentions "trailing" parameter packs, which doesn't really make sense in the context of function templates. Will file a core issue separately. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122463 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
7b976ece336d209977b25b5c28ee09c2d2146e6a |
23-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement the rest of C++0x [temp.deduct.type]p9, which specifies that the presence of a pack expansion anywhere except at the end of a template-argument-list causes the entire template-argument-list to be a non-deduced context. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122461 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
c6ed729f669044f5072a49d79041f455d971ece3 |
23-Dec-2010 |
Jeffrey Yasskin <jyasskin@google.com> |
Change all self assignments X=X to (void)X, so that we can turn on a new gcc warning that complains on self-assignments and self-initializations. Fix one bug found by the warning, in which one clang::OverloadCandidate constructor failed to initialize its FunctionTemplate member. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122459 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaDecl.cpp
|
34c2f8c8a16226f757947bf08c5f799d99c9ac1e |
23-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Be paranoid about NULL size expressions in dependently-sized array types git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122454 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
0d80abc3b7fb0dca26fb6b272d2c3484f86fb7e7 |
23-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Unify the consistency checking for deduced template arguments into a single routine. Extend that routine to handle consistency checking for template argument packs, so that we can compare the deduced packs for template parameter packs across different pack expansions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122452 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
e02e26293cf8e3bad1059b39cea75c6582896da6 |
22-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement template argument deduction for pack expansions whose pattern is a template argument, which involves repeatedly deducing template arguments using the pattern of the pack expansion, then bundling the resulting deductions into an argument pack. We can now handle a variety of simple list-handling metaprograms using variadic templates. See, e.g., the new "count" metaprogram. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122439 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaTemplateVariadic.cpp
|
99130e5a02e93282cb393d2cba0d3dffc10abc01 |
22-Dec-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Complain on missing property getter method only if property-dot expression is decidedly an rvalue. // rdar://8155806. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122430 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprObjC.cpp
|
0972c867e72171f24052d7b6d307020c065f8a66 |
22-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
When performing template argument deduction where the argument is a dependent template specialization type, the number of template arguments need not match precisely. Rather than checking the number of arguments eagerly (which does not consider argument packs), let the deduction routine for template argument lists cope with too many/too few arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122425 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
20a55e2515ce89ddf9993941f9b5d0f3a6c91b4f |
22-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Implicitly expand argument packs when performing template argument deduction. Unify all of the looping over template arguments for deduction purposes into a single place, where argument pack expansion occurs; this is also the hook for deducing from pack expansions, which itself is not yet implemented. For now, at least we can handle a basic "count" metafunction written with variadics. See the new test for the formulation that works. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122418 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
a0e27f00158c9306d53b0003b94182e415380ea9 |
22-Dec-2010 |
Francois Pichet <pichet2000@gmail.com> |
Redesign the way anonymous fields are handled in designated-initializers. Previously designated anonymous fields were found via name lookup. This redesign uses the fact that an IndirectFieldDecl declaration will always follow an anonymous implicit field to remove the special case of name lookup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122387 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
f97ecf3566cd006875c8f76e426126b4b5a551f7 |
21-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Tweak the checking of class template partial specialization arguments to cope with parameter packs. This is a band-aid I will be revisiting this section when I implement declaration matching semantics for variadic templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122369 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
f7dd69969aa25093ca9a7897a0d8819c145d1c77 |
21-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Add some const qualifiers git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122365 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
cfddf7be7992d386391968db448c3abbdc6e324a |
21-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
For member pointer conversions potentially involving derived-to-base conversions, make sure that the (possibly) derived type is complete before looking for base classes. Finishes the fix for PR8801. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122363 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
ebb1c56a4b7a944921b564025df53505ff886050 |
21-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
When searching for the instantiation of a locally-scoped tag declaration, also look for an instantiation of its previous declarations. Fixes PR8801. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122361 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
b68e39930d06ed81a2b431dc09e4cb97e5c0d57a |
21-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
In C++, if the user redeclares a builtin function with a type that is inconsistent with the type that the builtin *should* have, forget about the builtin altogether: we don't want subsequence analyses, CodeGen, etc., to think that we have a proper builtin function. C is protected from errors here because it allows one to use a library builtin without having a declaration, and detects inconsistent (re-)declarations of builtins during declaration merging. C++ was unprotected, and therefore would crash. Fixes PR8839. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122351 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
bdb2d5056fd675c27307b34efd371bbba6839e92 |
21-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Fix a major inconsistency in the representation of Objective-C classes, categories, protocols, and class extensions, where the methods and properties of these entities would be inserted into the DeclContext in an ordering that doesn't necessarily reflect source order. The culprits were Sema::ActOnMethodDeclaration(), which did not perform the insertion of the just-created method declaration into the DeclContext for these Objective-C entities, and Sema::ActOnAtEnd(), which inserted all method declarations at the *end* of the DeclContext. With this fix in hand, clean up the code-completion actions for property setters/getters that worked around this brokenness in the AST. Fixes <rdar://problem/8062781>, where this problem manifested as poor token-annotation information, but this would have struck again in many other places. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122347 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
emaDeclObjC.cpp
|
b0ee93cf945744569b82b8a07361061f2963264a |
21-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
A class template partial specialization cannot be a friend. Fixes PR8649. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122325 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
6fb0729241ab204e9bed9a5ff2f5bd396db111d4 |
21-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
When checking a using declaration, make sure that the context we're looking in is complete. Fixes PR8756. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122323 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
14af91a38c8cf89f0a5e1835d7d8e0fa220e17a9 |
21-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Don't try to compute the value of a value-dependent expression when checking trivial comparisons. Fixes PR8795. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122322 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
b99268b3083c882103bd1bd08bdcc9a76a2b4795 |
21-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement instantiation of pack expansions whose pattern is a type-id in an exception specification. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122297 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaTemplateVariadic.cpp
reeTransform.h
|
00ccbefcffeb88ea3e2e6323e594fa968753ad14 |
21-Dec-2010 |
John McCall <rjmccall@apple.com> |
Fix the noreturn conversion to only strip off a single level of indirection. Apply the noreturn attribute while creating a builtin function's type. Remove the getNoReturnType() API. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122295 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaOverload.cpp
|
8e5fc9be37c6828ad008f22730e3baac1bef1686 |
21-Dec-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Warn when message is sent to receiver of unknown type and there is a possibility that at runtime method is resolved to a deprecated or unavailable method. Addreses // rdar://8769853 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122294 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprObjC.cpp
|
7ca7ac40ad45d5253ba474dddfa5ee233f35c2fe |
21-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Further refactoring of the tree transformation for template argument lists, so that all such transformations go through a single, iterator-based transformation function. This is the only place where we need to implement the logic for transforming pack expansions whose pattern is a template argument. Unfortunately, the new cases this refactoring brings into the fold can't be meaningfully tested yet. We need template argument deduction to work well enough for variadic function templates first. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122289 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
a40bc724849f9cdc6a7706bc5d230685c3bdf63c |
21-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Give the RecursiveASTVisitor a configuration function shouldWalkTypesOfTypeLocs() that determines whether it should walk the Types within TypeLocs. This walk is redundant, but perhaps required for some clients. Disabling this redundant walk in the unexpanded parameter pack finder produces better results, because we get parameter packs with source location info *unless* such source location information isn't available. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122287 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateVariadic.cpp
|
984a58b6c6892671c88e112ce449b1da3f7de4ba |
20-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Handle instantiation of template type parameter packs that occur as the first qualifier in scope. We can't adequately test this test, unfortunately. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122283 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
8491ffe86c50241b47c6d7ef8cd9ee00f5e675da |
20-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement basic support for template instantiation of pack expansions whose patterns are template arguments. We can now instantiate, e.g., typedef tuple<pair<OuterTypes, InnerTypes>...> type; where OuterTypes and InnerTypes are template type parameter packs. There is a horrible inefficiency in TemplateArgumentLoc::getPackExpansionPattern(), where we need to create copies of TypeLoc data because our interfaces traffic in TypeSourceInfo pointers where they should traffic in TypeLocs instead. I've isolated in efficiency in this one routine; once we refactor our interfaces to traffic in TypeLocs, we can eliminate it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122278 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateVariadic.cpp
reeTransform.h
|
21a288f2ee8673d91e2d0b7d5aaca567c332de13 |
20-Dec-2010 |
Matt Beaumont-Gay <matthewbg@google.com> |
Remove unused variable git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122257 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
7f61f2fc1a880ac3bf5b0993525922dd2c1f09bf |
20-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Finish refactoring the transformation of template argument lists, centralizing the transformation into two routines. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122253 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
fcc1253ba28d1d1debacd147be15e1684cc2eda5 |
20-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Refactor the transformation of template argument lists to centralize the list traversal. Part 1, no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122252 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
14be16b93941aa4c4909b596d52a34af70ee1928 |
20-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
When checking a template argument list against a template containing a parameter pack, check the parameter pack against each of the template arguments it corresponds to, then pack the converted arguments into a template argument pack. Allows us to use variadic class templates so long as instantiation isn't required, e.g., template<typename... Types> struct Tuple; Tuple<int, float> *t2; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122251 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
87dd697dcc8ecb64df73ae64d61b8c80ff0c157c |
20-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Clean up the handling of template argument packs, especially in the area of printing template arguments. The functionality changes here are limited to cases of variadic templates that aren't yet enabled. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122250 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateDeduction.cpp
|
d8039129f3da19819696209e4005cc73907f5c3b |
20-Dec-2010 |
Francois Pichet <pichet2000@gmail.com> |
XFAIL vtable-debug-info.cpp on WIN32 and fix curly brace. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122230 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
913b7bf8c40454641588611b7bbad981dc53c882 |
20-Dec-2010 |
Francois Pichet <pichet2000@gmail.com> |
Emit an error if operator __uuidof() is called on a type with no associated GUID. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122226 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
7536dd5e6c99584481b7dab68b7e7d8df9c54054 |
20-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Introduce a new type, PackExpansionType, to capture types that are pack expansions, e.g. given template<typename... Types> struct tuple; template<typename... Types> struct tuple_of_refs { typedef tuple<Types&...> types; }; the type of the "types" typedef is a PackExpansionType whose pattern is Types&. This commit introduces support for creating pack expansions for template type arguments, as above, but not for any other kind of pack expansion, nor for any form of instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122223 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateVariadic.cpp
reeTransform.h
|
d3d3be9bc717b37366324e9711f1ea22dea42caa |
20-Dec-2010 |
Francois Pichet <pichet2000@gmail.com> |
Validate Microsoft's uuid attribute string. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122220 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
276fdf408050d205f3a7f34c1e788224a67d2098 |
19-Dec-2010 |
Wesley Peck <peckw@wesleypeck.com> |
1. Add some ABI information for the Microblaze. 2. Add attibutes "interrupt_handler" and "save_volatiles" for the Microblaze target. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122184 91177308-0d34-0410-b5e6-96231b3b80d8
argetAttributesSema.cpp
|
11542141e385859df6b4f1a8f1f01856ad193b5b |
19-Dec-2010 |
Francois Pichet <pichet2000@gmail.com> |
Add support for the Microsoft uuid attribute: example: struct __declspec(uuid("6d5140c1-7436-11ce-8034-00aa006009fa")) test { }; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122173 91177308-0d34-0410-b5e6-96231b3b80d8
ttributeList.cpp
emaDeclAttr.cpp
|
e6a365d772a6b455f1e23ac9ae5f40d65a55a18c |
19-Dec-2010 |
John McCall <rjmccall@apple.com> |
Motions towards simplifying how we deal with attribute-qualified function types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122162 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExprCXX.cpp
emaType.cpp
|
7f1b98760d419a09b2261c1ef901f6bc1ff33e19 |
18-Dec-2010 |
John McCall <rjmccall@apple.com> |
Apply attributes to explicit specializations. Specializations which don't provide their own explicit visibility attributes should get them from the template. Fixes rdar://problem/8778497. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122136 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
dd4430e596fac34e9ce44228a249f71e73effd4a |
17-Dec-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Warn when synthesizing a property which is implicitly atomic under -Wimplicit-atomic-properties flag. // rdar://8774580 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122095 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
320e153dbce9c7f57f22a59e4d162795059717e5 |
17-Dec-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Use hasSameType to compare types for equality. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122058 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
bbca85d14c227641cb482ef497e1e567fe6f9c95 |
17-Dec-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Avoid to emit redundant implicit cast for enum constants init expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122056 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
1bc80af703ceff3e92797f33c41634d327bf067a |
16-Dec-2010 |
John McCall <rjmccall@apple.com> |
Do lvalue-to-rvalue conversions on the LHS of a shift operator. Fixes rdar://problem/8776586. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121992 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
a669c534cf414339060868d70d2348fea9ce6c7d |
16-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Add tests checking for unexpanded parameter packs in declarations that occur within statements. Teach Sema::ActOnExceptionDeclarator() to check for unexpanded parameter packs in the exception type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121984 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
099ffe812664e3a24164710c181c26e646391250 |
16-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Tweak a comment git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121979 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateVariadic.cpp
|
4d2abba63ede7dde686892a20865245ed355aeb1 |
16-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Delay the check for unexpanded parameter packs in the types of non-type template parameters until we know that we have an actual template declaration of some sort. This cannot be tested yet, but will become important when we have template template parameter packs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121967 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
781def075d4a486a5b367c6730fe77cb1f721ac1 |
16-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Check for unexpanded parameter packs in non-type template parameter types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121964 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
6f52675ec400a0ee89ec6214c4845b8ee274304a |
16-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Check for unexpanded parameter packs in default arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121962 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplate.cpp
emaTemplateVariadic.cpp
|
0762bfd268552d260899cb414800eadf3b4741b9 |
16-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Fix a regression I caused in r121930. It turns out that DeclarationNameInfo instances don't always have a non-NULL TypeSourceInfo? git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121940 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateVariadic.cpp
|
a31040f16604849b3b1dc36015056c81bae68ad1 |
16-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Check for unexpanded parameter packs within variable initializers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121938 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
6ccab97c17c17f38eb92c7fe02c766508875bd97 |
16-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Check for unexpanded parameter packs in friend declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121934 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
8b1aba495744bea7093899a65f08c3987263061c |
16-Dec-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Improve diagnostics when property being looked up in a forward @class object. // rdar://8774513 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121933 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
56c04588ef3cfa1bbc968fd68de2480a4e66971d |
16-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Check for unexpanded parameter packs in using declarations. As a drive-by, make sure to check for unexpanded parameter packs within the name of a declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121930 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaTemplateVariadic.cpp
|
0c9e4799fd78d350a037498b2c797f2b2558791c |
16-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Check for unexpanded parameter packs in enumeration types and enumerators. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121928 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
399ad970a25efcbfa7111e17f48285a70fba2731 |
16-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Check for unexpanded parameter packs in static assertion expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121922 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
7504966cc0d07eac26baabec80a7406695efb307 |
16-Dec-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
ivars craeted for explicit @synthesize and those created for auto-synthesis are @private. Fixes: // rdar://8769582 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121913 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaObjCProperty.cpp
|
e186269a8a41dbff1ebea2c251048892979d1078 |
16-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Check for unexpanded parameter packs in various kinds of declarations. This is a work in progress, as I go through the C++ declaration grammar to identify where unexpanded parameter packs can occur. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121912 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
cff163e3cc78277496b30fa40070b46abdc290db |
15-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Test that all of the relevant types properly compute the "contains unexpanded parameter pack" bit and that the recursive AST visitor can then find those unexpanded parameter packs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121899 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateVariadic.cpp
|
9ef75899bae6dd9a4be1252ae9cadcb619c170ff |
15-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Introduce a RecursiveASTVisitor subclass that finds all unexpanded parameter packs within a statement, type, etc. Use this visitor to provide improved diagnostics for the presence of unexpanded parameter packs in a full expression, base type, declaration type, etc., by highlighting the unexpanded parameter packs and providing their names, e.g., test/CXX/temp/temp.decls/temp.variadic/p5.cpp:28:85: error: declaration type contains unexpanded parameter packs 'VeryInnerTypes', 'OuterTypes', ... ...VeryInnerTypes, OuterTypes>, pair<InnerTypes, OuterTypes> > types; ~~~~~~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~~~ ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121883 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateVariadic.cpp
|
0827408865e32789e0ec4b8113a302ccdc531423 |
15-Dec-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Fix diagnostic pragmas. Diagnostic pragmas are broken because we don't keep track of the diagnostic state changes and we only check the current/latest state. Problems manifest if a diagnostic is emitted for a source line that has different diagnostic state than the current state; this can affect a lot of places, like C++ inline methods, template instantiations, the lexer, etc. Fix the issue by having the Diagnostic object keep track of the source location of the pragmas so that it is able to know what is the diagnostic state at any given source location. Fixes rdar://8365684. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121873 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
emaChecking.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
|
c46333550f5787b6d48ca3043e14ba9594cb632d |
15-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Move the work-in-progress implementation of variadic templates to its own file in Sema. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121869 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
emaTemplate.cpp
emaTemplateVariadic.cpp
|
028d397c1b4082c88067efde740f1811fd557792 |
15-Dec-2010 |
John McCall <rjmccall@apple.com> |
Reorganize LookupMemberExpr for clarity and to make the obvious fast paths come first. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121866 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
de43632a5951abf3f357e2f79dcddda4dc6ec8ff |
15-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
__attribute__((nonnull)) can apply to reference-to-pointer parameters. Fixes <rdar://problem/8769025>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121864 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
fb7b36327c4cd14c9454e0e9c26f8c44ba8207c0 |
15-Dec-2010 |
Peter Collingbourne <peter@pcc.me.uk> |
Sema: have BuildExpressionFromIntegralTemplateArgument produce well-formed IntegerLiterals BuildExpressionFromIntegralTemplateArgument can produce malformed IntegerLiterals with an EnumType if the template parameter type is an EnumType. This breaks the AST printer which expects all IntegerLiterals to have a plain integer type. Instead, give the IntegerLiteral the enum's promotion type and wrap in an implicit cast to the EnumType. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121862 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
5e3c67b4bd894a926282d24b4d0cbc0e123c9f4a |
15-Dec-2010 |
John McCall <rjmccall@apple.com> |
Sundry missing lvalue-to-rvalue conversions. Also leave a TODO for the vital future task of performing contextual conversion to size_t in a VLA size expression. :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121836 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaStmt.cpp
emaType.cpp
|
bfdcdc8e26097c9dbb4c40d78296f6ccc3e6684c |
15-Dec-2010 |
John McCall <rjmccall@apple.com> |
Set the "implicitly inline" bit on a method as soon as we see a definition within the class. Teach IR gen to look for function definitions in record lexical contexts when deciding whether to emit a function whose address was taken. Fixes PR8789. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121833 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
bebbe0d9b7568ce43a464286bee49429489ef483 |
15-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Variadic templates: extend the Expr class with a bit that specifies whether the expression contains an unexpanded parameter pack, in the same vein as the changes to the Type hierarchy. Compute this bit within all of the Expr subclasses. This change required a bunch of reshuffling of dependency calculations, mainly to consolidate them inside the constructors and to fuse multiple loops that iterate over arguments to determine type dependence, value dependence, and (now) containment of unexpanded parameter packs. Again, testing is painfully sparse, because all of the diagnostics will change and it is more important to test the to-be-written visitor that collects unexpanded parameter packs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121831 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprCXX.cpp
emaOverload.cpp
emaStmt.cpp
emaTemplate.cpp
|
723df245307a530da5433dfb43accf187dc3e243 |
14-Dec-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Added missing IgnoreParens(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121795 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaExceptionSpec.cpp
emaExpr.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
8786da77984e81d48e0e1b2bd339809b1efc19f3 |
14-Dec-2010 |
John McCall <rjmccall@apple.com> |
Rewrite ComplexExprEvaluator::VisitCastExpr to use cast kinds, and fix the basic casting logic to insert intermediate casts and preserve the exact complex-cast design. Fixes a crash in the test suite. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121776 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
373920bd733b1d28fe7bf209945a62eb9248d948 |
14-Dec-2010 |
John McCall <rjmccall@apple.com> |
Improve some comments, shrink FunctionType::ExtInfo, and fix a bug found by valgrind where we were doing the wrong thing in the presence of invalid exception specs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121770 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
e23cf437fe76b1ed02d63c3f61b456fd48a915f5 |
14-Dec-2010 |
John McCall <rjmccall@apple.com> |
Restore r121752 without modification. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121763 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaExceptionSpec.cpp
emaExpr.cpp
emaExprCXX.cpp
emaLookup.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
|
5bfe232d1f07a6fd160fcf82c277c055a412a1c0 |
14-Dec-2010 |
John McCall <rjmccall@apple.com> |
Pull out r121752 in case it's causing the selfhost breakage. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121759 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaExceptionSpec.cpp
emaExpr.cpp
emaExprCXX.cpp
emaLookup.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
|
0e88aa7100da32acc63bc8a4dcb946ed517868f1 |
14-Dec-2010 |
John McCall <rjmccall@apple.com> |
Factor out most of the extra state in a FunctionProtoType into a separate class to be passed around. The line between argument and return types and everything else is kindof vague, but I think it's justifiable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121752 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaExceptionSpec.cpp
emaExpr.cpp
emaExprCXX.cpp
emaLookup.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
|
d0937224f383c7cc72c947119380f9713a070c73 |
13-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Variadic templates: extend Type, NestedNameSpecifier, TemplateName, and TemplateArgument with an operation that determines whether there are any unexpanded parameter packs within that construct. Use this information to diagnose the appearance of the names of parameter packs that have not been expanded (C++ [temp.variadic]p5). Since this property is checked often (every declaration, ever expression statement, etc.), we extend Type and Expr with a bit storing the result of this computation, rather than walking the AST each time to determine whether any unexpanded parameter packs occur. This commit is deficient in several ways, which will be remedied with future commits: - Expr has a bit to store the presence of an unexpanded parameter pack, but it is never set. - The error messages don't point out where the unexpanded parameter packs were named in the type/expression, but they should. - We don't check for unexpanded parameter packs in all of the places where we should. - Testing is sparse, pending the resolution of the above three issues. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121724 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaTemplate.cpp
|
140a2bd77539b4537010d8cd6a0a3805ce724b3e |
13-Dec-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Skip ParenType on function instantiations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121720 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
6a57746ea8e94aaf3fbcc961dc95756f5f3dda52 |
13-Dec-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Reduce the number of builtin operator overload candidates added in certain cases. First, omit all builtin overloads when no non-record type is in the set of candidate types. Second, avoid arithmetic type overloads for non-arithmetic or enumeral types (counting vector types as arithmetic due to Clang extensions). When heavily using constructs such as STL's '<<' based stream logging, this can have a significant impact. One logging-heavy test case's compile time dropped by 10% with this. Self-host shows 1-2% improvement in compile time, but that's likely in the noise. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121665 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
7b381985353304a7723acb05911ff91634fa1f27 |
13-Dec-2010 |
Peter Collingbourne <peter@pcc.me.uk> |
Basic, Sema: add support for CUDA launch_bounds attribute git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121654 91177308-0d34-0410-b5e6-96231b3b80d8
ttributeList.cpp
emaDeclAttr.cpp
|
2c2c8dd0acb2a51067299bfcec9ff2145f2031c8 |
13-Dec-2010 |
Peter Collingbourne <peter@pcc.me.uk> |
Sema: diagnose kernel functions with non-void return type git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121653 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
aee543a1a3d70de38cd2607fd2f3179551febc93 |
12-Dec-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Move the functionality to mark all vtables of key functions as used within a translation unit to the ActOnEndOfTranslationUnit function instead of doing it at the start of DefineUsedVTables. The latter is now called *recursively* during template instantiation, which causes an absolutely insane number of walks of every record decl in the translation unit. After this patch, an extremely template instantiation heavy test case's compile time drops by 10x, and we see between 15% and 20% improvement in average compile times across a project. This is just recovering a regression, it doesn't make anything faster than it was several weeks ago. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121644 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDeclCXX.cpp
|
6d695587032d82c16078b769400701c3c666bea3 |
12-Dec-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Finish cleaning up the static utility code for adding builtin operator overload candidates. They're now wrapped in nice APIs which hide the tables, etc. Also removes some repetitive code from clients. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121634 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
38ca8d1298ed1bf4512be920917559766a498916 |
12-Dec-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Clean up the helpers used to compute the usual arithmetic conversions' result type. Localize all of the logic within a single function rather than spreading it throughout the class. Also fixes a buglet where we failed to check for a RHS arithmetic type wider than the LHS and return its canonical type. I've yet to produce a test case that breaks because of this, but it was spotted by inspection by folks on the IRC channel and is obviously correct now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121633 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
3c69dc46d5391d5171875310be3edf8ca94db352 |
12-Dec-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Add a comment to a helper function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121632 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
7b80b4b9a9df2ee54466922ce14cdfd639ac1972 |
12-Dec-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Sink the logic to suppress builtin operator overloads in the presence of user-defined operator overloads on the same enumeral types to the one place where it is used. In theory this removes wasted computation from several paths through this code, but I'm not aware of a case where it actually matters. This is mostly for cleanliness. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121630 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
abb71845ef4a2bbd0a20541b92285e44f2190825 |
12-Dec-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Reorder the cases in the switch to be more logically grouped (to my mind). If others have another ordering they would prefer, I'm all ears, but this one made it much easier for me to find the group of operators I'm interested in. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121629 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
c1409467542f2b3dc7f563f7e56ba54158a70b0e |
12-Dec-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Remove the final goto from this switch making it explict which overload set is added for binary operator&. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121628 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
32fe0d0831a34f41b9ceabb6475035c5d57c5faf |
12-Dec-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Fold away completely identical code with simple fallthrough. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121627 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
fe62274f48efcd93b2f3fc0fcc67cdf5725083db |
12-Dec-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Move and copy function calls around to remove the indirection through gotos from the switch statement. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121626 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
daf55d39306dccd13db46586c071262d9ace5533 |
12-Dec-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Simplify the flow through the switch by explicitly listing the added overloads for a few cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121625 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
6df868e8d69347d6141baa41b95a96d22c8eaefd |
12-Dec-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Fix 80-column violations and reflowing some code to facilitate those fixes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121624 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
3a0f3eff30dfa39ca8f78f98070b888dc8c67e54 |
12-Dec-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Begin the refactoring of how builtin operators are added to the overload candidate set. This breaks apart a huge switch + goto system into distinct methods on a class. It also places the current mess of tables and other static state used in the process within that class. This is still a work in progress. I did a few simplifications that jumped out at me as I went, but I plan to iterate on this a bit before it's truly clean. However, this is easily the most invasive chunk. I benchmarked it on all-std-headers.cpp and an internal testcase that has a major hotspot in overload resolution and saw no real performance impact. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121623 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
c78f684c8e300414956bc1566957a17a48da2fc8 |
11-Dec-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Enhance my implementation of //rdar ://8747333 in r121597 to allow for declaration of property setter/getter in forward class extensions and also skip over propeties which are @dynamic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121617 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
88f5e9be350f4b107f8665183a6d441874e0fcc7 |
11-Dec-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Any property declared in a class extension might have user declared setter or getter in current class extension or one of the other class extensions. Mark them as synthesized as property will be synthesized when property with same name is seen in the @implementation. This prevents bogus warning about unimplemented methods to be issued for these methods. Fixes // rdar://8747333 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121597 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
emaObjCProperty.cpp
|
f40f0d5a382395e0301d7dcbeaa2b8e90b8973b1 |
10-Dec-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Keep the source location of the selector in ObjCMessageExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121516 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
reeTransform.h
|
42499f94069c73d7a9c82da98a4245ea9fe2c526 |
10-Dec-2010 |
Bob Wilson <bob.wilson@apple.com> |
Do not assert on shifts of Neon polynomial types. Most Neon shift intrinsics do not have variants for polynomial types, but vsri_n and vsli_n do support them, and we need to properly range-check the shift immediates for them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121509 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
3922ed09db588c27282369622afb613acaee6a22 |
10-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Silence a few more uninitialized-value warnings git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121505 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
9f6f6a107287bd81aedab8b578216535b0b51d0f |
10-Dec-2010 |
Peter Collingbourne <peter@pcc.me.uk> |
Do not substitute template types if template has dependent context We should not substitute template types if the template has a dependent context because the template argument stack is not yet fully formed. Instead, defer substitution until the template has a non-dependent context (i.e. instantiation of an outer template). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121491 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
9913d6e086b95cdc791b52c10f773dfd1267f5f8 |
10-Dec-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Fix a compiler warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121490 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
075f8f1b6bed4d1b224c74f87508534cc6392ce6 |
10-Dec-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Added ParenType type node. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121488 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExceptionSpec.cpp
emaTemplate.cpp
emaType.cpp
reeTransform.h
|
49f4e1cbd839da27ff4814b4ea6d85a79f786cbd |
10-Dec-2010 |
John McCall <rjmccall@apple.com> |
It's kindof silly that ExtQuals has an ASTContext&, and we can use that space better. Remove this reference. To make that work, change some APIs (most importantly, getDesugaredType()) to take an ASTContext& if they need to return a QualType. Simultaneously, diminish the need to return a QualType by introducing some useful APIs on SplitQualType, which is just a std::pair<const Type *, Qualifiers>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121478 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
emaOverload.cpp
emaStmt.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
|
eb0eb49ce5f5294902769702b9322e42e89e972e |
10-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Use TypeAlignment constant rather than fixed alignment of 8 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121473 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
90f1450c109fbbd333001165bbd986061f7c4513 |
10-Dec-2010 |
John McCall <rjmccall@apple.com> |
Treat visibility on an enclosing namespace as a non-explicit source of visibility. Fixes PR8713. I've disabled a test which was testing that you can #pragma pop visibility to get out of a namespace's visibility attribute. We should probably just diagnose that as an error unless it's instrumental to someone's system headers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121459 91177308-0d34-0410-b5e6-96231b3b80d8
emaAttr.cpp
emaDeclCXX.cpp
|
db67e2f5b890f1fb2ad536ae5df1532f56fd8e71 |
10-Dec-2010 |
John McCall <rjmccall@apple.com> |
Bind the result of a property fetch to a temporary. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121452 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
bfe5788a00b44cf77cb2bd33e1fa0c35eb02e3f9 |
10-Dec-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Refactored/cleanedup ActOnFunctionDeclarator and ActOnVariableDeclarator No functionality change. // rdar://8751949 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121427 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
7344921b22bebec4f86eb8eb865150b2978b5d2e |
10-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Eliminate duplicate code completions for properties. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121424 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
70c233591ad2f77a01c8a318283ae03010c64c8f |
09-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Don't walk the translation unit context to produce protocol names when global code completions are disabled (e.g., because they are cached). Also, make sure that forward-declared protocols are visited when we look for all visible names within a declaration context. Previously, we would end up with duplicate completions for protocols. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121416 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
emaLookup.cpp
|
40e17752086c2c497951d64f5ac6ab5039466113 |
09-Dec-2010 |
Francois Pichet <pichet2000@gmail.com> |
Fix PR8760: IndirectFieldDecl Type was not updated during template instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121363 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
d95450421ee3b7cebfb18ce1312310d6c703431c |
09-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
A typename specifier can end up referring to a unresolved using declaration that is a value in ill-formed code. Instead of crashing, treat this as a dependent typename specifier and suggest that the using add "typename" into the using declaration. Fixes <rdar://problem/8740998>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121322 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
f187237d916afa97c491ac32fe98be7d335c5b63 |
08-Dec-2010 |
Francois Pichet <pichet2000@gmail.com> |
Remove the TypesCompatibleExprClass AST node. Merge its functionality into BinaryTypeTraitExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121298 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprCXX.cpp
reeTransform.h
|
241d5580d2f3969d2cd2a94b4a92c762b5dc1e04 |
07-Dec-2010 |
John McCall <rjmccall@apple.com> |
Bump up property conversion earlier in the initialization process. Fixes the failed compile in PR8751. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121192 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaInit.cpp
|
f5fe2925b87cf382f2f13983c81679e38067122b |
07-Dec-2010 |
Rafael Espindola <rafael.espindola@gmail.com> |
Fix PR8720 by printing an error message with a substring that the gcc testsuite searches for. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121137 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
9f71a8f4c7a182a5236da9e747d57cc1d1bd24c2 |
07-Dec-2010 |
Jay Foad <jay.foad@gmail.com> |
PR5207: Change APInt methods trunc(), sext(), zext(), sextOrTrunc() and zextOrTrunc(), and APSInt methods extend(), extOrTrunc() and new method trunc(), to be const and to return a new value instead of modifying the object in place. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121121 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaInit.cpp
emaStmt.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
|
6f18fca241bf060bccbea52e5e436e17562bc9b3 |
07-Dec-2010 |
John McCall <rjmccall@apple.com> |
Kill FullExpr, as it was not, in fact, used anywhere in the code base. I'm not opposed to the idea in concept, but there's no point in preserving abortive experiments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121083 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
53c374f1ac6d28b2341b3a8f3902eb51db9c50e7 |
07-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Use Sema::MaybeCreateExprWithCleanups() only after we've checked for a NULL/invalid expression git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121081 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
|
6ad6f2848d7652ab2991286eb48be440d3493b28 |
07-Dec-2010 |
Francois Pichet <pichet2000@gmail.com> |
Type traits intrinsic implementation: __is_base_of(T, U) New AST node introduced: BinaryTypeTraitExpr; to be reused for more intrinsics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121074 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
reeTransform.h
|
143c7acef37824bca93c34d4b1d07c4560ce49a6 |
06-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Objective-C pointer conversions to 'id' or qualified 'id' subsume cv-qualification conversions. More specifically, there's an implicit cv-qualification conversion (even one that drops qualifiers) when converting to 'id' or qualified 'id'. Fixes <rdar://problem/8734046>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121047 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
409fa9ab9579de04c5d68fb6a6a8d094545b1e77 |
06-Dec-2010 |
John McCall <rjmccall@apple.com> |
Split out a function to do lvalue conversion on objects; this is basically FunctionArrayLvalueConversion but without the function/array decay. Generally this is only appropriate for use sites that know the type of the expression and thus that it can't be subject to the decays. Also make sure we do lvalue-to-rvalue on the bases of ivar references. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121035 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
7e112c08271699fbf86167bc9973cdbaa3748da9 |
06-Dec-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Remove a fixme which was fixed in a previous commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121029 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
40c2913cef2c211f1fe720ffef83fdb3e4d0fabf |
06-Dec-2010 |
John McCall <rjmccall@apple.com> |
Do unary conversions on vararg arguments and *then* special-case float. Fixes PR8742. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121022 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
223ae5c26654e5fd7dacdafe43aff28a096ba63b |
06-Dec-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Use Sema's MarkDeclarationReferenced, which takes care of templates, instead of calling Decl's setUsed directly. Thanks to John for the hint! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121014 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
f0b0ccce127857e7e4fb829e017dbcb7487884c4 |
06-Dec-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Use the source location of the parameter, when it makes sense, for diagnostics in HandleCleanupAttr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121013 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
894aed964fae942b62326881dc106801dabfd04c |
06-Dec-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Un-templatetize this method. It's definition is out of line in the .cpp file, so that's not a valid thing to do at all. Instead, switch to a ValueDecl argument, the template isn't really necessary here. When handling the types explicitly in the code, it becomes awkward to cerate the CXXBaseOrMemberInitializer object in so many places. Re-flow the code to calculate the Init expression first, and then create the initializer. If this is too gross, we can factor the init expression logic into helper functions, but it's not past my threshold yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120997 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
4765fa05b5652fcc4356371c2f481d0ea9a1b007 |
06-Dec-2010 |
John McCall <rjmccall@apple.com> |
Rename CXXExprWithTemporaries -> ExprWithCleanups; there's no theoretical reason this is limited to C++, and it's certainly not limited to temporaries. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120996 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaObjCProperty.cpp
emaStmt.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
01b2e4e3e2fbd60e62539f7e8e8b99575fa8a5b0 |
06-Dec-2010 |
John McCall <rjmccall@apple.com> |
Clarify the logic for when to build an overloaded binop. In particular, build one when either of the operands calls itself type-dependent; previously we were building when one of the operand types was dependent, which is not always the same thing and which can lead to unfortunate inconsistencies later. Fixes PR8739. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120990 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
85515d64c15838eadb3ffe82b635f8217b04be8a |
04-Dec-2010 |
John McCall <rjmccall@apple.com> |
First pass at implementing the intent of ANSI C DR106. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120904 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprCXX.cpp
|
9ec9445402f4365fb0ac6e28e8be78cda3e9d8af |
04-Dec-2010 |
John McCall <rjmccall@apple.com> |
dyn_cast else unreachable -> cast git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120902 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
00eb3f9c5b33e3d99aee1f8b75dd9c9678fdd66b |
04-Dec-2010 |
Francois Pichet <pichet2000@gmail.com> |
More anonymous struct/union redesign. This one deals with anonymous field used in a constructor initializer list: struct X { X() : au_i1(123) {} union { int au_i1; float au_f1; }; }; clang will now deal with au_i1 explicitly as an IndirectFieldDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120900 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
|
74e40b70306b39d65fed16d474017df036ff3960 |
04-Dec-2010 |
John McCall <rjmccall@apple.com> |
Don't crash when initializing a subaggregate in C from a property r-value. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120899 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
0e800c9c20d1a658a91096c756c4a4a9e90264fc |
04-Dec-2010 |
John McCall <rjmccall@apple.com> |
Remove some defensive calls to EmitLoadOfPropertyRefLValue that shouldn't be required, and then fix up some missing loads on overloaded-operator paths which that exposed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120896 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
abc56c726178fc7c8a3f45185768426a6e9d584e |
04-Dec-2010 |
John McCall <rjmccall@apple.com> |
When deciding whether to complain about the type of a boolean condition, use the type of the expression *after* array/function decay. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120895 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
f6a1648197562e0b133440d612d9af297d0a86cc |
04-Dec-2010 |
John McCall <rjmccall@apple.com> |
Although we currently have explicit lvalue-to-rvalue conversions, they're not actually frequently used, because ImpCastExprToType only creates a node if the types differ. So explicitly create an ICE in the lvalue-to-rvalue conversion code in DefaultFunctionArrayLvalueConversion() as well as several other new places, and consistently deal with the consequences throughout the compiler. In addition, introduce a new cast kind for loading an ObjCProperty l-value, and make sure we emit those nodes whenever an ObjCProperty l-value appears that's not on the LHS of an assignment operator. This breaks a couple of rewriter tests, which I've x-failed until future development occurs on the rewriter. Ted Kremenek kindly contributed the analyzer workarounds in this patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120890 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaChecking.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaInit.cpp
emaStmt.cpp
|
0982136cb748f4a842141bf199d133126d6be882 |
04-Dec-2010 |
Peter Collingbourne <peter@pcc.me.uk> |
Implement -cl-single-precision-constant git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120877 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ae3038c5e8bfce47337e83aeb253256633fbb701 |
04-Dec-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Mark functions referenced by 'cleanup' attribute as used. Fixes rdar://8728293 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120872 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
74b2756bc1f1f5f7c189996fe7e4cd3efef70263 |
04-Dec-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Diagnose when accessing property in a class method and no property accessor class method to be found, instead of crashing in IRGen. // rdar://8703553 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120855 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprObjC.cpp
|
6c572f1b5bd00d16abe880c2b483aa0ed570b427 |
03-Dec-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Fixed typo. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120839 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
a88cefd266c428be33cc06f7e8b00ff8fc97c1ff |
03-Dec-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Added struct/class syntactic info for c++0x scoped enum. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120828 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
722109c1b7718d3e8aab075ce65007b372822199 |
03-Dec-2010 |
Eric Christopher <echristo@apple.com> |
Add some warning messages about invalid use of common/nocommon attributes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120799 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
a3998bd364f8c6b4a520f479083da1d6e30482a1 |
02-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
When we're performing an explicit cast of some sort, don't complain about deprecated Objective-C pointer conversions. Plus, make sure to actually set an appropriate AssignmentAction when performing an implicit conversion from an InitializationSequence. Fixes regressions in the GCC DejaGNU testsuite. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120744 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaInit.cpp
|
fce5656f752199bb99a80fdff9184f9ddb470fc3 |
02-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Do not change the size of LookupResult::Filter based on the NDEBUG macri; the extra bool fits into padding anyway. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120708 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
a6cf1e709b96865210b81bd611d41e9a2d41500a |
02-Dec-2010 |
Eric Christopher <echristo@apple.com> |
Add support for the common and nocommon attributes. rdar://8560647 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120650 91177308-0d34-0410-b5e6-96231b3b80d8
ttributeList.cpp
emaDeclAttr.cpp
|
a878cda355074d7d50211be49e7871840a55a5d9 |
02-Dec-2010 |
John McCall <rjmccall@apple.com> |
Perform lvalue-to-rvalue at the end of an expression statement in C. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120646 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
12f78a6741a4cb3d904340f8d3d2714568b50e7a |
02-Dec-2010 |
John McCall <rjmccall@apple.com> |
Simplify the ASTs by consolidating ObjCImplicitGetterSetterExpr and ObjCPropertyRefExpr into the latter. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120643 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprObjC.cpp
emaStmt.cpp
reeTransform.h
|
de3deea82767a2c418fa1b5828a3744326ffd9c3 |
02-Dec-2010 |
Bob Wilson <bob.wilson@apple.com> |
Swap order of checking for compatible vector types. Check for compatible gcc, Altivec and Neon vectors before handling the lax-vector-conversions case. Otherwise there is no way to avoid the warnings from -Wvector-conversions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120633 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
7e44e3fcd75147f229f42e6912898ce62d6b4d08 |
02-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Make TypeLocBuilder an implementation detail of Sema. Nobody else should be using it git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120628 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
ypeLocBuilder.h
|
1ceee5c42d5c410217f67d384eecc6ea4a2bba9b |
01-Dec-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Sema/AST work for capturing copy init expression to be used in copy helper synthesis of __block variables. wip. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120617 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f48f367cfe096fd307d36aff27d2d5a00e830571 |
01-Dec-2010 |
Eric Christopher <echristo@apple.com> |
80-col fixups. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120613 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
da80f74d8a3f9a78a48d5fdc2d26eb125b70e0d7 |
01-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Improve our handling of cv-qualifiers in Objective-C pointer conversions. Previously, we would end up collapsing qualification conversions into the Objective-C pointer conversion step, including (possibly) stripping qualifiers that shouldn't be removed. This generalizes BuildSimilarlyQualifiedPointerType() to also work on Objective-C object pointers, then eliminates the (redundant, not totally correct) BuildSimilarlyQualifiedObjCObjectPointerType() function. Fixes <rdar://problem/8714395>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120607 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
d11617f6e0622bbf843d6f8d60c441f844e46e9a |
01-Dec-2010 |
Douglas Gregor <dgregor@apple.com> |
Improve the diagnostic when the fixed underlying type of a redeclaration of an enum type differs from that of the original declaration, from Daniel Wallin git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120577 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
0ae287a498b8cec2086fe6b7e753cbb3df63e74a |
01-Dec-2010 |
John McCall <rjmccall@apple.com> |
Restore the lvalue-to-rvalue conversion patch with a minimal fix. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120555 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ced7671c18e115ac3c3f54abfaaafcc6d33edc4c |
01-Dec-2010 |
Peter Collingbourne <peter@pcc.me.uk> |
Basic, Sema: add support for CUDA location attributes git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120545 91177308-0d34-0410-b5e6-96231b3b80d8
ttributeList.cpp
emaDeclAttr.cpp
|
2600503170c8366af2587408c50e2beedee5d1f1 |
01-Dec-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
When unknown method is sent to a receiver of 'Class' type, disgnostic should refere to a class method. Fixes // rdar://8592156 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120517 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
26e10bea3d2e9d2979194890e51b98ecea165a96 |
30-Nov-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Follow through references to catch returned stack addresses, local blocks, label addresses or references to temporaries, e.g: const int& g2() { int s1; int &s2 = s1; // expected-note {{binding reference variable 's2' here}} return s2; // expected-warning {{reference to stack memory associated with local variable 's1' returned}} } git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120483 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
20fbe7c4772d537c1f779b1ff89cbb57d1d9afff |
30-Nov-2010 |
John McCall <rjmccall@apple.com> |
L-value to r-value conversion is not ready for prime-time. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120433 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
67aba816901503d9cf7ba699525fa62cc7f8e5e4 |
30-Nov-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Such function decls,as objc's objc_msgSend, builtins in a specific language. We are adding such language info. by extensing Builtins.def and via a language flag added to LIBBUILTIN/BUILTIN and check for that when deciding a name is builtin or not. Implements //rdar://8689273. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120429 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaLookup.cpp
|
7e4857931bfe27bb355275bc7ec1eaa44612dfff |
30-Nov-2010 |
John McCall <rjmccall@apple.com> |
Introduce an r-value to l-value cast kind. I'm not promising anything about the reliability of this yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120422 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
15d5c83ce698a6b6ae1166f9008c6ead34ae7a5d |
30-Nov-2010 |
Nico Weber <nicolasweber@gmx.de> |
Fix bug in r120299 spotted by dgregor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120389 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
9b4b9d6d221ab804f5b65fec6c8661be4d5c2b84 |
30-Nov-2010 |
John McCall <rjmccall@apple.com> |
Fix another case of giving the wrong value kind to a dependent cast to a non-dependent type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120384 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
d976ca4fcacdd965446bcfbe8cb03b4ee67cd827 |
30-Nov-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Revert r120331 since it causes spurious warnings and a possible assertion hit when self-host. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120351 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
8b2f01b56209f4bb7331292225c5300753880044 |
29-Nov-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Emit warnings if we are returning a reference to a local temporary. The issue was brought to our attention by Matthieu Monrocq. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120331 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
08e41a656575ee63f8eefc7805493055c645fa85 |
29-Nov-2010 |
Nico Weber <nicolasweber@gmx.de> |
Always use a function's decl context when building default arguments. Fixes http://http://llvm.org/pr8479. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120299 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
8a72621a019a0b3ae793b1f5fc6da2243476979f |
29-Nov-2010 |
John McCall <rjmccall@apple.com> |
Revert r120063, it was wrong. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120296 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
7ff776eb7d874913588f55df4e6b459d15e20175 |
28-Nov-2010 |
Nico Weber <nicolasweber@gmx.de> |
Revert parts of r120266 that I did not mean to commit git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120267 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
6bb4dcb412d53d05a80017df81d41e447e2aa3ea |
28-Nov-2010 |
Nico Weber <nicolasweber@gmx.de> |
Minor whitespace and comment fixes. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120266 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaTemplateInstantiateDecl.cpp
|
f9780007a9c31a46a025bdd3eaf5c2be31eb4c0e |
26-Nov-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Allow access to non-static members without an object in sizeof expressions, in C++0x. Patch by Jakub Wieczorek. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120182 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
a21e06cb62dbd806073f646e756e89d8e23fc1c3 |
26-Nov-2010 |
John McCall <rjmccall@apple.com> |
For internal consistency's sake, compute the value kind of a dependent cast based on the known properties of the casted-to type. Fixes a crash on spirit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120180 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
2a5f99eb4e2af771faacfceb9f78e230129c5e5a |
25-Nov-2010 |
Nick Lewycky <nicholas@mxc.ca> |
Tie DefineVTablesUsed() in with recursive function instantiation so that we emit a useful template instantiation stack. Fixes PR8640. This also causes a slight change to where the "instantianted from" note shows up in truly esoteric cases (see the change to test/SemaCXX/destructor.cpp), but that isn't directly the fault of this patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120135 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaTemplateInstantiateDecl.cpp
|
7eb0a9eb0cde8444b97f9c5b713d9be7a6f1e607 |
24-Nov-2010 |
John McCall <rjmccall@apple.com> |
Switch a lot of call-sites over to using the new value-kind calculations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120084 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
emaStmt.cpp
emaTemplateDeduction.cpp
|
fe4ea55700c806493bebbf7bbfe07ce4b7339a3e |
23-Nov-2010 |
John McCall <rjmccall@apple.com> |
Redeclarations of using declarations are not okay in function scopes. Not sure what I was thinking before. Fixes PR8668. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120063 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
dfa1edbebeda7ec3a7a9c45e4317de9241aa9883 |
23-Nov-2010 |
John McCall <rjmccall@apple.com> |
A few tweaks to the value-kind computation: - Default argument expressions pick up the value kind of the incoming expression, not the value kind of the parameter it initializes. - When building a template argument for substitution, A::x is an rvalue if x is an instance method. - Anonymous struct/union paths pick up value kind the same way that normal member accesses do; extract out a common code path for this. Enable the value-kind assertion, now that it passes self-host. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120055 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaTemplate.cpp
|
7a73002783b30dcf613b06dbe618cfc1d1116ff8 |
23-Nov-2010 |
Peter Collingbourne <peter@pcc.me.uk> |
Remove static_casts from SemaDeclAttr.cpp git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120053 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
8e161ed8e63bd9d3783a987d837b72b2b96c4512 |
23-Nov-2010 |
Francois Pichet <pichet2000@gmail.com> |
Microsoft C anonymous struct implementation. Documentation: http://msdn.microsoft.com/en-us/library/z2cx9y4f.aspx git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120000 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
253e80b019727451edb4cbcad71277fcbe05ff0e |
22-Nov-2010 |
Nico Weber <nicolasweber@gmx.de> |
Fix the source range of CXXNewExprs. Fixes http://llvm.org/pr8661. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119966 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
d98114647e16796a976b04af79975b4f0eacf22b |
21-Nov-2010 |
Benjamin Kramer <benny.kra@googlemail.com> |
Fix a bunch of IndirectFieldDecl-related warnings. - Negative ChainingSize doesn't make sense, make it unsigned. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119943 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
87c2e121cf0522fc266efe2922b58091cd2e0182 |
21-Nov-2010 |
Francois Pichet <pichet2000@gmail.com> |
Major anonymous union/struct redesign. A new AST node is introduced: def IndirectField : DDecl<Value>; IndirectFields are injected into the anonymous's parent scope and chain back to the original field. Name lookup for anonymous entities now result in an IndirectFieldDecl instead of a FieldDecl. There is no functionality change, the code generated should be the same. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119919 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaInit.cpp
emaTemplateInstantiateDecl.cpp
|
44aa1f397855f130e88e62ffc1029f7f83bb5d2e |
20-Nov-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Revert r119838 "Don't warn for empty 'if' body if there is a macro that expands to nothing" and use a better and more general approach, where NullStmt has a flag to indicate whether it was preceded by an empty macro. Thanks to Abramo Bagnara for the hint! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119887 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
reeTransform.h
|
7663f396651716c82280f8fdcf97ad8e27c1ce5a |
20-Nov-2010 |
Nick Lewycky <nicholas@mxc.ca> |
A bundle of whitespace changes, separated out from the functional changes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119886 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaInit.cpp
emaOverload.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
a25b6a4b43e8b9611f7506e5fe1b448833b10a46 |
19-Nov-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Don't warn for empty 'if' body if there is a macro that expands to nothing, e.g: if (condition) CALL(0); // empty macro but don't warn for empty body. Fixes rdar://8436021. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119838 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
reeTransform.h
|
0bc5c66a1c5a69d8ea067c86c63480d3feb210fa |
19-Nov-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
objc_msgSend is not a builtin type in non-objc mode. Fixes //rdar://8686888 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119813 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
8fc32d272bd57b0a59f61c874cb7b56d9005e89e |
19-Nov-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Refactoring. Get FunctionScopeInfo to use DiagnosticErrorTrap. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119764 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
9c4eb1f3438370355f51dc8c62f2ca4803e3338d |
19-Nov-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Refactoring. Move ErrorTrap from clang/Sema to clang/Basic as DiagnosticErrorTrap and use it in Scope. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119763 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
33e4e70c8c0a17e0ccb7465d96556b077a68ecb1 |
18-Nov-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Refactoring of Diagnostic class. -Move the stuff of Diagnostic related to creating/querying diagnostic IDs into a new DiagnosticIDs class. -DiagnosticIDs can be shared among multiple Diagnostics for multiple translation units. -The rest of the state in Diagnostic object is considered related and tied to one translation unit. -Have Diagnostic point to the SourceManager that is related with. Diagnostic can now accept just a SourceLocation instead of a FullSourceLoc. -Reflect the changes to various interfaces. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119730 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
ema.cpp
emaTemplateInstantiate.cpp
|
0943168ac126b8047f30f6bd215fbe7db14d61ba |
18-Nov-2010 |
John McCall <rjmccall@apple.com> |
Add an assertion, fix a whole bunch of bugs, comment the assertion out because there are still bugs left. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119722 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
|
f4bed3f768a1effac21f3089f4c05f9ab9c37fe3 |
18-Nov-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Remove the getDiagnosticLevel check since it doesn't buy us much. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119719 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
45ab4b5f8961dadcef6545ed6956da5daf95c6cb |
18-Nov-2010 |
Craig Silverstein <csilvers2000@yahoo.com> |
In some situations, TemplateArgumentLoc wasn't setting TypeSourceLoc (see http://llvm.org/bugs/show_bug.cgi?id=8558). This patch fixes it. Thanks to rjmccall for all the coaching! Approved by rjmccall git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119697 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
f89e55ab1bfb3ea997f8b02997c611a02254eb2d |
18-Nov-2010 |
John McCall <rjmccall@apple.com> |
Calculate the value kind of an expression when it's created and store it on the expression node. Also store an "object kind", which distinguishes ordinary "addressed" l-values (like variable references and pointer dereferences) and bitfield, @property, and vector-component l-values. Currently we're not using these for much, but I aim to switch pretty much everything calculating l-valueness over to them. For now they shouldn't necessarily be trusted. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119685 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaChecking.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaObjCProperty.cpp
emaOverload.cpp
emaTemplate.cpp
reeTransform.h
|
aa4fe05939ffbfd746b8f0065cc0b5e06ea94fe2 |
18-Nov-2010 |
Anton Yartsev <anton.yartsev@gmail.com> |
comparison of AltiVec vectors now gives bool result (fix for 7533) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119678 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
1380a147d4578b619c215b23aa79ce17036d3c46 |
18-Nov-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
-Rename -Wargument-larger-than -> -Wlarge-by-value-copy -Improve the diagnostic message -Add some comments Suggestions by Chris. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119594 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
3532fdd1db8ff6f353f2a5b215cebe3e0e2ff3c2 |
18-Nov-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Introduce option -Wargument-larger-than[=N] which warns about function definitions if they take by-value or return by-value any POD that is larger than some threshold (default is 64 bytes). Implements rdar://8548050. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119583 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
cf5442648d4fdd9f1a3b524e449bbdb172ed14fa |
17-Nov-2010 |
Douglas Gregor <dgregor@apple.com> |
Do not produce "purely informative" code completion results for Objective-C message sends, which have only whitespace in their TypedText chunk. Such results have no purpose. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119569 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
de2676076ba218b5c09a88ac26dd86cc97a9d02e |
17-Nov-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Warn if direct accessing synthesized ivar backing the property in nonofragile-abi2. Fixes //rdar://8673791 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119543 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
47d512c337d06376d56beeb7eccc7c581ed5ff57 |
17-Nov-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Don't emit warn_logical_and_in_logical_or for cases like "a && b || 0". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119540 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
d92ccaa76923cfa374d5d9a33e82f15412fa3daf |
17-Nov-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Don't emit warn_logical_and_in_logical_or for macros. Fixes rdar://8678458 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119537 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
567bb71a01bcf178c6fcabb3eecf7a8c4f71e674 |
17-Nov-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Don't warn for parentheses for the '&&' inside '||' for cases like: assert(a || b && "bad"); since this is safe. This way we avoid a big source of such warnings which in this case are practically useless. Note that we don't handle *all* cases where precedence wouldn't matter because of constants since this is a bit costly to check, and IMO clarifying precedence with parentheses is good for readability in general. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119533 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
4659e1e2e06983e4de77040315537aa86984cec8 |
17-Nov-2010 |
Dan Gohman <gohman@apple.com> |
Drop the warning about __attribute__((may_alias)) being used on a non-type declaration, as GCC permits it on variables too. This fixes PR8635. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119517 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
08f92e3a5dead1f1ee656678a7f06e43279d6e50 |
17-Nov-2010 |
Chris Lattner <sabre@nondot.org> |
a metric ton of refactoring later, Sema::getLocationOfStringLiteralByte no longer depends on Preprocessor, so we can move it out of Sema into a nice new StringLiteral::getLocationOfByte method that can be used by any AST client. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119481 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
0833dd0675c25cbb35671c7a2006d511d5c77ce3 |
17-Nov-2010 |
Chris Lattner <sabre@nondot.org> |
propagate preprocessor out of StringLiteralParser. It is now possible to create one without a preprocessor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119476 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
6c66f07854c1334a1ce9eae1428d61d54182a6e1 |
17-Nov-2010 |
Chris Lattner <sabre@nondot.org> |
push use of Preprocessor out farther. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119471 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
ca1475ea0e76da6b852796610139ed9b49c8d4a6 |
17-Nov-2010 |
Chris Lattner <sabre@nondot.org> |
push use of Preprocessor out of getOffsetOfStringByte git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119470 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
91f54ce93bec136fb9e18740b895cf1c1339524b |
17-Nov-2010 |
Chris Lattner <sabre@nondot.org> |
refactor the interface to StringLiteralParser::getOffsetOfStringByte, pushing the dependency on the preprocessor out a bit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119468 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
a4ffd85a6684e42f900aad5459e58ad91bb88755 |
17-Nov-2010 |
Douglas Gregor <dgregor@apple.com> |
For an Objective-C @synthesize statement, e.g., @synthesize foo = _foo; keep track of the location of the ivar ("_foo"). Teach libclang to visit the ivar as a member reference. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119447 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
34c26300b384286c544e0b9fd45e7a3648ac79e3 |
17-Nov-2010 |
Dan Gohman <gohman@apple.com> |
Front-end support for __attribute__((may_alias)). This is not yet hooked up to anything yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119407 91177308-0d34-0410-b5e6-96231b3b80d8
ttributeList.cpp
emaDeclAttr.cpp
|
bee77f75358a5aaf2e2e01ab9cfd37ffc514ed7a |
16-Nov-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Warn about arg1 && arg2 || arg3, as GCC 4.3+ does. Fixes rdar://8659922 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119381 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e220455a059d926953befe72857b9525273717ef |
16-Nov-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Implements __block API for c++ objects. There is still issue with runtime which I am discussing it with Blaine. This is wip (so no test yet). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119368 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e08c44ee5f07117b0e3b48865b169083b54f56ed |
16-Nov-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Fix PR8625 and correctly interpret member-calls to static members when producing warnings. This feels really fragile, and I've not audited all other argument index-based warnings. I suspect we'll grow this bug on another warning eventually. It might be nice to adjust the argument indices when building up the attribute AST node, as we already have to remember about the 'this' argument within that code to produce correct errors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119340 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
9263a3060087eb7b5954ec4ee1ff2c22227b422e |
16-Nov-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Fix PR8625 and correctly interpret member-calls to static members when producing warnings. This feels really fragile, and I've not audited all other argument index-based warnings. I suspect we'll grow this bug on another warning eventually. It might be nice to adjust the argument indices when building up the attribute AST node, as we already have to remember about the 'this' argument within that code to produce correct errors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119340 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
b756fdb0a7d17bff4a8bc1a7c18ecec343b70046 |
16-Nov-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Re-work the handling of implicit 'this' arguments and silly GCC-style attribute argument indexes. This handles the offsets in a consistent manner for all of the attributes which I saw working with these concepts. I've also added tests for the attribute that motivated this: nonnull. I consolidated the tests for format attributes into one file, and fleshed them out a bit to trigger more of the warning cases. Also improved the quality of some of the diagnostics that occur with invalid argument indices. The only really questionable change here is supporting the implicit this argument for the ownership attribute. I'm not sure it's really a sensible concept there, but implemented the logic for consistency. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119339 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
07d7e7a6b10f798459f350b792713db2fb3e9365 |
16-Nov-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Re-work the handling of implicit 'this' arguments and silly GCC-style attribute argument indexes. This handles the offsets in a consistent manner for all of the attributes which I saw working with these concepts. I've also added tests for the attribute that motivated this: nonnull. I consolidated the tests for format attributes into one file, and fleshed them out a bit to trigger more of the warning cases. Also improved the quality of some of the diagnostics that occur with invalid argument indices. The only really questionable change here is supporting the implicit this argument for the ownership attribute. I'm not sure it's really a sensible concept there, but implemented the logic for consistency. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119339 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
87f3cbf94b22286fcfdf0df502e9174d5fa781e3 |
16-Nov-2010 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Improve diagnostic for calling non-const method on const object. Fixes rdar://7743000 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119336 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
64ccf2480609f4b5c27b31f6beaa157e6ec4f065 |
16-Nov-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Improve diagnostic for calling non-const method on const object. Fixes rdar://7743000 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119336 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
a4ffbd8c8f55681d39dd2be1efa60b9870f6ae34 |
16-Nov-2010 |
John McCall <rjmccall@apple.com> |
Kill CK_Unknown and flesh out the documentation for the existing CastKinds. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119331 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaChecking.cpp
|
e2b768877b77fa4e00171ee6e6443722e0f3d111 |
16-Nov-2010 |
John McCall <rjmccall@apple.com> |
Kill CK_Unknown and flesh out the documentation for the existing CastKinds. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119331 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaChecking.cpp
|
24ad73d3f087b316dffa4f2076bd4910b057b99d |
16-Nov-2010 |
John McCall <rjmccall@apple.com> |
Kill off the remaining places which generate CK_Unknown casts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119326 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaExpr.cpp
emaObjCProperty.cpp
|
1c23e91ef66688d20868b6bab3b5589a119eb603 |
16-Nov-2010 |
John McCall <rjmccall@apple.com> |
Kill off the remaining places which generate CK_Unknown casts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119326 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaExpr.cpp
emaObjCProperty.cpp
|
5599487add6698c95a8d9b53531045805c3c26b6 |
16-Nov-2010 |
John McCall <rjmccall@apple.com> |
Add an ExternalASTSource hook to complete a type on demand. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119316 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
916c870442978db40404d51348cdf5524e506faa |
16-Nov-2010 |
John McCall <rjmccall@apple.com> |
Add an ExternalASTSource hook to complete a type on demand. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119316 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
597073dafeab044fd295ea021d341b5f31357c2b |
16-Nov-2010 |
Bob Wilson <bob.wilson@apple.com> |
Add support for "neon_vector_type" and "neon_polyvector_type" attributes to create the special Neon vector types. These are intended to be used in Clang's version of <arm_neon.h> to define special Neon vector types that will be mangled according to ARM's ABI. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119301 91177308-0d34-0410-b5e6-96231b3b80d8
ttributeList.cpp
emaDeclAttr.cpp
emaType.cpp
|
4211bb68cff1f310be280f66a59520548ef99d8f |
16-Nov-2010 |
Bob Wilson <bob.wilson@apple.com> |
Add support for "neon_vector_type" and "neon_polyvector_type" attributes to create the special Neon vector types. These are intended to be used in Clang's version of <arm_neon.h> to define special Neon vector types that will be mangled according to ARM's ABI. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119301 91177308-0d34-0410-b5e6-96231b3b80d8
ttributeList.cpp
emaDeclAttr.cpp
emaType.cpp
|
af5ee790cf6a0da98e01e79a926ced7bfd71c8de |
16-Nov-2010 |
Bob Wilson <bob.wilson@apple.com> |
Fix a comment typo. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119298 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
56affbcaeff9a01caa70b2a237f7e6ac31c8ded6 |
16-Nov-2010 |
Bob Wilson <bob.wilson@apple.com> |
Fix a comment typo. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119298 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
1ebdd533402ce4e115e3a588754032ced20855a3 |
16-Nov-2010 |
John McCall <rjmccall@apple.com> |
Add a new expression kind, OpaqueValueExpr, which is useful for certain internal type-checking procedures as well as for representing certain implicitly-generated operations. Uses to follow. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119289 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
7cd7d1ad33fdf49eef83942e8855fe20d95aa1b9 |
16-Nov-2010 |
John McCall <rjmccall@apple.com> |
Add a new expression kind, OpaqueValueExpr, which is useful for certain internal type-checking procedures as well as for representing certain implicitly-generated operations. Uses to follow. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119289 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
b0957fb5663cb8fce11321103b49224e106d4e95 |
15-Nov-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement C++0x [temp.func.order]p3 (aka DR532) properly. In particular, we only add the implement object parameter type if only one of the function templates is a non-static member function template. Moreover, since this DR differs from existing practice in C++98/03, this commit implements the existing practice (which ignores the first parameter of the function template that is not the non-static member function template) in C++98/03 mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119145 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
8d706ecf488c4f548c4f8cf0aa08ea82a4d6a5ba |
15-Nov-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement C++0x [temp.func.order]p3 (aka DR532) properly. In particular, we only add the implement object parameter type if only one of the function templates is a non-static member function template. Moreover, since this DR differs from existing practice in C++98/03, this commit implements the existing practice (which ignores the first parameter of the function template that is not the non-static member function template) in C++98/03 mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119145 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
8ca89f4fdd7ad4888883ba4e5b7e6b02464172e9 |
15-Nov-2010 |
John McCall <rjmccall@apple.com> |
Yes, vector conversions are bitcasts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119141 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
0c6d28d6742de6e250560336048fcf545df4d448 |
15-Nov-2010 |
John McCall <rjmccall@apple.com> |
Yes, vector conversions are bitcasts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119141 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
6b4052d120c3ef414a822b3cff063432a1df3186 |
15-Nov-2010 |
John McCall <rjmccall@apple.com> |
Assorted work leading towards the elimination of CK_Unknown. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119138 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaChecking.cpp
emaDeclAttr.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaObjCProperty.cpp
emaOverload.cpp
emaTemplate.cpp
|
daa8e4e888758d55a7a759dd4a91b83921cef222 |
15-Nov-2010 |
John McCall <rjmccall@apple.com> |
Assorted work leading towards the elimination of CK_Unknown. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119138 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaChecking.cpp
emaDeclAttr.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaObjCProperty.cpp
emaOverload.cpp
emaTemplate.cpp
|
c948dee3af99fe58d4f94a6727b2a7c9f98434fc |
14-Nov-2010 |
John McCall <rjmccall@apple.com> |
Add a few more complex-related cast kinds that arise due to arbitrary implicit conversions; the last batch was specific to promotions. I think this is the full set we need. I do think dividing the cast kinds into floating and integral is probably a good idea. Annotate a *lot* more C casts with useful cast kinds. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119036 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
f3ea8cfe6b1c2ef0702efe130561e9e66708d799 |
14-Nov-2010 |
John McCall <rjmccall@apple.com> |
Add a few more complex-related cast kinds that arise due to arbitrary implicit conversions; the last batch was specific to promotions. I think this is the full set we need. I do think dividing the cast kinds into floating and integral is probably a good idea. Annotate a *lot* more C casts with useful cast kinds. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119036 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
9be0a77e91cbfa4ef6af18680fb81fe9574adab3 |
13-Nov-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When complaining about ambiguous overload resolution for a unary or binary operator, provide the types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119008 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
ae2cf767de457df939d07c44b162de5fe0b5e607 |
13-Nov-2010 |
Douglas Gregor <dgregor@apple.com> |
When complaining about ambiguous overload resolution for a unary or binary operator, provide the types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119008 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
a7f6ec6ae503dab3c62ee2c1772b1047fdad3c69 |
13-Nov-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When we're type-checking the result of calling a conversion function (while computing user conversion sequences), make sure that a result of class type is a complete class type. Had we gone through ActOnCallExpr, this would have happened when we built the CallExpr. Fixes PR8425. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119005 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
7d14d389f0539545715e756629127c1fe5a4773a |
13-Nov-2010 |
Douglas Gregor <dgregor@apple.com> |
When we're type-checking the result of calling a conversion function (while computing user conversion sequences), make sure that a result of class type is a complete class type. Had we gone through ActOnCallExpr, this would have happened when we built the CallExpr. Fixes PR8425. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119005 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
0bf22e6c0c3413f491ea179db51a45bcf2381391 |
13-Nov-2010 |
John McCall <rjmccall@apple.com> |
Introduce five new cast kinds for various conversions into and between complex types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118994 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
2bb5d00fcf71a7b4d478d478be778fff0494aff6 |
13-Nov-2010 |
John McCall <rjmccall@apple.com> |
Introduce five new cast kinds for various conversions into and between complex types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118994 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
0e4ca01531c7c2a854c10e8dc47b857125513f67 |
13-Nov-2010 |
John McCall <rjmccall@apple.com> |
Bring UsualArithmeticConversionsType back into Sema and cast the operands appropriately. There are a lot of missing complex-related cast kinds. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118993 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
cf33b24441798f538fb5ab089edbba2ac3ba819c |
13-Nov-2010 |
John McCall <rjmccall@apple.com> |
Bring UsualArithmeticConversionsType back into Sema and cast the operands appropriately. There are a lot of missing complex-related cast kinds. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118993 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
58c0713f0ab5ec95cea13e1fb3a194df32af48cb |
13-Nov-2010 |
John McCall <rjmccall@apple.com> |
Pre-compute all possible usual-arithmetic-conversions results for the promoted arithmetic types for which builtin operator candidates are emitted. A few of these need further analysis. Removes all the uses of UsualArithmeticConversionsType except the core function in SemaExpr.cpp. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118988 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
00071ec8f2f46201327b26e7092ffa40a53876be |
13-Nov-2010 |
John McCall <rjmccall@apple.com> |
Pre-compute all possible usual-arithmetic-conversions results for the promoted arithmetic types for which builtin operator candidates are emitted. A few of these need further analysis. Removes all the uses of UsualArithmeticConversionsType except the core function in SemaExpr.cpp. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118988 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
ce1958bf0f692928bc9e4a1b2c77755eb56d2377 |
13-Nov-2010 |
John McCall <rjmccall@apple.com> |
Store the list of arithmetic types as a static array of member pointers instead of copying them all out at the start. Not a significant optimization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118967 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
72a014197ceb759f14eeca78c713caf64d6d196d |
13-Nov-2010 |
John McCall <rjmccall@apple.com> |
Store the list of arithmetic types as a static array of member pointers instead of copying them all out at the start. Not a significant optimization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118967 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
4f6199189cdc8acb40d76c24122f57672485baec |
13-Nov-2010 |
John McCall <rjmccall@apple.com> |
Introduce a null-to-pointer implicit cast kind. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118966 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
|
404cd1669c3ba138a9ae0a619bd689cce5aae271 |
13-Nov-2010 |
John McCall <rjmccall@apple.com> |
Introduce a null-to-pointer implicit cast kind. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118966 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
|
333714bf7722848de9b629a63d366353284062a5 |
13-Nov-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement C++ [over.match.funcs]p4 as it concerns partial ordering of function templates. Fixes PR8130. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118944 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
77bc572138543ef97ebec137522b763d6a6ee909 |
13-Nov-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement C++ [over.match.funcs]p4 as it concerns partial ordering of function templates. Fixes PR8130. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118944 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
70db99371d6218cd24b0c564e24e3fc8825b266e |
12-Nov-2010 |
John McCall <rjmccall@apple.com> |
Replace one hack with a different hack: strip out the ObjectType parameters to the Transform*Type functions and instead call out the specific cases where an object type and the unqualified lookup results are important. Fixes an assert and failed compile on a testcase from PR7248. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118887 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
reeTransform.h
|
43fed0de4f5bc189e45562491f83d5193eb8dac0 |
12-Nov-2010 |
John McCall <rjmccall@apple.com> |
Replace one hack with a different hack: strip out the ObjectType parameters to the Transform*Type functions and instead call out the specific cases where an object type and the unqualified lookup results are important. Fixes an assert and failed compile on a testcase from PR7248. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118887 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
reeTransform.h
|
9ff392ff02ce0f5729dfbc0e2b596acc9365e344 |
12-Nov-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When performing initialization of a copy of a temporary object, use direct-initialization (rather than copy-initialization) to initialize the temporary, allowing explicit constructors. Fixes PR8342. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118880 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
8ff338bfd8abd9ac5d0c1d89c1b05e2c02727174 |
12-Nov-2010 |
Douglas Gregor <dgregor@apple.com> |
When performing initialization of a copy of a temporary object, use direct-initialization (rather than copy-initialization) to initialize the temporary, allowing explicit constructors. Fixes PR8342. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118880 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
a3a5aaa66d5023f00edf041d4b808ec6dd7ad8f0 |
11-Nov-2010 |
John McCall <rjmccall@apple.com> |
Undo a refactor-o and base the bitfield-truncation warning on the uncoerced value. Also, whitelist bool bitfields, which aren't really a truncation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118778 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
91b6014876e9186f968f74a8975ab8fc08ef1b68 |
11-Nov-2010 |
John McCall <rjmccall@apple.com> |
Undo a refactor-o and base the bitfield-truncation warning on the uncoerced value. Also, whitelist bool bitfields, which aren't really a truncation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118778 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
cf9507fcdc135c2be831d9e6e8a8bb051af763a2 |
11-Nov-2010 |
John McCall <rjmccall@apple.com> |
Extend the bitfield-truncation warning to initializations. rdar://problem/8652606 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118773 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaInit.cpp
|
15d7d12226f83de24f96f4bf4e27ebba30fef51e |
11-Nov-2010 |
John McCall <rjmccall@apple.com> |
Extend the bitfield-truncation warning to initializations. rdar://problem/8652606 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118773 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaInit.cpp
|
9c78fa830b4594f06ba3db0b24d50b5a3083109d |
11-Nov-2010 |
John McCall <rjmccall@apple.com> |
Unnest; no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118753 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
b934c2d77144471f35c5ebae9e925b056dac8112 |
11-Nov-2010 |
John McCall <rjmccall@apple.com> |
Unnest; no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118753 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
0a23593ad6afe1e0b9b79347504296907a84fd05 |
11-Nov-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Adding couple of Block API, a bug fix and a test change, all for blocks. wip. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118745 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e27e9d673346056e6ff7dca1d7fb1d75dfd42956 |
11-Nov-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Adding couple of Block API, a bug fix and a test change, all for blocks. wip. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118745 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
1a60422264884dc5611ae82f0dd6ec105b10a326 |
11-Nov-2010 |
John McCall <rjmccall@apple.com> |
When -Wconversion computes the range of a type, it uses the (bit-)range of the enumerators rather than the actual expressible range. This is great when dealing with opaque *values* of that type, but when computing the range of the type for purposes of converting *into* it, it produces warnings in cases we don't care about (e.g. enum_t x = 500;). Divide the logic into these two cases and use the more conservative range for targets. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118735 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
1844a6e1074a5c1fd8eadac7fc7317c3e29d4653 |
11-Nov-2010 |
John McCall <rjmccall@apple.com> |
When -Wconversion computes the range of a type, it uses the (bit-)range of the enumerators rather than the actual expressible range. This is great when dealing with opaque *values* of that type, but when computing the range of the type for purposes of converting *into* it, it produces warnings in cases we don't care about (e.g. enum_t x = 500;). Divide the logic into these two cases and use the more conservative range for targets. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118735 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
b3e547db227afec80fd921b4dbff66bd91da992f |
10-Nov-2010 |
Bob Wilson <bob.wilson@apple.com> |
Add a variant of GCC-style vector types for ARM NEON. NEON vector types need to be mangled in a special way to comply with ARM's ABI, similar to some of the AltiVec-specific vector types. This patch is mostly just renaming a bunch of "AltiVecSpecific" things, since they will no longer be specific to AltiVec. Besides that, it just adds the new "NeonVector" enum. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118724 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaInit.cpp
emaType.cpp
reeTransform.h
|
e86d78cf4754a6aef2cf9a33d847aa15338e276f |
10-Nov-2010 |
Bob Wilson <bob.wilson@apple.com> |
Add a variant of GCC-style vector types for ARM NEON. NEON vector types need to be mangled in a special way to comply with ARM's ABI, similar to some of the AltiVec-specific vector types. This patch is mostly just renaming a bunch of "AltiVecSpecific" things, since they will no longer be specific to AltiVec. Besides that, it just adds the new "NeonVector" enum. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118724 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaInit.cpp
emaType.cpp
reeTransform.h
|
5e2891651c53c2a313b7d6f6321c405ed5a7d1e3 |
10-Nov-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Instantiate class member template partial specialization declarations in the order they occur within the class template, delaying out-of-line member template partial specializations until after the class has been fully instantiated. This fixes a regression introduced by r118454 (itself a fix for PR8001). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118704 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
d65587f7a6d38965fa37158d3f57990a7faf3836 |
10-Nov-2010 |
Douglas Gregor <dgregor@apple.com> |
Instantiate class member template partial specialization declarations in the order they occur within the class template, delaying out-of-line member template partial specializations until after the class has been fully instantiated. This fixes a regression introduced by r118454 (itself a fix for PR8001). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118704 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
9e4267947dda38aa5ba2df4543e28737733f00d1 |
10-Nov-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Check for duplicate declaration of a property in current and other class extensions. // rdar://7629420 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118689 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
2a2891410b02d146b779cdb29eeb9b6d1a9fa030 |
10-Nov-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Check for duplicate declaration of a property in current and other class extensions. // rdar://7629420 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118689 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
21db9802890bd12bb62ceb0b3145a4b7cc9b86a1 |
10-Nov-2010 |
John McCall <rjmccall@apple.com> |
Propagate the deprecated and unavailable attributes from a @property declaration to the autogenerated methods. I'm uncertain whether this should apply to attributes in general, but these are a reasonable core. Implements rdar://problem/8617301 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118676 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
5de74d19ddcf84cfe9d7d973192ba93fd0c64d4f |
10-Nov-2010 |
John McCall <rjmccall@apple.com> |
Propagate the deprecated and unavailable attributes from a @property declaration to the autogenerated methods. I'm uncertain whether this should apply to attributes in general, but these are a reasonable core. Implements rdar://problem/8617301 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118676 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
34dd352b2835602dafce70491f02c66a40fefb06 |
10-Nov-2010 |
Ted Kremenek <kremenek@apple.com> |
Region-allocate all AttributeList objects from a factory object instead of manually managing them using new/delete and OwningPtrs. After memory profiling Clang, I witnessed periodic leaks of these objects; digging deeper into the code, it was clear that our management of these objects was a mess. The ownership rules were murky at best, and not always followed. Worse, there are plenty of error paths where we could screw up. This patch introduces AttributeList::Factory, which is a factory class that creates AttributeList objects and then blows them away all at once. While conceptually simple, most of the changes in this patch just have to do with migrating over to the new interface. Most of the changes have resulted in some nice simplifications. This new strategy currently holds on to all AttributeList objects during the lifetime of the Parser object. This is easily tunable. If we desire to have more bound the lifetime of AttributeList objects more precisely, we can have the AttributeList::Factory object (in Parser) push/pop its underlying allocator as we enter/leave key methods in the Parser. This means that we get simple memory management while still having the ability to finely control memory use if necessary. Note that because AttributeList objects are now BumpPtrAllocated, we may reduce malloc() traffic in many large files with attributes. This fixes the leak reported in: <rdar://problem/8650003> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118675 91177308-0d34-0410-b5e6-96231b3b80d8
ttributeList.cpp
emaDeclCXX.cpp
emaStmt.cpp
|
8113ecfa4e41e2c888b1794389dfe3bce6386493 |
10-Nov-2010 |
Ted Kremenek <kremenek@apple.com> |
Region-allocate all AttributeList objects from a factory object instead of manually managing them using new/delete and OwningPtrs. After memory profiling Clang, I witnessed periodic leaks of these objects; digging deeper into the code, it was clear that our management of these objects was a mess. The ownership rules were murky at best, and not always followed. Worse, there are plenty of error paths where we could screw up. This patch introduces AttributeList::Factory, which is a factory class that creates AttributeList objects and then blows them away all at once. While conceptually simple, most of the changes in this patch just have to do with migrating over to the new interface. Most of the changes have resulted in some nice simplifications. This new strategy currently holds on to all AttributeList objects during the lifetime of the Parser object. This is easily tunable. If we desire to have more bound the lifetime of AttributeList objects more precisely, we can have the AttributeList::Factory object (in Parser) push/pop its underlying allocator as we enter/leave key methods in the Parser. This means that we get simple memory management while still having the ability to finely control memory use if necessary. Note that because AttributeList objects are now BumpPtrAllocated, we may reduce malloc() traffic in many large files with attributes. This fixes the leak reported in: <rdar://problem/8650003> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118675 91177308-0d34-0410-b5e6-96231b3b80d8
ttributeList.cpp
emaDeclCXX.cpp
emaStmt.cpp
|
f11a3b3329c428ee277c8457cbef497b197d8f72 |
10-Nov-2010 |
John McCall <rjmccall@apple.com> |
Friend function declarations can overload with tag declarations. Fixes PR7915. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118670 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
d7945c6bfd9e0cc7ed451e6c4acd8860f2d0eaba |
10-Nov-2010 |
John McCall <rjmccall@apple.com> |
Friend function declarations can overload with tag declarations. Fixes PR7915. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118670 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
a84a8537fe56300cc3b9a9edb2244518c587cab0 |
10-Nov-2010 |
John McCall <rjmccall@apple.com> |
Diagnose attempst to template using declarations and using directives. Recover from the latter and fail early for the former. Fixes PR8022. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118669 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplate.cpp
|
78b810559d89e996e00684335407443936ce34a1 |
10-Nov-2010 |
John McCall <rjmccall@apple.com> |
Diagnose attempst to template using declarations and using directives. Recover from the latter and fail early for the former. Fixes PR8022. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118669 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplate.cpp
|
d9b01a86ec633384a3a870e43ce169a93365c1c4 |
10-Nov-2010 |
John McCall <rjmccall@apple.com> |
Tweak to bitfield-overflow warning: don't warn about storing a positive value into a signed bitfield of the exact width of the value. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118657 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
935cd6e8529edbb3b0eba660bd934b508766de37 |
10-Nov-2010 |
John McCall <rjmccall@apple.com> |
Tweak to bitfield-overflow warning: don't warn about storing a positive value into a signed bitfield of the exact width of the value. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118657 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
7d12dec762127522e05edded420b88079e6da6d3 |
10-Nov-2010 |
John McCall <rjmccall@apple.com> |
Add a warning for implicit truncation of constant values due to bitfield assignment. Implements rdar://problem/7809123 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118647 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
beb22aaa22e255241d6a81e8b0a9239f5fa584f3 |
10-Nov-2010 |
John McCall <rjmccall@apple.com> |
Add a warning for implicit truncation of constant values due to bitfield assignment. Implements rdar://problem/7809123 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118647 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
8f015ffc4e7f0af60ed699737565beae79599b43 |
09-Nov-2010 |
John McCall <rjmccall@apple.com> |
Split out -Wconversion warnings about constant precision into their own subcategory, -Wconstant-conversion, which is on by default. Tweak the constant folder to give better results in the invalid case of a negative shift amount. Implements rdar://problem/6792488 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118636 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
091f23f1d6d4bcffd6641cda72a6831e08c02ea7 |
09-Nov-2010 |
John McCall <rjmccall@apple.com> |
Split out -Wconversion warnings about constant precision into their own subcategory, -Wconstant-conversion, which is on by default. Tweak the constant folder to give better results in the invalid case of a negative shift amount. Implements rdar://problem/6792488 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118636 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
f6307976ebd61ae0a120c2c75c4cc4113b531ac0 |
09-Nov-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Test moved to its correct place. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118635 91177308-0d34-0410-b5e6-96231b3b80d8
uiltin_objc_msgSend.c
|
73167ec561c1dc3f34cbca2287c83985cbf2bfdf |
09-Nov-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Test moved to its correct place. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118635 91177308-0d34-0410-b5e6-96231b3b80d8
uiltin_objc_msgSend.c
|
28a226b02fd749c9b6d6cf43aac0e32c7c7da449 |
09-Nov-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Restore patch reversed in r118475. Fixes // rdar://8632525 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118634 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
uiltin_objc_msgSend.c
|
ba8bda05fefd3bb2f1ef201784b685f715bdde29 |
09-Nov-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Restore patch reversed in r118475. Fixes // rdar://8632525 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118634 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
uiltin_objc_msgSend.c
|
d0df66c9f8bb54f33b0b2a77266a7d0e414889ae |
09-Nov-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Attempt to resolve overloaded functions in comma expressions and conditional operators. Fixes PR7863. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118631 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
7ad5d421d9f12bd287aa17fdb00e0f4d5971d76f |
09-Nov-2010 |
Douglas Gregor <dgregor@apple.com> |
Attempt to resolve overloaded functions in comma expressions and conditional operators. Fixes PR7863. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118631 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
8fbf643683bb55bdd168cfa7f9bbf33969402f6f |
09-Nov-2010 |
Chris Lattner <sabre@nondot.org> |
tidy up git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118626 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
7d64271b162eaf5cae264ff64465b28af623dc17 |
09-Nov-2010 |
Chris Lattner <sabre@nondot.org> |
tidy up git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118626 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
dfd0279b0674e19c2b324d3ed3e4b7892c95ab5d |
09-Nov-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Revert the fix for PR8013. That bug concerned the well-formedness of code such as (&ovl)(a, b, c). GCC rejects the code, while EDG accepts it. On further study of the standard, I see no support for EDG's position: in particular, C++ [over.over] does not list this as a context where we can take the address of an overloaded function, C++ [over.call.func] does not reference the address-of operator at any point, and C++ [expr.call] claims that the function argument in a call is either a function lvalue or a pointer-to-function; (&ovl) is neither. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118620 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
emaExpr.cpp
|
ef9b1497908ab1684e04f244289f1ebe8d44274e |
09-Nov-2010 |
Douglas Gregor <dgregor@apple.com> |
Revert the fix for PR8013. That bug concerned the well-formedness of code such as (&ovl)(a, b, c). GCC rejects the code, while EDG accepts it. On further study of the standard, I see no support for EDG's position: in particular, C++ [over.over] does not list this as a context where we can take the address of an overloaded function, C++ [over.call.func] does not reference the address-of operator at any point, and C++ [expr.call] claims that the function argument in a call is either a function lvalue or a pointer-to-function; (&ovl) is neither. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118620 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
emaExpr.cpp
|
a8fb91f0dd241c4bbba5238819fa25d4c18177fc |
09-Nov-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Handle overload resolution when calling an overloaded function set with, e.g., (&f)(a, b, c). Fixes PR8013. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118508 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
emaExpr.cpp
|
9a0f2b6d89ae16abb882cd0ec0be2222e15c3785 |
09-Nov-2010 |
Douglas Gregor <dgregor@apple.com> |
Handle overload resolution when calling an overloaded function set with, e.g., (&f)(a, b, c). Fixes PR8013. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118508 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
emaExpr.cpp
|
29bd5e2fc30c066127921a278db4abacd59844d3 |
09-Nov-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Make #pragma unused work for static local variables. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118500 91177308-0d34-0410-b5e6-96231b3b80d8
emaAttr.cpp
|
268f89e02de7bddbc9d7d7a147a3003bd81cf0d7 |
09-Nov-2010 |
Douglas Gregor <dgregor@apple.com> |
Make #pragma unused work for static local variables. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118500 91177308-0d34-0410-b5e6-96231b3b80d8
emaAttr.cpp
|
1c82cc23a4aff7899f98e1e0a1b47360f471d51d |
09-Nov-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Teach code completion not to include out-of-line declarations and definitions in its results. The original declarations will be visible wherever they are declared. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118484 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
9b0ba87a5ee4d872ae60dbfe4cbd500e57b8a775 |
09-Nov-2010 |
Douglas Gregor <dgregor@apple.com> |
Teach code completion not to include out-of-line declarations and definitions in its results. The original declarations will be visible wherever they are declared. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118484 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
d2e23ce4b26953c891a0ab492701e036a0a07495 |
09-Nov-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix source locations in unnamed bitfield diagnostic, from Jakub Wieczorek! Fixes PR8025. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118481 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
90ba6d5cf790c98231c93a63a5b1f7c6a95bd6b6 |
09-Nov-2010 |
Douglas Gregor <dgregor@apple.com> |
Fix source locations in unnamed bitfield diagnostic, from Jakub Wieczorek! Fixes PR8025. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118481 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
b91e55346c28b86f2abffe4c905a1850aa108bf4 |
09-Nov-2010 |
Nick Lewycky <nicholas@mxc.ca> |
Fix warning about unused variable 'Fn' in no-asserts builds. Also reflow this block so that it looks more like the rest of the file. No functional change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118459 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
43328e91627382870d51b5d84e08873cc0c970eb |
09-Nov-2010 |
Nick Lewycky <nicholas@mxc.ca> |
Fix warning about unused variable 'Fn' in no-asserts builds. Also reflow this block so that it looks more like the rest of the file. No functional change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118459 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
83c510d9e78ba596c7618afc382f6d2e40d05204 |
09-Nov-2010 |
Nick Lewycky <nicholas@mxc.ca> |
Don't lose track of previous-declarations when instantiating a class template. Fixes PR8001. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118454 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
37574f55cd637340f651330f5cfda69742880d36 |
09-Nov-2010 |
Nick Lewycky <nicholas@mxc.ca> |
Don't lose track of previous-declarations when instantiating a class template. Fixes PR8001. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118454 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
bbead4dcb574bd7d2b86ed9926483e9b124537cb |
08-Nov-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
If an instance method messages is sending to an expression of type Class, and we statically can compute a bound on the actual type (e.g., because it's a send to the the magic "class" instance method), code complete as if we were performing a class message send to that class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118443 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
da892649f9a0b6dd92eecb97c7959dc3f968241f |
08-Nov-2010 |
Douglas Gregor <dgregor@apple.com> |
If an instance method messages is sending to an expression of type Class, and we statically can compute a bound on the actual type (e.g., because it's a send to the the magic "class" instance method), code complete as if we were performing a class message send to that class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118443 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
216eb2c4f258b9d45343ef74ff56703cbf7557a4 |
08-Nov-2010 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
When building a compound literal, check that the base element of the array is complete. Fixes rdar://8620582 & http://llvm.org/PR7905 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118428 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e6fe9a28bc5ceec284099c1e5bc90e2316ade3de |
08-Nov-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
When building a compound literal, check that the base element of the array is complete. Fixes rdar://8620582 & http://llvm.org/PR7905 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118428 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
49faccdf4e9532c5c1e80581aab8ee622cf26a07 |
08-Nov-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve our handling of C++ [class.copy]p3, which specifies that a constructor template will not be used to copy a class object to a value of its own type. We were eliminating all constructor templates whose specializations look like a copy constructor, which eliminated important candidates. Fixes PR8182. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118418 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
emaOverload.cpp
|
6493cc50b66c2d097b3e22514bbe303048c4a8ff |
08-Nov-2010 |
Douglas Gregor <dgregor@apple.com> |
Improve our handling of C++ [class.copy]p3, which specifies that a constructor template will not be used to copy a class object to a value of its own type. We were eliminating all constructor templates whose specializations look like a copy constructor, which eliminated important candidates. Fixes PR8182. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118418 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
emaOverload.cpp
|
66db3b09cc9c6ea34bc6aa794bbee336bc9480b9 |
08-Nov-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When attempting reference binding to an overloaded function, also consider that we might be trying to bind a reference to a class type, which involves a constructor call. Fixes PR7425. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118407 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
3afb97700200f629d6036e437267af9c1fd37c90 |
08-Nov-2010 |
Douglas Gregor <dgregor@apple.com> |
When attempting reference binding to an overloaded function, also consider that we might be trying to bind a reference to a class type, which involves a constructor call. Fixes PR7425. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118407 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
5754a0ff32686682ab664ffdc5dcc6074086c1aa |
08-Nov-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Properly diagnose invalid casts to function references. Patch by Faisal Vali, tweaked by me. Fixes PR8230. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118400 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaInit.cpp
emaOverload.cpp
|
8e960435696b4ccf6a8ad0ed0530e3280b77af8b |
08-Nov-2010 |
Douglas Gregor <dgregor@apple.com> |
Properly diagnose invalid casts to function references. Patch by Faisal Vali, tweaked by me. Fixes PR8230. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118400 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaInit.cpp
emaOverload.cpp
|
99cb76d06906fd6c126da9c22f7af15c8658457b |
08-Nov-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Remove broken support for variadic templates, along with the various abstractions (e.g., TemplateArgumentListBuilder) that were designed to support variadic templates. Only a few remnants of variadic templates remain, in the parser (parsing template type parameter packs), AST (template type parameter pack bits and TemplateArgument::Pack), and Sema; these are expected to be used in a future implementation of variadic templates. But don't get too excited about that happening now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118385 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
910f8008fea79120489a53593fe971b0b8a4a740 |
08-Nov-2010 |
Douglas Gregor <dgregor@apple.com> |
Remove broken support for variadic templates, along with the various abstractions (e.g., TemplateArgumentListBuilder) that were designed to support variadic templates. Only a few remnants of variadic templates remain, in the parser (parsing template type parameter packs), AST (template type parameter pack bits and TemplateArgument::Pack), and Sema; these are expected to be used in a future implementation of variadic templates. But don't get too excited about that happening now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118385 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
dcdac090356c2408cae49942db7e71bf97149bca |
07-Nov-2010 |
Anders Carlsson <andersca@mac.com> |
A union cannot contain static data members or data members of reference type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118381 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
dfdfc584f2a8d9f1eebd6e6eaa9b1bbff519d8f9 |
07-Nov-2010 |
Anders Carlsson <andersca@mac.com> |
A union cannot contain static data members or data members of reference type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118381 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
adb9d5f0810379fa4e17ddb9b9de9474e0ebbac1 |
07-Nov-2010 |
Ted Kremenek <kremenek@apple.com> |
Fix memory leak of IdentifierIterator object. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118371 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
7a054b1a2ebd265bbc8c640d176af92ad0965701 |
07-Nov-2010 |
Ted Kremenek <kremenek@apple.com> |
Fix memory leak of IdentifierIterator object. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118371 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
d410e41ccddf477e3e4f7961c31050e1fa9fce73 |
06-Nov-2010 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
When determining which template partial specialization is more specialized, make sure to setup the instantiation stack. Fixes rdar://8620775 & http://llvm.org/PR8234 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118314 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
2c4792c731690dbbcbe69dd0625977adffc2961a |
06-Nov-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
When determining which template partial specialization is more specialized, make sure to setup the instantiation stack. Fixes rdar://8620775 & http://llvm.org/PR8234 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118314 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
1a81a11dffa46da43843083ba93a1b9f150fa30a |
06-Nov-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When searching for an instantiated declaration requires instantiation of its parent context, be sure to update the parent-context pointer after instantiation. Fixes two anonymous-union instantiation issues in <rdar://problem/8635664>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118313 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
a43064c7b721a51ab2c0d0ccdc4f84064aa7cecc |
06-Nov-2010 |
Douglas Gregor <dgregor@apple.com> |
When searching for an instantiated declaration requires instantiation of its parent context, be sure to update the parent-context pointer after instantiation. Fixes two anonymous-union instantiation issues in <rdar://problem/8635664>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118313 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
a3b8f0755758eee99f269978bdd02a887c6a4b50 |
05-Nov-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Check for an invalid field earlier in a constructor's initialization of that field. Otherwise, we can end up building and later trying to instantiate a dependent member initializer that will fail at instantiation time. Unfortunately, I've only managed to trigger this bug with very large sources, so there's no test case :( git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118306 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
464b2f0ab31f6de8761f76f6754809f9746f4584 |
05-Nov-2010 |
Douglas Gregor <dgregor@apple.com> |
Check for an invalid field earlier in a constructor's initialization of that field. Otherwise, we can end up building and later trying to instantiate a dependent member initializer that will fail at instantiation time. Unfortunately, I've only managed to trigger this bug with very large sources, so there's no test case :( git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118306 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
369d9e21254b91964a11d8cd4f27c3a7e0d89834 |
05-Nov-2010 |
Anders Carlsson <andersca@mac.com> |
Expressions of type std::nullptr_t can be used as sentinels. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118276 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
343e6ffa70459b1afdb488c69fb651434a5016c0 |
05-Nov-2010 |
Anders Carlsson <andersca@mac.com> |
Expressions of type std::nullptr_t can be used as sentinels. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118276 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
48baba586d1ac2e04f325af0b77c4edd36c99707 |
05-Nov-2010 |
Anders Carlsson <andersca@mac.com> |
Implement [over.ics.rank]p4: A conversion that does not convert an std::nullptr_t to bool is better than one than does. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118269 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
c8df0b634ee5ca8573852fdc96252b8bba5a10db |
05-Nov-2010 |
Anders Carlsson <andersca@mac.com> |
Implement [over.ics.rank]p4: A conversion that does not convert an std::nullptr_t to bool is better than one than does. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118269 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
802862852fb82e972d9540da63018c33f732e7fb |
04-Nov-2010 |
John McCall <rjmccall@apple.com> |
Use the real keyword location when rebuilding an elaborated type instead of making something up. Fixes PR8129. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118258 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
reeTransform.h
|
21e413fe6305a198564d436ac515497716c47844 |
04-Nov-2010 |
John McCall <rjmccall@apple.com> |
Use the real keyword location when rebuilding an elaborated type instead of making something up. Fixes PR8129. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118258 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
reeTransform.h
|
2aad72f4e164201fb167638150eeff49bff06ab2 |
04-Nov-2010 |
Anders Carlsson <andersca@mac.com> |
std::nullptr_t is a fundamental type for RTTI purposes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118238 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
2bd6250f8e14750033362664ee298c2cc0e64853 |
04-Nov-2010 |
Anders Carlsson <andersca@mac.com> |
std::nullptr_t is a fundamental type for RTTI purposes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118238 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
68ddf3fc7e63a08755c55aa8dfe23240c52aecf3 |
04-Nov-2010 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Don't instantiate members not belonging in the semantic context of the template. e.g. for: template <int i> class A { class B *g; }; 'class B' has the template as lexical context but semantically it is introduced in namespace scope. Fixes rdar://8611125 & http://llvm.org/PR8505 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118235 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
bb5e431bf187a9f3cabb72045694fbaea414a702 |
04-Nov-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Don't instantiate members not belonging in the semantic context of the template. e.g. for: template <int i> class A { class B *g; }; 'class B' has the template as lexical context but semantically it is introduced in namespace scope. Fixes rdar://8611125 & http://llvm.org/PR8505 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118235 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
7ed541cd38b3ac7dc2f54fde8965afebbe0984e6 |
04-Nov-2010 |
Anders Carlsson <andersca@mac.com> |
It's OK to use nullptr in relational operators if the other side is a null pointer constant. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118234 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
0c8209e40b405fd32f047e95aafdc94054406a58 |
04-Nov-2010 |
Anders Carlsson <andersca@mac.com> |
It's OK to use nullptr in relational operators if the other side is a null pointer constant. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118234 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
832b0d9dae759281ed8b43d692c73f74c1e8e081 |
03-Nov-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When producing overload candidates for binary built-in operators, keep the sets of available conversions for the first and second arguments separate. This is apparently the indent of C++ [over.built], and reduces the number of overload candidates generated, eliminating some ambiguities. Fixes PR8477. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118178 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
fec56e7e341cd1d9a861d64bffc80a97aed89802 |
03-Nov-2010 |
Douglas Gregor <dgregor@apple.com> |
When producing overload candidates for binary built-in operators, keep the sets of available conversions for the first and second arguments separate. This is apparently the indent of C++ [over.built], and reduces the number of overload candidates generated, eliminating some ambiguities. Fixes PR8477. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118178 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
098bd2b151e9d566b66af2b069e006e41338716d |
03-Nov-2010 |
Sean Hunt <rideau3@gmail.com> |
Provide an error when a non-identifier name (such as an operator) is used as a parameter name. Fixes PR8012. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118138 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
7533a5b65f81a4eed1e0f0afeb859e26bc0c056b |
03-Nov-2010 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Provide an error when a non-identifier name (such as an operator) is used as a parameter name. Fixes PR8012. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118138 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
6cb4432d0b7a50db290d63e28ba4fc238f2d1cdd |
03-Nov-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve source-location information for CXXConstructExpr nodes, by ensuring that they cover all of their child nodes. There's still a clang_getCursor()-related issue with CXXFunctionalCastExprs with CXXConstructExprs as children (see FIXME in the test case); I'll look at that separately. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118132 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
40749ee585abc84fbb3c8fdbd8aaac062f153062 |
03-Nov-2010 |
Douglas Gregor <dgregor@apple.com> |
Improve source-location information for CXXConstructExpr nodes, by ensuring that they cover all of their child nodes. There's still a clang_getCursor()-related issue with CXXFunctionalCastExprs with CXXConstructExprs as children (see FIXME in the test case); I'll look at that separately. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118132 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
42d2b2fd1ce4d109872b86213dbe45192f62c1bc |
02-Nov-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Teach code completion to provide property results when the property can be used to automatically synthesize an ivar. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118052 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
emaExpr.cpp
emaLookup.cpp
|
ca45da0c6da20d9c0c903370f99af5e9a186e0da |
02-Nov-2010 |
Douglas Gregor <dgregor@apple.com> |
Teach code completion to provide property results when the property can be used to automatically synthesize an ivar. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118052 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
emaExpr.cpp
emaLookup.cpp
|
35bed2aa27b645a1a39efeff3256c4c4148c73dd |
02-Nov-2010 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Properly handle temporaries that are created in a AsmStmt. Previously the temporaries would get destroyed before the asm call. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118001 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
bf8cafadb9d4e0d7a90fe78fc175efb80ae34d42 |
02-Nov-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Properly handle temporaries that are created in a AsmStmt. Previously the temporaries would get destroyed before the asm call. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118001 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
dde1645d6ae6396f5ddec5f27ea3cc1f04dc10f6 |
02-Nov-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When performing template argument deduction against a template-id, only keep deduction results for successful deductions, so that they can be compared against each other. Fixes PR8462, from Richard Smith! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117983 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
053105d58552c600a2e56473592212a9bddafcd4 |
02-Nov-2010 |
Douglas Gregor <dgregor@apple.com> |
When performing template argument deduction against a template-id, only keep deduction results for successful deductions, so that they can be compared against each other. Fixes PR8462, from Richard Smith! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117983 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
56d65b125179b539d3ea1715ca7cc46d2de74946 |
01-Nov-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Eliminate an unused local variable git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117963 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
21e75d00b0e016fa89d54cf5b4e7d48bf5ff6e57 |
01-Nov-2010 |
Douglas Gregor <dgregor@apple.com> |
Eliminate an unused local variable git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117963 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
43a2aa7002c1f8196c7128c513e3dd95b19599f8 |
01-Nov-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Harden Sema::MaybeBindTotemporary. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117954 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
19cc1c715e97885f10b3496f91d0a8ae24642faa |
01-Nov-2010 |
Douglas Gregor <dgregor@apple.com> |
Harden Sema::MaybeBindTotemporary. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117954 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
908200b4754e1544a13c602c412e66ce32d74635 |
01-Nov-2010 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Emit error when using a bound member function for something other than calling it. Also avoids IRGen crashes due to accepting invalid code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117943 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaExpr.cpp
emaStmt.cpp
|
11ab79030938209f50691acae0ddb65e72a58ca9 |
01-Nov-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Emit error when using a bound member function for something other than calling it. Also avoids IRGen crashes due to accepting invalid code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117943 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaExpr.cpp
emaStmt.cpp
|
d1f3fdb1fbed5e91c55cea66ec7c4edd9b805fdc |
01-Nov-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Require that the types of the parameters of a block literal are complete. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117942 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDecl.cpp
emaExpr.cpp
|
82aa713bcda99f388836c2a30bb868d9c9974817 |
01-Nov-2010 |
Douglas Gregor <dgregor@apple.com> |
Require that the types of the parameters of a block literal are complete. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117942 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDecl.cpp
emaExpr.cpp
|
f0e3e30d42c2c72ece53393d8d5d045e0c24ac70 |
30-Oct-2010 |
Nick Lewycky <nicholas@mxc.ca> |
Preserve the template type parameter name when instantiating a templace. Fixes PR8489. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117776 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
61139c561f1a2c872209e32ff9143487cebf4324 |
30-Oct-2010 |
Nick Lewycky <nicholas@mxc.ca> |
Preserve the template type parameter name when instantiating a templace. Fixes PR8489. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117776 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
6ac524b7c3428c9449db281a4d851351f8ec4dff |
30-Oct-2010 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Don't remove the init expression from the initializer list if it had a semantic error. We already flag the error with InitListChecker's hadError and we mess up the AST unnecessarily. Fixes rdar://8605381. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117760 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
d86132d52c1dd99ad5519abaad92533712692a8b |
30-Oct-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Don't remove the init expression from the initializer list if it had a semantic error. We already flag the error with InitListChecker's hadError and we mess up the AST unnecessarily. Fixes rdar://8605381. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117760 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
2c5695df67c369523bddebe525bc6e410905cb1f |
30-Oct-2010 |
John McCall <rjmccall@apple.com> |
When list-initializing a vector, try to copy-initialize from vectors instead of descending into the subelements. rdar://problem/8345836 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117749 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
20e047abc5f19dc948436c0fb891450d9cd40667 |
30-Oct-2010 |
John McCall <rjmccall@apple.com> |
When list-initializing a vector, try to copy-initialize from vectors instead of descending into the subelements. rdar://problem/8345836 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117749 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
1bfa059effa6b3cf3cf4b2f377a8f8e2f7d2cd12 |
30-Oct-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Improve diagnostics reporting of un-implemented methods in protocols when protocols are in system headers and thus ignored. //rdar: //8227199 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117739 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
61c8d3ecac8d565136ac82e9ea06c351227c9c5a |
30-Oct-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Improve diagnostics reporting of un-implemented methods in protocols when protocols are in system headers and thus ignored. //rdar: //8227199 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117739 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
f1e4bb699b977f537af45416ee369b9ce2827c23 |
29-Oct-2010 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
When doing name lookup for members don't look into global/namespace scope. Better performance and fixes rdar://8603569. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117656 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
78f5911a4ef8742c51a7f7643957e1aaa0098324 |
29-Oct-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
When doing name lookup for members don't look into global/namespace scope. Better performance and fixes rdar://8603569. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117656 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
ed022b71b0e1d96d924ad681fd591f65f669503e |
28-Oct-2010 |
John McCall <rjmccall@apple.com> |
Implement an indirect-goto optimization for goto *&&lbl and respect this in the scope checker. With that done, turn an indirect goto into a protected scope into a hard error; otherwise IR generation has to start worrying about declarations not dominating their scopes, as exemplified in PR8473. If this really affects anyone, I can probably adjust this to only hard-error on possible indirect gotos into VLA scopes rather than arbitrary scopes. But we'll see how people cope with the aggressive change on the marginal feature. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117539 91177308-0d34-0410-b5e6-96231b3b80d8
umpDiagnostics.cpp
|
95c225de9fa3d79f70ef5008c0279580a7d9dcad |
28-Oct-2010 |
John McCall <rjmccall@apple.com> |
Implement an indirect-goto optimization for goto *&&lbl and respect this in the scope checker. With that done, turn an indirect goto into a protected scope into a hard error; otherwise IR generation has to start worrying about declarations not dominating their scopes, as exemplified in PR8473. If this really affects anyone, I can probably adjust this to only hard-error on possible indirect gotos into VLA scopes rather than arbitrary scopes. But we'll see how people cope with the aggressive change on the marginal feature. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117539 91177308-0d34-0410-b5e6-96231b3b80d8
umpDiagnostics.cpp
|
18cadfc6c150f2a41c0a0282daa970c4acbc6e2e |
28-Oct-2010 |
John McCall <rjmccall@apple.com> |
Implement the newest status quo for method override checking. The idea now is that we need more information to decide the exact conditions for whether one ObjCObjectPointer is an acceptable return/parameter override for another, so we're going to disable that entire class of warning for now. The "forward developement" warning category, -Wmethod-signatures, can receive unrestricted feature work, and when we're happy with how it acts, we'll turn it on by default. This is a pretty conservative change, and nobody's totally content with it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117524 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
10302c01e8ceffd86c1a2b1bb15466e852ca8898 |
28-Oct-2010 |
John McCall <rjmccall@apple.com> |
Implement the newest status quo for method override checking. The idea now is that we need more information to decide the exact conditions for whether one ObjCObjectPointer is an acceptable return/parameter override for another, so we're going to disable that entire class of warning for now. The "forward developement" warning category, -Wmethod-signatures, can receive unrestricted feature work, and when we're happy with how it acts, we'll turn it on by default. This is a pretty conservative change, and nobody's totally content with it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117524 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
25bdd7ae3539c7441e6763a1946016761c0587f3 |
27-Oct-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Decay array/function types of a statement-expression. // rdar: // 8600553. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117484 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
4bdc446fd46c66068a3697ff552607bd2ef0f948 |
27-Oct-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Decay array/function types of a statement-expression. // rdar: // 8600553. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117484 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
990776e11cfd688aab6cd2d2d0484bdc9a81dd4e |
27-Oct-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
patch to do array-to-pointer conversion in a statement-expression. // rdar: //8600553 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117479 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
500b782d51541a5f20f3113305bc3842fba8b77a |
27-Oct-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
patch to do array-to-pointer conversion in a statement-expression. // rdar: //8600553 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117479 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
dc4f60d18e4a519c37756a4d52fc2b9fb5d0ec80 |
27-Oct-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Remove redundant test git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117446 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
157a3ff14d2dfe21c63fec34f07bf917d0ccf789 |
27-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
Remove redundant test git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117446 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
bf6c4651811d95cc7f58e6daf16a8f7b1705d706 |
27-Oct-2010 |
John McCall <rjmccall@apple.com> |
Avoid calculating linkage until the more obvious checks have run when deciding whether to queue a decl for unused-declaration warnings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117431 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
82b965992fbd27da37b9e13b5ef618d73f33e5c9 |
27-Oct-2010 |
John McCall <rjmccall@apple.com> |
Avoid calculating linkage until the more obvious checks have run when deciding whether to queue a decl for unused-declaration warnings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117431 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
35162c18648975ac44eb47c1bb8481296fc90b60 |
27-Oct-2010 |
John McCall <rjmccall@apple.com> |
Don't compute linkage for a declaration as part of the #pragma weak forward-declaration support unless there's really a mapping for that name. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117426 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
d4aff0e2b77879e27e7e4eac8c972aaaa293fa12 |
27-Oct-2010 |
John McCall <rjmccall@apple.com> |
Don't compute linkage for a declaration as part of the #pragma weak forward-declaration support unless there's really a mapping for that name. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117426 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
200663fe0cc6812de6614d23068dd1a9516be1fb |
26-Oct-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Teach typo correction not to return the same keyword that matches a typo. This can happen with context-sensitive keywords like "super", when typo correction didn't know that "super" wasn't permitted in this context. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117372 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
53e4b55d2c534cfd59021ff18349ac58979ce43f |
26-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
Teach typo correction not to return the same keyword that matches a typo. This can happen with context-sensitive keywords like "super", when typo correction didn't know that "super" wasn't permitted in this context. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117372 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
c8149b0df721d5ec08cb73021aa69e0b429d9a3f |
26-Oct-2010 |
John McCall <rjmccall@apple.com> |
No really, we don't have a retain/release system for statements/expressions anymore. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117357 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaInit.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
3fa5cae9b3812cab9fab6c042c3329bb70a3d046 |
26-Oct-2010 |
John McCall <rjmccall@apple.com> |
No really, we don't have a retain/release system for statements/expressions anymore. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117357 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaInit.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
e12601ff521d54a3bfc96e52ddc7dbb5817db453 |
26-Oct-2010 |
John McCall <rjmccall@apple.com> |
Actually, that doesn't really work, and anyway we should choose conversion to id over conversion to void*. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117355 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
202422eea3b7c1c455edd168e6e79a50e732d7a9 |
26-Oct-2010 |
John McCall <rjmccall@apple.com> |
Actually, that doesn't really work, and anyway we should choose conversion to id over conversion to void*. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117355 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
217ce68bcdfb14d5a11bcdf0c065e95df751182b |
26-Oct-2010 |
John McCall <rjmccall@apple.com> |
Consider conversions of Objective-C pointers to 'id' to be basically of the same rank as conversions of normal pointers to 'void*'. Also, resurrect a test case. Fixes rdar://problem/8592139 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117354 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
6d09da00bf5b5841380eae76571798ced6697f4c |
26-Oct-2010 |
John McCall <rjmccall@apple.com> |
Consider conversions of Objective-C pointers to 'id' to be basically of the same rank as conversions of normal pointers to 'void*'. Also, resurrect a test case. Fixes rdar://problem/8592139 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117354 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
95f76e7782cabe5b84a1dc329d2b69981b328bd8 |
26-Oct-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Delay complete-type checking for arguments to no-prototype functions until after we've checked/promoted the argument. Hopefully fixes the Emacs regression due to my recent change that expanded type-checking in the presence of K&R function definitions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117353 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
0700bbfbccc639f093f0e2a9b2ae94a213f218b4 |
26-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
Delay complete-type checking for arguments to no-prototype functions until after we've checked/promoted the argument. Hopefully fixes the Emacs regression due to my recent change that expanded type-checking in the presence of K&R function definitions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117353 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
3e4a1e889180a2f6c33ee083bd42b614b39430fa |
26-Oct-2010 |
John McCall <rjmccall@apple.com> |
Pending further discussion, re-enable warnings for Objective C covariant/contravariant overrides and implementations, but do so under control of a new flag (-Wno-objc-covariant-overrides, which yes does cover contravariance too). *At least* the covariance cases will probably be enabled by default shortly, but that's not totally uncontroversial. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117346 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
1235b0ebb16618bf41a9e7234d5e2690faf97d37 |
26-Oct-2010 |
John McCall <rjmccall@apple.com> |
Pending further discussion, re-enable warnings for Objective C covariant/contravariant overrides and implementations, but do so under control of a new flag (-Wno-objc-covariant-overrides, which yes does cover contravariance too). *At least* the covariance cases will probably be enabled by default shortly, but that's not totally uncontroversial. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117346 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
626161ecc7e10b432e2b293fe806ba314c1f4aa7 |
26-Oct-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch for mis-compile of statement expressions with non-trivial copy constructors. // rdar: //8540501. A test will be added to llvm nightly tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117324 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e946fc833d8592aa2890bfd9839f1ad839b3d284 |
26-Oct-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch for mis-compile of statement expressions with non-trivial copy constructors. // rdar: //8540501. A test will be added to llvm nightly tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117324 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
1b981fbf74b6e8e659a187b1b78ca35983c614e4 |
25-Oct-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Look through the address-of operator to find the function being called. Fixes another aspect of PR8314. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117308 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
d8f0ade43ee3f9d13d2d98b7a3d07468c2b4096e |
25-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
Look through the address-of operator to find the function being called. Fixes another aspect of PR8314. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117308 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
f9188df2a388c0eac4fc82964cd50c7d2d6191c2 |
25-Oct-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When we're calling a function that we know based on its K&R-style function definition, we should still use a prototype to type-check and convert the function arguments, if such a prototype exists. Fixes PR8314. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117305 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
4654241866c91fa312d7b26d5eb4afd070b5c602 |
25-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
When we're calling a function that we know based on its K&R-style function definition, we should still use a prototype to type-check and convert the function arguments, if such a prototype exists. Fixes PR8314. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117305 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b2e3cb4fc1aaf4761b2f75b1ece91c937ae8d6e2 |
25-Oct-2010 |
David Chisnall <csdavec@swan.ac.uk> |
Only warn for mismatched types in Objective-C methods when they are incompatible, not when they are simply different. Now we test whether the difference in types breaks the principle of substitutability, rather than whether they are different. A common idiom in Objective-C is to provide a definition of a method in a subclass that returns a more-specified version of an object than the superclass. This does not violate the principle of substitutability, because you can always use the object returned by the subclass anywhere that you could use the type returned by the superclass. It was, however, generating warnings with clang, leading people to believe that semantically correct code was incorrect and requiring less accurate type specification and explicit down-casts (neither of which is a good thing to encourage). This change ensures that any method definition has parameter and return types that make it accept anything that something conforming to the declaration may pass and return something that the caller will expect, but allows stricter definitions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117271 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
e8a2d4c32cb2a7840bd91c9cf9b7838ee3f47dc3 |
25-Oct-2010 |
David Chisnall <csdavec@swan.ac.uk> |
Only warn for mismatched types in Objective-C methods when they are incompatible, not when they are simply different. Now we test whether the difference in types breaks the principle of substitutability, rather than whether they are different. A common idiom in Objective-C is to provide a definition of a method in a subclass that returns a more-specified version of an object than the superclass. This does not violate the principle of substitutability, because you can always use the object returned by the subclass anywhere that you could use the type returned by the superclass. It was, however, generating warnings with clang, leading people to believe that semantically correct code was incorrect and requiring less accurate type specification and explicit down-casts (neither of which is a good thing to encourage). This change ensures that any method definition has parameter and return types that make it accept anything that something conforming to the declaration may pass and return something that the caller will expect, but allows stricter definitions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117271 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
fe1419904bce9fcd0423c0735ccee25445fecd61 |
25-Oct-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Improve the tracking of source locations for parentheses in constructor calls. This adds them where missing, and traces them through PCH. We fix at least one bug in the extents found by the Index library, and make a lot of refactoring tools which care about the exact formulation of a constructor call easier to write. Also some minor cleanups to more consistently follow the friend pattern instead of the setter pattern when rebuilding a serialized AST. Patch originally by Samuel Benzaquen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117254 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExprCXX.cpp
emaInit.cpp
reeTransform.h
|
428edafa9eb80e01dd40aab31d4166a787a741e1 |
25-Oct-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Improve the tracking of source locations for parentheses in constructor calls. This adds them where missing, and traces them through PCH. We fix at least one bug in the extents found by the Index library, and make a lot of refactoring tools which care about the exact formulation of a constructor call easier to write. Also some minor cleanups to more consistently follow the friend pattern instead of the setter pattern when rebuilding a serialized AST. Patch originally by Samuel Benzaquen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117254 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExprCXX.cpp
emaInit.cpp
reeTransform.h
|
0b4f0d46ae0d2cae877064ac743f81c1ecf934ea |
23-Oct-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
C++ [basic.scope.hiding] allows an ordinary name to hide a non-tag name *in the same scope*, but not across scopes. Implement the highlighted condition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117212 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
77a1a8868e03bb74412f001f32d66ce0c26afae6 |
23-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
C++ [basic.scope.hiding] allows an ordinary name to hide a non-tag name *in the same scope*, but not across scopes. Implement the highlighted condition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117212 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
fd22f9db9eb1ca89fd30a994c4771220b52dd3e8 |
23-Oct-2010 |
Anders Carlsson <andersca@mac.com> |
Warn if a variable marked with the "unused" attribute is used. Patch by Darin Adler! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117184 91177308-0d34-0410-b5e6-96231b3b80d8
emaAttr.cpp
emaExpr.cpp
|
2127eccbe15fd3b1b29aa53ccedd2e0f55ad27f9 |
23-Oct-2010 |
Anders Carlsson <andersca@mac.com> |
Warn if a variable marked with the "unused" attribute is used. Patch by Darin Adler! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117184 91177308-0d34-0410-b5e6-96231b3b80d8
emaAttr.cpp
emaExpr.cpp
|
cc9bc4e9207eea7bd59beacb95c73f2d3cfbe77b |
23-Oct-2010 |
John McCall <rjmccall@apple.com> |
Parse attributes on enumerators and instantiate attributes on enum decls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117182 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplateInstantiateDecl.cpp
|
5b629aa86c987f276d00453b6c9ab8424f7903fe |
23-Oct-2010 |
John McCall <rjmccall@apple.com> |
Parse attributes on enumerators and instantiate attributes on enum decls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117182 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplateInstantiateDecl.cpp
|
bed0f2ea054b22cc67f7bdf9c9ab154cabfc2937 |
23-Oct-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
In the presence of using declarations, we can find the same class members in class subobjects of different types. So long as the underlying declaration sets are the same, and the declaration sets involve non-instance members, this is not an ambiguity. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117163 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
f17b58c98b57537e9abfaaa8b5f19ea7e6de01ee |
23-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
In the presence of using declarations, we can find the same class members in class subobjects of different types. So long as the underlying declaration sets are the same, and the declaration sets involve non-instance members, this is not an ambiguity. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117163 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
fe1e7493d01803d3a373caadd76ff4269ad370a6 |
22-Oct-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When performing name lookup for a namespace definition, only look into the current context's redeclaration context, ignoring using directives. Fixes PR8430. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117097 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
fe7574b3adc7b38e70dc4ecd335e8c9b38ab549f |
22-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
When performing name lookup for a namespace definition, only look into the current context's redeclaration context, ignoring using directives. Fixes PR8430. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117097 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
9da3fb28306b09ca9a6f2cafc46fd45612b69549 |
21-Oct-2010 |
Ted Kremenek <kremenek@apple.com> |
Tweak diagnostics for redeclaration of a @property in a class extension where the redelcaration and original declaration have the 'readwrite' attribute. This is a common case, and we can issue a more lucid diagnostic. Fixes <rdar://problem/7629420>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117045 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
788f489a37bf1150deb9378cec6a6eb902d0d1b2 |
21-Oct-2010 |
Ted Kremenek <kremenek@apple.com> |
Tweak diagnostics for redeclaration of a @property in a class extension where the redelcaration and original declaration have the 'readwrite' attribute. This is a common case, and we can issue a more lucid diagnostic. Fixes <rdar://problem/7629420>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117045 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
bc099c3a136844259bb2edf250ede10f4c7e969a |
21-Oct-2010 |
Ted Kremenek <kremenek@apple.com> |
Tidy up comment (remove extraneous text). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117044 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
ee1c08c88649aaea9dd53272a726cd23de533215 |
21-Oct-2010 |
Ted Kremenek <kremenek@apple.com> |
Tidy up comment (remove extraneous text). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117044 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
8802b2a669e960d8ace98a5958cd783161ef0767 |
21-Oct-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement the integral promotion rules for the C++0x char16_t and char32_t character types and enable built-in overloaded operator candidates for these types. Fixes PR8432. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117038 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
0b8ddb9a4743465cd76e9f134a2f55ab2330a0a4 |
21-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement the integral promotion rules for the C++0x char16_t and char32_t character types and enable built-in overloaded operator candidates for these types. Fixes PR8432. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117038 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
f9cd9b022cc53a706f3da31f4b7c8a0702477c80 |
21-Oct-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Diagnose the declaration of template template parameters that themselves have no template parameters. This is actually a restriction due to the grammar of template template parameters, but we choose to diagnose it in Sema to provide better recovery. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117032 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
369ea27b56b89379023366ff1b8ab362b5709e4e |
21-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
Diagnose the declaration of template template parameters that themselves have no template parameters. This is actually a restriction due to the grammar of template template parameters, but we choose to diagnose it in Sema to provide better recovery. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117032 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
91d4578cba8b8bba891056b8b96583ec71023aac |
21-Oct-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Always treat 'main' as an extern "C" function, so that we detect redeclarations of main appropriately rather than allowing it to be overloaded. Also, disallowing declaring main as a template. Fixes GCC DejaGNU g++.old-deja/g++.other/main1.C. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117029 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
0bab54cf82cd679152197c7a2eb938f8aa9f07dd |
21-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
Always treat 'main' as an extern "C" function, so that we detect redeclarations of main appropriately rather than allowing it to be overloaded. Also, disallowing declaring main as a template. Fixes GCC DejaGNU g++.old-deja/g++.other/main1.C. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117029 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
5da51e3ec3daa73ea35b2bb2c8ccb881be061faa |
21-Oct-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When checking whether a return statement returns a stack-local variable, handle conditional operators involving a throw-expression. Fixes GCC DejaGNU's g++.dg/template/cond4.C. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117027 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
9ee5ee84f0ad8246bff105786a128c7a909fdf12 |
21-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
When checking whether a return statement returns a stack-local variable, handle conditional operators involving a throw-expression. Fixes GCC DejaGNU's g++.dg/template/cond4.C. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117027 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
16b6f68e2012abb1b36c44dd9412e09e09488e20 |
21-Oct-2010 |
Ted Kremenek <kremenek@apple.com> |
Previously, the printf warnings would say your arguments type was 'int' when it was really a 'char' or a 'short'. This fixes that and allows the hints to suggest 'h' modifiers for small ints. Patch by Justin Bogner! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116996 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
4d8ae4d57ed18d60da4d3786fb740607aa7c3688 |
21-Oct-2010 |
Ted Kremenek <kremenek@apple.com> |
Previously, the printf warnings would say your arguments type was 'int' when it was really a 'char' or a 'short'. This fixes that and allows the hints to suggest 'h' modifiers for small ints. Patch by Justin Bogner! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116996 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
0fc35a77b2a5843fd536a5ad566e5f7779e9bb8c |
21-Oct-2010 |
Craig Silverstein <csilvers2000@yahoo.com> |
Pass TInfo to CXXDestructorDecl::Create(), just like we do for other function decls. Reviewed by rjmccall and nlewycky. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116979 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
|
b41d899a6023385c00a61eb9dd3e44db9dc7994e |
21-Oct-2010 |
Craig Silverstein <csilvers2000@yahoo.com> |
Pass TInfo to CXXDestructorDecl::Create(), just like we do for other function decls. Reviewed by rjmccall and nlewycky. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116979 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
|
89bee1dc0446d9bc133fd3245692eb5e5fef2330 |
20-Oct-2010 |
John McCall <rjmccall@apple.com> |
Access control polish: drop the note on the original declaration and say 'implicitly' when it was implicit. Resolves PR 7930 and my peace of mind. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116916 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
aa56a66abb61e9f42b48ae88e43328aba10c9148 |
20-Oct-2010 |
John McCall <rjmccall@apple.com> |
Access control polish: drop the note on the original declaration and say 'implicitly' when it was implicit. Resolves PR 7930 and my peace of mind. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116916 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
8fde52b41225a2ac3e187a5aa15999ebcc6ad6d3 |
20-Oct-2010 |
John McCall <rjmccall@apple.com> |
When matching template parameter lists to template-ids in a scope specifier on a friend declaration, skip template-ids which do not depend on the current parameter list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116911 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
4e2cbb28baa0342b51336e55c519cd06308c4df2 |
20-Oct-2010 |
John McCall <rjmccall@apple.com> |
When matching template parameter lists to template-ids in a scope specifier on a friend declaration, skip template-ids which do not depend on the current parameter list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116911 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
99b6f9ef71b7c888dabb5b0f0669e5ca2c70ddc3 |
20-Oct-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix handling of property and ivar lookup in typo correction; the two kinds of lookup into Objective-C classes were tangled together, a situation that was compounded by automatically synthesized ivars. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116907 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaLookup.cpp
|
9a632eaa0ee73e4db701a8df74e92909d1fa350e |
20-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
Fix handling of property and ivar lookup in typo correction; the two kinds of lookup into Objective-C classes were tangled together, a situation that was compounded by automatically synthesized ivars. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116907 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaLookup.cpp
|
8c6a3fd44ea5d50dd977323a6f36da1d4d12515a |
20-Oct-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Introduce a simple cache for unqualified typo corrections, so that we don't repeatedly loop through identifiers, correcting the same typo'd identifier over and over again. We still bail out after 20 typo corrections, but this should help improve performance in the common case where we're typo-correcting because the user forgot to include a header. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116901 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
3eedbb06dd35b021bb614250585d4a6a5b7936e7 |
20-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
Introduce a simple cache for unqualified typo corrections, so that we don't repeatedly loop through identifiers, correcting the same typo'd identifier over and over again. We still bail out after 20 typo corrections, but this should help improve performance in the common case where we're typo-correcting because the user forgot to include a header. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116901 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
29e65ebda3f75ff7075f4b601b00ab8632be06f8 |
20-Oct-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Eliminate another ordering dependency in typo correction. Re-enable typo.m, which seems to be working properly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116894 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
f98402d9e6ccef7052eb01de418fd740f5f5e02f |
20-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
Eliminate another ordering dependency in typo correction. Re-enable typo.m, which seems to be working properly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116894 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
70750141c97e311119b47d3be1d1675ac7cefd74 |
20-Oct-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Provide an upper bound to the edit-distance algorithm when performing typo correction, to allow early exits. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116868 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
a1194775dc3bc3c9471e089797ca08fdbe773794 |
20-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
Provide an upper bound to the edit-distance algorithm when performing typo correction, to allow early exits. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116868 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
f3041996cd4ce26e55982b1374d8566bd0a9f396 |
19-Oct-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve the performance of typo correction, by using a simple computation to compute the lower bound of the edit distance, so that we can avoid computing the edit distance for names that will clearly be rejected later. Since edit distance is such an expensive algorithm (M x N), this leads to a 7.5x speedup when correcting NSstring -> NSString in the presence of a Cocoa PCH. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116849 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
362a8f21a6438bb0b1901e0b7ae44b5c33fb48ca |
19-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
Improve the performance of typo correction, by using a simple computation to compute the lower bound of the edit distance, so that we can avoid computing the edit distance for names that will clearly be rejected later. Since edit distance is such an expensive algorithm (M x N), this leads to a 7.5x speedup when correcting NSstring -> NSString in the presence of a Cocoa PCH. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116849 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
8c1fa9b6a3431eef6d11cad85709a2085cb89a6f |
19-Oct-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Fixes a bug in ivar lookup in the new objc's default property synthesis mode, when dealing with legacy code. Fixes //rdar: //8565343. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116846 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
43e1b46d640e9e9c9faa784fe6a6d8252f4e776a |
19-Oct-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Fixes a bug in ivar lookup in the new objc's default property synthesis mode, when dealing with legacy code. Fixes //rdar: //8565343. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116846 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
82690692019a119902cc075c208dd5324fbe672a |
19-Oct-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
This patch implements Next's IRGen for -fconstant-string-class=class-name. PR6056, //rdar: //8564463 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116819 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
4c73307c74764ba99e1379677fe92af72f676531 |
19-Oct-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
This patch implements Next's IRGen for -fconstant-string-class=class-name. PR6056, //rdar: //8564463 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116819 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
5f44860517d8a8fbaac40cbd69fe0da1eccf5836 |
19-Oct-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When marking declarations referenced within an expression (e.g., within a default argument), recurse into default arguments. Fixes PR8401, a regression I introduced in r113700 while refactoring our handling of "used" declarations in default arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116817 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
102ff97bc55ba9f925a100671d49e49b3c5f7129 |
19-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
When marking declarations referenced within an expression (e.g., within a default argument), recurse into default arguments. Fixes PR8401, a regression I introduced in r113700 while refactoring our handling of "used" declarations in default arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116817 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
dded5067e97f6de7161a4d1ceb7af81e583d2140 |
19-Oct-2010 |
John McCall <rjmccall@apple.com> |
When instantiating a dependently-scoped friend function declaration, we may need to complete the type before looking into it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116795 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
c54d688c604d28dcb9ab8f92047837c10c8f9c61 |
19-Oct-2010 |
John McCall <rjmccall@apple.com> |
When instantiating a dependently-scoped friend function declaration, we may need to complete the type before looking into it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116795 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
3b8c6768c6b1acd2f1d18cdecf5bf7689093bcb7 |
19-Oct-2010 |
John McCall <rjmccall@apple.com> |
Instantiate enclosing template parameter lists when instantiating friends. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116789 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
4eab39f0745fb1949dbb40c4145771b927888242 |
19-Oct-2010 |
John McCall <rjmccall@apple.com> |
Instantiate enclosing template parameter lists when instantiating friends. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116789 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
fd6ce3bfc199707726ddeb16835b1fb7ae580a2b |
19-Oct-2010 |
John McCall <rjmccall@apple.com> |
Uncomputable contexts are always records but can exist. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116787 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
613ef3d4c144f8c35224daf28a187426d2044aee |
19-Oct-2010 |
John McCall <rjmccall@apple.com> |
Uncomputable contexts are always records but can exist. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116787 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
c31bd773bd43aa091aaf00e58e787deca354583f |
19-Oct-2010 |
John McCall <rjmccall@apple.com> |
Redirect templated friend class decls to a new Sema callback and construct an unsupported friend when there's a friend with a templated scope specifier. Fixes a consistency crash, rdar://problem/8540527 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116786 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
|
9a34edb710917798aa30263374f624f13b594605 |
19-Oct-2010 |
John McCall <rjmccall@apple.com> |
Redirect templated friend class decls to a new Sema callback and construct an unsupported friend when there's a friend with a templated scope specifier. Fixes a consistency crash, rdar://problem/8540527 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116786 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
|
a2417753c716036006be5cce78c7258fb6ccf27e |
19-Oct-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix the translation of the PCC_ForInit code-completion context for C++/C99/Objective-C, so that we properly include types. This fix affects global caching of code-completion results; without caching, the behavior was already correct. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116757 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
a5450a097e83072c0e545ccd8df8b07e172f1b09 |
19-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
Fix the translation of the PCC_ForInit code-completion context for C++/C99/Objective-C, so that we properly include types. This fix affects global caching of code-completion results; without caching, the behavior was already correct. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116757 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
672fd885f8022b449ba811a366b0df240ae3c712 |
18-Oct-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Introduce code completion results for Objective-C methods, both when declaring methods and when sending messages to them, by bringing all of the selector into TypedCheck chunks in the completion result. This way, we can improve the sorting of these results to account for the full selector name rather than just the first chunk. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116746 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
c7b7b7a8eda7a5316ad1062b7f81a339f5550bca |
18-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
Introduce code completion results for Objective-C methods, both when declaring methods and when sending messages to them, by bringing all of the selector into TypedCheck chunks in the completion result. This way, we can improve the sorting of these results to account for the full selector name rather than just the first chunk. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116746 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
0bdfeffc8a7ce04a51c682c9db89de46a0f991aa |
18-Oct-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When providing code completions of Objective-C method declarations (after - or +), always traverse superclasses and all categories. The programmer may want to complete a method from *anywhere*. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116723 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
ea76618ced548ea1550a7a4de21cb8b6eea878bc |
18-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
When providing code completions of Objective-C method declarations (after - or +), always traverse superclasses and all categories. The programmer may want to complete a method from *anywhere*. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116723 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
c7ac90f6529e272e5f9c76d6f8d5697edbadcf04 |
18-Oct-2010 |
Anders Carlsson <andersca@mac.com> |
Implement the first half of [dcl.attr.override]p6. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116709 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
693d467ed44ecb754762aff129accce30c306422 |
18-Oct-2010 |
Anders Carlsson <andersca@mac.com> |
Implement the first half of [dcl.attr.override]p6. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116709 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
32977822e1dd3ca3c74a9b93c58058f013138dd1 |
18-Oct-2010 |
Francois Pichet <pichet2000@gmail.com> |
Microsoft enum extensions. 2 things will change on -fms-extensions: 1. enum underlying type is int by default. 2. Error "enumerator value is not representable in the underlying type"is a ExtWarning git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116704 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
842e7a22c6a0fbf0ccdb4bb9308d92ca9e9621f6 |
18-Oct-2010 |
Francois Pichet <pichet2000@gmail.com> |
Microsoft enum extensions. 2 things will change on -fms-extensions: 1. enum underlying type is int by default. 2. Error "enumerator value is not representable in the underlying type"is a ExtWarning git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116704 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f3b5f4c9d263179521c3a87af3c595dcac078928 |
18-Oct-2010 |
Anders Carlsson <andersca@mac.com> |
Implement [dcl.attr.override]p2 and add tests for p1 and p2. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116692 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
4d09e84fbb0305372efc778a6770f0c3a5b5b2ae |
18-Oct-2010 |
Anders Carlsson <andersca@mac.com> |
Implement [dcl.attr.override]p2 and add tests for p1 and p2. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116692 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
cb1e745b33afc9deabd0150fbfc503a581c03633 |
16-Oct-2010 |
John McCall <rjmccall@apple.com> |
Reformatting. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116662 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
be04b6df363f083f51636efcf4a8be4c5e8ea038 |
16-Oct-2010 |
John McCall <rjmccall@apple.com> |
Reformatting. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116662 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
0a3d65c147e28d6d96bd64d454f8f0cfaf20c9c6 |
16-Oct-2010 |
John McCall <rjmccall@apple.com> |
White-listing templated-scope friend decls is a good idea, but doing it by marking the decl invalid isn't. Make some steps towards supporting these and then hastily shut them down at the last second by marking them as unsupported. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116661 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaTemplate.cpp
|
6102ca1d490836096678d7d934f0b2b78f9293ec |
16-Oct-2010 |
John McCall <rjmccall@apple.com> |
White-listing templated-scope friend decls is a good idea, but doing it by marking the decl invalid isn't. Make some steps towards supporting these and then hastily shut them down at the last second by marking them as unsupported. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116661 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaTemplate.cpp
|
73d7115d5bb3aa845ac04fe61f3a94491b24cba3 |
16-Oct-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Allow list-initialization of a local variable of class type with a flexible array member, so long as the flexibility array member is either not initialized or is initialized with an empty initializer list. Fixes <rdar://problem/8540437>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116647 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
c6eddf50bff68683238f06625fa9fb5016a3694c |
16-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
Allow list-initialization of a local variable of class type with a flexible array member, so long as the flexibility array member is either not initialized or is initialized with an empty initializer list. Fixes <rdar://problem/8540437>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116647 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
4e8ad0fd1b4caf9e2a9264e1a4addd3aa72fb30e |
16-Oct-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Check for ivar being a C++ object before attempting to find a copy constructor/assignment operator used in getter/setter synthesis. This removes an unintended diagnostics and makes objc++ consistant with objective-c. // rdar: //8550657. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116631 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
0313f441b72ef6b69a93e5003c684b01cb72fd46 |
16-Oct-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Check for ivar being a C++ object before attempting to find a copy constructor/assignment operator used in getter/setter synthesis. This removes an unintended diagnostics and makes objc++ consistant with objective-c. // rdar: //8550657. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116631 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
91ca9e15e53dd7c85f8790f8b9b1efe016fbccd3 |
15-Oct-2010 |
Nick Lewycky <nicholas@mxc.ca> |
Report the location of the syntax error inside a macro. Fixes PR7944. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116624 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
3d6c45d8f8df76d6a0a71d3ef36f835a0d5e515f |
15-Oct-2010 |
Nick Lewycky <nicholas@mxc.ca> |
Report the location of the syntax error inside a macro. Fixes PR7944. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116624 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
2d17a269820cb3fb1ed9393924703090497c2e91 |
15-Oct-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When performing typo correction, keep track of whether the last lookup we did was an acceptable lookup. If it is, then we can re-use that lookup result. If it isn't, we have to perform the lookup again. This is almost surely the cause behind the mysterious typo.m failures on some builders; we were getting the wrong lookup results returned. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116586 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
6eaac8b3e68177f56090ddb0fcfc8fbfd49150a6 |
15-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
When performing typo correction, keep track of whether the last lookup we did was an acceptable lookup. If it is, then we can re-use that lookup result. If it isn't, we have to perform the lookup again. This is almost surely the cause behind the mysterious typo.m failures on some builders; we were getting the wrong lookup results returned. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116586 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
839f6af7784c6960b51667f77e15f28ae74fc77e |
15-Oct-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When we're in the context of an Objective-C message send's receiver, typo correction prefers "super" over other, equivalent completions. I believe this will fix the regression on the buildbot. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116574 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
7b824e854b8ffc0d46337d95425825015528f35c |
15-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
When we're in the context of an Objective-C message send's receiver, typo correction prefers "super" over other, equivalent completions. I believe this will fix the regression on the buildbot. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116574 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
c2141810fbe4f332b6f4627216cdd268c5b90ee2 |
15-Oct-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Diagnose C++ [class.mem]p13-14, where a class member has the same name as the class itself. Fixes PR7082. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116573 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
a6e937ce32474934778346f4d51c3beec40e77ec |
15-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
Diagnose C++ [class.mem]p13-14, where a class member has the same name as the class itself. Fixes PR7082. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116573 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
07c4fa83db91c78c1d5638552b19e2cff344e80f |
15-Oct-2010 |
Gabor Greif <ggreif@gmail.com> |
fix http://llvm.org/PR8371 in the straightforward way, also adding a comment git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116570 91177308-0d34-0410-b5e6-96231b3b80d8
ttributeList.cpp
|
c5127edaec77915a173708c2460fda030c67edc6 |
15-Oct-2010 |
Gabor Greif <ggreif@gmail.com> |
fix http://llvm.org/PR8371 in the straightforward way, also adding a comment git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116570 91177308-0d34-0410-b5e6-96231b3b80d8
ttributeList.cpp
|
68790944c3bb21baf8d3d28c9d4da5027f1bd229 |
15-Oct-2010 |
John McCall <rjmccall@apple.com> |
Death to blocks, or at least the word "block" in one particular obnoxiously ambiguous context. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116567 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaStmt.cpp
|
b6bbcc9995186799a60ce17d0c1acff31601653a |
15-Oct-2010 |
John McCall <rjmccall@apple.com> |
Death to blocks, or at least the word "block" in one particular obnoxiously ambiguous context. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116567 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaStmt.cpp
|
f5703efc891541db2e133c12a874f180472c5735 |
15-Oct-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Don't complain about a variable within a linkage-specification that is initialized. Fixes PR7076. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116553 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
66c42d443982a0891ce58deb7391d641ca87adc5 |
15-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
Don't complain about a variable within a linkage-specification that is initialized. Fixes PR7076. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116553 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
eeb49e09c60dedc167a4a05fcb5a95aadfcde81d |
15-Oct-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Add builtin conditional operator candidates for scoped enumeration types, from Alp Toker! Fixes PR8344. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116549 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
5a1f97ee183d2614db58452a4380dd11cb309263 |
15-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
Add builtin conditional operator candidates for scoped enumeration types, from Alp Toker! Fixes PR8344. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116549 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
3a84ffd08c22c0ae95a90fc4983c885dfe4df904 |
15-Oct-2010 |
John McCall <rjmccall@apple.com> |
template-ids are looked up differently in friend declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116529 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
8a407370c37229f2b69fe643850959b98899c28a |
15-Oct-2010 |
John McCall <rjmccall@apple.com> |
template-ids are looked up differently in friend declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116529 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
b9d1dba5986d9b5cd4e1a5ff93759b3704593829 |
15-Oct-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When performing typo correction, look through the set of known identifiers to determine good typo-correction candidates. Once we've identified those candidates, we perform name lookup on each of them and the consider the results. This optimization makes typo correction > 2x faster on a benchmark example using a single typo (NSstring) in a tiny file that includes Cocoa.h from a precompiled header, since we are deserializing far less information now during typo correction. There is a semantic change here, which is interesting. The presence of a similarly-named entity that is not visible can now affect typo correction. This is both good (you won't get weird corrections if the thing you wanted isn't in scope) and bad (you won't get good corrections if there is a similarly-named-but-completely-unrelated thing). Time will tell whether it was a good choice or not. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116528 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
emaLookup.cpp
|
95f4292cc526c629fead321c7fcfd4fe0f3bc66e |
15-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
When performing typo correction, look through the set of known identifiers to determine good typo-correction candidates. Once we've identified those candidates, we perform name lookup on each of them and the consider the results. This optimization makes typo correction > 2x faster on a benchmark example using a single typo (NSstring) in a tiny file that includes Cocoa.h from a precompiled header, since we are deserializing far less information now during typo correction. There is a semantic change here, which is interesting. The presence of a similarly-named entity that is not visible can now affect typo correction. This is both good (you won't get weird corrections if the thing you wanted isn't in scope) and bad (you won't get good corrections if there is a similarly-named-but-completely-unrelated thing). Time will tell whether it was a good choice or not. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116528 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
emaLookup.cpp
|
3fd7ab3de7dc0ca3e7aed74c641b5c5d10e07081 |
15-Oct-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Make sure that we diagnose invalid qualifiers on friend functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116527 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
708f3b8e350a5c0605889a4f32b26686864495ca |
15-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
Make sure that we diagnose invalid qualifiers on friend functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116527 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
340ede862ca99a0d45b2c25dd4de453b8881da6e |
14-Oct-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Put line number on the diagnostic. //rdar: //8550657. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116519 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
fa432391a708448518df1e6ced4e34f4c349d169 |
14-Oct-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Put line number on the diagnostic. //rdar: //8550657. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116519 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
8bd942c2791fb323a5902c6ffdd9fde9a6bd8508 |
14-Oct-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Tweak the typo-correction implementation to determine corrections solely based on the names it sees, rather than actual declarations it gets. In essence, we determine the set of names that are "close enough" to the typo'd name. Then, we perform name lookup for each of those names, filtering out those that aren't actually visible, and typo-correct from the remaining results. Overall, there isn't much of a change in the behavior of typo correction here. The only test-suite change comes from the fact that we make good on our promise to require that the user type 3 characters for each 1 character corrected. The real intent behind this change is to set the stage for an optimization to typo correction (so that we don't need to deserialize all declarations in a translation unit) and future work in finding missing qualification ("'vector' isn't in scope; did you mean 'std::vector'?). Plus, the code is cleaner this way. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116511 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
e24b575f06985336973bb721e198bd184bf7bdd3 |
14-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
Tweak the typo-correction implementation to determine corrections solely based on the names it sees, rather than actual declarations it gets. In essence, we determine the set of names that are "close enough" to the typo'd name. Then, we perform name lookup for each of those names, filtering out those that aren't actually visible, and typo-correct from the remaining results. Overall, there isn't much of a change in the behavior of typo correction here. The only test-suite change comes from the fact that we make good on our promise to require that the user type 3 characters for each 1 character corrected. The real intent behind this change is to set the stage for an optimization to typo correction (so that we don't need to deserialize all declarations in a translation unit) and future work in finding missing qualification ("'vector' isn't in scope; did you mean 'std::vector'?). Plus, the code is cleaner this way. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116511 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
583ff831bd226436c88999ed8f1c9101e7d8adfa |
14-Oct-2010 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Don't add the injected class name to the redeclarations chain; the chain should contain actual redeclarations, not implicits. As a bonus, now we don't deserialize it unless we need it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116504 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
3b8f610ac98f816f3d5c4657fc45dcd130a4bfdb |
14-Oct-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Don't add the injected class name to the redeclarations chain; the chain should contain actual redeclarations, not implicits. As a bonus, now we don't deserialize it unless we need it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116504 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
7241e85cb216e6d122511c74cd96d98d0fd77e30 |
14-Oct-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Eliminate usage of ObjCSuperExpr used for 'super' as receiver of property or a setter/getter methods. //rdar: //8525788 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116483 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprObjC.cpp
reeTransform.h
|
8ac2d449820fd0df00fcbde5bf82165c1f49854d |
14-Oct-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Eliminate usage of ObjCSuperExpr used for 'super' as receiver of property or a setter/getter methods. //rdar: //8525788 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116483 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprObjC.cpp
reeTransform.h
|
aa7e86e076688366c203fdc9f0e764223a8166f9 |
14-Oct-2010 |
John McCall <rjmccall@apple.com> |
Whoops. This really shouldn't compile in clang, either. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116470 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
008df5dce3938456ae7ea2e7ab3b2d12391ebf3e |
14-Oct-2010 |
John McCall <rjmccall@apple.com> |
Whoops. This really shouldn't compile in clang, either. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116470 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
fd509f767badc944f8fce4527bd8178862059983 |
14-Oct-2010 |
John McCall <rjmccall@apple.com> |
Perform range restrictions on regparm when applied to a type and not a decl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116469 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
1e030eb1194763b42c1752723be23b1515f48981 |
14-Oct-2010 |
John McCall <rjmccall@apple.com> |
Perform range restrictions on regparm when applied to a type and not a decl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116469 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
8e6f2f55803397d4336538bed6f3f0972336ac9f |
14-Oct-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Diagnose when a 'static' member function overrides a virtual function in a base class. Fixes PR8168. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116448 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
a6c1e3a56afb76876cd06e3646fd7ca57a38d4bb |
14-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
Diagnose when a 'static' member function overrides a virtual function in a base class. Fixes PR8168. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116448 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
b8362891592542e17e04c727e5a3a8a0dd02a493 |
14-Oct-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Generalize the checking for qualification of (non-friend) class members. Provide a hard error when the qualification doesn't match the current class type, or a warning + Fix-it if it does match the current class type. Fixes PR8159. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116445 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
922fff2c9ef458fc04839e45a79552513f41ec7e |
14-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
Generalize the checking for qualification of (non-friend) class members. Provide a hard error when the qualification doesn't match the current class type, or a warning + Fix-it if it does match the current class type. Fixes PR8159. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116445 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
b7a3be5b188370142ec5ee75bb69bfa5b2f87f3c |
13-Oct-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Eliminate the use of ObjCSuperExpr in code completion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116436 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
6b0656a7c386662e1bec5f23a3bd0bf2687a9635 |
13-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
Eliminate the use of ObjCSuperExpr in code completion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116436 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
2df0241d7ac68326a39d1d0bec5f03a773d59ca0 |
13-Oct-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
There is no reason for dereferencing a pointer-to-member to require that the class type into which the pointer points be complete, even though the standard requires it. GCC/EDG do not require a complete type here, so we're calling this a problem with the standard. Fixes PR8328. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116429 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
7d520baec9b762633a09d31ee0db12e41fe2758a |
13-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
There is no reason for dereferencing a pointer-to-member to require that the class type into which the pointer points be complete, even though the standard requires it. GCC/EDG do not require a complete type here, so we're calling this a problem with the standard. Fixes PR8328. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116429 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
b0efb27f8928c8cdfd4b94b547ec9d87e31066cd |
13-Oct-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Introduce a bit into Type that keeps track of whether there are any unnamed or local types within that type. This bit is cached along with the linkage of a type, so that it can be recomputed (e.g., when we see that a typedef has given a name to an anonymous declaration). Use this bit when checking C++03 [temp.arg.type]p2, so that we don't walk template argument types repeatedly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116413 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
db4d4bb03df52920cf379797a7ff5c9900f938a6 |
13-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
Introduce a bit into Type that keeps track of whether there are any unnamed or local types within that type. This bit is cached along with the linkage of a type, so that it can be recomputed (e.g., when we see that a typedef has given a name to an anonymous declaration). Use this bit when checking C++03 [temp.arg.type]p2, so that we don't walk template argument types repeatedly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116413 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
7ad91b430acfc5360cf8dad23763b69f25855ff9 |
13-Oct-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix a silly bug in the suppression of non-error diagnostics in a SFINAE context, where we weren't getting the right diagnostic argument count. I blame DiagnosticBuilder's weirdness. Fixes PR8372. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116411 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
b535041ee33c5eff255832bc5541c8d52aae8254 |
13-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
Fix a silly bug in the suppression of non-error diagnostics in a SFINAE context, where we weren't getting the right diagnostic argument count. I blame DiagnosticBuilder's weirdness. Fixes PR8372. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116411 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
e497cbdbb6c0906e42385ec6462c71807d60e3e4 |
13-Oct-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Eliminates a clang warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116408 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
7b1ec6c4781ce960e1c3157b84ebe8362df2d2a7 |
13-Oct-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Eliminates a clang warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116408 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
eee5fd6b330f3d979f730141432c934fcaec1bde |
13-Oct-2010 |
John McCall <rjmccall@apple.com> |
Preserve the original scope when picking the right scope for a friend declaration, because we'll need it later. Hopefully fixed self-host. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116399 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
380aaa44213c7ddff95117a30d5c6cec05a911d5 |
13-Oct-2010 |
John McCall <rjmccall@apple.com> |
Preserve the original scope when picking the right scope for a friend declaration, because we'll need it later. Hopefully fixed self-host. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116399 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
f69637ac15ea0a34a1e7df28d6f7b6e908eccbce |
13-Oct-2010 |
John McCall <rjmccall@apple.com> |
Support friend function declarations in local classes correctly. Fixes a crash and diagnoses the error condition of an unqualified friend which doesn't resolve to something. I'm still not certain how this is useful. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116393 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
29ae6e5fb001deddd831e66faf143ecd9e50f67c |
13-Oct-2010 |
John McCall <rjmccall@apple.com> |
Support friend function declarations in local classes correctly. Fixes a crash and diagnoses the error condition of an unqualified friend which doesn't resolve to something. I'm still not certain how this is useful. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116393 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
d5fdd5afbbe57c31b84ecc1f422a9503baf64510 |
13-Oct-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Teach the warning about unnamed/local types in template arguments to actually walk the template argument type to find any unnamed/local types within it. Fixes PR6784. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116382 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
|
5f3aeb6f8b1e1cc00015407ef6886429f9b7fb78 |
13-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
Teach the warning about unnamed/local types in template arguments to actually walk the template argument type to find any unnamed/local types within it. Fixes PR6784. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116382 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
|
5e513042ca50f0c19e8fa66ced95d8043415b31c |
13-Oct-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Introduce support for emitting diagnostics (warnings + their notes) that are suppressed during template argument deduction. This change queues diagnostics computed during template argument deduction. Then, if the resulting function template specialization or partial specialization is chosen by overload resolution or partial ordering (respectively), we will emit the queued diagnostics at that point. This addresses most of PR6784. However, the check for unnamed/local template arguments (which existed before this change) is still only skin-deep, and needs to be extended to look deeper into types. It must be improved to finish PR6784. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116373 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
|
9b623639378d53a675921ddfa7316034d571881e |
13-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
Introduce support for emitting diagnostics (warnings + their notes) that are suppressed during template argument deduction. This change queues diagnostics computed during template argument deduction. Then, if the resulting function template specialization or partial specialization is chosen by overload resolution or partial ordering (respectively), we will emit the queued diagnostics at that point. This addresses most of PR6784. However, the check for unnamed/local template arguments (which existed before this change) is still only skin-deep, and needs to be extended to look deeper into types. It must be improved to finish PR6784. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116373 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
|
988d1193697ec42b2e8d2d49516f6215d73c9eef |
13-Oct-2010 |
Devang Patel <dpatel@apple.com> |
Fix anon union member assignment expression's location. This is tested by anon-union.exp in gdb testsuite. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116371 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
a2c21a2ddd84a216bad48a005ccec12c7cfd1549 |
13-Oct-2010 |
Devang Patel <dpatel@apple.com> |
Fix anon union member assignment expression's location. This is tested by anon-union.exp in gdb testsuite. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116371 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ff3f7ef339ee1c531015fbd17016013d469d538f |
13-Oct-2010 |
John McCall <rjmccall@apple.com> |
Handle dependent friends more explicitly and deal with the possibility of templated-scope friends by marking them invalid and white-listing all accesses until such time as we implement them. Fixes a crash, this time without a broken test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116364 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaTemplate.cpp
|
337ec3d0e8cb24a591ecbecdc0a995a167f6af01 |
13-Oct-2010 |
John McCall <rjmccall@apple.com> |
Handle dependent friends more explicitly and deal with the possibility of templated-scope friends by marking them invalid and white-listing all accesses until such time as we implement them. Fixes a crash, this time without a broken test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116364 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaTemplate.cpp
|
6eccaf0e6d826474f737842862281b45528a9646 |
12-Oct-2010 |
Eli Friedman <eli.friedman@gmail.com> |
PR8325: don't do destructor checking when a pointer is thrown. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116336 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
98efb9f6df133f5508d260c4510c6c3bd70f34ad |
12-Oct-2010 |
Eli Friedman <eli.friedman@gmail.com> |
PR8325: don't do destructor checking when a pointer is thrown. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116336 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
97aeb6d4c3ff12ac5faf2f06f65af0b44012ccf5 |
12-Oct-2010 |
John McCall <rjmccall@apple.com> |
Enter the context of the declared function template when performing deduction and the final substitution, but not while substituting the explicit template arguments. Fixes rdar://problem/8537391 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116332 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
df41f18936693f7c62e457eefb9fad5b2d2fe3cd |
12-Oct-2010 |
John McCall <rjmccall@apple.com> |
Enter the context of the declared function template when performing deduction and the final substitution, but not while substituting the explicit template arguments. Fixes rdar://problem/8537391 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116332 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
d7092324128ecd14933040b3854037090a7672da |
12-Oct-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When finalizing a function template specialization following template argument deduction, make sure to check the correctness of deduced template type arguments (which we had previously skipped) along with other kinds of template arguments. This fixes part of PR6784, but we're still swallowing the extension warning about unnamed/local template arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116327 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
3273b0cea879c7af345d6bf98502bbf73fc4fde1 |
12-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
When finalizing a function template specialization following template argument deduction, make sure to check the correctness of deduced template type arguments (which we had previously skipped) along with other kinds of template arguments. This fixes part of PR6784, but we're still swallowing the extension warning about unnamed/local template arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116327 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
3012d21880276c87377e9cee335f5c6a15e0000d |
12-Oct-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
If we end up instantiating a function parameter whose default argument has not yet been parsed, note that the default argument hasn't been parsed and keep track of all of the instantiations of that function parameter. When its default argument does get parsed, imbue the instantiations with that default argument. Fixes PR8245. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116324 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplateInstantiate.cpp
|
8cfb7a39caa44797522773cf417ad9c1a6ffbc6f |
12-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
If we end up instantiating a function parameter whose default argument has not yet been parsed, note that the default argument hasn't been parsed and keep track of all of the instantiations of that function parameter. When its default argument does get parsed, imbue the instantiations with that default argument. Fixes PR8245. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116324 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplateInstantiate.cpp
|
5bba96a8e56a1452f76a930c5e87bc88fa3e3d74 |
12-Oct-2010 |
Chris Lattner <sabre@nondot.org> |
fix PR7885, rejecting invalid uses of __builtin_constant_p. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116317 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
75c29a012793292ff4578015a9113bf086156d7f |
12-Oct-2010 |
Chris Lattner <sabre@nondot.org> |
fix PR7885, rejecting invalid uses of __builtin_constant_p. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116317 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
e921dc075a387e60967847e92bb3d411e9c4361b |
12-Oct-2010 |
Duncan Sands <baldrick@free.fr> |
Pacify gcc-4.4. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116300 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
240a020bed4a58c3e2e894ad4a3dd31ee3147c9f |
12-Oct-2010 |
Duncan Sands <baldrick@free.fr> |
Pacify gcc-4.4. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116300 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
16ac89e81c9f15865afac48e3c08e498489815d7 |
12-Oct-2010 |
John McCall <rjmccall@apple.com> |
C's comma operator performs lvalue conversion on both its operands; require them to have complete types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116297 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
cf2e5063ae7e7ed3f8d86bb426b2208e242128ab |
12-Oct-2010 |
John McCall <rjmccall@apple.com> |
C's comma operator performs lvalue conversion on both its operands; require them to have complete types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116297 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
f8f573fc0b3fbf28dcdc55deaba5531839824b95 |
12-Oct-2010 |
John McCall <rjmccall@apple.com> |
I just do what the comments tell me to do. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116289 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
2bf6f49ffa839c966f692420491145adeac4f1e2 |
12-Oct-2010 |
John McCall <rjmccall@apple.com> |
I just do what the comments tell me to do. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116289 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e623a9ee0ecf0983949e4b627d4221e303dce876 |
12-Oct-2010 |
John McCall <rjmccall@apple.com> |
Progress. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116287 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
2cd11fefb62c580651e4269e1488381c2d6d07ad |
12-Oct-2010 |
John McCall <rjmccall@apple.com> |
Progress. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116287 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
13e47eecb1470d59e399952280e68c16e302c75d |
12-Oct-2010 |
John McCall <rjmccall@apple.com> |
Add some infrastructure for dealing with expressions of 'placeholder' type, i.e. expressions with an internally-convenient type which should not be appearing in generally valid, complete ASTs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116281 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaType.cpp
reeTransform.h
|
2a984cad5ac3fdceeff2bd99daa7b90979313475 |
12-Oct-2010 |
John McCall <rjmccall@apple.com> |
Add some infrastructure for dealing with expressions of 'placeholder' type, i.e. expressions with an internally-convenient type which should not be appearing in generally valid, complete ASTs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116281 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaType.cpp
reeTransform.h
|
2c3a26e07309d71be7686e744191fa77fb1fe468 |
12-Oct-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Eliminate the (de-)serialization of code completion results, now that libclang does not support out-of-process code completion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116253 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
|
a9f4f620daf073805b89e893afcdc5eb7a9bdc50 |
12-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
Eliminate the (de-)serialization of code completion results, now that libclang does not support out-of-process code completion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116253 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
|
0c9397b58fe69d34f3111c8ffdd450b061eab8f6 |
11-Oct-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Switch c-index-test from clang_codeComplete() over to clang_codeCompleteAt(). This uncovered a few issues with the latter: - ASTUnit wasn't saving/restoring diagnostic state appropriately between reparses and code completions. - "Overload" completions weren't being passed through to the client git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116241 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
32be4a588fbb87d0d163ead49c42f5438bf0b2b7 |
11-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
Switch c-index-test from clang_codeComplete() over to clang_codeCompleteAt(). This uncovered a few issues with the latter: - ASTUnit wasn't saving/restoring diagnostic state appropriately between reparses and code completions. - "Overload" completions weren't being passed through to the client git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116241 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
c98c24e9cbe1b3c16679c90e7218351b7958ac6e |
11-Oct-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
This patch does a few things in the area of objective-c properties. 1. Generates the AST for lexical info. of accessing getter/setter methods using dot-syntax notation. This fixes //rdar: //8528170. 2. Modifes rewriter to handle the AST putout in 1. 3. Supportes in rewriter ObjCImplicitSetterGetter ASTs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116237 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
f2ad2c92720f0e25c032188783a1d6374155f03a |
11-Oct-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
This patch does a few things in the area of objective-c properties. 1. Generates the AST for lexical info. of accessing getter/setter methods using dot-syntax notation. This fixes //rdar: //8528170. 2. Modifes rewriter to handle the AST putout in 1. 3. Supportes in rewriter ObjCImplicitSetterGetter ASTs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116237 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
f6d9c70dad1e3e2f68bc39a496ff18c5fa82229d |
10-Oct-2010 |
Chris Lattner <sabre@nondot.org> |
fix PR8217, a silent miscompilation of invalid code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116166 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
16c5dea6c2d3e4cf529de9d9b37f6a40441acb2c |
10-Oct-2010 |
Chris Lattner <sabre@nondot.org> |
fix PR8217, a silent miscompilation of invalid code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116166 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
5031852bc25afaec8d40079683b286164399a85c |
10-Oct-2010 |
Chris Lattner <sabre@nondot.org> |
Allow a string literal to initialize a tail array (PR8217), patch by Pierre Habouzit! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116165 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
9046c224f16be3cef84f03b96a6c00a621c8383e |
10-Oct-2010 |
Chris Lattner <sabre@nondot.org> |
Allow a string literal to initialize a tail array (PR8217), patch by Pierre Habouzit! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116165 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
542fd21af294934cdc7135f0ef4e57c4b554f460 |
09-Oct-2010 |
Benjamin Kramer <benny.kra@googlemail.com> |
Don't rely on a StringRef being null-terminated (it's not) for deprecation messages. Store pointer and length of the message in DelayedDiagnostic and hide the gory union details. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116153 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaExpr.cpp
|
ce2d186a421526e94d9e417ced141ae6c891cf48 |
09-Oct-2010 |
Benjamin Kramer <benny.kra@googlemail.com> |
Don't rely on a StringRef being null-terminated (it's not) for deprecation messages. Store pointer and length of the message in DelayedDiagnostic and hide the gory union details. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116153 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaExpr.cpp
|
f47e15b1791b9e0a081b53a8f065a3d0c75479e9 |
09-Oct-2010 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Fix g++.dg regressions introduced at r115347 (rdar://8529993) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116144 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
1d1e70ec6545c8ca863e00aaca14287269a23c1c |
09-Oct-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Fix g++.dg regressions introduced at r115347 (rdar://8529993) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116144 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
df8e391abb083ea901108528cbd505980dccf695 |
09-Oct-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement C++0x scoped enumerations, from Daniel Wallin! (and tweaked a bit by me). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116122 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaDecl.cpp
emaExpr.cpp
emaExprCXX.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
|
1274ccd90aec0b205fc838c3d504821ccfb55482 |
09-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement C++0x scoped enumerations, from Daniel Wallin! (and tweaked a bit by me). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116122 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaDecl.cpp
emaExpr.cpp
emaExprCXX.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
|
44df782463aa3471d507e7bb4f8cffa9663f1bc3 |
09-Oct-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Method implemented in class's implementation may implement one declared in class's extension and not one declared in class's superclass. This supresses a bogus warning on method type mismatch. Fixes //rdar: // 8530080 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116118 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
f54e3aec8a12c3ce453b1012e686c4b88881564a |
09-Oct-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Method implemented in class's implementation may implement one declared in class's extension and not one declared in class's superclass. This supresses a bogus warning on method type mismatch. Fixes //rdar: // 8530080 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116118 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
86dd09bf29d406e2bd3dfe45ad59a61ca870ff01 |
08-Oct-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
This patch fixes multiple issues in clang's designated init builder and completes support for C1X anonymous struct/union init features: * Indexed anonymous member initializers should not be expanded. Doing so makes little sense and would cause unresolvable semantic ambiguity in valid code (regression introduced by r69153). * Subobject initialization of (possibly nested) anonymous members are now referred to with paths relative to the naming record context, eliminating the synthesis of incorrect implicit InitListExprs that caused CodeGen to assert. * Field lookup was missing a null check in IdentifierInfo comparison which caused lookup for a known (already resolved) field to match the first unnamed data member it encountered leading to silent miscompilation. * Subobject paths are no longer built using the general purpose Sema::BuildAnonymousStructUnionMemberPath(). If any corner cases crop up, we will now assert earlier in Sema instead of passing invalid InitListExprs through to CodeGen. Fixes PR6955, from Alp Toker! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116098 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
022d13de47a5f02d1e4089fa3360fae8bcb17666 |
08-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
This patch fixes multiple issues in clang's designated init builder and completes support for C1X anonymous struct/union init features: * Indexed anonymous member initializers should not be expanded. Doing so makes little sense and would cause unresolvable semantic ambiguity in valid code (regression introduced by r69153). * Subobject initialization of (possibly nested) anonymous members are now referred to with paths relative to the naming record context, eliminating the synthesis of incorrect implicit InitListExprs that caused CodeGen to assert. * Field lookup was missing a null check in IdentifierInfo comparison which caused lookup for a known (already resolved) field to match the first unnamed data member it encountered leading to silent miscompilation. * Subobject paths are no longer built using the general purpose Sema::BuildAnonymousStructUnionMemberPath(). If any corner cases crop up, we will now assert earlier in Sema instead of passing invalid InitListExprs through to CodeGen. Fixes PR6955, from Alp Toker! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116098 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
b9dcda3cba713603535651deb6705be45d39197b |
08-Oct-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix the mapping of vertical-space cursor kinds to produce a newline, rather than a space. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116097 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
5a9c0bca4504eeda45a3fd0ae1c244b2994f38b2 |
08-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
Fix the mapping of vertical-space cursor kinds to produce a newline, rather than a space. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116097 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
5a037ddb6945de3984afe3d0b14ae7cd71c75430 |
08-Oct-2010 |
John McCall <rjmccall@apple.com> |
Track the location of the context requiring an implicit conversion and use it to white-list conversions required by system headers. rdar://problem/8232669 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116029 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaStmt.cpp
|
b4eb64d8426c0eaa58d398961e0e74ff85063d7c |
08-Oct-2010 |
John McCall <rjmccall@apple.com> |
Track the location of the context requiring an implicit conversion and use it to white-list conversions required by system headers. rdar://problem/8232669 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116029 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaStmt.cpp
|
5775b4da486d47faac404597c46705ad007a3fb3 |
08-Oct-2010 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Implement -fshort-enums (rdar://8490496). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116020 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
9a2b9d794bdf349b517ff799170f4409f45d147c |
08-Oct-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Implement -fshort-enums (rdar://8490496). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116020 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
7333aa16f667c101267fe666ce0ac78f6ca1747a |
07-Oct-2010 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Fix an infinite loop, caused by unintended syntax bug (the 'break;' after 'default:' was intended to break out of the while loop). Fixes rdar://8518859&8520617. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115985 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
63b57aeeebb5bb758ecebf9b41b5131781f32bf3 |
07-Oct-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Fix an infinite loop, caused by unintended syntax bug (the 'break;' after 'default:' was intended to break out of the while loop). Fixes rdar://8518859&8520617. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115985 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
d45b6479220ba79ddd071aef8e9fe9c26175f96a |
07-Oct-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Fixed cast to union with anonymous bitfields. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115979 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
8c4bfe52e528d6c9810cfb0c59859bca9ddc41f0 |
07-Oct-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Fixed cast to union with anonymous bitfields. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115979 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
2bb0c822456d678cb584f11e929ce49e8e13fa09 |
07-Oct-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Start and end location of a property-dot syntax expression must match start and end location of the expression as expected by the rewriter client. Fixes // rdar: // 8520727 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115934 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ed76f4474fcadacdfeeacacc44bbadb1d4faa6ac |
07-Oct-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Start and end location of a property-dot syntax expression must match start and end location of the expression as expected by the rewriter client. Fixes // rdar: // 8520727 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115934 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
6505cf576a0c7d347a60758420d8d0e341a30086 |
07-Oct-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch for adding message to unavailable attribute. And its documentation. Finishes off // rdar: // 6734520. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115862 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaExpr.cpp
|
c784dc1caf0df288a383700f7b57772103b3adab |
07-Oct-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch for adding message to unavailable attribute. And its documentation. Finishes off // rdar: // 6734520. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115862 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaExpr.cpp
|
2e2c8d1ab26716609363d3c26af800e65ef22f5e |
07-Oct-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Simplified code for deprecated attribute wih message a little. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115856 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaExpr.cpp
|
df9fb9150e9ffb4660fb02ccea1480713fb8e0fb |
07-Oct-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Simplified code for deprecated attribute wih message a little. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115856 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaExpr.cpp
|
d3f30b30e27d2e7ec55aa9c9127a90d41434feaf |
06-Oct-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Add message to attribute(deprecated). attribute(unavailable) to do next. // rdar:// 6734520. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115842 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaDeclObjC.cpp
emaExpr.cpp
|
c4b35cfdb977f6427fe0d5725bf104e1b425d72e |
06-Oct-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Add message to attribute(deprecated). attribute(unavailable) to do next. // rdar:// 6734520. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115842 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaDeclObjC.cpp
emaExpr.cpp
|
b0406ccde76ee9b4f8601a693f4cd49388873a73 |
06-Oct-2010 |
Stephen Hines <srhines@google.com> |
Add LOCAL_MODULE_TAGS to clang Android.mk files. Change-Id: Iba0dd9023388948d2c3fcb3522cea5d5d9a264a7
ndroid.mk
|
e80983e24e780079e421aacd27b4c9e83953f4fe |
06-Oct-2010 |
Nick Lewycky <nicholas@mxc.ca> |
Silence unused variable warning in Release builds. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115806 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
edd59112ab812ad498b8cc29ad2b6e2b90de787a |
06-Oct-2010 |
Nick Lewycky <nicholas@mxc.ca> |
Silence unused variable warning in Release builds. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115806 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
d20f2e86539173688839fd6bc3967e9dd6887b4a |
06-Oct-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Issue deprecated warning when typeof uses typedef based on underlying type's deprecatedness. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115800 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
730e175910936eae49e65caea8b2ba81c67edff7 |
06-Oct-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Issue deprecated warning when typeof uses typedef based on underlying type's deprecatedness. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115800 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
df45c23a0a56459d8953de0602a36286abc182aa |
06-Oct-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Reject the allocation of variably-modified types in C++ 'new' expressions. Fixes PR8209 in the narrowest way possible. I'm still considering whether I want to implement the extension that permits the use of VLA types in a 'new' expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115790 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
a0750768718bb5d05150641b5bba74847a21bc09 |
06-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
Reject the allocation of variably-modified types in C++ 'new' expressions. Fixes PR8209 in the narrowest way possible. I'm still considering whether I want to implement the extension that permits the use of VLA types in a 'new' expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115790 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
97c6abfe83841772974aedb2ec59f17b190bffc0 |
06-Oct-2010 |
Anders Carlsson <andersca@mac.com> |
When checking for uninitialized fields in member initializers, special case static variables and enums. Fixes PR8075. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115732 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
175ffbf7db893181b301e201c561ac928266f4be |
06-Oct-2010 |
Anders Carlsson <andersca@mac.com> |
When checking for uninitialized fields in member initializers, special case static variables and enums. Fixes PR8075. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115732 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
d4ec6719c325f215119826a8770b2459bb8e828f |
06-Oct-2010 |
John McCall <rjmccall@apple.com> |
Provide a slightly specialized diagnostic for tautological comparisons of an enum value. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115725 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
372e103dab4239ec52b65b9eda69fd43c0b348d4 |
06-Oct-2010 |
John McCall <rjmccall@apple.com> |
Provide a slightly specialized diagnostic for tautological comparisons of an enum value. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115725 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
15d9630eba7f91a984019b236cdd071c4da879d3 |
06-Oct-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Ue TagType, added a FIXME. Per John's comment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115723 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
aca7f7bab0102341863a0d1bdb048d69213ae362 |
06-Oct-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Ue TagType, added a FIXME. Per John's comment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115723 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
3a0045fc7c458d1d67ecab4bcc6d40c35315e92e |
06-Oct-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Issue deprecated warning when typeof uses an expression of deprecated type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115713 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
2b1d51bcf891f8887759aebb4b9e78dee8542e6d |
06-Oct-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Issue deprecated warning when typeof uses an expression of deprecated type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115713 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
584fcf808952abd8dc0e44b98c62181b27a19100 |
06-Oct-2010 |
John McCall <rjmccall@apple.com> |
When instantiating a new-expression, force a rebuild if there were default arguments in either the placement or constructor arguments. This is important if the default arguments refer to a declaration or create a temporary. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115700 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
63d5fb3a142c39ff4236235cb284401b88685692 |
06-Oct-2010 |
John McCall <rjmccall@apple.com> |
When instantiating a new-expression, force a rebuild if there were default arguments in either the placement or constructor arguments. This is important if the default arguments refer to a declaration or create a temporary. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115700 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
b76940de1760f404b652ed57a77a84cc5c73faf6 |
05-Oct-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Method declaration and its implementation must match in all their types. Previously, compiler warned only if it was unsafe if types did not match. Fixes // rdar: //7933061 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115683 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
bdaae392d4ede29c992db6c40c14860a0505415f |
05-Oct-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Method declaration and its implementation must match in all their types. Previously, compiler warned only if it was unsafe if types did not match. Fixes // rdar: //7933061 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115683 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
5155f7f9b875f422a7cc25d9d66b12c3492a22df |
05-Oct-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Register the __builtin_va_list_type node when we parse it, rather than waiting until we think we need it: we didn't catch all of the places where we actually needed it, and we probably wouldn't ever. Fixes a C++ PCH crasher. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115621 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
|
4a1bb8c4d708d5594e62c9ec7e25e273cae8a1ed |
05-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
Register the __builtin_va_list_type node when we parse it, rather than waiting until we think we need it: we didn't catch all of the places where we actually needed it, and we probably wouldn't ever. Fixes a C++ PCH crasher. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115621 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
|
fc8ba61c279f72d3bac5df8754348037df5f76f3 |
05-Oct-2010 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
In Sema's TryRefInitWithConversionFunction, suppress user conversions for the overload candidates. Fixes an infinite recursion in overload resolution for rdar://8499524. Many thanks to Doug! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115588 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
b72db8977ed032d6425045d7e9d36e49d9b2d3f8 |
05-Oct-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
In Sema's TryRefInitWithConversionFunction, suppress user conversions for the overload candidates. Fixes an infinite recursion in overload resolution for rdar://8499524. Many thanks to Doug! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115588 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
0afbb8fb1f138be32dbccc69446927d67d6f7fda |
03-Oct-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When providing a block literal as a code completion for a function/method argument, include the parameter name and always include parentheses (even for zero-parameter blocks). Otherwise, the block literal placeholder '^' can look very weird. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115444 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
c2760bc8e99510c4b3848fcd21323afd711ee269 |
03-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
When providing a block literal as a code completion for a function/method argument, include the parameter name and always include parentheses (even for zero-parameter blocks). Otherwise, the block literal placeholder '^' can look very weird. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115444 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
dac1e18dbd52db48af6a22074eaaccb91e640582 |
02-Oct-2010 |
Chris Lattner <sabre@nondot.org> |
kill off CheckX86BuiltinFunctionCall git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115382 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
57a4087b349702062cd7c93735106270964be0d5 |
02-Oct-2010 |
Chris Lattner <sabre@nondot.org> |
kill off CheckX86BuiltinFunctionCall git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115382 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
c23313b4f417481cb24fc5286841bb8e62f82b0d |
02-Oct-2010 |
Chris Lattner <sabre@nondot.org> |
move imperative code to declarative definitions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115381 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
b803c66ae4deedfdc62ad63c1d2ed9e2616529b5 |
02-Oct-2010 |
Chris Lattner <sabre@nondot.org> |
move imperative code to declarative definitions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115381 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
70b2b70732536cc5c8b4f4a64e4e53ba9cdd7d70 |
02-Oct-2010 |
Chris Lattner <sabre@nondot.org> |
diagnose errors when a builtin that require constant arguments don't have them. For example, on: #include <emmintrin.h> int foo(int N) { __m128i white2; white2 = _mm_slli_si128(white2, N); return 0; } we used to get: fatal error: error in backend: Cannot yet select: intrinsic %llvm.x86.sse2.psll.dq now we get: /Users/sabre/t.c:4:11: error: argument to '__builtin_ia32_pslldqi128' must be a constant integer white2 = _mm_slli_si128(white2, N); ^~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /Users/sabre/t.c:1: /Volumes/Projects/cvs/llvm/Debug+Asserts/lib/clang/2.9/include/emmintrin.h:781:13: note: instantiated from: ((__m128i)__builtin_ia32_pslldqi128((__m128i)(VEC), (IMM)*8)) ^ ~~~~~~~ 1 error generated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115374 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
946928f48c96bddf3cfa126862f5ab69c2d904a0 |
02-Oct-2010 |
Chris Lattner <sabre@nondot.org> |
diagnose errors when a builtin that require constant arguments don't have them. For example, on: #include <emmintrin.h> int foo(int N) { __m128i white2; white2 = _mm_slli_si128(white2, N); return 0; } we used to get: fatal error: error in backend: Cannot yet select: intrinsic %llvm.x86.sse2.psll.dq now we get: /Users/sabre/t.c:4:11: error: argument to '__builtin_ia32_pslldqi128' must be a constant integer white2 = _mm_slli_si128(white2, N); ^~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /Users/sabre/t.c:1: /Volumes/Projects/cvs/llvm/Debug+Asserts/lib/clang/2.9/include/emmintrin.h:781:13: note: instantiated from: ((__m128i)__builtin_ia32_pslldqi128((__m128i)(VEC), (IMM)*8)) ^ ~~~~~~~ 1 error generated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115374 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
b9e0e69675d97c38020c92023f7eac88b1d0a8d4 |
02-Oct-2010 |
Gabor Greif <ggreif@gmail.com> |
Factor out enumerator APSInt adjustment into a helper function (AdjustAPSInt) and use that for adjusting the high bounds of case ranges before APSInt comparisons. Fixes http://llvm.org/bugs/show_bug.cgi?id=8135 Some minor refacorings while I am here. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115355 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
28164ab2ac1deea68cdb989f941728bf1860ce41 |
02-Oct-2010 |
Gabor Greif <ggreif@gmail.com> |
Factor out enumerator APSInt adjustment into a helper function (AdjustAPSInt) and use that for adjusting the high bounds of case ranges before APSInt comparisons. Fixes http://llvm.org/bugs/show_bug.cgi?id=8135 Some minor refacorings while I am here. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115355 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
aa36ba1eced17c88538ecd7aa24ed7b984f24330 |
01-Oct-2010 |
Francois Pichet <pichet2000@gmail.com> |
Better diagnostic for superfluous scope specifier inside a class definition for member functions. + Fixit. Example: class A { void A::foo(); //warning: extra qualification on member 'foo' }; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115347 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
c71d8eb6592ae3ef498fc57db3563d1dfae48dff |
01-Oct-2010 |
Francois Pichet <pichet2000@gmail.com> |
Better diagnostic for superfluous scope specifier inside a class definition for member functions. + Fixit. Example: class A { void A::foo(); //warning: extra qualification on member 'foo' }; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115347 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
b5288692a4e585568459261b8aa1ab5aa1aff524 |
01-Oct-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement the C++0x "trailing return type" feature, e.g., auto f(int) -> int from Daniel Wallin! (With a few minor bug fixes from me). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115322 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
emaType.cpp
reeTransform.h
|
dab60ad68a3a98d687305941a3852e793705f945 |
01-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement the C++0x "trailing return type" feature, e.g., auto f(int) -> int from Daniel Wallin! (With a few minor bug fixes from me). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115322 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
emaType.cpp
reeTransform.h
|
a4e08b7c8c9a62d8549986d6bd7c84936f9353da |
29-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When performing template argument deduction of a function template against a function type, be sure to check the type of the resulting function template specialization against the desired function type after substituting the deduced/defaulted template arguments. Fixes PR8196. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115086 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaTemplateDeduction.cpp
|
fbb6fad63acac2bef36cfa13e0706fa3e2a1ed7d |
29-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
When performing template argument deduction of a function template against a function type, be sure to check the type of the resulting function template specialization against the desired function type after substituting the deduced/defaulted template arguments. Fixes PR8196. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115086 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaTemplateDeduction.cpp
|
27933bf89fd147c770a03315b7ceeceaf6e5b76f |
29-Sep-2010 |
Daniel Dunbar <daniel@zuster.org> |
Add support for attribute((naked)), patch by Zoxc on cfe-commits! - Minor style tweaks by me. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115056 91177308-0d34-0410-b5e6-96231b3b80d8
ttributeList.cpp
emaDeclAttr.cpp
|
dd0cb22bd62e1e835327f478a2dbf0b8fa439713 |
29-Sep-2010 |
Daniel Dunbar <daniel@zuster.org> |
Add support for attribute((naked)), patch by Zoxc on cfe-commits! - Minor style tweaks by me. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115056 91177308-0d34-0410-b5e6-96231b3b80d8
ttributeList.cpp
emaDeclAttr.cpp
|
9e6b8f7e5f2cd40c8f8484d63b26d03131d4e62e |
29-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix handling of dependent nested namespace specifiers in UsingDecls during template instantiation, from Martin Vejnar! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115051 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
1b398205267ea69f35230eea50e0225db22ebb7e |
29-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Fix handling of dependent nested namespace specifiers in UsingDecls during template instantiation, from Martin Vejnar! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115051 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
1c0131e5b7914bfd65abf07004f07c5881591fdc |
29-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Move the management of the set of conversion functions in a C++ class into CXXRecordDecl. The only part that we do not handle this way are using declarations, since that would require extra name lookup that we don't currently want to pay for. This fixes <rdar://problem/8459981>, so that LLDB can build a CXXRecordDecl and magically get all of the right bits set. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115026 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
e80622fd48261b6e5c7e6629dcfee2f76b124487 |
29-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Move the management of the set of conversion functions in a C++ class into CXXRecordDecl. The only part that we do not handle this way are using declarations, since that would require extra name lookup that we don't currently want to pay for. This fixes <rdar://problem/8459981>, so that LLDB can build a CXXRecordDecl and magically get all of the right bits set. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115026 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
62ad8842288762f483eba3af9e9956e3444b281e |
29-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Move the maintenance of CXXRecordDecl::DefinitionData's Abstract bit completely into CXXRecordDecl, by adding a new completeDefinition() function. This required a little reshuffling of the final-overrider checking code, since the "abstract" calculation in the presence of abstract base classes needs to occur in CXXRecordDecl::completeDefinition() but we don't want to compute final overriders more than one in the common case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115007 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
7a39dd01edc43aa5f058e7259a39737fc1f43792 |
29-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Move the maintenance of CXXRecordDecl::DefinitionData's Abstract bit completely into CXXRecordDecl, by adding a new completeDefinition() function. This required a little reshuffling of the final-overrider checking code, since the "abstract" calculation in the presence of abstract base classes needs to occur in CXXRecordDecl::completeDefinition() but we don't want to compute final overriders more than one in the common case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115007 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
f48dc0e6de265a849c4ef938ba6666b679c9e0b6 |
28-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Teach FunctionDecl::setPure() to (indirectly) mark the Abstract bit in CXXRecordDecl::DefinitionData, rather than having Sema mark the bit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114993 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
2138664dd2cff39de52ff11ca35f653c20b2e4b0 |
28-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Teach FunctionDecl::setPure() to (indirectly) mark the Abstract bit in CXXRecordDecl::DefinitionData, rather than having Sema mark the bit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114993 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
88a8e683b56be0b9629d7c58d0d5423058132a57 |
28-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Reinstate r114925 and r114929, both steps toward <rdar://problem/8459981>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114984 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
85606ebf3dd1b5dd81a59ef25b5ad47627664774 |
28-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Reinstate r114925 and r114929, both steps toward <rdar://problem/8459981>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114984 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
322b648bf29f1f9f92be9bb00a5570fd3a3649b5 |
28-Sep-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
vla expressions used in __typeof__ must be evaluated. Fixes rdar://8476159. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114982 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
c5be7b0fc804d8e6f87298ec03c94d8cccd74f29 |
28-Sep-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
vla expressions used in __typeof__ must be evaluated. Fixes rdar://8476159. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114982 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
13a6750d53b50870295e599cee062c3c299e5b55 |
28-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Centralize the management of CXXRecordDecl::DefinitionData's Empty bit in CXXRecordDecl itself. Yes, this is also part of <rdar://problem/8459981>. This reinstates r114924, with one crucial bug fix: we were ignoring the implicit fields created by anonymous structs/unions when updating the bits in CXXRecordDecl, which means that a class/struct containing only an anonymous class/struct would be considered "empty". Hilarity follows. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114980 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
2cf9d656f6283f2a8be0549da110d7cfbb1ea4b2 |
28-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Centralize the management of CXXRecordDecl::DefinitionData's Empty bit in CXXRecordDecl itself. Yes, this is also part of <rdar://problem/8459981>. This reinstates r114924, with one crucial bug fix: we were ignoring the implicit fields created by anonymous structs/unions when updating the bits in CXXRecordDecl, which means that a class/struct containing only an anonymous class/struct would be considered "empty". Hilarity follows. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114980 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
a96b2852af2b6c4bdf696d890401673c7d503771 |
28-Sep-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Move ExternalSemaSource::ReadMethodPool's implementation to Sema.cpp so that the header can get away with forward declarations only for ObjCMethodList and Selector. Fixes <rdar://8467631>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114978 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
8c84571f3e262569ba51d107db7ab31a23de79b3 |
28-Sep-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Move ExternalSemaSource::ReadMethodPool's implementation to Sema.cpp so that the header can get away with forward declarations only for ObjCMethodList and Selector. Fixes <rdar://8467631>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114978 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
a420ef387d84290854387e4735a3ca3ab13aa562 |
28-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Reinstate r114921, which I've exonerated via a self-host build. Centralize the management of CXXRecordDecl::DefinitionData's Aggregate and PlainOldData bits in CXXRecordDecl itself. Another milepost on the road toward <rdar://problem/8459981>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114977 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
9fe183ae1ec568716501f861235afecebee8cd45 |
28-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Reinstate r114921, which I've exonerated via a self-host build. Centralize the management of CXXRecordDecl::DefinitionData's Aggregate and PlainOldData bits in CXXRecordDecl itself. Another milepost on the road toward <rdar://problem/8459981>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114977 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
62b17d0e4f02c5a49791f2ac3a1de0122da0c703 |
28-Sep-2010 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Don't warn with -Wbool-conversions if the user wrote an explicit cast like "(void *)false". Fixes rdar://8459342. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114955 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
b3358724d985dc08889f7905f20284718361e885 |
28-Sep-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Don't warn with -Wbool-conversions if the user wrote an explicit cast like "(void *)false". Fixes rdar://8459342. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114955 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
8cfc0311e19291b2d33a434fb1ce78ce7e69974c |
28-Sep-2010 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Don't warn for an unused label if it has 'unused' attribute. Fixes rdar://8483139. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114954 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
reeTransform.h
|
1a18600b85aaa691122983dd8dcf4225cfc9ef68 |
28-Sep-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Don't warn for an unused label if it has 'unused' attribute. Fixes rdar://8483139. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114954 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
reeTransform.h
|
99c210e3c34130c08b1ce86ffc2b594a087cb354 |
28-Sep-2010 |
Bill Wendling <isanbard@gmail.com> |
Temporarily revert 114929 114925 114924 114921. It looked like they (or at least one of them) was causing a series of failures: http://google1.osuosl.org:8011/builders/clang-x86_64-darwin10-selfhost/builds/4518 svn merge -c -114929 https://llvm.org/svn/llvm-project/cfe/trunk --- Reverse-merging r114929 into '.': U include/clang/Sema/Sema.h U include/clang/AST/DeclCXX.h U lib/Sema/SemaDeclCXX.cpp U lib/Sema/SemaTemplateInstantiateDecl.cpp U lib/Sema/SemaDecl.cpp U lib/Sema/SemaTemplateInstantiate.cpp U lib/AST/DeclCXX.cpp svn merge -c -114925 https://llvm.org/svn/llvm-project/cfe/trunk --- Reverse-merging r114925 into '.': G include/clang/AST/DeclCXX.h G lib/Sema/SemaDeclCXX.cpp G lib/AST/DeclCXX.cpp svn merge -c -114924 https://llvm.org/svn/llvm-project/cfe/trunk --- Reverse-merging r114924 into '.': G include/clang/AST/DeclCXX.h G lib/Sema/SemaDeclCXX.cpp G lib/Sema/SemaDecl.cpp G lib/AST/DeclCXX.cpp U lib/AST/ASTContext.cpp svn merge -c -114921 https://llvm.org/svn/llvm-project/cfe/trunk --- Reverse-merging r114921 into '.': G include/clang/AST/DeclCXX.h G lib/Sema/SemaDeclCXX.cpp G lib/Sema/SemaDecl.cpp G lib/AST/DeclCXX.cpp git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114933 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
2a674e8e443b7a3e77957078248fb52b3b1ec321 |
28-Sep-2010 |
Bill Wendling <isanbard@gmail.com> |
Temporarily revert 114929 114925 114924 114921. It looked like they (or at least one of them) was causing a series of failures: http://google1.osuosl.org:8011/builders/clang-x86_64-darwin10-selfhost/builds/4518 svn merge -c -114929 https://llvm.org/svn/llvm-project/cfe/trunk --- Reverse-merging r114929 into '.': U include/clang/Sema/Sema.h U include/clang/AST/DeclCXX.h U lib/Sema/SemaDeclCXX.cpp U lib/Sema/SemaTemplateInstantiateDecl.cpp U lib/Sema/SemaDecl.cpp U lib/Sema/SemaTemplateInstantiate.cpp U lib/AST/DeclCXX.cpp svn merge -c -114925 https://llvm.org/svn/llvm-project/cfe/trunk --- Reverse-merging r114925 into '.': G include/clang/AST/DeclCXX.h G lib/Sema/SemaDeclCXX.cpp G lib/AST/DeclCXX.cpp svn merge -c -114924 https://llvm.org/svn/llvm-project/cfe/trunk --- Reverse-merging r114924 into '.': G include/clang/AST/DeclCXX.h G lib/Sema/SemaDeclCXX.cpp G lib/Sema/SemaDecl.cpp G lib/AST/DeclCXX.cpp U lib/AST/ASTContext.cpp svn merge -c -114921 https://llvm.org/svn/llvm-project/cfe/trunk --- Reverse-merging r114921 into '.': G include/clang/AST/DeclCXX.h G lib/Sema/SemaDeclCXX.cpp G lib/Sema/SemaDecl.cpp G lib/AST/DeclCXX.cpp git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114933 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
36da5c4ee51506f0c0a95008872e281a373498e1 |
28-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Centralize the management of CXXRecordDecl::DefinitionData's HasTrivialConstructor, HasTrivialCopyConstructor, HasTrivialCopyAssignment, and HasTrivialDestructor bits in CXXRecordDecl's methods. This completes all but the Abstract bit and the set of conversion functions, both of which will require a bit of extra work. The majority of <rdar://problem/8459981> is now implemented (but not all of it). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114929 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
e10288c1e9e06dbd715f47bfaa22ce5d65fdf096 |
28-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Centralize the management of CXXRecordDecl::DefinitionData's HasTrivialConstructor, HasTrivialCopyConstructor, HasTrivialCopyAssignment, and HasTrivialDestructor bits in CXXRecordDecl's methods. This completes all but the Abstract bit and the set of conversion functions, both of which will require a bit of extra work. The majority of <rdar://problem/8459981> is now implemented (but not all of it). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114929 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
cbd60a6b8b2a296e3a68b92a8398a4dedcfc950d |
28-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Centralize the management of CXXRecordDecl::DefinitionData's Polymorphic bit in CXXRecordDecl itself. Yes, this is also part of <rdar://problem/8459981>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114925 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
4a74df5901330c577d0a30d052338d06bbf9e279 |
28-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Centralize the management of CXXRecordDecl::DefinitionData's Polymorphic bit in CXXRecordDecl itself. Yes, this is also part of <rdar://problem/8459981>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114925 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
921255c54a74568ce4cf22e2ad0be6f2d8a40efc |
28-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Centralize the management of CXXRecordDecl::DefinitionData's Empty bit in CXXRecordDecl itself. Yes, this is also part of <rdar://problem/8459981>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114924 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
cdbfa6c4113411debfed9ffec2a45bd50b13e10f |
28-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Centralize the management of CXXRecordDecl::DefinitionData's Empty bit in CXXRecordDecl itself. Yes, this is also part of <rdar://problem/8459981>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114924 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
af80314a085ba7ee3ca18ca97e75806c87adef02 |
28-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Centralize the management of CXXRecordDecl::DefinitionData's Aggregate and PlainOldData bits in CXXRecordDecl itself. Another milepost on the road toward <rdar://problem/8459981>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114921 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
6e3c7713ca126c76053cc092670a949a5e15ddaf |
28-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Centralize the management of CXXRecordDecl::DefinitionData's Aggregate and PlainOldData bits in CXXRecordDecl itself. Another milepost on the road toward <rdar://problem/8459981>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114921 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
cb807137848e8b6585f1d58ebfe53729131d9afa |
28-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Centralize the handling of CXXRecordDecl::DefinitionData's DeclaredDestructor and UserDeclaredDestructor bits in CXXRecordDecl itself. Another step on the road to <rdar://problem/8459981>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114918 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
0ed2e0823cc7b727abd9307db4cd887f293eebe2 |
28-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Centralize the handling of CXXRecordDecl::DefinitionData's DeclaredDestructor and UserDeclaredDestructor bits in CXXRecordDecl itself. Another step on the road to <rdar://problem/8459981>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114918 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
7348ee8f60a5f5541164fe849c34c4b0c4c0fb9e |
28-Sep-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to support transparent_union arguments passed to nonnull attributed functions. Implements radar 6857843. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114917 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
ff3a078d2a67db9ae6ff4cc0f799a209f85a4e91 |
28-Sep-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to support transparent_union arguments passed to nonnull attributed functions. Implements radar 6857843. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114917 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
d01c4c7e227fce7200b84349859b8c50ee0a35bb |
28-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Kill FunctionDecl's IsCopyAssignment bit; it duplicated what could already be determined by isCopyAssignmentOperator(), and was set too late in the process for all clients to see the appropriate value. Cleanup only; no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114916 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaOverload.cpp
|
3e9438b5251a547253d64169863c2909b9b2772a |
28-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Kill FunctionDecl's IsCopyAssignment bit; it duplicated what could already be determined by isCopyAssignmentOperator(), and was set too late in the process for all clients to see the appropriate value. Cleanup only; no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114916 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaOverload.cpp
|
5889acf37f03a14ba7eb3406572f10d95f785e6b |
28-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Centralize the handling of CXXRecordDecl::DefinitionData::DeclaredCopyAssignment, for copy-assignment operators. Another step toward <rdar://problem/8459981>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114899 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
27c08ab4859d071efa158a256f7e47e13d924443 |
28-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Centralize the handling of CXXRecordDecl::DefinitionData::DeclaredCopyAssignment, for copy-assignment operators. Another step toward <rdar://problem/8459981>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114899 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
28abaf338c3165a1b14bb91b1e649b4ece22e02e |
27-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Clean up the handling of the DeclaredDefaultConstructor and DeclaredCopyConstructor bits in CXXRecordDecl's DefinitionData structure. Rather than having Sema call addedConstructor or set the bits directly at semi-random places, move all of the logic for managing these bits into CXXRecordDecl itself and tie the addedConstructor call into DeclContext::addDecl(). This makes it easier for AST-building clients to get the right bits set in DefinitionData, and is one small part of <rdar://problem/8459981>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114889 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
5c0646b98b203d105c10ad8cc11be11cc99a4218 |
27-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Clean up the handling of the DeclaredDefaultConstructor and DeclaredCopyConstructor bits in CXXRecordDecl's DefinitionData structure. Rather than having Sema call addedConstructor or set the bits directly at semi-random places, move all of the logic for managing these bits into CXXRecordDecl itself and tie the addedConstructor call into DeclContext::addDecl(). This makes it easier for AST-building clients to get the right bits set in DefinitionData, and is one small part of <rdar://problem/8459981>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114889 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
c1852b11e181751916079dc2f6b0fbde0d812c80 |
27-Sep-2010 |
Nico Weber <nicolasweber@gmx.de> |
Correctly set "explicit template instantiation" kind on inner structs of templates whose explicit instantiation is first declared and then defined. Fixes http://llvm.org/pr8207 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114874 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
c956b6e8ff909858cec5832f024d2af9c58f190b |
27-Sep-2010 |
Nico Weber <nicolasweber@gmx.de> |
Correctly set "explicit template instantiation" kind on inner structs of templates whose explicit instantiation is first declared and then defined. Fixes http://llvm.org/pr8207 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114874 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
217957c33d3f897d5130da13c0d3d860e53c5b4e |
27-Sep-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Issue warning for trivial cases of nonnull attributes (on functions with no pointer arguments) but only when the attribute has not been coming from a macro instantiation in a header file. Fixes first part of radar 6857843. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114860 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
60acea49c1343e5494edb6da20cac6f9d0b6cfb0 |
27-Sep-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Issue warning for trivial cases of nonnull attributes (on functions with no pointer arguments) but only when the attribute has not been coming from a macro instantiation in a header file. Fixes first part of radar 6857843. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114860 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
c2ca81d9dcd0ffacdea0e1530a2d2f56c5f56e74 |
25-Sep-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Fix a NYI in IRGen which was due to incorrect AST for property reference expression (of c++ object type) in the conditional expression. Fixes // rdar://8291337 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114783 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
3911a1a0ab0bbbf2304db8e965f5b8365eb6887b |
25-Sep-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Fix a NYI in IRGen which was due to incorrect AST for property reference expression (of c++ object type) in the conditional expression. Fixes // rdar://8291337 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114783 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
0f881c3735a8f5962943d799105adb63a873a2c2 |
24-Sep-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch implements passing arrays to functions expecting vla. Implements pr7827. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114737 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaOverload.cpp
|
745da3a5bb4ea35f93f50301e7fbbb7d78d3b6bb |
24-Sep-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch implements passing arrays to functions expecting vla. Implements pr7827. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114737 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaOverload.cpp
|
1ba11cbf79b9e4e7c1502939f60b3734e2a3b1ed |
24-Sep-2010 |
Ted Kremenek <kremenek@apple.com> |
Default synthesized ivars don't really have a location in the source. Using the location of the @implementation is just confusing for clients that want to use SourceLocations for syntactic references. Fixes: <rdar://problem/8470540> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114714 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
2a6af6b7874e41f3e6213e8d18623c4bac150354 |
24-Sep-2010 |
Ted Kremenek <kremenek@apple.com> |
Default synthesized ivars don't really have a location in the source. Using the location of the @implementation is just confusing for clients that want to use SourceLocations for syntactic references. Fixes: <rdar://problem/8470540> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114714 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
a9b976bc0d468dc6183fae093193ccb992999e33 |
24-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Synchronize globally-cached code completion results with the results provided when the optimization is disabled. In particular, split the completion context CCC_Other into two contexts: CCC_Other, which means that it's an undisclosed context for which any other results are unwelcome, and CCC_Recovery, which is used in recovery cases. Since we're now using the completion context within the completion results builder, make sure that it's always set to something. Fixes <rdar://problem/8470644>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114704 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
|
52779fb71795534d0447f6f4d4a6f6a7b09c4639 |
24-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Synchronize globally-cached code completion results with the results provided when the optimization is disabled. In particular, split the completion context CCC_Other into two contexts: CCC_Other, which means that it's an undisclosed context for which any other results are unwelcome, and CCC_Recovery, which is used in recovery cases. Since we're now using the completion context within the completion results builder, make sure that it's always set to something. Fixes <rdar://problem/8470644>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114704 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
|
cca5fe17d4b53544f63790958e71573c146cb19a |
23-Sep-2010 |
Ted Kremenek <kremenek@apple.com> |
When warning about comparing an unsigned int to being >= 0, don't issue a warning if the zero value was an enum or was expanded from a macro. Fixes: <rdar://problem/8414119> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114695 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
e3b159c0d4a93db8586861ff011b5a10de4ae6ef |
23-Sep-2010 |
Ted Kremenek <kremenek@apple.com> |
When warning about comparing an unsigned int to being >= 0, don't issue a warning if the zero value was an enum or was expanded from a macro. Fixes: <rdar://problem/8414119> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114695 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
7d947fe10b56e799604199fb20a6684a0d002218 |
23-Sep-2010 |
Ted Kremenek <kremenek@apple.com> |
For properties declared in a @protocol and redeclared in a class extension, use the class extension as the lexical DeclContext for the @property declaration that gets auto-created for the @interface. Fixes: <rdar://problem/8467189> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114693 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
4a2e9ea0c191176ebe996516a9cf4f93b7e932cc |
23-Sep-2010 |
Ted Kremenek <kremenek@apple.com> |
For properties declared in a @protocol and redeclared in a class extension, use the class extension as the lexical DeclContext for the @property declaration that gets auto-created for the @interface. Fixes: <rdar://problem/8467189> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114693 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
0d6a871b77bbbc300b87148a902ac825494dc595 |
23-Sep-2010 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Fix bogus compiler errors when declaring anonymous union, outside a class, with members with the same name as a decl outside the scope where the members are actually introduced. Fixes http://llvm.org/PR6741 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114641 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
2b64239a8ef4829be7b2c32eff60d8de204b4e2c |
23-Sep-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Fix bogus compiler errors when declaring anonymous union, outside a class, with members with the same name as a decl outside the scope where the members are actually introduced. Fixes http://llvm.org/PR6741 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114641 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
7d8a0be163216dba2a67d7f9e169f3ca7bb5373c |
23-Sep-2010 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Don't crash on _Imaginary. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114637 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
47423bdaa06a3b9c2a859b57c17fc570094dad1c |
23-Sep-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Don't crash on _Imaginary. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114637 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
8421ec07de0c295f54d1070b470a32155b8e0192 |
22-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix a hard-to-reproduce crash-on-invalid, where we weren't checking for a valid result from ActOnIdExpression git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114548 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e45bb6aefba8766cbcd86db40acca10de468149f |
22-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Fix a hard-to-reproduce crash-on-invalid, where we weren't checking for a valid result from ActOnIdExpression git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114548 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
5f1239dd9867e72bda34cf5f3de32b5fae89f634 |
21-Sep-2010 |
Ted Kremenek <kremenek@apple.com> |
Correctly register the class extension as the lexical DeclContext for ObjC methods declared with @property in class extensions. This matches the behavior for setters. Also pass the class extension to ProcessPropertyDecl as the lexical DeclContext, even when not redeclaring the @property. This fixes the remaining issues in <rdar://problem/7410145>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114477 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
a054fb46b1fb596d1719b89d2d9a5be3c32a4b0d |
21-Sep-2010 |
Ted Kremenek <kremenek@apple.com> |
Correctly register the class extension as the lexical DeclContext for ObjC methods declared with @property in class extensions. This matches the behavior for setters. Also pass the class extension to ProcessPropertyDecl as the lexical DeclContext, even when not redeclaring the @property. This fixes the remaining issues in <rdar://problem/7410145>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114477 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
54ee9141a7eb8f7805d261770ff9b9fbe0b3d518 |
21-Sep-2010 |
Ted Kremenek <kremenek@apple.com> |
For ObjCPropertyDecls in class extensions, use the class extension as the lexical DeclContext for newly created ObjCMethodDecls. Further, use the location of the new property declaration as the location of new ObjCMethodDecls (if they didn't previously exist). This fixes more of the issues reported in <rdar://problem/7410145>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114456 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
8254aa62d9189395be1eed61194cd4b5ee6cb4a2 |
21-Sep-2010 |
Ted Kremenek <kremenek@apple.com> |
For ObjCPropertyDecls in class extensions, use the class extension as the lexical DeclContext for newly created ObjCMethodDecls. Further, use the location of the new property declaration as the location of new ObjCMethodDecls (if they didn't previously exist). This fixes more of the issues reported in <rdar://problem/7410145>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114456 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
103d7132048e0d9c515247a3f4c8173b264283bf |
21-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Add code completion for C++ constructors wherever we see the class (or class template) and are in a context where we can have a value. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114441 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
|
6f942b2cabf32b96f9901b889d8e44a34e0e7c62 |
21-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Add code completion for C++ constructors wherever we see the class (or class template) and are in a context where we can have a value. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114441 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
|
1a89351c3a8402927304be9b3bd4c5228d13abb6 |
21-Sep-2010 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Do not warn with -Wuninitialized when the member is used in a sizeof or address-of expression. Fixes rdar://8331312. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114426 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
ff8819be64c53d71dcc0200ece9b2738041c80e2 |
21-Sep-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Do not warn with -Wuninitialized when the member is used in a sizeof or address-of expression. Fixes rdar://8331312. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114426 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
70a39b331caa5baed5600fc69fec89843b7832a3 |
21-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When providing code completions for an argument in an Objective-C message send, e.g., [[NSString alloc] initWithCString:<CC> look up all of the possible methods and determine the preferred type for the argument expression based on the type of the corresponding parameter. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114379 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
b9d775734b02e5369bdfa78fa3e479c7281a9761 |
21-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
When providing code completions for an argument in an Objective-C message send, e.g., [[NSString alloc] initWithCString:<CC> look up all of the possible methods and determine the preferred type for the argument expression based on the type of the corresponding parameter. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114379 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
6f5f1ab70eb0ec5831d86bea8cdde46f938b3e15 |
21-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Refactor code completion for expressions that occur as arguments in Objective-C message sends. There is no functionality change here; this is prep work for using the parameter types to help guide the expression results when code-completing the argument. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114375 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
70c5ac70ace21b011dc2d4001bae26cdcf62ff8d |
21-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Refactor code completion for expressions that occur as arguments in Objective-C message sends. There is no functionality change here; this is prep work for using the parameter types to help guide the expression results when code-completing the argument. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114375 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
f0939c45579e3a6e35fde072ddd3428bb5972e37 |
21-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Code completion has no reason to prefer values over types, especially at the statement level or in Objective-C message receivers. Therefore, just give types and declarations the same basic priority, and adjust from there. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114374 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
08f43cd5d966fd31b32bd5c76c0645ebbf08b2f1 |
21-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Code completion has no reason to prefer values over types, especially at the statement level or in Objective-C message receivers. Therefore, just give types and declarations the same basic priority, and adjust from there. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114374 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
0e23bda3536664f90b13194f48e5d16910e713f8 |
21-Sep-2010 |
Nate Begeman <natebegeman@mac.com> |
Check in support for OpenCL conditional operator on vector types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114371 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
6155d73ad1668be5335b1a060f6c49c03d4dca05 |
21-Sep-2010 |
Nate Begeman <natebegeman@mac.com> |
Check in support for OpenCL conditional operator on vector types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114371 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
2f66c7e3957113b3da68051eea7a71c0394e609c |
21-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Slight refactoring in code-completion results generation, placing the various priority adjustments for preferences (based on selectors, types) in a single function to make extension easier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114370 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
cee9ff16688bc6dd6571162c1860f4eae05d98f7 |
21-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Slight refactoring in code-completion results generation, placing the various priority adjustments for preferences (based on selectors, types) in a single function to make extension easier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114370 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
a345dc8c0c1905b13f4a18cf7643b63cfb51acd8 |
20-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Get rid of the lame attempt to prioritize "void" functions at statement context; it really isn't helpful in practice (remember printf!) and we'll be doing other adjustments for statements very soon. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114358 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
d475aad02da03c31c0e07f7ce0e26ef22bc039da |
20-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Get rid of the lame attempt to prioritize "void" functions at statement context; it really isn't helpful in practice (remember printf!) and we'll be doing other adjustments for statements very soon. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114358 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
cb37467b4a0e56739b6f60e4f2609bd53bc47286 |
20-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Tweak priorities for some types and macros: - In Objective-C, we prefer BOOL to bool for historic reasons; slightly penalize "bool". - Treat Nil macro as a NULL pointer constant. - Treat YES, NO, true, and false macros as constants. - Treat the bool macro as a type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114356 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
b05496dbd63f03bf474dae2c4d1e2142608780cc |
20-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Tweak priorities for some types and macros: - In Objective-C, we prefer BOOL to bool for historic reasons; slightly penalize "bool". - Treat Nil macro as a NULL pointer constant. - Treat YES, NO, true, and false macros as constants. - Treat the bool macro as a type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114356 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
3f6f4597b6bbf39e108b616cd0f96eaa6953135e |
20-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Check that an overloaded function name, when used by the ! operator, actually resolves to a particular function. Fixes PR8181, from Faisal Vali! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114331 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ea844f3aa29c1238683ac98bc1b720e49d97d1f1 |
20-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Check that an overloaded function name, when used by the ! operator, actually resolves to a particular function. Fixes PR8181, from Faisal Vali! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114331 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b0bc5b2b1a6f114b31a5cf770c0db6d2589877cf |
20-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Give implicitly-defined default constructors and destructors empty bodies, from Martin Vejnar! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114329 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
4ada9d3aa47d66e4074229fb93f24416526a15e8 |
20-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Give implicitly-defined default constructors and destructors empty bodies, from Martin Vejnar! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114329 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
ede2675976fd9f70a9a7ccd4b9114281d795d24a |
19-Sep-2010 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Implement -Wunused-label. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114315 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
emaStmt.cpp
|
355a9fe26a6dec89680ddf713dd5bc7a671b298a |
19-Sep-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Implement -Wunused-label. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114315 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
emaStmt.cpp
|
55d7c1787246c4a84fa303ee0f5a221e10c0aebc |
19-Sep-2010 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Warn when an expression result in a LabelStmt is unused. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114314 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
d2827af6f96d441d72315dbe6d8505c3be0f2aa6 |
19-Sep-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Warn when an expression result in a LabelStmt is unused. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114314 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
fe921683933ba702385bd8932926aa9c57e09cd5 |
18-Sep-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Problem with gnu conditional extension with missing LHS and when conditional expression is an array. Since it will be decayed, saved expression must be saved with decayed expression. This is necessary to preserve semantics of this extension (and prevent an IRGen crash which expects an array to always be decayed). I am sure there will be other cases in c++ (aggregate conditionals for example) when saving of the expression must happen after some transformation on conditional expression has happened. Doug, please review. Fixes // rdar://8446940 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114296 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprCXX.cpp
|
1fb019bf42f5757c027edb56e5bb70233787a39c |
18-Sep-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Problem with gnu conditional extension with missing LHS and when conditional expression is an array. Since it will be decayed, saved expression must be saved with decayed expression. This is necessary to preserve semantics of this extension (and prevent an IRGen crash which expects an array to always be decayed). I am sure there will be other cases in c++ (aggregate conditionals for example) when saving of the expression must happen after some transformation on conditional expression has happened. Doug, please review. Fixes // rdar://8446940 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114296 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprCXX.cpp
|
08cbcf8fbe083678843261d5613273ed0f0a230a |
18-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Give the Objective-C _cmd an "unlikely" code completion priority; it's very rarely used. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114286 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
|
97fe61ca1749110c28eb4570a710c8983711c7b3 |
18-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Give the Objective-C _cmd an "unlikely" code completion priority; it's very rarely used. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114286 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
|
454fda625603db32379fed451334fa6661c03e0d |
18-Sep-2010 |
John McCall <rjmccall@apple.com> |
static local variables with destructors don't require a global destructor unless we're on a platform without __cxa_atexit (or use thereof has been disabled). This patch actually just disables the check completely for static locals, but I've filed http://llvm.org/bugs/show_bug.cgi?id=8176 to track the platform-specific fix. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114269 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
ae79222014a7a90a2c2d4a04e67deac0012a0461 |
18-Sep-2010 |
John McCall <rjmccall@apple.com> |
static local variables with destructors don't require a global destructor unless we're on a platform without __cxa_atexit (or use thereof has been disabled). This patch actually just disables the check completely for static locals, but I've filed http://llvm.org/bugs/show_bug.cgi?id=8176 to track the platform-specific fix. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114269 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
7d756cb07d278ce98104b55c2a4c152ec38c4e38 |
18-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Continue parsing more postfix expressions, even after semantic errors. Improves code completion in yet another case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114255 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
ac5fd8404fa8ecfae28be76f98fd0d926350354c |
18-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Continue parsing more postfix expressions, even after semantic errors. Improves code completion in yet another case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114255 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
eea07e58340513fb69233bfaec43ab511f94dad3 |
18-Sep-2010 |
John Thompson <john.thompson.jtsoftware@gmail.com> |
Add more error checking to attribute vecreturn git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114251 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
01add59bc8fd178960ad61169bc01566b0d6614c |
18-Sep-2010 |
John Thompson <John.Thompson.JTSoftware@gmail.com> |
Add more error checking to attribute vecreturn git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114251 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
fb2200e50a2a0ad9ebe37487a7259579b059cc70 |
18-Sep-2010 |
Daniel Dunbar <daniel@zuster.org> |
Sema/transparent_union: Make sure to add implicit cast when constructing implicit union values for the transparent_union extension. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114236 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
41e11a9315f7041c93e409f5d372013204e7cd04 |
18-Sep-2010 |
Daniel Dunbar <daniel@zuster.org> |
Sema/transparent_union: Make sure to add implicit cast when constructing implicit union values for the transparent_union extension. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114236 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
11f2abc89c286ea0ce3d8a821cd34ca8a0a43bb8 |
18-Sep-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Diagnose use of incomplete type on method argument type of method definitions instead of crashing in code gen. Fixes radar 8421082. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114223 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
23c0104bb8ad04f06804bd399cbc1f5f962b356c |
18-Sep-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Diagnose use of incomplete type on method argument type of method definitions instead of crashing in code gen. Fixes radar 8421082. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114223 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
4e7474226f3d91e5168a7f57ad10fcbb178ec1ea |
17-Sep-2010 |
Chris Lattner <sabre@nondot.org> |
fix rdar://8445858 - __sync_* intrinsics erroneously reject ObjC pointers git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114209 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
dd5fa7a21ca9db9d620001ca977681a1b724e3fe |
17-Sep-2010 |
Chris Lattner <sabre@nondot.org> |
fix rdar://8445858 - __sync_* intrinsics erroneously reject ObjC pointers git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114209 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
0385609201477401a9894a8a2333dd45157e3f9b |
17-Sep-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Only assignment operator triggers property setter call. Fixes radar 8437253. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114207 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
eb17e8b9aea1f260f73f1f9dd1da951b80b46370 |
17-Sep-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Only assignment operator triggers property setter call. Fixes radar 8437253. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114207 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
51d8c0f0972268579063d1459cee2eb1c62b0036 |
17-Sep-2010 |
John McCall <rjmccall@apple.com> |
When emitting a new-expression inside a conditional expression, the cleanup might not be dominated by the allocation code. In this case, we have to store aside all the delete arguments in case we need them later. There's room for optimization here in cases where we end up not actually needing the cleanup in different branches (or being able to pop it after the initialization code). Also make sure we only call this operator delete along the path where we actually allocated something. Fixes rdar://problem/8439196. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114145 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
3019c444c672938c57f5573840071ecd73425ee7 |
17-Sep-2010 |
John McCall <rjmccall@apple.com> |
When emitting a new-expression inside a conditional expression, the cleanup might not be dominated by the allocation code. In this case, we have to store aside all the delete arguments in case we need them later. There's room for optimization here in cases where we end up not actually needing the cleanup in different branches (or being able to pop it after the initialization code). Also make sure we only call this operator delete along the path where we actually allocated something. Fixes rdar://problem/8439196. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114145 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
a05526543c69a2cf3c897c1f748094bba47daf02 |
17-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When dealing with an anonymous enumeration declared in function prototype scope, temporarily set the context of the enumeration declaration to the translation unit. We do the same thing for parameters, until we have an actual function declaration on which to hang them. Fixes <rdar://problem/8435682>. There is more work to do in this area, since we have existing bugs with tags being declared/defined in function parameter lists. This fix is correct, and we'll end up extending it when we deal with those existing bugs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114135 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
069ea646616e4ece684e1dec652640f644f0d40a |
17-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
When dealing with an anonymous enumeration declared in function prototype scope, temporarily set the context of the enumeration declaration to the translation unit. We do the same thing for parameters, until we have an actual function declaration on which to hang them. Fixes <rdar://problem/8435682>. There is more work to do in this area, since we have existing bugs with tags being declared/defined in function parameter lists. This fix is correct, and we'll end up extending it when we deal with those existing bugs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114135 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
118dde1cdfb29a7c66520071711edf1728720ce2 |
16-Sep-2010 |
Chris Lattner <sabre@nondot.org> |
improve the "enumeration value 'g' not handled in switch" warning to handle multiple enumerators with one warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114093 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
ce78461303f45fecb3460d1c49c9b71f27ad19c3 |
16-Sep-2010 |
Chris Lattner <sabre@nondot.org> |
improve the "enumeration value 'g' not handled in switch" warning to handle multiple enumerators with one warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114093 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
ca96311d57ab1ab489c9c49d29feea05540c2245 |
16-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Don't add two code-completion results for the same selector; it doesn't add any value. Instead, we'll just take the first method with that selector that we find and create a completion for it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114082 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
d36adf553cd71df96fe869204482e0f0d68c6bbf |
16-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Don't add two code-completion results for the same selector; it doesn't add any value. Instead, we'll just take the first method with that selector that we find and create a completion for it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114082 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
9652cd0cbb5b8b9686087dcd95ac3fef016b3026 |
16-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When collecting Objective-C methods for message send completions, be sure to visit the protocols of protocols. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114079 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
e396c7bd99ed99fd8136fadc8945791754c61b16 |
16-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
When collecting Objective-C methods for message send completions, be sure to visit the protocols of protocols. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114079 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
e1ee27b77d892300f3c16e289e6ac1fcd1329027 |
16-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement code completion for Objective-C class message sends that are missing the opening bracket '[', e.g., NSArray <CC> at function scope. Previously, we would only give trivial completions (const, volatile, etc.), because we're in a "declaration name" scope. Now, we also provide completions for class methods of NSArray, e.g., alloc Note that we already had support for this after the first argument, e.g., NSArray method:x <CC> would get code completion for class methods of NSArray whose selector starts with "method:". This was already present because we recover as if NSArray method:x were a class message send missing the opening bracket (which was committed in r114057). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114078 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
c7b6d883360092808b0ae81b7829fa8196ef42a1 |
16-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement code completion for Objective-C class message sends that are missing the opening bracket '[', e.g., NSArray <CC> at function scope. Previously, we would only give trivial completions (const, volatile, etc.), because we're in a "declaration name" scope. Now, we also provide completions for class methods of NSArray, e.g., alloc Note that we already had support for this after the first argument, e.g., NSArray method:x <CC> would get code completion for class methods of NSArray whose selector starts with "method:". This was already present because we recover as if NSArray method:x were a class message send missing the opening bracket (which was committed in r114057). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114078 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
815434869c8af8ebe1d380b0272b0706af725ff0 |
16-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement automatic bracket insertion for Objective-C class message sends. These are far trickier than instance messages, because we typically have something like NSArray alloc] where it appears to be a declaration of a variable named "alloc" up until we see the ']' (or a ':'), and at that point we can't backtrace. So, we use a combination of syntactic and semantic disambiguation to treat this as a message send only when the type is an Objective-C type and it has the syntax of a class message send (which would otherwise be ill-formed). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114057 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
9497a73ad0d54859edbf48beb93ebb19a7ae50c9 |
16-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement automatic bracket insertion for Objective-C class message sends. These are far trickier than instance messages, because we typically have something like NSArray alloc] where it appears to be a declaration of a variable named "alloc" up until we see the ']' (or a ':'), and at that point we can't backtrace. So, we use a combination of syntactic and semantic disambiguation to treat this as a message send only when the type is an Objective-C type and it has the syntax of a class message send (which would otherwise be ill-formed). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114057 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
bcd067d551ea9eb7dc811620c0228fb424937909 |
16-Sep-2010 |
Zhongxing Xu <xuzhongxing@gmail.com> |
Introduce new CFGElement hierarchy to support C++ CFG, based on Marcin's patch and discussions with Ted and Jordy. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114056 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
b36cd3e1757fb4fcd9509f35558c847b04bef35f |
16-Sep-2010 |
Zhongxing Xu <xuzhongxing@gmail.com> |
Introduce new CFGElement hierarchy to support C++ CFG, based on Marcin's patch and discussions with Ted and Jordy. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114056 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
70ecc5575f0f9ffd9bd15582a07cd17f0c5ae9fb |
16-Sep-2010 |
Ted Kremenek <kremenek@apple.com> |
Do not warn about empty bodies for 'if' statements if the body is expanded from a macro. Fixes <rdar://problem/8436021>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114049 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
b3198178daf9d33466fc18e009e2c6692fdf29c0 |
16-Sep-2010 |
Ted Kremenek <kremenek@apple.com> |
Do not warn about empty bodies for 'if' statements if the body is expanded from a macro. Fixes <rdar://problem/8436021>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114049 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
657ca29cff71016e5300825ef539140b34fa535a |
16-Sep-2010 |
Ted Kremenek <kremenek@apple.com> |
For self-comparison warning, check the source location of both the LHS and RHS to see if they are expanded from macros (and if so, omit the warning). Previously we were just looking at the location of the binary expression. Fixes <rdar://problem/8435950>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114044 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
fbcb0ebb51f4b76abaa4a7b30be08c175f723369 |
16-Sep-2010 |
Ted Kremenek <kremenek@apple.com> |
For self-comparison warning, check the source location of both the LHS and RHS to see if they are expanded from macros (and if so, omit the warning). Previously we were just looking at the location of the binary expression. Fixes <rdar://problem/8435950>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114044 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
1564a16532a99886f6a57647f47eded70bc42c5a |
16-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Handle bracket insertion for Objective-C class messages in a very narrow, almost useless case where we're inside a parenthesized expression, e.g., (NSArray alloc]) The solution to the general case still eludes me. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114039 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
77328d1bb92c2c46bc3e4badc4b4b97c517903b7 |
16-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Handle bracket insertion for Objective-C class messages in a very narrow, almost useless case where we're inside a parenthesized expression, e.g., (NSArray alloc]) The solution to the general case still eludes me. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114039 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
427a8c171ae0bf5c3ea2cab5b63d84a85fd8d505 |
15-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve code completion for Objective-C message sends when the opening '[' is missing. Prior commits improving recovery also improved code completion beyond the first selector, e.g., at or after the "to" in calculator add:x to:y but not after "calculator". We now provide the same completions for calculator <CC> that we would for [calculator <CC> if "calculator" is an expression whose type is something that can receive Objective-C messages. This code completion works for instance and super message sends, but not class message sends. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113976 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
78edf515544f0b9dddf69d6c1678fd83e94d8352 |
15-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Improve code completion for Objective-C message sends when the opening '[' is missing. Prior commits improving recovery also improved code completion beyond the first selector, e.g., at or after the "to" in calculator add:x to:y but not after "calculator". We now provide the same completions for calculator <CC> that we would for [calculator <CC> if "calculator" is an expression whose type is something that can receive Objective-C messages. This code completion works for instance and super message sends, but not class message sends. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113976 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
04611ee4c92c5c430a096a39ac5c6b5f4a3df7e4 |
15-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement bracket insertion for Objective-C instance message sends as part of parser recovery. For example, given: a method1:arg]; we detect after parsing the expression "a" that we have the start of a message send expression. We pretend we've seen a '[' prior to the a, then parse the remainder as a message send. We'll then give a diagnostic+fix-it such as: fixit-objc-message.m:17:3: error: missing '[' at start of message send expression a method1:arg]; ^ [ The algorithm here is very simple, and always assumes that the open bracket goes at the beginning of the message send. It also only works for non-super instance message sends at this time. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113968 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
0fbda68b50ce17d7ad36ef7a5ed77518a5cd272e |
15-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement bracket insertion for Objective-C instance message sends as part of parser recovery. For example, given: a method1:arg]; we detect after parsing the expression "a" that we have the start of a message send expression. We pretend we've seen a '[' prior to the a, then parse the remainder as a message send. We'll then give a diagnostic+fix-it such as: fixit-objc-message.m:17:3: error: missing '[' at start of message send expression a method1:arg]; ^ [ The algorithm here is very simple, and always assumes that the open bracket goes at the beginning of the message send. It also only works for non-super instance message sends at this time. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113968 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
c1226787962c6550878b4e0df3c4bbb0fbf4b3a2 |
15-Sep-2010 |
John McCall <rjmccall@apple.com> |
one piece of code is responsible for the lifetime of every aggregate slot. The easiest way to do that was to bundle up the information we care about for aggregate slots into a new structure which demands that its creators at least consider the question. I could probably be convinced that the ObjC 'needs GC' bit should be rolled into this structure. Implement generalized copy elision. The main obstacle here is that IR-generation must be much more careful about making sure that exactly git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113962 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaInit.cpp
|
558d2abc7f9fd6801cc7677200992313ae90b5d8 |
15-Sep-2010 |
John McCall <rjmccall@apple.com> |
one piece of code is responsible for the lifetime of every aggregate slot. The easiest way to do that was to bundle up the information we care about for aggregate slots into a new structure which demands that its creators at least consider the question. I could probably be convinced that the ObjC 'needs GC' bit should be rolled into this structure. Implement generalized copy elision. The main obstacle here is that IR-generation must be much more careful about making sure that exactly git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113962 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaInit.cpp
|
d1733762531574bb9e979b78b578e358319944ad |
15-Sep-2010 |
Francois Pichet <pichet2000@gmail.com> |
Microsoft's flexible array rules relaxation: - in union - as the only element of a struct/class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113909 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
09246183715f4b0a8728a3827bfe894b6c6016b9 |
15-Sep-2010 |
Francois Pichet <pichet2000@gmail.com> |
Microsoft's flexible array rules relaxation: - in union - as the only element of a struct/class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113909 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
810032993c6c0095c4d9399da1af2daccd0bec1e |
15-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Introduce a new code-completion context for a parenthesized expression, e.g., after the '(' that could also be a type cast. Here, we provide types as code-completion results in C/Objective-C (C++ already had them), although we wouldn't in a normal expression context. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113904 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
0268810a46780144a2d5fb5a017c938d1199189c |
15-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Introduce a new code-completion context for a parenthesized expression, e.g., after the '(' that could also be a type cast. Here, we provide types as code-completion results in C/Objective-C (C++ already had them), although we wouldn't in a normal expression context. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113904 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
19f13b1cbbe43dfa6bbd62bfe84bd6ac752d6c18 |
15-Sep-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Fix destructor and assignment operator lookup in the has_nothrow traits. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113897 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
f8aca8664512c80a018eb4a4a93c61ad6793abcd |
15-Sep-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Fix destructor and assignment operator lookup in the has_nothrow traits. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113897 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
3b2c9345bf8cf5c5eace1cbca6329a8266a92c90 |
15-Sep-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
RHS of property expression assignment requires copy initialization before passing it to a setter. Fixes radar 8427922. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113885 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
c4e1a6815235ade1a4affe3511ca5ce2dcc64467 |
15-Sep-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
RHS of property expression assignment requires copy initialization before passing it to a setter. Fixes radar 8427922. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113885 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
c00411820af08810fa952049c5ea1c9819cbfb60 |
15-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When marking the declarations in a default argument expression as "used", at the time that the default argument itself is used, also mark destructors that will be called by this expression. This fixes a regression that I introduced in r113700, which broke WebKit, and fixes <rdar://problem/8427926>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113883 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
reeTransform.h
|
5833b0b831d6afae2885e6af420e2bda639652e6 |
15-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
When marking the declarations in a default argument expression as "used", at the time that the default argument itself is used, also mark destructors that will be called by this expression. This fixes a regression that I introduced in r113700, which broke WebKit, and fixes <rdar://problem/8427926>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113883 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
reeTransform.h
|
3049ec9961d1a1f0570a24dc601e6a362129b35d |
10-Sep-2010 |
Shih-wei Liao <sliao@google.com> |
Merge changes from upstream repository (r112367) Change-Id: Ib88c8fd890e7c8c5597ea2b86cfa934438965c08
|
4ebf3c46ddb1a95cb90f9489996d36db8803747a |
14-Sep-2010 |
John McCall <rjmccall@apple.com> |
The paired 'operator delete' for a placement 'operator new' is always a placement 'operator delete', even if there are no placement args (i.e. overload resolution selected an operator new with default arguments). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113861 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
edeb6c9b47e802da1a9a149ea1ea4f1ddd7f6182 |
14-Sep-2010 |
John McCall <rjmccall@apple.com> |
The paired 'operator delete' for a placement 'operator new' is always a placement 'operator delete', even if there are no placement args (i.e. overload resolution selected an operator new with default arguments). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113861 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
fe0fb28bcfc69003c77765352186302b6ba30a90 |
14-Sep-2010 |
Michael J. Spencer <bigcheesegs@gmail.com> |
Revert "CMake: Update to use standard CMake dependency tracking facilities instead" This reverts commit r113631 Conflicts: CMakeLists.txt lib/CodeGen/CMakeLists.txt git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113817 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
|
560a921b85773ac7c2d1a7a4aec4682c822c5cb4 |
14-Sep-2010 |
Michael J. Spencer <bigcheesegs@gmail.com> |
Revert "CMake: Update to use standard CMake dependency tracking facilities instead" This reverts commit r113631 Conflicts: CMakeLists.txt lib/CodeGen/CMakeLists.txt git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113817 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
|
65816f06550de59a31e526e6580c88d8a1289b10 |
14-Sep-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Don't crash when using type traits on a class with a constructor template. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113796 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
08295a592d7e54e6bea00daeb2abe7ac79a3aaba |
14-Sep-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Don't crash when using type traits on a class with a constructor template. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113796 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
be19ac06518581e1080abb13cb6eafff431b2585 |
14-Sep-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Remove CXXRecordDecl::getDefaultConstructor(), an inherently unsafe function due to lazy declaration of default constructors. Now that __has_nothrow_constructor doesn't use it anymore, part of PR8101 is fixed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113794 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExprCXX.cpp
|
751025d5d174ab75dc3788211581d9fbe6224841 |
14-Sep-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Remove CXXRecordDecl::getDefaultConstructor(), an inherently unsafe function due to lazy declaration of default constructors. Now that __has_nothrow_constructor doesn't use it anymore, part of PR8101 is fixed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113794 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExprCXX.cpp
|
ad2a338a7c357775e5bfb08a3a9517c6a94c5e1d |
13-Sep-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Have __has_nothrow_copy use Sema's lookup routines. This fixes the problem with not finding implicitly declared copy constructors, part of PR8107. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113784 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
5f4e8999aa30e2986e99fbfa4c43e61e99a18687 |
13-Sep-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Have __has_nothrow_copy use Sema's lookup routines. This fixes the problem with not finding implicitly declared copy constructors, part of PR8107. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113784 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
8510a307c69112f0df8805501c0682e28513b527 |
13-Sep-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Eagerly evaluate type traits in Sema instead of lazily in AST. They actually need Sema access to be correct, fixes coming up. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113782 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
0dfd848fa4c9664852ba8c929a8bd3fce93ddca2 |
13-Sep-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Eagerly evaluate type traits in Sema instead of lazily in AST. They actually need Sema access to be correct, fixes coming up. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113782 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
a03c2a265003f10407486c516fe20807910860ce |
13-Sep-2010 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
When applying 'delete' on a pointer-to-array type match GCC and EDG behavior and treat it as 'delete[]'. Also offer a fix-it hint adding '[]'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113778 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
4076dacf1497fb95cb298b9d964fbdbdaf9bde6c |
13-Sep-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
When applying 'delete' on a pointer-to-array type match GCC and EDG behavior and treat it as 'delete[]'. Also offer a fix-it hint adding '[]'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113778 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
3a031ae36a2f29a65930d6f38433851560945163 |
13-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix a typo noted by Gabor git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113754 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
1034170d053b2600dc435a128be88d76e6f988cf |
13-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Fix a typo noted by Gabor git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113754 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
8d033e911931bc942681b5ef85c125f9559a570b |
13-Sep-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Congruent diagnostic for void* arithmetic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113740 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
46358457f712a8da89d4e03a17a1d44d35c78b77 |
13-Sep-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Congruent diagnostic for void* arithmetic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113740 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
8d8eadaae4b509b0a422a8204a9f44a8e6ac120a |
13-Sep-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Parentheses around address non-type template argument is demoted to an extension warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113739 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
2c5399f99c95b831fa90fd3a3c1d9719c1dd9441 |
13-Sep-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Parentheses around address non-type template argument is demoted to an extension warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113739 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
958ff32e7b9a4a65b87c2bda25613b1bb4155a2f |
12-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Don't assert when attempting to take the address of an overloaded function fails due to ambiguities in partial ordering of function templates. Fixes PR8033. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113725 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
78c057e5a16b3ba186cc6453ca26b15745f2b79d |
12-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Don't assert when attempting to take the address of an overloaded function fails due to ambiguities in partial ordering of function templates. Fixes PR8033. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113725 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
9371c2b92dc4fc359da131db9be5c6dcd5f2fcf4 |
12-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When performing overload resolution, only compare the final conversion sequences for two conversion functions when in fact we are in the text of initialization by a user-defined conversion sequences. Fixes PR8034. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113724 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
emaOverload.cpp
|
8fcc516a5d5b2fec0023a9dced29285a38b95355 |
12-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
When performing overload resolution, only compare the final conversion sequences for two conversion functions when in fact we are in the text of initialization by a user-defined conversion sequences. Fixes PR8034. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113724 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
emaOverload.cpp
|
91305bf1b2e75937fb60db03cca766ad983fffdb |
12-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Diagnose the instantiation of variables (including static data members) with function type. Fixes PR8047. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113723 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
c6dbc3fa467e2355b678a6b717534928048efcb2 |
12-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Diagnose the instantiation of variables (including static data members) with function type. Fixes PR8047. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113723 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
61899b68a87d1d16201f993adc9f9fc19c35d226 |
12-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Don't complain about useless user-defined conversion functions when they were instantiated from a template. In template metaprogramming, stuff happens. Fixes PR8065. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113722 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
da0fd9a7faa8b8a666e3c31ff0b5897e0f73f892 |
12-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Don't complain about useless user-defined conversion functions when they were instantiated from a template. In template metaprogramming, stuff happens. Fixes PR8065. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113722 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
bfc2eaa077e7f914cfbf35ffdf53da889847838c |
12-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When diagnosing C++ [temp.expl.spec]p3 in C++98/03 mode, downgrade the error to a warning if we're in a case that would be allowed in C++0x. This "fixes" PR8084 by making Clang accept more code than GCC and (non-strict) EDG do. Also, add the missing test case for the C++0x semantics, which should have been in r113717. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113718 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
a4d5de539bc2f0cd25d6292e84eaa067591ff792 |
12-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
When diagnosing C++ [temp.expl.spec]p3 in C++98/03 mode, downgrade the error to a warning if we're in a case that would be allowed in C++0x. This "fixes" PR8084 by making Clang accept more code than GCC and (non-strict) EDG do. Also, add the missing test case for the C++0x semantics, which should have been in r113717. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113718 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
38c12cf25118adeaf2b0d0b5c08dcec961f3e0f5 |
12-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement C++0x semantics for [temp.expl.spec]p2, which loosens the restrictions on out-of-line specializations to allow them anywhere in an enclosing context. Motivated by PR8084. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113717 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
121dc9ab38bda202720c506c26c67457eb967f02 |
12-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement C++0x semantics for [temp.expl.spec]p2, which loosens the restrictions on out-of-line specializations to allow them anywhere in an enclosing context. Motivated by PR8084. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113717 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
9296aebfac203d1bcce33df85ea14a0c84d7cedb |
12-Sep-2010 |
Francois Pichet <pichet2000@gmail.com> |
Add basic support for Microsoft enum forward declaration. Assigning an underlying integral type to an enum forward declaration will come in a next patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113716 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
8dc3abcc36df883324461daad0c05364158f3cf0 |
12-Sep-2010 |
Francois Pichet <pichet2000@gmail.com> |
Add basic support for Microsoft enum forward declaration. Assigning an underlying integral type to an enum forward declaration will come in a next patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113716 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
9638a2f25bc3acae13fd04841899d87317a621e8 |
12-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement the "note" in C++ [over.built]p1, which is actually meant to be a semantic requirement that a built-in overloaded operator is not added to the overload set of there is already a user-defined overloaded operator with the same parameter types. Fixes PR8087. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113713 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
661b4939ae3f84380dc3e670a06e963b4b9d3b6e |
12-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement the "note" in C++ [over.built]p1, which is actually meant to be a semantic requirement that a built-in overloaded operator is not added to the overload set of there is already a user-defined overloaded operator with the same parameter types. Fixes PR8087. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113713 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
cb697218218cbc0736a9bffcbe1f39d5f599e676 |
12-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Don't perform integral promotions from an incompletion enumeration type. Fixes PR8089 in a slightly different way than had been suggested. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113711 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
5dde1605da5e6db8a9214f4a5d094ae0bbc64a4e |
12-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Don't perform integral promotions from an incompletion enumeration type. Fixes PR8089 in a slightly different way than had been suggested. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113711 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
88481cf45755ee5d34b66fcfee6143e0e0674f4b |
12-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Teach the EvaluatedExprVisitor and its client, which marks declarations in potentially-evaluated subexpressions, about recursion. Fixes the release-mode self-host failure I introduced in r113700. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113708 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
4fcf5b2f816347ba7a3f16557d5e2b293634d4d6 |
12-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Teach the EvaluatedExprVisitor and its client, which marks declarations in potentially-evaluated subexpressions, about recursion. Fixes the release-mode self-host failure I introduced in r113700. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113708 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
1c1f0344bbef6a0abc0f203def5639554f465407 |
11-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When parsing default function arguments, do not mark any declarations used in the default function argument as "used". Instead, when we actually use the default argument, make another pass over the expression to mark any used declarations as "used" at that point. This addresses two kinds of related problems: 1) We were marking some declarations "used" that shouldn't be, because we were marking them too eagerly. 2) We were failing to mark some declarations as "used" when we should, if the first time it was instantiated happened to be an unevaluated context, we wouldn't mark them again at a later point. I've also added a potentially-handy visitor class template EvaluatedExprVisitor, which only visits the potentially-evaluated subexpressions of an expression. I bet this would have been useful for noexcept... Fixes PR5810 and PR8127. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113700 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
be0f7bd61c7b2879d02ae75aad7a91d92f819d94 |
11-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
When parsing default function arguments, do not mark any declarations used in the default function argument as "used". Instead, when we actually use the default argument, make another pass over the expression to mark any used declarations as "used" at that point. This addresses two kinds of related problems: 1) We were marking some declarations "used" that shouldn't be, because we were marking them too eagerly. 2) We were failing to mark some declarations as "used" when we should, if the first time it was instantiated happened to be an unevaluated context, we wouldn't mark them again at a later point. I've also added a potentially-handy visitor class template EvaluatedExprVisitor, which only visits the potentially-evaluated subexpressions of an expression. I bet this would have been useful for noexcept... Fixes PR5810 and PR8127. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113700 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
21e859fbce9f84f37413af6d48aeb36c4186b371 |
11-Sep-2010 |
John McCall <rjmccall@apple.com> |
Support in-class initialization of static const floating-point data members. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113663 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
4e6356426fcfef84e2484820814a8eaaaf547eda |
11-Sep-2010 |
John McCall <rjmccall@apple.com> |
Support in-class initialization of static const floating-point data members. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113663 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
e82808d575aaa99145c4a33ce6228b69b6a28c46 |
10-Sep-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Eli helped me understand how evaluation contexts work. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113642 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
bd7c849de9a1647b235597681c3983ba1e8c6c8b |
10-Sep-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Eli helped me understand how evaluation contexts work. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113642 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
42591fac8f92efab995608d36060579a9b688d66 |
10-Sep-2010 |
Michael J. Spencer <bigcheesegs@gmail.com> |
CMake: Update to use standard CMake dependency tracking facilities instead of whatever we were using before... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113631 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
|
5a7f34958ca6f2fa8a52e9921cf521cbb92ae070 |
10-Sep-2010 |
Michael J. Spencer <bigcheesegs@gmail.com> |
CMake: Update to use standard CMake dependency tracking facilities instead of whatever we were using before... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113631 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
|
287e188b96e61b218be777ade96ff894e8c01a99 |
10-Sep-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Define and implement CXXNoexceptExpr. Create it in Sema. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113623 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
reeTransform.h
|
2e156225a29407a50dd19041aa5750171ad44ea3 |
10-Sep-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Define and implement CXXNoexceptExpr. Create it in Sema. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113623 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
reeTransform.h
|
796ba8e4a7106869535101c9e5b30167a78b11e1 |
10-Sep-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Parse the noexcept operator and stub out sema. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113622 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
02bc21a88ecbdf49b2e674c210a4cbf8c48c6e58 |
10-Sep-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Parse the noexcept operator and stub out sema. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113622 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
783c10d7a1509c6ae297a34be06e619ca6bd86c4 |
10-Sep-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
property reference expression used on lhs of assignment follows objective's semantics and is not overload'able with an assignment operator. Fixes a crash and a missing diagnostics. Radar 8379892. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113555 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
4088ec00f035cf3ced00aab7dac611ce6ec1988e |
10-Sep-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
property reference expression used on lhs of assignment follows objective's semantics and is not overload'able with an assignment operator. Fixes a crash and a missing diagnostics. Radar 8379892. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113555 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
27e15718d55fcd5dc481e69bc1bf3a8e3c349bbb |
09-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Teach libclang to walk the base and member initializers of a constructor, in source order. Also introduces a new reference kind for class members, which is used here (for member initializers) and will also be used for designated initializers and offsetof. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113545 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
a67e03fdf1ae8a1f92463a307d0b6281f1161f40 |
09-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Teach libclang to walk the base and member initializers of a constructor, in source order. Also introduces a new reference kind for class members, which is used here (for member initializers) and will also be used for designated initializers and offsetof. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113545 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
e5928fceca0ad454c0d654e0bf75e0664c53f4af |
09-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Simplify template instantiation for C++ exception declarations, eliminating an unnecessary use of TemporaryBase in the process. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113500 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplateInstantiate.cpp
reeTransform.h
|
83cb94269015bf2770ade71e616c5322ea7e76e1 |
09-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Simplify template instantiation for C++ exception declarations, eliminating an unnecessary use of TemporaryBase in the process. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113500 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplateInstantiate.cpp
reeTransform.h
|
f7c728d83586cae9410c965e8118d28147b63542 |
09-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Eliminate some unnecessary uses of TreeTransform::TemporaryBase. There are still a few (legitimate, unfortunate) uses of this hack around, but at least now there are fewer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113498 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
ba48d6aad11a684d8557b25831764a61a37f65a2 |
09-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Eliminate some unnecessary uses of TreeTransform::TemporaryBase. There are still a few (legitimate, unfortunate) uses of this hack around, but at least now there are fewer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113498 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
5c32acaf1056b166e6308af9304aa8e553f37305 |
09-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Eliminate the comma locations from all of the Sema routines that deal with comma-separated lists. We never actually used the comma locations, nor did we store them in the AST, but we did manage to waste time during template instantiation to produce fake locations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113495 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaOverload.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
a1a04786cea2445759026edacd096abd1fbf4a05 |
09-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Eliminate the comma locations from all of the Sema routines that deal with comma-separated lists. We never actually used the comma locations, nor did we store them in the AST, but we did manage to waste time during template instantiation to produce fake locations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113495 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaOverload.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
7c19c19eac2eb4815dd086173ee6d990478264b1 |
09-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Add proper type-source information to UnaryTypeTraitExpr, including libclang visitation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113492 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
reeTransform.h
|
3d37c0ada0e46b87be0a10e8d52d990a97d3907a |
09-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Add proper type-source information to UnaryTypeTraitExpr, including libclang visitation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113492 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
reeTransform.h
|
f7974c265841c9751d4c3a1b5ca75d8d743c2839 |
09-Sep-2010 |
Ted Kremenek <kremenek@apple.com> |
Fix indentation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113476 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
47bb27f16882e4f5ababdd0cf6642bb904a9aaf8 |
09-Sep-2010 |
Ted Kremenek <kremenek@apple.com> |
Fix indentation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113476 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
cc1ad0a50971a16af076795320d786481c7a18a6 |
09-Sep-2010 |
Ted Kremenek <kremenek@apple.com> |
Check format strings when a called function has more than one FormatAttr (one for 'scanf' and one for 'printf'). Fixes <rdar://problem/8409437>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113472 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
c82faca0be59b072b38bed375e21bd24f1f72647 |
09-Sep-2010 |
Ted Kremenek <kremenek@apple.com> |
Check format strings when a called function has more than one FormatAttr (one for 'scanf' and one for 'printf'). Fixes <rdar://problem/8409437>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113472 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
7867f76da6000b08060a44a40fdec61c04eea44c |
09-Sep-2010 |
Ted Kremenek <kremenek@apple.com> |
It appears that technically a null format string is not warned under -Wformat-nonliteral, as the function processing the format string can decided whether or not to accept a null format string (e.g., asl_log). Fixes <rdar://problem/8269537>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113469 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
95355bb53ef3145e463b98c6fd26f8f95e26e26c |
09-Sep-2010 |
Ted Kremenek <kremenek@apple.com> |
It appears that technically a null format string is not warned under -Wformat-nonliteral, as the function processing the format string can decided whether or not to accept a null format string (e.g., asl_log). Fixes <rdar://problem/8269537>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113469 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
35f39b8bef56133a40cb8568b77277d70e2a1dfb |
09-Sep-2010 |
Ted Kremenek <kremenek@apple.com> |
Avoid redundant recursive calls in SemaCheckStringLiteral by just updating the expression and trying again. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113468 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
4fe6441a558e471f2ad3c6bddf07c77332539f6b |
09-Sep-2010 |
Ted Kremenek <kremenek@apple.com> |
Avoid redundant recursive calls in SemaCheckStringLiteral by just updating the expression and trying again. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113468 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
b090ab73996bbf2a1eaccbd5ba2487523c18e41f |
09-Sep-2010 |
Ted Kremenek <kremenek@apple.com> |
Remove tabs I accidentally introduced. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113467 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
e0ba9d1beeba01a96808c2fc61f9ca89acec313b |
09-Sep-2010 |
Ted Kremenek <kremenek@apple.com> |
Remove tabs I accidentally introduced. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113467 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
1fe3c055f22b3bce0f89977b84a5b65d7cc92789 |
09-Sep-2010 |
Ted Kremenek <kremenek@apple.com> |
Relax __attribute_((nonnull)) checking to allow the attribute on functions with no pointer arguments. GCC doesn't warn in this case, and the attribute is trivially satisfied (and benign). Fixes <rdar://problem/8364828>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113464 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
1db5d140b24bd181644135446fdaca75d8396aa4 |
09-Sep-2010 |
Ted Kremenek <kremenek@apple.com> |
Relax __attribute_((nonnull)) checking to allow the attribute on functions with no pointer arguments. GCC doesn't warn in this case, and the attribute is trivially satisfied (and benign). Fixes <rdar://problem/8364828>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113464 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
9cdcb4da1408356989ce3999094a4baec48d3314 |
09-Sep-2010 |
Ted Kremenek <kremenek@apple.com> |
Enhance -Wreturn-type to not warn when control-flow is most likely limited by a switch statement explicitly covering all the cases for an enum value. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113450 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
90b828aa279542559f655d1af666580288cb1841 |
09-Sep-2010 |
Ted Kremenek <kremenek@apple.com> |
Enhance -Wreturn-type to not warn when control-flow is most likely limited by a switch statement explicitly covering all the cases for an enum value. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113450 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
aa90dfae5914fb934c315fae3ff8a9bab9e64a95 |
09-Sep-2010 |
Ted Kremenek <kremenek@apple.com> |
When building SwitchStmts in Sema, record whether all the enum values of a switch(enum) where covered by individual case statements. Flow-based analyses may wish to consult this information, and recording this in the AST allows us to obviate reconstructing this information later when we build the CFG. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113447 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
559fb554602bedb57dbbf3cc14ac8a38264b4547 |
09-Sep-2010 |
Ted Kremenek <kremenek@apple.com> |
When building SwitchStmts in Sema, record whether all the enum values of a switch(enum) where covered by individual case statements. Flow-based analyses may wish to consult this information, and recording this in the AST allows us to obviate reconstructing this information later when we build the CFG. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113447 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
de9a8c9d3f428d3fa5b4304bb7484b09171f9108 |
09-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Push the range associated with a nested-name-specifier further through TreeTransform, since we were getting an empty source range where we shouldn't. Sadly, the test case is Boost.Proto, and isn't worth reducing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113446 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
1efb6c716397f2c4e3ede3a4853c5efebb375441 |
09-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Push the range associated with a nested-name-specifier further through TreeTransform, since we were getting an empty source range where we shouldn't. Sadly, the test case is Boost.Proto, and isn't worth reducing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113446 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
435c92801ea81d61e0210c9b94716ba01c7a5355 |
09-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix a few minor issues with parsing and semantic analysis of C++ typeid expressions: - make sure we have a proper source location for the closing ')' - cache the declaration of std::type_info once we've found it git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113441 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaExprCXX.cpp
|
4eb4f0f96289cbece50c1270e02af3caf8779705 |
09-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Fix a few minor issues with parsing and semantic analysis of C++ typeid expressions: - make sure we have a proper source location for the closing ')' - cache the declaration of std::type_info once we've found it git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113441 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaExprCXX.cpp
|
f24c9a657355b6ec8a695b1934fcd21eaa4f8019 |
09-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When providing a completion for a function/method parameter of block pointer type, actually provide a usable block literal expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113431 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
382762582c8fcbc06b395a806fd57879381897a8 |
09-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
When providing a completion for a function/method parameter of block pointer type, actually provide a usable block literal expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113431 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
5aed99a6e77ca28d524315fc3d500610e4abc5af |
08-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Clean up some of the CMake dependencies git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113416 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
|
bfae8bd6259460ae0668cad39c141504511d19b0 |
08-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Clean up some of the CMake dependencies git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113416 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
|
f7b0bf7c7f36cf19df5b27bf966be1bf7bbe38d9 |
08-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Use the new-initialization code for initializing scalars with a function-style cast. Previously, we had a (redundant, incorrect) semantic-checking path for non-class types, which allowed value-initialization of a reference type and then crashed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113415 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaInit.cpp
|
19311e70edaa2d7bb0d709344aebea4fbbae2da4 |
08-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Use the new-initialization code for initializing scalars with a function-style cast. Previously, we had a (redundant, incorrect) semantic-checking path for non-class types, which allowed value-initialization of a reference type and then crashed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113415 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaInit.cpp
|
545f1ccf514d62d9ad5bb1c1e1063c945d2cf897 |
08-Sep-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Reverse r113397 until we decide what to do with use of 'struct objc_object*' for 'is' (and others) in clang. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113414 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
56a965c0f77c9e6bffd65cc8f8796442a8527381 |
08-Sep-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Reverse r113397 until we decide what to do with use of 'struct objc_object*' for 'is' (and others) in clang. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113414 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
41c27790a2054cecc1ac4e2ebf9c04bf2cfd7e82 |
08-Sep-2010 |
Bill Wendling <isanbard@gmail.com> |
Initialize the MSVCGuidDecl variable in the correct order. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113412 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
b7566d8346ed8040a5cb7cefe96bd6ccbf015595 |
08-Sep-2010 |
Bill Wendling <isanbard@gmail.com> |
Initialize the MSVCGuidDecl variable in the correct order. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113412 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
6fa68948f7d604946617deb5de14ce3d7905b21c |
08-Sep-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Fix a crash when overloading id with objc_object*. Radar 8400356. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113397 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
d1877953f06df6df9b2cd5fc04b49e80eec66019 |
08-Sep-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Fix a crash when overloading id with objc_object*. Radar 8400356. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113397 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
4d58b6820c0a78959a00e45dd77a55178e8c6d94 |
08-Sep-2010 |
Francois Pichet <pichet2000@gmail.com> |
Microsoft's __uuidof operator implementation part 1. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113356 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaExprCXX.cpp
reeTransform.h
|
01b7c3028da5bbcb9f8e52ba67e4613070de0e60 |
08-Sep-2010 |
Francois Pichet <pichet2000@gmail.com> |
Microsoft's __uuidof operator implementation part 1. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113356 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaExprCXX.cpp
reeTransform.h
|
792c9aabbdf38bd3c1d5279355ea99d94a023603 |
08-Sep-2010 |
Francois Pichet <pichet2000@gmail.com> |
Allow type definitions inside anonymous struct/union in Microsoft mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113354 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
538e0d0292cab16198a4fce5c388ff06adc74d0c |
08-Sep-2010 |
Francois Pichet <pichet2000@gmail.com> |
Allow type definitions inside anonymous struct/union in Microsoft mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113354 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
55fe81b6d5e466e222b2b0e0f7b2a080064256d0 |
08-Sep-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Don't give 'global constructor' warnings for function statics, even if they have a direct initializer. Fixes PR8095. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113344 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
36281c6fd792a254ade72caf825bad7b7c63b0e0 |
08-Sep-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Don't give 'global constructor' warnings for function statics, even if they have a direct initializer. Fixes PR8095. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113344 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
599d675f806426575d43296fe05cd0e8193514e4 |
08-Sep-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Allow (cv) void and incomplete arrays to be passed to the type traits. Fixes PR8110, and thus PR8109, PR8097, and parts of PR8101, PR8105 and PR8107. Only a few traits have tests for incomplete arrays, since I'm not yet clear what the result for them should be; Howards wants to file a DR to change the standard. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113326 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
607a1788d9529c8e8494ac528764aa2c678a1a97 |
08-Sep-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Allow (cv) void and incomplete arrays to be passed to the type traits. Fixes PR8110, and thus PR8109, PR8097, and parts of PR8101, PR8105 and PR8107. Only a few traits have tests for incomplete arrays, since I'm not yet clear what the result for them should be; Howards wants to file a DR to change the standard. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113326 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
c3dd68dd8b770e213ee136d4c1d4814c314ab6c9 |
08-Sep-2010 |
Gabor Greif <ggreif@gmail.com> |
add a fixit when 'main' does ot return 'int'; review welcome git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113324 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
a4a301dc74dd4e7da1c35cbb3c1e03614482728b |
08-Sep-2010 |
Gabor Greif <ggreif@gmail.com> |
add a fixit when 'main' does ot return 'int'; review welcome git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113324 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
95bea5fdd03b244075607f1d3e94754e2d95ddf7 |
08-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Provide proper type-source location information for CXXTemporaryObjectExpr, CXXScalarValueInitExpr, and CXXUnresolvedConstructExpr, getting rid of a bunch of FIXMEs in the process. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113319 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaInit.cpp
reeTransform.h
|
ab6677ec401cfd2c82b34e4cdfebd55a9dc25778 |
08-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Provide proper type-source location information for CXXTemporaryObjectExpr, CXXScalarValueInitExpr, and CXXUnresolvedConstructExpr, getting rid of a bunch of FIXMEs in the process. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113319 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaInit.cpp
reeTransform.h
|
5b8552c7a4a4db82b98b490bdb67a1a07a794345 |
07-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve source-location information for CXXNewExpr, by hanging on to the TypeSourceInfo for the allocated type. Fixes PR7501. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113291 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
reeTransform.h
|
1bb2a93ab7b1499dda6f6b58865bd0dce1864228 |
07-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Improve source-location information for CXXNewExpr, by hanging on to the TypeSourceInfo for the allocated type. Fixes PR7501. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113291 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
reeTransform.h
|
8fee33e7925d771f4b410744735a52122ce5b315 |
07-Sep-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Have Sema check for validity of CGString literal instead of asserting in IRGen. Fixes radar 8390459. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113253 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
7da71020b97c69b95831bd03d35e8e8404bfdea0 |
07-Sep-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Have Sema check for validity of CGString literal instead of asserting in IRGen. Fixes radar 8390459. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113253 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
1cd45d3521e568f5d60d2311273ba34533bff478 |
07-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Provide a specific diagnostic when trying to redefine an "extern inline" function outside of GNU89 mode. Fixes <rdar://problem/6880464>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113204 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
fbc5b49322577e03ed780dcdf5be514871ec381d |
07-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Provide a specific diagnostic when trying to redefine an "extern inline" function outside of GNU89 mode. Fixes <rdar://problem/6880464>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113204 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
17569450317cec43f523815879069568e8454249 |
06-Sep-2010 |
Eli Friedman <eli.friedman@gmail.com> |
PR8023: Don't crash on invalid uses of __real__ on class types in C++. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113124 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
957c094bd435c9ae367a9fcf375a5fadcc0c2bff |
06-Sep-2010 |
Eli Friedman <eli.friedman@gmail.com> |
PR8023: Don't crash on invalid uses of __real__ on class types in C++. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113124 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
c02280d37f2c180b990a035ebc5a0076bcae8206 |
04-Sep-2010 |
Chris Lattner <sabre@nondot.org> |
zap more dead code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113076 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
24dce6ef2f39d939eb8f01ef70eaa7dcdb8c6a62 |
04-Sep-2010 |
Chris Lattner <sabre@nondot.org> |
zap more dead code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113076 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
660296621869d6930ba782384219f5a75b728e68 |
04-Sep-2010 |
Chris Lattner <sabre@nondot.org> |
zap dead code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113074 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
66392d4260cdd1a98f9ce908d99e3cf9a31432e2 |
04-Sep-2010 |
Chris Lattner <sabre@nondot.org> |
zap dead code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113074 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
c9ea513ccc6142913013ffb9a3f97c2914ce8cc6 |
04-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Synchronize code-completion cursor kinds with indexing cursor kinds. How shameful that this code was duplicated! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113033 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
|
e8d7bebc0dd037516dd695ee1ac2eb0923753b46 |
04-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Synchronize code-completion cursor kinds with indexing cursor kinds. How shameful that this code was duplicated! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113033 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
|
4dea2d66f247cc119785ec2bdb4c99e65ca89714 |
03-Sep-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Fix PR7402 when it strikes via template instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113019 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
030ef472f31709e175895853fcb43d61d09022c7 |
03-Sep-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Fix PR7402 when it strikes via template instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113019 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
82f0eb2a926cc6842f29d57cb0ac246c75523cf4 |
03-Sep-2010 |
Anders Carlsson <andersca@mac.com> |
It's OK for classes to have flexible array elements (but not unions). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113018 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
e63438b34b075a65849b9dee022adffc7c222ae5 |
03-Sep-2010 |
Anders Carlsson <andersca@mac.com> |
It's OK for classes to have flexible array elements (but not unions). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113018 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
5eb667af08d8619c455d6f53e7d59aab8831c187 |
03-Sep-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Allow anonymous and local types. The support was already in place for these, but this makes them work even as an extension in C++98. This resolves PR8077. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113011 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
17fb855280be411389361f1c79753e0013c4187c |
03-Sep-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Allow anonymous and local types. The support was already in place for these, but this makes them work even as an extension in C++98. This resolves PR8077. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113011 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
861dbb58b7ef8dcd70d2d1246164cfccc5af83ff |
03-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Simplify code-completion result sorting a bit git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112968 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
|
ff67789ee51a0eb55eeb07397de92c6c60ebe9d4 |
03-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Simplify code-completion result sorting a bit git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112968 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
|
aa3d61c48e65e5f705a2c7e8d34e73032f66d76c |
03-Sep-2010 |
John McCall <rjmccall@apple.com> |
Add a quick-and-dirty hack to give a better diagnostic for [class.protected] restrictions. The note's not really on the right place given its wording, but putting a second note on the call site (or muddying the wording) doesn't appeal. There are corner cases where this can be wrong, but I'm not concerned. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112950 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
fe24e05a87e48fa3318b65d1a92c542107639fd9 |
03-Sep-2010 |
John McCall <rjmccall@apple.com> |
Add a quick-and-dirty hack to give a better diagnostic for [class.protected] restrictions. The note's not really on the right place given its wording, but putting a second note on the call site (or muddying the wording) doesn't appeal. There are corner cases where this can be wrong, but I'm not concerned. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112950 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
f5ccabe892e8cee2a4f1d1ebc030bb32d6c07f36 |
03-Sep-2010 |
Chris Lattner <sabre@nondot.org> |
"I see dead code". IdempotentOperationChecker::isTruncationExtensionAssignment should probably be removed if it has no purpose, but I just #if'd it out in case it's usefulIdempotentOperationChecker::isTruncationExtensionAssignment should probably be removed if it has no purpose, but I just #if'd it out in case it's useful git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112949 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
fae962200efef618d1c24c14b9c3fed25876f059 |
03-Sep-2010 |
Chris Lattner <sabre@nondot.org> |
"I see dead code". IdempotentOperationChecker::isTruncationExtensionAssignment should probably be removed if it has no purpose, but I just #if'd it out in case it's usefulIdempotentOperationChecker::isTruncationExtensionAssignment should probably be removed if it has no purpose, but I just #if'd it out in case it's useful git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112949 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
660da6b0e9d9e4fb118e93610c64b17af6578e02 |
03-Sep-2010 |
John McCall <rjmccall@apple.com> |
Devirtualize Sema, kill off DeleteExpr and DeleteStmt, and reformat. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112945 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaStmt.cpp
|
8c465e6494d16a19127873dc9bdc55177ac6b6fd |
03-Sep-2010 |
John McCall <rjmccall@apple.com> |
Devirtualize Sema, kill off DeleteExpr and DeleteStmt, and reformat. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112945 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaStmt.cpp
|
23cf1f9d0f258b16fb5c07a14ceb7aba4562903e |
03-Sep-2010 |
Dawn Perchik <dawn@burble.org> |
Add symantic support for the Pascal calling convention via "__attribute((pascal))" or "__pascal" (and "_pascal" under -fborland-extensions). Support still needs to be added to llvm. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112939 91177308-0d34-0410-b5e6-96231b3b80d8
ttributeList.cpp
emaDeclAttr.cpp
emaType.cpp
|
52fc314e1b5e1baee6305067cf831763d02bd243 |
03-Sep-2010 |
Dawn Perchik <dawn@burble.org> |
Add symantic support for the Pascal calling convention via "__attribute((pascal))" or "__pascal" (and "_pascal" under -fborland-extensions). Support still needs to be added to llvm. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112939 91177308-0d34-0410-b5e6-96231b3b80d8
ttributeList.cpp
emaDeclAttr.cpp
emaType.cpp
|
6d94cf6a2696675144627c8fefc9e93d8b8eb4d3 |
03-Sep-2010 |
Anders Carlsson <andersca@mac.com> |
Static local variables don't result in global constructors being emitted. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112933 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
4938f2385f82e54df019b2fb1128a58ebad98bec |
03-Sep-2010 |
Anders Carlsson <andersca@mac.com> |
Static local variables don't result in global constructors being emitted. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112933 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
47906d3ad3bca568d7eaf9bdf5e240363667da37 |
03-Sep-2010 |
Anders Carlsson <andersca@mac.com> |
Remove now unused function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112927 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
2d0e2431b2ddd16cd87176a3bf6c2529b8acaab2 |
03-Sep-2010 |
Anders Carlsson <andersca@mac.com> |
Remove now unused function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112927 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
a7754dfa32338bae703c0d943cb5624fab6e5053 |
03-Sep-2010 |
Anders Carlsson <andersca@mac.com> |
Get rid of the "functions declared 'noreturn' should have a 'void' result type" warning. The rationale behind this is that it is normal for callback functions to have a non-void return type and it should still be possible to mark them noreturn. (JavaScriptCore is a good example of this). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112918 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
5d1d7ae120c2c8e6cba5d2a712b33500a5aecc10 |
03-Sep-2010 |
Anders Carlsson <andersca@mac.com> |
Get rid of the "functions declared 'noreturn' should have a 'void' result type" warning. The rationale behind this is that it is normal for callback functions to have a non-void return type and it should still be possible to mark them noreturn. (JavaScriptCore is a good example of this). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112918 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
499d0f4b4f76328812ed192cb9800791dc333170 |
02-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Eliminate CXXBindReferenceExpr, which was used in a ton of well-intentioned but completely unused code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112868 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
e2ca6d4a2f41876930fbd304caa706452d2569d8 |
02-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Eliminate CXXBindReferenceExpr, which was used in a ton of well-intentioned but completely unused code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112868 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
28c68058a49c3aaa9df8bc9721046ecbce0a744a |
02-Sep-2010 |
Ted Kremenek <kremenek@apple.com> |
Enhance return-stack-address check (in Sema) to handle fields that themselves are references. (Fixes PR 7999; fix by Chandler Carruth). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112792 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
a423e81a4d04b7c1882d2787d1189cbc14540c16 |
02-Sep-2010 |
Ted Kremenek <kremenek@apple.com> |
Enhance return-stack-address check (in Sema) to handle fields that themselves are references. (Fixes PR 7999; fix by Chandler Carruth). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112792 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
7a819efa72cc057766b606624a12ee1f36f28b2e |
01-Sep-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Transfer calling-convention attributes down to member function pointers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112715 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
afac01d7e76f28d5e5a5c377369cc400919387ee |
01-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Transfer calling-convention attributes down to member function pointers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112715 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
51e8eea95cb6886b76e9d72eadce34aba72dd35a |
01-Sep-2010 |
Ted Kremenek <kremenek@apple.com> |
Split ObjCInterfaceDecl::ReferencedProtocols into two lists: ReferencedProtocols and AllReferencedProtocols. ReferencedProtocols (and thus protocol_begin(), protocol_end()) now only contains the list of protocols that were directly referenced in an @interface declaration. 'all_referenced_protocol_[begin,end]()' now returns the set of protocols that were referenced in both the @interface and class extensions. The latter is needed for semantic analysis/codegen, while the former is needed to maintain the lexical information of the original source. Fixes <rdar://problem/8380046>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112691 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
emaDeclObjC.cpp
emaLookup.cpp
emaObjCProperty.cpp
|
53b9441b5a81a24fa1f66f3f6416f1e36baa9c2f |
01-Sep-2010 |
Ted Kremenek <kremenek@apple.com> |
Split ObjCInterfaceDecl::ReferencedProtocols into two lists: ReferencedProtocols and AllReferencedProtocols. ReferencedProtocols (and thus protocol_begin(), protocol_end()) now only contains the list of protocols that were directly referenced in an @interface declaration. 'all_referenced_protocol_[begin,end]()' now returns the set of protocols that were referenced in both the @interface and class extensions. The latter is needed for semantic analysis/codegen, while the former is needed to maintain the lexical information of the original source. Fixes <rdar://problem/8380046>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112691 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
emaDeclObjC.cpp
emaLookup.cpp
emaObjCProperty.cpp
|
458da213564aae23c42bd0ff6e906de7fd73b8cd |
31-Aug-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Make inline namespace not be transparent after all. The concept simply doesn't fit. Instead, special-case the few places where transparent contexts have the desired behavior for inline namespaces. Fixes a redeclaration issue in inline namespaces. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112637 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
410c4f2eb5e6a8c2318cacb9a6751f1b4fcff166 |
31-Aug-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Make inline namespace not be transparent after all. The concept simply doesn't fit. Instead, special-case the few places where transparent contexts have the desired behavior for inline namespaces. Fixes a redeclaration issue in inline namespaces. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112637 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
5e1fe4d264f3777fbd3afd3301e0e515d88425d8 |
31-Aug-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
AST work to support [C++] [IRgen] for ?: with missing LHS This is also pr7726 and wip. No change in functionality at this time. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112612 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
f9b949fecf339a2c9bd97dd11a272c4878f85ce4 |
31-Aug-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
AST work to support [C++] [IRgen] for ?: with missing LHS This is also pr7726 and wip. No change in functionality at this time. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112612 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b88eafd94faee5cebd0b8bb27803e61cd92d7d56 |
31-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement basic support for indexing function templates in libclang. This includes: - Cursor kind for function templates, with visitation logic - Cursor kinds for template parameters, with visitation logic - Visitation logic for template specialization types, qualified type locations - USR generation for function templates, template specialization types, template parameter types. Also happens to fix PR7804, which I tripped across while testing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112604 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
fe72e9ceeae6cc8669cd8bb722425300190638ea |
31-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement basic support for indexing function templates in libclang. This includes: - Cursor kind for function templates, with visitation logic - Cursor kinds for template parameters, with visitation logic - Visitation logic for template specialization types, qualified type locations - USR generation for function templates, template specialization types, template parameter types. Also happens to fix PR7804, which I tripped across while testing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112604 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
2bbdcdb9afd0c58677a396bf8e1db54dbfa49c13 |
31-Aug-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Fix a regression that allowed clearly ill formed code. The diagnostic is still terrible, FIXME left to do a proper job of diagnosing this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112581 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
1baf2f778c26a71d1353ff2cc1701fcd1dbeaf76 |
31-Aug-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Fix a regression that allowed clearly ill formed code. The diagnostic is still terrible, FIXME left to do a proper job of diagnosing this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112581 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
b730b024fab8bfdaf074b2ad5fbee0f693d351ca |
31-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When provide code completions for a variadic Objective-C method declaration send or a variadic function call, collapse the ", ..." into the parameter before it, so that we don't get a second placeholder. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112579 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
e17794ffbb8d509d705207ce7140e290665ca33d |
31-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
When provide code completions for a variadic Objective-C method declaration send or a variadic function call, collapse the ", ..." into the parameter before it, so that we don't get a second placeholder. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112579 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
8c3265d167b99591c6f057941e887da3264041e1 |
31-Aug-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Add a forgotten place where the enclosing namespace set matters, plus a big testcase for inline namespace fun. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112565 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
03b16a7d476789d62d61d3e57e75f0bf6a8229bb |
31-Aug-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Add a forgotten place where the enclosing namespace set matters, plus a big testcase for inline namespace fun. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112565 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
6bd5085ed4a787ab6a534719505b0a84f6606164 |
31-Aug-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Enable inline namespaces in the AST. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112564 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
4e4d57069cf9402728e05f7fc856295a86e4801f |
31-Aug-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Enable inline namespaces in the AST. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112564 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
92ae2b40f721121f8944a1bb3c69b23d96bcff31 |
31-Aug-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Rename DeclContext::getLookupContext to getRedeclContext and change its semantics slightly. No functionality change in the absence of inline namespaces. Also, change a few places where inline namespaces actually make a difference to be prepared for them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112563 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
dentifierResolver.cpp
emaCXXScopeSpec.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaInit.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
7a126a474fdde06382b315b4e3d8ef0a21d4dc31 |
31-Aug-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Rename DeclContext::getLookupContext to getRedeclContext and change its semantics slightly. No functionality change in the absence of inline namespaces. Also, change a few places where inline namespaces actually make a difference to be prepared for them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112563 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
dentifierResolver.cpp
emaCXXScopeSpec.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaInit.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
38e132e00ece05468e46166d5f857a941266827e |
31-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When instantiating a function type, instantiate the return type before instantiating the parameters. In a perfect world, this wouldn't matter, and compilers are free to instantiate in any order they want. However, every other compiler seems to instantiate the return type first, and some code (in this case, Boost.Polygon) depends on this and SFINAE to avoid instantiating something that shouldn't be instantiated. We could fight this battle, and insist that Clang is allowed to do what it does, but it's not beneficial: it's more predictable to instantiate this way, in source order. When we implement late-specified return types, we'll need to instantiate the return type last when it was late-specified, hence the FIXME. We now compile Boost.Polygon properly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112561 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
7e010a04fef171049291d8cb3047f118566da090 |
31-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
When instantiating a function type, instantiate the return type before instantiating the parameters. In a perfect world, this wouldn't matter, and compilers are free to instantiate in any order they want. However, every other compiler seems to instantiate the return type first, and some code (in this case, Boost.Polygon) depends on this and SFINAE to avoid instantiating something that shouldn't be instantiated. We could fight this battle, and insist that Clang is allowed to do what it does, but it's not beneficial: it's more predictable to instantiate this way, in source order. When we implement late-specified return types, we'll need to instantiate the return type last when it was late-specified, hence the FIXME. We now compile Boost.Polygon properly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112561 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
951c3884e4af6515ca8274dc7470efc8e9143472 |
31-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Add a missing return. Bug noticed by Dawn Perchik! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112552 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
04633eb86621747bece5643f5909222e2dd6884f |
31-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Add a missing return. Bug noticed by Dawn Perchik! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112552 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
5eb95c3d5b9adf7ccf48487cc2652bb7ff3d9fe3 |
31-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When template substitution into a template parameter reduces the level of that parameter, reduce the level by the number of active template argument lists rather than by 1. The number of active template argument lists is only > 1 when we have a class template partial specialization of a member template of a class template that itself is a member template of another class template. ... and Boost.MSM does this. Fixes PR7669. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112551 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
71b87e4fa6bfb47107b099135864f9024004a4c9 |
31-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
When template substitution into a template parameter reduces the level of that parameter, reduce the level by the number of active template argument lists rather than by 1. The number of active template argument lists is only > 1 when we have a class template partial specialization of a member template of a class template that itself is a member template of another class template. ... and Boost.MSM does this. Fixes PR7669. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112551 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
e76e92b1da4f7a462833b856f2ea716234c49013 |
31-Aug-2010 |
Gabor Greif <ggreif@gmail.com> |
zap tabs git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112541 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
77535dfde258765c056ef4c6786ef56cc48f0c76 |
31-Aug-2010 |
Gabor Greif <ggreif@gmail.com> |
zap tabs git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112541 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
d61472633ec9cc4e27127dc638febb17a2f93cfe |
30-Aug-2010 |
Gabor Greif <ggreif@gmail.com> |
fix dual aspect of PR8007, namely when the friend function prototype is already used at the point of the template definition that is supposed to inject the friend function. Testcase verifies four scenarios. I would like receive some code review for this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112524 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
ab297ac4d3f7c078a34c75493b840ef6b5801be3 |
30-Aug-2010 |
Gabor Greif <ggreif@gmail.com> |
fix dual aspect of PR8007, namely when the friend function prototype is already used at the point of the template definition that is supposed to inject the friend function. Testcase verifies four scenarios. I would like receive some code review for this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112524 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
32f2f84ce3ed52273376b86bf0660bcb530a4f6b |
30-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Perform the function-to-pointer adjustment during template argument deduction where the parameter is a function reference, function pointer, or member function pointer and the argument is an overloaded function. Fixes <rdar://problem/8360106>, a template argument deduction issue found by Boost.Filesystem. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112523 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
75f21af57f3dce1577d6c27bbe7bb45b49ced732 |
30-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Perform the function-to-pointer adjustment during template argument deduction where the parameter is a function reference, function pointer, or member function pointer and the argument is an overloaded function. Fixes <rdar://problem/8360106>, a template argument deduction issue found by Boost.Filesystem. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112523 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
28a209c7deee1ce5b6f101fabbedf74fa626e557 |
30-Aug-2010 |
Sean Hunt <rideau3@gmail.com> |
Revert my user-defined literal commits - r1124{58,60,67} pending some issues being sorted out. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112493 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
reeTransform.h
|
6cf750298d3621d8a10a6dd07fcee8e274b9d94d |
30-Aug-2010 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Revert my user-defined literal commits - r1124{58,60,67} pending some issues being sorted out. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112493 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
reeTransform.h
|
9875d32d0437d6a19a040b4acb0a98b9eede428a |
30-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix an corner-case assertion introduced by the refactoring in r112258; when we're taking the address of a unresolvable value, it might be an implicit member access. Fixes some Boost.Spirit regressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112487 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e2248be8746e0ebb01e9a3b823bc0e129283bef4 |
30-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Fix an corner-case assertion introduced by the refactoring in r112258; when we're taking the address of a unresolvable value, it might be an implicit member access. Fixes some Boost.Spirit regressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112487 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ac0172d8741ae0237f31cdd4d607ac04344164ab |
30-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Emulate (some of) Microsoft's looser semantic checking of exception specifications, from Martin Vejnar! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112482 91177308-0d34-0410-b5e6-96231b3b80d8
emaExceptionSpec.cpp
|
5b6f769a6abda4da44186cc8e6a2d6ed37dc9344 |
30-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Emulate (some of) Microsoft's looser semantic checking of exception specifications, from Martin Vejnar! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112482 91177308-0d34-0410-b5e6-96231b3b80d8
emaExceptionSpec.cpp
|
b2eb28ad57b13799403b6b7c30829601974fb18f |
30-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Add redeclaration checking for static data members and fix a corner case with redeclaration checking for fields, from Faisal Vali! Fixes PR7970. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112476 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
7f6ff02d66bcf397cbe154da89de97fd5f96657c |
30-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Add redeclaration checking for static data members and fix a corner case with redeclaration checking for fields, from Faisal Vali! Fixes PR7970. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112476 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
b0a75ac4b4d612e016d3d2e23b0420e25c80d865 |
30-Aug-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Add some braces for sanity and GCC silence. These became unbalanced in r112122, so please review echristo and let me know if the logic is wrong now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112466 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
629f9e49d984912c408c6d0096f5fdffbd98b44f |
30-Aug-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Add some braces for sanity and GCC silence. These became unbalanced in r112122, so please review echristo and let me know if the logic is wrong now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112466 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
0fd5a8586deed8910d4e62ef0df12f0e6f48f24b |
29-Aug-2010 |
Sean Hunt <rideau3@gmail.com> |
Implement C++0x user-defined string literals. The extra data stored on user-defined literal Tokens is stored in extra allocated memory, which is managed by the PreprocessorLexer because there isn't a better place to put it that makes sure it gets deallocated, but only after it's used up. My testing has shown no significant slowdown as a result, but independent testing would be appreciated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112458 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
reeTransform.h
|
0016d519b831859526b79405cdae4c64c73731c8 |
29-Aug-2010 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Implement C++0x user-defined string literals. The extra data stored on user-defined literal Tokens is stored in extra allocated memory, which is managed by the PreprocessorLexer because there isn't a better place to put it that makes sure it gets deallocated, but only after it's used up. My testing has shown no significant slowdown as a result, but independent testing would be appreciated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112458 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
reeTransform.h
|
408ae3b2e4e25ef79979ca9d0df916dc34640de1 |
29-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When providing a code completion for an Objective-C message send, drop the parameter names from the completions, e.g., provide withString:(NSString *) instead of withString:(NSString *)string since the parameter name is, by convention, redundant with the selector piece that precedes it and the completions can get unnecessarily long. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112456 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
aba480862485ea1140a81f25c23f43bb080edc90 |
29-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
When providing a code completion for an Objective-C message send, drop the parameter names from the completions, e.g., provide withString:(NSString *) instead of withString:(NSString *)string since the parameter name is, by convention, redundant with the selector piece that precedes it and the completions can get unnecessarily long. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112456 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
9c0d53a9932c135e3fb28b757e03f7424d98c840 |
29-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve code completion for initializer lists in constructors. Instead of prioritizing just by initialization order, we bump the priority of just the *next* initializer in the list, and leave everything else at the normal priority. That way, if one intentionally skips the initialization of a base or member (to get default initialization), we'll still get ordered completion for the rest. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112454 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
0c431c8c001e4c1f7488663d98700a8ce1e89e2a |
29-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Improve code completion for initializer lists in constructors. Instead of prioritizing just by initialization order, we bump the priority of just the *next* initializer in the list, and leave everything else at the normal priority. That way, if one intentionally skips the initialization of a base or member (to get default initialization), we'll still get ordered completion for the rest. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112454 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
5958f284e041ef427994cfef669d5683f3e86bee |
29-Aug-2010 |
John McCall <rjmccall@apple.com> |
When perform exact-qualifier-match template argument deduction, properly account for the possibility that certain opaque types might be more qualified than they appear. Fixes PR7708. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112390 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
cd05e81e2e2640a0a0097658c660afc6c8a9f4fd |
29-Aug-2010 |
John McCall <rjmccall@apple.com> |
When perform exact-qualifier-match template argument deduction, properly account for the possibility that certain opaque types might be more qualified than they appear. Fixes PR7708. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112390 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
023aeab93de64d6d079ceba7e870bd32c4662444 |
28-Aug-2010 |
John McCall <rjmccall@apple.com> |
If filtering a lookup result leaves it ambiguous, keep the ambiguity kind. Fixes PR7252. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112383 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
67d22fb57ecccd29ea9c8ec004f63dc356cd477d |
28-Aug-2010 |
John McCall <rjmccall@apple.com> |
If filtering a lookup result leaves it ambiguous, keep the ambiguity kind. Fixes PR7252. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112383 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
79aa621ebe41f98cfa8943ae0876b7b0da647790 |
28-Aug-2010 |
Gabor Greif <ggreif@gmail.com> |
simplify by relying on cascading operator-> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112373 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
6a557d8f6b3d7a747a0b57960d4b86f05ba2e53c |
28-Aug-2010 |
Gabor Greif <ggreif@gmail.com> |
simplify by relying on cascading operator-> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112373 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
67bee8199b79de7be7cb5cc05389176749c270b7 |
28-Aug-2010 |
Gabor Greif <ggreif@gmail.com> |
simplify git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112372 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
13a8affbb87cdb869adabe2a6e5998559f2598c4 |
28-Aug-2010 |
Gabor Greif <ggreif@gmail.com> |
simplify git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112372 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
a53d7f2521cfe49435fb52d4bd62110a7fbe5a27 |
28-Aug-2010 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Fix the memory leak of FloatingLiteral/IntegerLiteral. For large floats/integers, APFloat/APInt will allocate memory from the heap to represent these numbers. Unfortunately, when we use a BumpPtrAllocator to allocate IntegerLiteral/FloatingLiteral nodes the memory associated with the APFloat/APInt values will never get freed. I introduce the class 'APNumericStorage' which uses ASTContext's allocator for memory allocation and is used internally by FloatingLiteral/IntegerLiteral. Fixes rdar://7637185 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112361 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaOverload.cpp
emaTemplate.cpp
reeTransform.h
|
9996a7f06a3c5b4554692e7177930cf4e8ef09af |
28-Aug-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Fix the memory leak of FloatingLiteral/IntegerLiteral. For large floats/integers, APFloat/APInt will allocate memory from the heap to represent these numbers. Unfortunately, when we use a BumpPtrAllocator to allocate IntegerLiteral/FloatingLiteral nodes the memory associated with the APFloat/APInt values will never get freed. I introduce the class 'APNumericStorage' which uses ASTContext's allocator for memory allocation and is used internally by FloatingLiteral/IntegerLiteral. Fixes rdar://7637185 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112361 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaOverload.cpp
emaTemplate.cpp
reeTransform.h
|
88fbf6ba850be0f0c646b236047ac0a6908c27c7 |
28-Aug-2010 |
John McCall <rjmccall@apple.com> |
That's not the right direction to compute notional accessibility in at all. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112360 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
326c8c7d6e6996c82a1da55c1c3cd6cb4b89a584 |
28-Aug-2010 |
John McCall <rjmccall@apple.com> |
That's not the right direction to compute notional accessibility in at all. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112360 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
a9ea6019a98192de5c1622c9e75ef1ffa06bdf3f |
28-Aug-2010 |
John McCall <rjmccall@apple.com> |
Fix build. Bad me, adding last-minute assertions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112359 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
1797a05f97671d40929224ac030c8c16fe69938c |
28-Aug-2010 |
John McCall <rjmccall@apple.com> |
Fix build. Bad me, adding last-minute assertions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112359 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
2a32a92006798cf849e4f7c3c02f4686716e245e |
28-Aug-2010 |
John McCall <rjmccall@apple.com> |
When checking access control for an instance member access on an object of type I, if the current access target is protected when named in a class N, consider the friends of the classes P where I <= P <= N and where a notional member of N would be non-forbidden in P. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112358 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
8c77bcb072e7fd089f39fd7e079b6d767bf583fa |
28-Aug-2010 |
John McCall <rjmccall@apple.com> |
When checking access control for an instance member access on an object of type I, if the current access target is protected when named in a class N, consider the friends of the classes P where I <= P <= N and where a notional member of N would be non-forbidden in P. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112358 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
ea2888de9295f76a98631a98be26f0f8cb252bee |
28-Aug-2010 |
Gabor Greif <ggreif@gmail.com> |
perform cheap test first git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112346 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
be9ebe3747716a916d8b69a7e7a5276919136c87 |
28-Aug-2010 |
Gabor Greif <ggreif@gmail.com> |
perform cheap test first git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112346 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
844c0cb6de099a143ae54fe30fa85703562976f4 |
28-Aug-2010 |
Gabor Greif <ggreif@gmail.com> |
fix PR8007 reordering and redefinition issues still may linger, I plan to nail them next git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112333 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
40181c4e587b8a988e691d7b46580b1a1212c535 |
28-Aug-2010 |
Gabor Greif <ggreif@gmail.com> |
fix PR8007 reordering and redefinition issues still may linger, I plan to nail them next git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112333 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
5d25327ee94eb07d81ff8aa0ee726ee8a2c3bac0 |
28-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Basic code completion support for the base and member initializers in a constructor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112330 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
0133f525a23e18dd444880f7554f25fbcbd834e5 |
28-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Basic code completion support for the base and member initializers in a constructor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112330 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
0edeb683d4242d94f32543a325d2a8c651398a2c |
28-Aug-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Parser support for inline namespaces git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112320 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
d078e641450bbc5a20df8d3b54f87b27e398acb3 |
28-Aug-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Parser support for inline namespaces git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112320 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
f83845030dfc2499d1e92ceebef3c82151c1a45c |
28-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Miscellaneous found by inspection with John and Sebastian git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112315 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
757c600d696f016fea6b086d0349bcd7a4d06bd1 |
28-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Miscellaneous found by inspection with John and Sebastian git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112315 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
90ee813c5b20a89ea92228876666533a995676e5 |
27-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement the "call super" code completion for C++. If the virtual member function you're typing in overrides another virtual function, this fills in a (qualified!) call to that virtual function to make such delegation easy. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112294 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
f696152ccc574b4921b2cd1c3d8afbce0d72e510 |
27-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement the "call super" code completion for C++. If the virtual member function you're typing in overrides another virtual function, this fills in a (qualified!) call to that virtual function to make such delegation easy. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112294 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
7ce323c99954cff6060c412ccceaaa9504804761 |
27-Aug-2010 |
John McCall <rjmccall@apple.com> |
Continue to instantiate sub-statements in a CompoundStmt as long as we don't see a DeclStmt (failure to instantiate which generally causes panic). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112282 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
7114cbab7eb6e8b714eb22f014327daf2c741c08 |
27-Aug-2010 |
John McCall <rjmccall@apple.com> |
Continue to instantiate sub-statements in a CompoundStmt as long as we don't see a DeclStmt (failure to instantiate which generally causes panic). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112282 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
9862d9eaf9393e2ccaaf28901d794dd1c771f080 |
27-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Suggest "const" and "volatile" code completions after a function declarator, the very definition of "low-hanging fruit". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112274 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
1a480c403a3b141ab89c9c59cf7b681102a1bfab |
27-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Suggest "const" and "volatile" code completions after a function declarator, the very definition of "low-hanging fruit". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112274 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
ee273b5e73a8c866da7b4c9fcfb0af48c7973ed2 |
27-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When code-completing inside an Objective-C method, give a slight priority boost to methods with the same selector. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112268 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
265f749edb28a80db517cc9051bd21092720d0f0 |
27-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
When code-completing inside an Objective-C method, give a slight priority boost to methods with the same selector. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112268 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
e6e047ff2c8a8cb07162e8fe3b5ae5b7bda89dae |
27-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Add a super-cool code completion for send-to-super. When we're typing a message send to "super" from a method that appears to be meant to override a superclass method (same kind, same selector, same argument types), provide a "super" completion that fills in the selector along with forwarding the method's arguments (as placeholders). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112263 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
03d8aec611380d30ddb0659bb61be9289c3871b3 |
27-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Add a super-cool code completion for send-to-super. When we're typing a message send to "super" from a method that appears to be meant to override a superclass method (same kind, same selector, same argument types), provide a "super" completion that fills in the selector along with forwarding the method's arguments (as placeholders). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112263 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
580dec2c9965112b0c9854467aa7ae1463c4ea94 |
27-Aug-2010 |
John McCall <rjmccall@apple.com> |
Propagate whether an id-expression is the immediate argument of an '&' expression from the second caller of ActOnIdExpression. Teach template argument deduction that an overloaded id-expression doesn't give a valid type for deduction purposes to a non-static member function unless the expression has the correct syntactic form. Teach ActOnIdExpression that it shouldn't try to create implicit member expressions for '&function', because this isn't a permitted form of use for member functions. Teach CheckAddressOfOperand to diagnose these more carefully. Some of these cases aren't reachable right now because earlier diagnostics interrupt them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112258 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaExpr.cpp
emaOverload.cpp
emaTemplateDeduction.cpp
|
9c72c6088d591ace8503b842d39448c2040f3033 |
27-Aug-2010 |
John McCall <rjmccall@apple.com> |
Propagate whether an id-expression is the immediate argument of an '&' expression from the second caller of ActOnIdExpression. Teach template argument deduction that an overloaded id-expression doesn't give a valid type for deduction purposes to a non-static member function unless the expression has the correct syntactic form. Teach ActOnIdExpression that it shouldn't try to create implicit member expressions for '&function', because this isn't a permitted form of use for member functions. Teach CheckAddressOfOperand to diagnose these more carefully. Some of these cases aren't reachable right now because earlier diagnostics interrupt them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112258 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaExpr.cpp
emaOverload.cpp
emaTemplateDeduction.cpp
|
5058ef6c7ab13f285da81c787ea7a5ffe464e8a4 |
27-Aug-2010 |
John McCall <rjmccall@apple.com> |
One who seeks knowledge learns something new every day. One who seeks the Tao unlearns something new every day. Less and less remains until you arrive at non-action. When you arrive at non-action, nothing will be left undone. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112244 91177308-0d34-0410-b5e6-96231b3b80d8
ction.cpp
MakeLists.txt
ema.cpp
emaAttr.cpp
emaCXXCast.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaInit.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
reeTransform.h
|
f312b1ea179f1c44371f9ee0cd0bc006f612de11 |
27-Aug-2010 |
John McCall <rjmccall@apple.com> |
One who seeks knowledge learns something new every day. One who seeks the Tao unlearns something new every day. Less and less remains until you arrive at non-action. When you arrive at non-action, nothing will be left undone. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112244 91177308-0d34-0410-b5e6-96231b3b80d8
ction.cpp
MakeLists.txt
ema.cpp
emaAttr.cpp
emaCXXCast.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaInit.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
reeTransform.h
|
55ff5846f30290119058058a4b7eefa81ef102ea |
26-Aug-2010 |
John McCall <rjmccall@apple.com> |
Make sure we clear TypeSpecOwned when setting TypeSpecType to something when it might previously have been a tag TST. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112196 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
|
9e46b8cfb3e6c6feab5664744f52f06a40f9566b |
26-Aug-2010 |
John McCall <rjmccall@apple.com> |
Make sure we clear TypeSpecOwned when setting TypeSpecType to something when it might previously have been a tag TST. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112196 91177308-0d34-0410-b5e6-96231b3b80d8
eclSpec.cpp
|
05ee8bc89be192c08d82b071a6472ad63d3c2a98 |
26-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Tweak the @selector completion to collapse multiple informative and typed-text blocks into one of each. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112194 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
2d9e21f4675232a39a39611a5b4bb1f4914b2742 |
26-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Tweak the @selector completion to collapse multiple informative and typed-text blocks into one of each. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112194 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
6b5f410f4ef7d4e2300df3cec8ef30810e10dfc7 |
26-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When code-completing a potential call to a C++ non-static member function, take into account the qualifiers on the object argument (e.g., what will become "this"), filtering around uncallable member functions and giving a slight priority boost to those with exactly-matching qualifiers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112193 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
3cdee121daa13403335094ce0e181b9911c2124c |
26-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
When code-completing a potential call to a C++ non-static member function, take into account the qualifiers on the object argument (e.g., what will become "this"), filtering around uncallable member functions and giving a slight priority boost to those with exactly-matching qualifiers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112193 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
daa73fcef7c19bc10665a2b2014a6a511ee4877b |
26-Aug-2010 |
John McCall <rjmccall@apple.com> |
Work around a gcc warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112192 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
38a4ffe5244e6be46f1b1f8394342a77836be776 |
26-Aug-2010 |
John McCall <rjmccall@apple.com> |
Work around a gcc warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112192 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
45a85e0c449024f48a113c336e73d4458e81c72b |
26-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement code completion for @selector expressions git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112186 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
458433d2f0f5c96a9e0d21decdd44bebccf20b11 |
26-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement code completion for @selector expressions git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112186 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
6a611fd3a13f7e773427f2fbde993354ca269f54 |
26-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Move the sorting of code-completion results out of the main path and into the clients, e.g., the printing code-completion consumer and c-index-test. Clients may want to re-sort the results anyway. Provide a libclang function that sorts the results. 3rd try. How embarrassing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112180 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
|
1e5e6684b0f27701e6f7c65f8c6a32a10cbcc3ed |
26-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Move the sorting of code-completion results out of the main path and into the clients, e.g., the printing code-completion consumer and c-index-test. Clients may want to re-sort the results anyway. Provide a libclang function that sorts the results. 3rd try. How embarrassing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112180 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
|
0942e31e6c3725b57c5093ab339dd86031454cfc |
26-Aug-2010 |
John McCall <rjmccall@apple.com> |
Move things around so that Sema.h no longer depends on even DeclBase.h. It still depends on Type because DeclarationName.h does. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112177 91177308-0d34-0410-b5e6-96231b3b80d8
emaAttr.cpp
emaDeclCXX.cpp
|
ea318642072d3d94b5c3cff0fa6f4b33d2db0768 |
26-Aug-2010 |
John McCall <rjmccall@apple.com> |
Move things around so that Sema.h no longer depends on even DeclBase.h. It still depends on Type because DeclarationName.h does. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112177 91177308-0d34-0410-b5e6-96231b3b80d8
emaAttr.cpp
emaDeclCXX.cpp
|
0fcb42021cd2e1bf18acae23907f8dc24ea6bd8c |
26-Aug-2010 |
Daniel Dunbar <daniel@zuster.org> |
Revert r112149, "Move the sorting of code-completion results out of the main path and ...", it is failing tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112161 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
|
1cb237fbf9e52e17f1e03b6f80c1114f47f93781 |
26-Aug-2010 |
Daniel Dunbar <daniel@zuster.org> |
Revert r112149, "Move the sorting of code-completion results out of the main path and ...", it is failing tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112161 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
|
f680d9ef70e596ada56e0fc91a3f17dad2a81e5a |
26-Aug-2010 |
John McCall <rjmccall@apple.com> |
De-memberify the VarDecl and FunctionDecl StorageClass enums. This lets us remove Sema.h's dependency on Expr.h and Decl.h. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112156 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaObjCProperty.cpp
|
d931b086984257de68868a64a235c2b4b34003fb |
26-Aug-2010 |
John McCall <rjmccall@apple.com> |
De-memberify the VarDecl and FunctionDecl StorageClass enums. This lets us remove Sema.h's dependency on Expr.h and Decl.h. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112156 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaObjCProperty.cpp
|
5437fa02575af032848585514761237d247306df |
26-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Move the sorting of code-completion results out of the main path and into the clients, e.g., the printing code-completion consumer and c-index-test. Clients may want to re-sort the results anyway. Provide a libclang function that sorts the results. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112149 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
|
be13afea6d9a5dc8877d5553552bd07c733a99bf |
26-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Move the sorting of code-completion results out of the main path and into the clients, e.g., the printing code-completion consumer and c-index-test. Clients may want to re-sort the results anyway. Provide a libclang function that sorts the results. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112149 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
|
d3a91a6b4123d8b9b6f55d6d08a5943de9bb8aba |
26-Aug-2010 |
John McCall <rjmccall@apple.com> |
Restore r112114 now that SmallVector<...,0> is safe. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112148 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaAccess.cpp
emaDeclAttr.cpp
|
9c3087b0b0bea2fd782205c1274ebfc4290265e0 |
26-Aug-2010 |
John McCall <rjmccall@apple.com> |
Restore r112114 now that SmallVector<...,0> is safe. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112148 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaAccess.cpp
emaDeclAttr.cpp
|
df1075a9d307ce6c8b32d2e5d73a982592acdfa5 |
26-Aug-2010 |
Daniel Dunbar <daniel@zuster.org> |
Revert r112114, "Pull DelayedDiagnostic and AccessedEntity out into their own header.", it is teh broken. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112123 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaAccess.cpp
emaDeclAttr.cpp
|
0ad106fec9dd188e20026c80d814f836e15780e3 |
26-Aug-2010 |
Daniel Dunbar <daniel@zuster.org> |
Revert r112114, "Pull DelayedDiagnostic and AccessedEntity out into their own header.", it is teh broken. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112123 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaAccess.cpp
emaDeclAttr.cpp
|
0a64d87e65e9b1ee08114ac6d25b9302f93b8669 |
26-Aug-2010 |
Eric Christopher <echristo@apple.com> |
With lax vector conversions (the default) make sure we convert between two vectors that are the same size. Fix up testcases accordingly and add a new one to make sure we still error if lax vector conversions are disabled. Fixes rdar://8328190 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112122 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e84f9ebf8c89d5600f5930b65a0df0de890791b2 |
26-Aug-2010 |
Eric Christopher <echristo@apple.com> |
With lax vector conversions (the default) make sure we convert between two vectors that are the same size. Fix up testcases accordingly and add a new one to make sure we still error if lax vector conversions are disabled. Fixes rdar://8328190 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112122 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
38a65ea54243f58b04c53c0f78468d09101f99a9 |
26-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Revert "Move the sorting of code-completion results out of the main path and into the clients", because the C standard library sucks. Where's my stable sort, huh? git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112121 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
|
9214819c7d4b24fd1b38480d845d8e345d8f0196 |
26-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Revert "Move the sorting of code-completion results out of the main path and into the clients", because the C standard library sucks. Where's my stable sort, huh? git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112121 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
|
7033227c7749e2b50d5a8625b2be7c3d7bbd5f26 |
26-Aug-2010 |
John McCall <rjmccall@apple.com> |
Pull DelayedDiagnostic and AccessedEntity out into their own header. This works courtesy of the new SmallVector<..., 0> specialization that doesn't require a complete type. Note that you'll need to pull at least SmallVector.h from LLVM to compile successfully. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112114 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaAccess.cpp
emaDeclAttr.cpp
|
679063472244a6cb6d4b52894ac020022690620d |
26-Aug-2010 |
John McCall <rjmccall@apple.com> |
Pull DelayedDiagnostic and AccessedEntity out into their own header. This works courtesy of the new SmallVector<..., 0> specialization that doesn't require a complete type. Note that you'll need to pull at least SmallVector.h from LLVM to compile successfully. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112114 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaAccess.cpp
emaDeclAttr.cpp
|
78571d3c84971c7f390aade640396fa5c166b86a |
26-Aug-2010 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Fix miscompilation. The custom new[]/delete[] methods were not getting called for arrays with more than 1 dimension. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112107 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
d2932986a16244b7f9a3f9a7a6b0daf543c91540 |
26-Aug-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Fix miscompilation. The custom new[]/delete[] methods were not getting called for arrays with more than 1 dimension. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112107 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
57cdd35c3f7e8cd5709b481bbcb036d6c3e5d022 |
26-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Move the sorting of code-completion results out of the main path and into the clients, e.g., the printing code-completion consumer and c-index-test. Clients may want to re-sort the results anyway. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112095 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
|
c7ed372ec7b1c9be05d022e9bc23cd8641f2b28b |
26-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Move the sorting of code-completion results out of the main path and into the clients, e.g., the printing code-completion consumer and c-index-test. Clients may want to re-sort the results anyway. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112095 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
|
078c44e99a11522150708025c15678d2cafb3072 |
26-Aug-2010 |
John McCall <rjmccall@apple.com> |
Split out a header to hold APIs meant for the Sema implementation from Sema.h. Clients of Sema don't need to know (for example) the list of diagnostics we support. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112093 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
umpDiagnostics.cpp
ema.cpp
emaAccess.cpp
emaAttr.cpp
emaCXXCast.cpp
emaCXXScopeSpec.cpp
emaChecking.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExceptionSpec.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaInit.cpp
emaLookup.cpp
emaObjCProperty.cpp
emaOverload.cpp
emaStmt.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
argetAttributesSema.cpp
reeTransform.h
|
2d88708cbe4e4ec5e04e4acb6bd7f5be68557379 |
26-Aug-2010 |
John McCall <rjmccall@apple.com> |
Split out a header to hold APIs meant for the Sema implementation from Sema.h. Clients of Sema don't need to know (for example) the list of diagnostics we support. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112093 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
umpDiagnostics.cpp
ema.cpp
emaAccess.cpp
emaAttr.cpp
emaCXXCast.cpp
emaCXXScopeSpec.cpp
emaChecking.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExceptionSpec.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaInit.cpp
emaLookup.cpp
emaObjCProperty.cpp
emaOverload.cpp
emaStmt.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
argetAttributesSema.cpp
reeTransform.h
|
264c06db04c1167a291971ffc26e35d54df69dfd |
25-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When combining the code-completion results from Sema long with the code-completion results cached by ASTUnit, sort the resulting result set. This makes testing far, far easier, so this commit also includes tests for the previous few fixes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112070 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
|
721f359a350059a81945baa08f63b2e5feceb044 |
25-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
When combining the code-completion results from Sema long with the code-completion results cached by ASTUnit, sort the resulting result set. This makes testing far, far easier, so this commit also includes tests for the previous few fixes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112070 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
|
752f9ef6d27d72ba166d6b8f1855b720fa6bbab9 |
25-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Initialize the translation-unit scope before lexing the first token. The first token might be something that ends up triggering code completion, which in turn requires a valid Scope. Test case forthcoming. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112066 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
c1a3e5e73859ece9f106ae9d84c78bef4111956a |
25-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Initialize the translation-unit scope before lexing the first token. The first token might be something that ends up triggering code completion, which in turn requires a valid Scope. Test case forthcoming. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112066 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
84525f7472c58d7e59da52c5ecefdc09e57ae820 |
25-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Add a code-completion context for "natural language" completions, so that ASTUnit knows not to try to provide completions there. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112057 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
af1c6b532e6e1e944db987f29062e5efce71a573 |
25-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Add a code-completion context for "natural language" completions, so that ASTUnit knows not to try to provide completions there. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112057 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
6db78b69f4b9adb18df3f5c53272cc44b9bb1a06 |
25-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Introduce a preprocessor code-completion hook for contexts where we expect "natural" language and should not provide any completions, e.g., comments, string literals, #error. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112054 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
55817afdf9d453a443262a733f6caf6692dca118 |
25-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Introduce a preprocessor code-completion hook for contexts where we expect "natural" language and should not provide any completions, e.g., comments, string literals, #error. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112054 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
aeb70b12ab1af1ba7e5e48cee3903d1a768bca90 |
25-Aug-2010 |
John McCall <rjmccall@apple.com> |
GCC didn't care for my attempt at API compatibility, so brute-force everything to the new constants. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112047 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaCXXCast.cpp
emaChecking.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaInit.cpp
emaLookup.cpp
emaObjCProperty.cpp
emaOverload.cpp
emaStmt.cpp
emaTemplate.cpp
reeTransform.h
|
2de56d1d0c3a504ad1529de2677628bdfbb95cd4 |
25-Aug-2010 |
John McCall <rjmccall@apple.com> |
GCC didn't care for my attempt at API compatibility, so brute-force everything to the new constants. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112047 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaCXXCast.cpp
emaChecking.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaInit.cpp
emaLookup.cpp
emaObjCProperty.cpp
emaOverload.cpp
emaStmt.cpp
emaTemplate.cpp
reeTransform.h
|
be2f292079e8f6ea557982f5ba04ac3da2997f33 |
25-Aug-2010 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Recursive functions should be marked when used from another function. Fixes http://llvm.org/PR7923. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112045 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
58b5259e959f42823cc93f66da1499723eae366c |
25-Aug-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Recursive functions should be marked when used from another function. Fixes http://llvm.org/PR7923. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112045 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
6f072329e9c9b7d44f0fa2a34528193a6f478414 |
25-Aug-2010 |
John McCall <rjmccall@apple.com> |
More incremental progress towards not including Expr.h in Sema.h. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112044 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaChecking.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
|
5baba9d98364a3525d6afa15a04cdad82fd6dd30 |
25-Aug-2010 |
John McCall <rjmccall@apple.com> |
More incremental progress towards not including Expr.h in Sema.h. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112044 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaChecking.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
|
179258586662abdf86817652deb89287cee47cf9 |
25-Aug-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Rename *PendingImplicitInstantiations to *PendingInstantiations. No functionality changed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112040 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaExpr.cpp
emaTemplateInstantiateDecl.cpp
|
62c78d54bee499dd87f768f48b21c9b5ec15e516 |
25-Aug-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Rename *PendingImplicitInstantiations to *PendingInstantiations. No functionality changed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112040 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaExpr.cpp
emaTemplateInstantiateDecl.cpp
|
88138de2bd70bdd408d8c1e307e212a6459a6a2c |
25-Aug-2010 |
John McCall <rjmccall@apple.com> |
Split FunctionScopeInfo and BlockScopeInfo into their own header. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112038 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaChecking.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaLookup.cpp
emaStmt.cpp
reeTransform.h
|
781472fe99a120098c631b0cbe33c89f8cef5e70 |
25-Aug-2010 |
John McCall <rjmccall@apple.com> |
Split FunctionScopeInfo and BlockScopeInfo into their own header. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112038 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaChecking.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaLookup.cpp
emaStmt.cpp
reeTransform.h
|
362abfc94cf3661615c7d57ae308c88c2890d385 |
25-Aug-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Support explicit instantiation of function templates and members of class templates when only the declaration is in scope. This requires deferring the instantiation to be lazy, and ensuring the definition is required for that translation unit. We re-use the existing pending instantiation queue, previously only used to track implicit instantiations which were required to be lazy. Fixes PR7979. A subsequent change will rename *PendingImplicitInstantiations to *PendingInstatiations for clarity given its broader role. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112037 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
58e390ef491c8fb11ae17445054ee09527b492d3 |
25-Aug-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Support explicit instantiation of function templates and members of class templates when only the declaration is in scope. This requires deferring the instantiation to be lazy, and ensuring the definition is required for that translation unit. We re-use the existing pending instantiation queue, previously only used to track implicit instantiations which were required to be lazy. Fixes PR7979. A subsequent change will rename *PendingImplicitInstantiations to *PendingInstatiations for clarity given its broader role. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112037 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
d9b8fd0d8decfb9469397cd734d8ea90a62e8df9 |
25-Aug-2010 |
John McCall <rjmccall@apple.com> |
Remove Sema.h's dependency on DeclCXX.h. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112032 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
umpDiagnostics.cpp
ema.cpp
emaChecking.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
argetAttributesSema.cpp
argetAttributesSema.h
|
384aff8b94bb0d1ad6c5667b90621e5699815bb2 |
25-Aug-2010 |
John McCall <rjmccall@apple.com> |
Remove Sema.h's dependency on DeclCXX.h. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112032 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
umpDiagnostics.cpp
ema.cpp
emaChecking.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
argetAttributesSema.cpp
argetAttributesSema.h
|
3c229031bb964a748d27a38cf556f713da32c002 |
25-Aug-2010 |
John McCall <rjmccall@apple.com> |
Remove the DenseSet dependency from Sema.h. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112030 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaDeclObjC.cpp
emaLookup.cpp
emaObjCProperty.cpp
|
50df6ae41f232612e5e88b19e0db9900d08d2f6c |
25-Aug-2010 |
John McCall <rjmccall@apple.com> |
Remove the DenseSet dependency from Sema.h. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112030 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaDeclObjC.cpp
emaLookup.cpp
emaObjCProperty.cpp
|
231359e094850dbfe8004082a68c92df1dcd4c2a |
25-Aug-2010 |
John McCall <rjmccall@apple.com> |
Teach Sema to live without CodeCompleteConsumer.h. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112028 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
|
0a2c5e256abb4dc031c21fe4dc92c4f3afe9947c |
25-Aug-2010 |
John McCall <rjmccall@apple.com> |
Teach Sema to live without CodeCompleteConsumer.h. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112028 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
|
6a42ee9c92db87ccad2b90ed11a5aa4d13481f4b |
25-Aug-2010 |
John McCall <rjmccall@apple.com> |
Remove AnalysisBasedWarnings.h's dependency on Type.h git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112027 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
emaDecl.cpp
emaExpr.cpp
|
e0054f61fd84133eb0d19c19ae9afaf117933274 |
25-Aug-2010 |
John McCall <rjmccall@apple.com> |
Remove AnalysisBasedWarnings.h's dependency on Type.h git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112027 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
emaDecl.cpp
emaExpr.cpp
|
d3aecc01e33e2d0d9646779deb4527a4883679e1 |
25-Aug-2010 |
John McCall <rjmccall@apple.com> |
Move more stuff out of Sema.h. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112026 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaExprCXX.cpp
emaLookup.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
2a7fb27913999d132cf9e10e03dc5271faa2e9d3 |
25-Aug-2010 |
John McCall <rjmccall@apple.com> |
Move more stuff out of Sema.h. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112026 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaExprCXX.cpp
emaLookup.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
a58bb312dd5eff1a2e9020861298192e2d90e76d |
25-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When performing completions involving Objective-C method declarations (e.g., for message sends or method declaration/definition completions), adjust methods that come from a base class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112013 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
408be5a4c0ed09a6c0375468d7fff7c93725f2d3 |
25-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
When performing completions involving Objective-C method declarations (e.g., for message sends or method declaration/definition completions), adjust methods that come from a base class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112013 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
2ab56d4a9a0e2317cbf76149b5a3fc0e24b03808 |
25-Aug-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
No need to default synthesize property if implementation has its own getter and setter methods declared. Fixed 8349319 (nonfragile-abi2). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112003 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
95f1b86b73a9a203311adc7646f2fa9ee5cdd2b7 |
25-Aug-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
No need to default synthesize property if implementation has its own getter and setter methods declared. Fixed 8349319 (nonfragile-abi2). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112003 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
b569db2332ce8acb8ef77b8e71375c7df7268999 |
25-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Give a slight preference to functions returning "void" when we're performing code completion at the statement level (rather than in an arbitrary expression). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112001 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
eb0d0145910f3024d9bdefe279a1e9b95495f2fd |
25-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Give a slight preference to functions returning "void" when we're performing code completion at the statement level (rather than in an arbitrary expression). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112001 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
20db77949894d56853f11bb5794f4d8fad085c0b |
25-Aug-2010 |
John McCall <rjmccall@apple.com> |
Catch the case of trying to turn '&(X::a)' into a member pointer as well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111997 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
c988fab9860e83f25ef51101fef162b49380582b |
25-Aug-2010 |
John McCall <rjmccall@apple.com> |
Catch the case of trying to turn '&(X::a)' into a member pointer as well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111997 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
e1852335a6dc17b81193f63b1056745f35c5f661 |
25-Aug-2010 |
John McCall <rjmccall@apple.com> |
When trying to resolve the address of an overloaded expression, only form pointers-to-member if the expression has the appropriate form. This avoids assertions later on on invalid code, but also allows us to properly resolve mixed-staticity overloads. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111987 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaOverload.cpp
|
fb97e75e627599aaa7a613778134e290f9de663b |
25-Aug-2010 |
John McCall <rjmccall@apple.com> |
When trying to resolve the address of an overloaded expression, only form pointers-to-member if the expression has the appropriate form. This avoids assertions later on on invalid code, but also allows us to properly resolve mixed-staticity overloads. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111987 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaOverload.cpp
|
2353bc83ebc42dd79c1ab563d487c237d845bf03 |
25-Aug-2010 |
Ted Kremenek <kremenek@apple.com> |
Fix printf format string checking for '%lc' (which expects a wint_t or compatible argument). Fixes PR 7981. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111978 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
9325eaf08fcccbc0d038e703f570c64daacdaa31 |
25-Aug-2010 |
Ted Kremenek <kremenek@apple.com> |
Fix printf format string checking for '%lc' (which expects a wint_t or compatible argument). Fixes PR 7981. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111978 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
ccfb2bc5d5eddd4a1f2c2ecdcf24e521003e42e0 |
25-Aug-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
It is not error in c++ to take address of register variable (c++03 7.1.1P3). radar 8108252. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111977 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
4020f8703a8822fe0d4efe4a0dc74f0b8040bd9f |
25-Aug-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
It is not error in c++ to take address of register variable (c++03 7.1.1P3). radar 8108252. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111977 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e731c90a1e65ea98d8e8bd78129559b3c6cfc0ab |
25-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement code completion for preprocessor expressions and in macro arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111976 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
f29c5233085a5af795c3c01b94d319e5b3235d56 |
25-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement code completion for preprocessor expressions and in macro arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111976 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
ff25319858bc246fc0732fb8ee2939739a245d05 |
24-Aug-2010 |
John McCall <rjmccall@apple.com> |
Move some of SemaOverload's API to various places in Overload.h, and kill some of it off completely. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111957 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
|
120d63cd4465230c2cd56508c7cd8e0ad00848e7 |
24-Aug-2010 |
John McCall <rjmccall@apple.com> |
Move some of SemaOverload's API to various places in Overload.h, and kill some of it off completely. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111957 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
|
f3739ad6499abeda23f00c56dc350e58432b9ce5 |
24-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement preprocessor code completion where a macro name is expected, e.g., after #ifdef/#ifndef or #undef, or inside a defined <macroname> expression in a preprocessor conditional. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111954 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
1fbb447e9d43c2c676e94081fbfee7eb6cbe933b |
24-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement preprocessor code completion where a macro name is expected, e.g., after #ifdef/#ifndef or #undef, or inside a defined <macroname> expression in a preprocessor conditional. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111954 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
4f9145a1ecb1f0f7caa61d24b0ba5e5ca9977d45 |
24-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Introduce basic code-completion support for preprocessor directives, e.g., after a "#" we'll suggest #if, #ifdef, etc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111943 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
f44e854ed1e3aa86d2ed6d615ccd109d50ddcff9 |
24-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Introduce basic code-completion support for preprocessor directives, e.g., after a "#" we'll suggest #if, #ifdef, etc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111943 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
d65a8200e14724061872e79c2bc7c6fd29a2ba7c |
24-Aug-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Fix a bug in nonfragile-abi2 when attempting to diagnose previous use of a synthesized 'ivar' with property of same name declared as @dynamic. In this case, 'ivar' is in the inherited class and no diagnostics should be issued. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111940 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
cdaa6a8fed16d8bd3987fb4f3304dfb4e52876c3 |
24-Aug-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Fix a bug in nonfragile-abi2 when attempting to diagnose previous use of a synthesized 'ivar' with property of same name declared as @dynamic. In this case, 'ivar' is in the inherited class and no diagnostics should be issued. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111940 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
4b923c3085b58bd1cdf8362296305682fc4ef9db |
24-Aug-2010 |
John McCall <rjmccall@apple.com> |
Sema doesn't need these STL headers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111926 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
aab0132698c7550d0095986fb1fb4887bf18c3e8 |
24-Aug-2010 |
John McCall <rjmccall@apple.com> |
Sema doesn't need these STL headers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111926 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
7a2883dc14405da22b86162286e57d7d89156d55 |
24-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When providing completions for a function or method argument that corresponds to a block pointer, provide the skeleton of a block literal. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111918 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
83482d147a37c4d4f0562f73b0766279c500ffd1 |
24-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
When providing completions for a function or method argument that corresponds to a block pointer, provide the skeleton of a block literal. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111918 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
11b75a0d6059fb5354175a348bea9e0d639b31b5 |
24-Aug-2010 |
John McCall <rjmccall@apple.com> |
It turns out that this template is only instantiated at one type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111908 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
fbce0e1d582f10d890111d8d27f6e88055be6422 |
24-Aug-2010 |
John McCall <rjmccall@apple.com> |
It turns out that this template is only instantiated at one type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111908 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
fa4a3ef515f4ec17548169389050e36a2ad65c30 |
24-Aug-2010 |
John McCall <rjmccall@apple.com> |
More header elimination. The goal of all this is to allow Parser to #include Sema.h while keeping all the AST declarations opaque. That may not be reasonably attainable, though. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111907 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaLookup.cpp
emaStmt.cpp
emaTemplate.cpp
|
5f1e0942a32657b625702aa52f82430d0120f424 |
24-Aug-2010 |
John McCall <rjmccall@apple.com> |
More header elimination. The goal of all this is to allow Parser to #include Sema.h while keeping all the AST declarations opaque. That may not be reasonably attainable, though. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111907 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaLookup.cpp
emaStmt.cpp
emaTemplate.cpp
|
064a5209d8bfb036e836a718b69fcd79b9f42408 |
24-Aug-2010 |
John McCall <rjmccall@apple.com> |
Remove a header dependency from Sema.h at the cost of some type safety. If someone wants to fix this some other way.... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111905 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExprCXX.cpp
emaInit.cpp
|
7a1fad38256eb4c5129359be85ba1ea1678eb5c9 |
24-Aug-2010 |
John McCall <rjmccall@apple.com> |
Remove a header dependency from Sema.h at the cost of some type safety. If someone wants to fix this some other way.... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111905 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExprCXX.cpp
emaInit.cpp
|
89ee65fb6f6218b45c46537690ae4691b489cf05 |
24-Aug-2010 |
John McCall <rjmccall@apple.com> |
Struggle mightily against header inclusion in Sema.h. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111904 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
odeCompleteConsumer.cpp
dentifierResolver.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaObjCProperty.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
reeTransform.h
|
7cd088e519d7e6caa4c4c12db52e0e4ae35d25c2 |
24-Aug-2010 |
John McCall <rjmccall@apple.com> |
Struggle mightily against header inclusion in Sema.h. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111904 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
odeCompleteConsumer.cpp
dentifierResolver.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaObjCProperty.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
reeTransform.h
|
a2b55e58c780488ea9fb752c71fba2973aa7c9f5 |
24-Aug-2010 |
John McCall <rjmccall@apple.com> |
OwningExprResult -> ExprResult. This patch brought to you by M-x query-replace-regexp \(Sema::\|Action::\|Parser::\|\)Owning\(Expr\|Stmt\)Result -> \2Result git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111903 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaChecking.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaInit.cpp
emaObjCProperty.cpp
emaOverload.cpp
emaStmt.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
60d7b3a319d84d688752be3870615ac0f111fb16 |
24-Aug-2010 |
John McCall <rjmccall@apple.com> |
OwningExprResult -> ExprResult. This patch brought to you by M-x query-replace-regexp \(Sema::\|Action::\|Parser::\|\)Owning\(Expr\|Stmt\)Result -> \2Result git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111903 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaChecking.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaInit.cpp
emaObjCProperty.cpp
emaOverload.cpp
emaStmt.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
1f52c3afbf8f06b781e03640b11a41e6d712b72e |
24-Aug-2010 |
John McCall <rjmccall@apple.com> |
Fold ASTOwningResult back into ActionResult. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111902 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
182f7093dd9dabbcf6df44b4ae004ead38804b48 |
24-Aug-2010 |
John McCall <rjmccall@apple.com> |
Fold ASTOwningResult back into ActionResult. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111902 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
e5e113a803072ec06d440c882c4f2f67f45c93f1 |
24-Aug-2010 |
John McCall <rjmccall@apple.com> |
Abstract out passing around types and kill off ActionBase. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111901 91177308-0d34-0410-b5e6-96231b3b80d8
ction.cpp
ttributeList.cpp
eclSpec.cpp
emaCXXCast.cpp
emaCXXScopeSpec.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaTemplate.cpp
emaType.cpp
reeTransform.h
|
b3d8748e797c6c2f1dc01186c8eeb3b1b5fe970c |
24-Aug-2010 |
John McCall <rjmccall@apple.com> |
Abstract out passing around types and kill off ActionBase. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111901 91177308-0d34-0410-b5e6-96231b3b80d8
ction.cpp
ttributeList.cpp
eclSpec.cpp
emaCXXCast.cpp
emaCXXScopeSpec.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaTemplate.cpp
emaType.cpp
reeTransform.h
|
769b4dd31d3f1b911a1a7442eae93c670af6efeb |
24-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Diagnose the presence of multiple initializations of static data members, from Faisal Vali! Fixes PR6904. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111900 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
3a91abf311dcc399944882004f3e0b29489d31c7 |
24-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Diagnose the presence of multiple initializations of static data members, from Faisal Vali! Fixes PR6904. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111900 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
6e42569e57936c4947400146c90c647cf7170e80 |
24-Aug-2010 |
Eli Friedman <eli.friedman@gmail.com> |
PR7971: Compute the correct type for an address-of expression containing an UnresolvedMemberExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111899 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
fb3bb31af0bdf25b869d42599133d590cdf8c2c1 |
24-Aug-2010 |
Eli Friedman <eli.friedman@gmail.com> |
PR7971: Compute the correct type for an address-of expression containing an UnresolvedMemberExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111899 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
466e710f520b756fe56de70f373f679317123424 |
24-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
State explicitly that we are intentionally not providing macro completions for declarator name completions git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111898 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
4497dd49f78eb5e1a7c3f19d1a13564f79e12341 |
24-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
State explicitly that we are intentionally not providing macro completions for declarator name completions git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111898 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
a13f01d76ca33a8ac20630874edd1b223be91bf8 |
24-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Consistently switch on PCC_Type git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111888 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
72db10801161a23c3830d19844a8c0b2a348d849 |
24-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Consistently switch on PCC_Type git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111888 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
a25d1573d00e14c47a5c72867dae8d9ebe34c631 |
24-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Provide code completion results for the context-sensitive Objective-C keywords "in", "out", "inout", "byref", "bycopy", and "oneway". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111884 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
d32b0225e29fcafb2b2b2a4b1c51dcb1518af9c6 |
24-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Provide code completion results for the context-sensitive Objective-C keywords "in", "out", "inout", "byref", "bycopy", and "oneway". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111884 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
8dc0fc4ee162b99c277a8ab5d29a9fc0fdba08a6 |
24-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When calling a function or messaging a method marked "sentinel", add the ", nil", ", NULL", or ", (void*)0" to the end of the code completion, since it always has to be there anyway. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111867 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
aaa107acc8f906203101af259e8d764b5027700a |
24-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
When calling a function or messaging a method marked "sentinel", add the ", nil", ", NULL", or ", (void*)0" to the end of the code completion, since it always has to be there anyway. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111867 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
a7fe81a25309c4a9d62a288eb0a46a279e83765b |
24-Aug-2010 |
John McCall <rjmccall@apple.com> |
Kill off ExprArg (now just Expr*) and StmtArg (now just Stmt*). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111863 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaOverload.cpp
emaStmt.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
reeTransform.h
|
9ae2f076ca5ab1feb3ba95629099ec2319833701 |
24-Aug-2010 |
John McCall <rjmccall@apple.com> |
Kill off ExprArg (now just Expr*) and StmtArg (now just Stmt*). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111863 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaOverload.cpp
emaStmt.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
reeTransform.h
|
0722c716f747c52573dd1914d30acf539dd3f50c |
24-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Introduce new libclang API functions that determine the availability of a cursor or code-completion result, e.g., whether that result refers to an unavailable, deleted, or deprecated declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111858 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
|
58ddb60f409125eda5436c4a1f070f7fa4744295 |
24-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Introduce new libclang API functions that determine the availability of a cursor or code-completion result, e.g., whether that result refers to an unavailable, deleted, or deprecated declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111858 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
|
6f5e7298dcb517eaac5091c38410b2146e98f94a |
24-Aug-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Handling remaining rule for synthesize bitfields in class extensions (nonfragile-abi2).For every class @interface and class extension @interface, if the last ivar is a bitfield of any type, then add an implicit `char :0` ivar to the end of that interface. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111857 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d097be8f81fbf4ed96ac10bae18562dd8202666b |
24-Aug-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Handling remaining rule for synthesize bitfields in class extensions (nonfragile-abi2).For every class @interface and class extension @interface, if the last ivar is a bitfield of any type, then add an implicit `char :0` ivar to the end of that interface. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111857 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
5d14146645683c33c49f0cc2d24e6e70a3558091 |
23-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Include __FUNCTION__, __PRETTY_FUNCTION_, __func__ in code-completion results for expression contexts within a function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111851 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
aa5f77b2c914b68e6a3737c93db3598907bc64ab |
23-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Include __FUNCTION__, __PRETTY_FUNCTION_, __func__ in code-completion results for expression contexts within a function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111851 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
c4f00a350a77c0898bab84bc16a10610e76099d9 |
23-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Introduce a code-completion hook for the Objective-C collection argument in a for-each statement (e.g., "for (id x in <blah>)"), which restricts the expression completions provided to Objective-C types (or class types in C++). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111843 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
fb6294123b9de1605adae69d85cb4fddf81a9bc5 |
23-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Introduce a code-completion hook for the Objective-C collection argument in a for-each statement (e.g., "for (id x in <blah>)"), which restricts the expression completions provided to Objective-C types (or class types in C++). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111843 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
2760eaacfd41dc20fd39a0fa43674569f4e7e134 |
23-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Don't include macro results when we're completing a declarator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111830 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
6d72cbedbab7eea947f34ddc6a44c3b308530034 |
23-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Don't include macro results when we're completing a declarator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111830 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
693a734a0661bb432d95442fd9b459e6e37293e2 |
23-Aug-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Support for IRGen of synthesize bitfield ivars in objc-nonfragile-abi2 (radar 7824380). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111823 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
000835d0b04345c0014c603fe6339b3bc154050e |
23-Aug-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Support for IRGen of synthesize bitfield ivars in objc-nonfragile-abi2 (radar 7824380). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111823 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
9283ece07ecfa7c92c89fff2750ec0023344437f |
23-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Introduce a new code-completion point when we're parsing a declarator. Here, we can only see a few things (e.g., cvr-qualifiers, nested name specifiers) and we do not want to provide other non-macro completions. Previously, we would end up in recovery mode and would provide a large number of non-relevant completions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111818 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
2ccccb3ff40c64927817a7e1ddf1da8c188ed224 |
23-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Introduce a new code-completion point when we're parsing a declarator. Here, we can only see a few things (e.g., cvr-qualifiers, nested name specifiers) and we do not want to provide other non-macro completions. Previously, we would end up in recovery mode and would provide a large number of non-relevant completions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111818 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
683b2b45cadcaaf962eea37d5d3df61aaf72c641 |
23-Aug-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Relax the construction of a definition for implicit, trivial default constructors. We perform semantic checking when creating the definition, and this isn't needed in certain contexts (value initialization) but is in others (default initialization). This fixes PR7948. We add explicit code to the default initialization path to ensure the definition is both present and valid. Doug, please review. I think this follows your latest suggestion, and it ended up remarkably cleaner than I anticipated. Also let me know if similar logic should be followed for destructors and copy-constructors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111802 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaInit.cpp
|
4e6fbce4277fbc7c574fb2393c7dfe06f014c21a |
23-Aug-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Relax the construction of a definition for implicit, trivial default constructors. We perform semantic checking when creating the definition, and this isn't needed in certain contexts (value initialization) but is in others (default initialization). This fixes PR7948. We add explicit code to the default initialization path to ensure the definition is both present and valid. Doug, please review. I think this follows your latest suggestion, and it ended up remarkably cleaner than I anticipated. Also let me know if similar logic should be followed for destructors and copy-constructors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111802 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaInit.cpp
|
1375393206b22b6079c2b0bbf86327dd65c04e6d |
23-Aug-2010 |
John McCall <rjmccall@apple.com> |
Push DeclGroupRefs and TemplateNames in an opaque but type-safe way through the parser. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111800 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
emaExprCXX.cpp
emaTemplate.cpp
|
2b5289b6fd7e3d9899868410a498c081c9595662 |
23-Aug-2010 |
John McCall <rjmccall@apple.com> |
Push DeclGroupRefs and TemplateNames in an opaque but type-safe way through the parser. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111800 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
emaExprCXX.cpp
emaTemplate.cpp
|
714ef3d06b234cbb38275e35a79de1ea59eb13f2 |
23-Aug-2010 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
In Sema::AddBuiltinOperatorCandidates, candidate pointer types set can also contain a ObjCObjectPointerType since r111699. Don't assume that they are only PointerTypes or we will crash. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111798 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
42d0f2a03eb9e56a8293152ad9530848377a2c91 |
23-Aug-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
In Sema::AddBuiltinOperatorCandidates, candidate pointer types set can also contain a ObjCObjectPointerType since r111699. Don't assume that they are only PointerTypes or we will crash. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111798 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
f1714433f14eb45a413a9db7e29ffab23f75dbaf |
23-Aug-2010 |
John McCall <rjmccall@apple.com> |
Sundry incremental steps towards killing off Action. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111795 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
ca0408fb49c1370430672acf2d770b7151cf71de |
23-Aug-2010 |
John McCall <rjmccall@apple.com> |
Sundry incremental steps towards killing off Action. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111795 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
1222d1b52c50c687cc378558861ff56c197f3b77 |
22-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Do not elide copy construction when we're performing base-class initialization git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111783 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
b8f7de94c3a8fb4556d06a1447880e69bc3a113c |
22-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Do not elide copy construction when we're performing base-class initialization git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111783 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
3dc43e4808b856bc40b4f01bcbe5aca98621797f |
22-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Preserve the zero-initialization and construction-kind settings when instantiating CXXConstructExpr expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111780 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
8c3e554d00d456d5093c21ce8a0c205461279aab |
22-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Preserve the zero-initialization and construction-kind settings when instantiating CXXConstructExpr expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111780 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
08f845b775c7be1a417b1b20b445d47b5c72a1bb |
22-Aug-2010 |
Eli Friedman <eli.friedman@gmail.com> |
Detabify. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111768 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
a7e6845660f91ec611427e1db842780e1ec12bdb |
22-Aug-2010 |
Eli Friedman <eli.friedman@gmail.com> |
Detabify. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111768 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
2009a3a3af5b3ad94449e73a401c3dc0b231953b |
21-Aug-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
twik to my previous patch for pr7936. Build qualified version of ObjC pointers (not pointers) when doing overload resolution. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111740 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
957b4dfd64bce51be396048e6c10485229f4bc7b |
21-Aug-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
twik to my previous patch for pr7936. Build qualified version of ObjC pointers (not pointers) when doing overload resolution. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111740 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
f4bae14c1c2cb086d42aecf84c6779787c6c7d89 |
21-Aug-2010 |
John McCall <rjmccall@apple.com> |
DeclPtrTy -> Decl * git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111733 91177308-0d34-0410-b5e6-96231b3b80d8
ction.cpp
eclSpec.cpp
dentifierResolver.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaLookup.cpp
emaObjCProperty.cpp
emaStmt.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
reeTransform.h
|
d226f65006733ed7f709c3174f22ce33391cb58f |
21-Aug-2010 |
John McCall <rjmccall@apple.com> |
DeclPtrTy -> Decl * git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111733 91177308-0d34-0410-b5e6-96231b3b80d8
ction.cpp
eclSpec.cpp
dentifierResolver.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaLookup.cpp
emaObjCProperty.cpp
emaStmt.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
reeTransform.h
|
45f0087c499377311e852c423dd02933a1c0de07 |
21-Aug-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
patch to support comparison involving objctive-c pointer conversions. Fixes pr7936. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111699 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
2e2acec770a414bf1ebaf2664a752f67494200d1 |
21-Aug-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
patch to support comparison involving objctive-c pointer conversions. Fixes pr7936. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111699 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
661de7f9a92417d91a21eef6e4ed9a4e4441fd7c |
21-Aug-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Remove dead code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111693 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
4b6e6567f778133e25ec21e98e3e7e93d2c81e6a |
21-Aug-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Remove dead code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111693 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
e750e56a33f5216756f7ff87b53bd2b2d08dc318 |
20-Aug-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Rmove dead code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111680 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
a266ebc09b2b7e097341791b7ffe9d0a09a474a2 |
20-Aug-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Rmove dead code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111680 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
d74787f07ed2c35f61f437960b9182f256f6b45a |
20-Aug-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c ivar refactoring patch. Iterations over ivars for a varienty of puposes is now consolidated into two small routines; DeepCollectObjCIvars and ShallowCollectObjCIvars. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111679 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaDeclObjC.cpp
|
2c18bb7c9fca66c30b6eabbdcbc6399d24a54fa9 |
20-Aug-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c ivar refactoring patch. Iterations over ivars for a varienty of puposes is now consolidated into two small routines; DeepCollectObjCIvars and ShallowCollectObjCIvars. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111679 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaDeclObjC.cpp
|
b0152d7a86e6c0cd2d3c6993cb5464be970ea250 |
20-Aug-2010 |
Nick Lewycky <nicholas@mxc.ca> |
Add a workaround for PR7947, a crash trying to recover from invalid C++ code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111675 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
d9ca4ab3ed3637e97a19d716aa9fbd54c6a5f698 |
20-Aug-2010 |
Nick Lewycky <nicholas@mxc.ca> |
Add a workaround for PR7947, a crash trying to recover from invalid C++ code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111675 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e20fbc00b00b6a10c2d54afbd4a5ecd92a981b00 |
20-Aug-2010 |
John McCall <rjmccall@apple.com> |
Another step in the process of making the parser depend on Sema: - move DeclSpec &c into the Sema library - move ParseAST into the Parse library Reflect this change in a thousand different includes. Reflect this change in the link orders. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111667 91177308-0d34-0410-b5e6-96231b3b80d8
ction.cpp
ttributeList.cpp
MakeLists.txt
odeCompleteConsumer.cpp
eclSpec.cpp
arseAST.cpp
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaLookup.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaType.cpp
reeTransform.h
|
19510856727e0e14a3696b2a72c35163bff2a71f |
20-Aug-2010 |
John McCall <rjmccall@apple.com> |
Another step in the process of making the parser depend on Sema: - move DeclSpec &c into the Sema library - move ParseAST into the Parse library Reflect this change in a thousand different includes. Reflect this change in the link orders. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111667 91177308-0d34-0410-b5e6-96231b3b80d8
ction.cpp
ttributeList.cpp
MakeLists.txt
odeCompleteConsumer.cpp
eclSpec.cpp
arseAST.cpp
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaLookup.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaType.cpp
reeTransform.h
|
d5c95ab821ceb80361bcca24d60b589d79cdec95 |
20-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Revert r111609, which is failing its new test. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111611 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaDeclCXX.cpp
emaTemplate.cpp
|
72c4c15e030cabf71cffc899ca779a251bcc72d1 |
20-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Revert r111609, which is failing its new test. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111611 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaDeclCXX.cpp
emaTemplate.cpp
|
d166ebafe945bf28e569474d27ea97ab364efbe9 |
20-Aug-2010 |
John McCall <rjmccall@apple.com> |
Detect efforts to declare a template member friend and explicitly ignore them. Avoids a crash. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111609 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaDeclCXX.cpp
emaTemplate.cpp
|
29c695b86199ce917fd59b875683960a1858342a |
20-Aug-2010 |
John McCall <rjmccall@apple.com> |
Detect efforts to declare a template member friend and explicitly ignore them. Avoids a crash. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111609 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaDeclCXX.cpp
emaTemplate.cpp
|
94123d2d6164c19fe11d639459a054455f2ee887 |
20-Aug-2010 |
Ying Wang <wangying@google.com> |
Fix sim build. Note that this only makes the sim build green, but the built images won't work for sure: No libbcc.so, which depends on something else that can not build in sim mode. No x86 bitcode is generated as well, I believe. Change-Id: Idca8378427196622ac77cd56a38c6a160f03ba22
ndroid.mk
|
e120d10fc804b77c6830f4f4c32e7095603cc071 |
20-Aug-2010 |
John McCall <rjmccall@apple.com> |
Regularize the API for accessing explicit template arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111584 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
096832c5ed5b9106fa177ebc148489760c3bc496 |
20-Aug-2010 |
John McCall <rjmccall@apple.com> |
Regularize the API for accessing explicit template arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111584 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
6f16742bc5ebbf00b305a1c96b05e45fdfd06697 |
20-Aug-2010 |
John McCall <rjmccall@apple.com> |
Correctly instantiate templates with non-type template arguments that are local externs. Fixes <rdar://problem/8302138>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111570 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
766724566289e6951a90b6483f0d3e22fe4b9b52 |
20-Aug-2010 |
John McCall <rjmccall@apple.com> |
Correctly instantiate templates with non-type template arguments that are local externs. Fixes <rdar://problem/8302138>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111570 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
27d3e192d30210746855300fdc059c8f5f71a059 |
19-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix the source range of an anonymous namespace, from Jan Bierbaum git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111561 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
21e09b63df2e1cc1e18749839bf21a6adb9a5b3a |
19-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Fix the source range of an anonymous namespace, from Jan Bierbaum git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111561 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
1ca41043f663c39c2addae9074ab7168d135d902 |
19-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
We don't actually need to check the implicit object argument's conversion a second time for a conversion candidate (with the real acting context), because the only problems we would find are access or ambiguity issues that won't be diagnosed until we pick this candidate. Add a test case to prove it to myself. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111526 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
06ebc98ff017fadfaed515bc06f50ce94ca468d6 |
19-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
We don't actually need to check the implicit object argument's conversion a second time for a conversion candidate (with the real acting context), because the only problems we would find are access or ambiguity issues that won't be diagnosed until we pick this candidate. Add a test case to prove it to myself. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111526 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
987a5027a906e0ae2b454cde2e20cc1c62699b21 |
19-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Properly implement the part of C++ [over.match.funcs]p4 that treats conversion functions as if their acting context were the class that we're converting from (the implicit object argument's type). Retroactively tweaking the implicit conversion sequence, as we were trying to do before, breaks the invariants of that implicit conversion sequence (e.g., the types and conversions don't match up). Fixes <rdar://problem/8018274>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111520 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
c774b2f66478008196f497a227d5ab88ea157582 |
19-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Properly implement the part of C++ [over.match.funcs]p4 that treats conversion functions as if their acting context were the class that we're converting from (the implicit object argument's type). Retroactively tweaking the implicit conversion sequence, as we were trying to do before, breaks the invariants of that implicit conversion sequence (e.g., the types and conversions don't match up). Fixes <rdar://problem/8018274>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111520 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
065f55f7d3bdcd616371e13c466eee9b1356d164 |
19-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Include a proper citation for the wacky hijinks involving conversion functions and the implicit object parameter type. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111519 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
bca393259bc01955b334709de0f5a202470f913a |
19-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Include a proper citation for the wacky hijinks involving conversion functions and the implicit object parameter type. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111519 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
c63a11dd0d93a5e86b8bc7fdac107e2d706c76c6 |
19-Aug-2010 |
Charles Davis <cdavis@mines.edu> |
Add some enum goodness as requested by Chris. Now instead of storing the active C++ ABI as a raw string, we store it as an enum. This should improve performance somewhat. And yes, this time, I started from a clean build directory, and all the tests passed. :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111507 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
20cf717034ba1f20fc47c025ecb72ed9b631ad13 |
19-Aug-2010 |
Charles Davis <cdavis@mines.edu> |
Add some enum goodness as requested by Chris. Now instead of storing the active C++ ABI as a raw string, we store it as an enum. This should improve performance somewhat. And yes, this time, I started from a clean build directory, and all the tests passed. :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111507 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
c4cce474d3a92721646f3f842b2e800f6373ac95 |
19-Aug-2010 |
John McCall <rjmccall@apple.com> |
On second thought, don't warn about reinterpret_casts under -Wcast-align. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111497 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
35a38d95da89d48778019c37b5f8c9a20f7e309c |
19-Aug-2010 |
John McCall <rjmccall@apple.com> |
On second thought, don't warn about reinterpret_casts under -Wcast-align. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111497 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
bb903c15ec2ff9eb6c289858d8839aa29489f553 |
19-Aug-2010 |
Ted Kremenek <kremenek@apple.com> |
Add warning for functions/blocks that have attribute 'noreturn' but return a non-void result. (<rdar://problem/7562925>) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111492 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
58f281f7d54976f23ed4fa23a10ff1ab9c7037fe |
19-Aug-2010 |
Ted Kremenek <kremenek@apple.com> |
Add warning for functions/blocks that have attribute 'noreturn' but return a non-void result. (<rdar://problem/7562925>) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111492 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
f417466c35501dc174ead71932f8a6c23d4710a5 |
19-Aug-2010 |
Ted Kremenek <kremenek@apple.com> |
HandleCommonNoReturnAttr() now only has a single caller. Move that logic to HandleAnalyzerNoReturnAttr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111491 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
b56c1cc8ca593f832ca58d682876259c2ed9bec2 |
19-Aug-2010 |
Ted Kremenek <kremenek@apple.com> |
HandleCommonNoReturnAttr() now only has a single caller. Move that logic to HandleAnalyzerNoReturnAttr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111491 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
2c9200ed08e820c880ba91b3242298028b2b0262 |
19-Aug-2010 |
John McCall <rjmccall@apple.com> |
When deducing the element type of an array, ignore qualifiers if the context allows us to ignore qualifiers on the array type itself. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111486 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
e4f26e54d81fb1987333132fe34cd927e62c803c |
19-Aug-2010 |
John McCall <rjmccall@apple.com> |
When deducing the element type of an array, ignore qualifiers if the context allows us to ignore qualifiers on the array type itself. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111486 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
461310d47dfb77ed4b176cfa19358bddeb732a35 |
19-Aug-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
More PCH -> AST renaming. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111472 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
emaCodeComplete.cpp
emaDeclObjC.cpp
|
3c7f4134603d04b44f997b43c0a9def270f25386 |
19-Aug-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
More PCH -> AST renaming. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111472 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
emaCodeComplete.cpp
emaDeclObjC.cpp
|
7b39a2cadf9d62647f3aa572c52b77ea4114a599 |
19-Aug-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Rename PCHReader to ASTReader. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111467 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
c43b54cbc10654ed59de797898042e1a05265246 |
19-Aug-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Rename PCHReader to ASTReader. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111467 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
c8a316e75b46cbfaa7303b3b0e749e666ea4b3a9 |
19-Aug-2010 |
Sean Hunt <rideau3@gmail.com> |
Generate Attr subclasses with TableGen. Now all classes derived from Attr are generated from TableGen. Additionally, Attr* is no longer its own linked list; SmallVectors or Attr* are used. The accompanying LLVM commit contains the updates to TableGen necessary for this. Some other notes about newly-generated attribute classes: - The constructor arguments are a SourceLocation and a Context&, followed by the attributes arguments in the order that they were defined in Attr.td - Every argument in Attr.td has an appropriate accessor named getFoo, and there are sometimes a few extra ones (such as to get the length of a variadic argument). Additionally, specific_attr_iterator has been introduced, which will iterate over an AttrVec, but only over attributes of a certain type. It can be accessed through either Decl::specific_attr_begin/end or the global functions of the same name. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111455 91177308-0d34-0410-b5e6-96231b3b80d8
emaAttr.cpp
emaChecking.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExprCXX.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
argetAttributesSema.cpp
|
cf807c4dfdb23e8fa3f400e0b24ef5b79db7a530 |
19-Aug-2010 |
Sean Hunt <scshunt@csclub.uwaterloo.ca> |
Generate Attr subclasses with TableGen. Now all classes derived from Attr are generated from TableGen. Additionally, Attr* is no longer its own linked list; SmallVectors or Attr* are used. The accompanying LLVM commit contains the updates to TableGen necessary for this. Some other notes about newly-generated attribute classes: - The constructor arguments are a SourceLocation and a Context&, followed by the attributes arguments in the order that they were defined in Attr.td - Every argument in Attr.td has an appropriate accessor named getFoo, and there are sometimes a few extra ones (such as to get the length of a variadic argument). Additionally, specific_attr_iterator has been introduced, which will iterate over an AttrVec, but only over attributes of a certain type. It can be accessed through either Decl::specific_attr_begin/end or the global functions of the same name. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111455 91177308-0d34-0410-b5e6-96231b3b80d8
emaAttr.cpp
emaChecking.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExprCXX.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
argetAttributesSema.cpp
|
8aec69d4cbec96d8626e85b0af55e58ce6c4aa56 |
18-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
There is no pointer conversion between to similar types (i.e., same type ignoring cv-qualifiers). These are qualification conversions. Fixes PR7934. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111428 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
4e938f57bdd68b3716a4476acf151cdd27bb8a50 |
18-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
There is no pointer conversion between to similar types (i.e., same type ignoring cv-qualifiers). These are qualification conversions. Fixes PR7934. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111428 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
5e00c3e6efcd477e366de7b24a6472bb1425bbde |
18-Aug-2010 |
Chris Lattner <sabre@nondot.org> |
zap dead code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111365 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
|
9b7d6701dabc24387cc152e4d13bf9aec6aa461a |
18-Aug-2010 |
Chris Lattner <sabre@nondot.org> |
zap dead code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111365 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
|
85dd81b029e70acf3a66a5370bd36652071a0308 |
18-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Make sure to add MallocAttr to explicitly-declared operator new/new[] when -fassume-sane-operator-new. Patch by Tom Jablin! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111363 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
7b86862ff555a9d848ac7abf6042d192b6d5a04d |
18-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Make sure to add MallocAttr to explicitly-declared operator new/new[] when -fassume-sane-operator-new. Patch by Tom Jablin! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111363 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
68c0ef034930d84a63cab17c8bd84a4eb75e8d8d |
18-Aug-2010 |
John McCall <rjmccall@apple.com> |
Rip out the existing retroactive abstract-class usage checker, which in a fit of zeal wanted to walk the entire translation unit, and replace it with a new checker that walks the types of declarations nested within the class. Also, look into templates when doing this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111357 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
94c3b561a4f24c5c44a1e2ee6f28f530e6a041ba |
18-Aug-2010 |
John McCall <rjmccall@apple.com> |
Rip out the existing retroactive abstract-class usage checker, which in a fit of zeal wanted to walk the entire translation unit, and replace it with a new checker that walks the types of declarations nested within the class. Also, look into templates when doing this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111357 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
40c97a8a5e06900e778bc3b599b8736fbe687e03 |
18-Aug-2010 |
Chris Lattner <sabre@nondot.org> |
zap a big dead method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111346 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
9c487d175819eadc9f6036f292506ce8d6d5d8e7 |
18-Aug-2010 |
Chris Lattner <sabre@nondot.org> |
zap a big dead method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111346 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
64a5f6f7034808988c3596cf340a879c0c501869 |
18-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Emit an error if an array is too large. We're slightly more strict than GCC 4.2 here when building 32-bit (where GCC will allow allocation of an array for which we can't get a valid past-the-end pointer), and emulate its odd behavior in 64-bit where it only allows 63 bits worth of storage in the array. The former is a correctness issue; the latter is harmless in practice (you wouldn't be able to use such an array anyway) and helps us pass a GCC DejaGNU test. Fixes <rdar://problem/8212293>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111338 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExprCXX.cpp
emaType.cpp
|
2767ce2e21d8bc17869b8436220bce719b3369e4 |
18-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Emit an error if an array is too large. We're slightly more strict than GCC 4.2 here when building 32-bit (where GCC will allow allocation of an array for which we can't get a valid past-the-end pointer), and emulate its odd behavior in 64-bit where it only allows 63 bits worth of storage in the array. The former is a correctness issue; the latter is harmless in practice (you wouldn't be able to use such an array anyway) and helps us pass a GCC DejaGNU test. Fixes <rdar://problem/8212293>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111338 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExprCXX.cpp
emaType.cpp
|
184fbd446d81db7e83904b2f98757abcb6c95a6b |
18-Aug-2010 |
Daniel Dunbar <daniel@zuster.org> |
StringRef'ication of lots stuff, patch by Peter Davies! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111314 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaObjCProperty.cpp
|
4087f27e5416c799bcb6be072f905be752acb61c |
18-Aug-2010 |
Daniel Dunbar <daniel@zuster.org> |
StringRef'ication of lots stuff, patch by Peter Davies! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111314 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaObjCProperty.cpp
|
345fb7fbbd9e774f88879746be7b375ec774a0c2 |
18-Aug-2010 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Rename -Wunused-method -> -Wunused-member-function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111305 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
42cbd782cf17223076e5b6c0607414d9d68aae19 |
18-Aug-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Rename -Wunused-method -> -Wunused-member-function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111305 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
2937fd9d48279ce1c9d44a6b8243aeafe1cb0ce1 |
17-Aug-2010 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Introduce -Wunused-method option for warning on unused class methods in anonymous namespace. This option is not part of the Unused diagnostic group until the warnings on llvm codebase are fixed and we are ready to turn it on. Suggestion by Daniel. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111298 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
3d27b107c515ab1a8fd47b33c41adcf5a65f465b |
17-Aug-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Introduce -Wunused-method option for warning on unused class methods in anonymous namespace. This option is not part of the Unused diagnostic group until the warnings on llvm codebase are fixed and we are ready to turn it on. Suggestion by Daniel. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111298 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
c7da607d9a4d48ca5917b4aca5b4abedd1893964 |
17-Aug-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Diagnose use of iboutletcollection on ivar/property of non-object types. Radar 8308053. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111296 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
3a3400b4fdf73887e9d8b4372334bc24a858702f |
17-Aug-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Diagnose use of iboutletcollection on ivar/property of non-object types. Radar 8308053. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111296 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
ec7853a94e27e9f2300578197639a115b5a6e96b |
17-Aug-2010 |
John McCall <rjmccall@apple.com> |
Implicit decl ref expressions might not have name locations; don't silently fail to instantiate them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111293 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
ec8045d3f0375302eadaa63deb373bacaf25a569 |
17-Aug-2010 |
John McCall <rjmccall@apple.com> |
Implicit decl ref expressions might not have name locations; don't silently fail to instantiate them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111293 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
3c414771dd09faf7277d629451f9e43bfc3dc4bf |
17-Aug-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to add type parameter support for attribute iboutletcollection. Radar 8308053. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111275 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
a8fb24fa3151567056f6125999cea69e39604f35 |
17-Aug-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to add type parameter support for attribute iboutletcollection. Radar 8308053. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111275 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
c6400fed4778191ce44b4b555df981e51d223322 |
17-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When generating code completion patterns for method declarations, give the resulting pattern the appropriate cursor kind of an instance or class method declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111237 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
16ed9ada523a990ca4bb5015c7bf8d0ead60c7d9 |
17-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
When generating code completion patterns for method declarations, give the resulting pattern the appropriate cursor kind of an instance or class method declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111237 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
a9cce1749de9094df7fc064c7708525dfe8b7fd7 |
17-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
1 != I. Fix the formulation of code-completion patterns for Objective-C method declarations with > 2 parameters. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111233 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
47c03a75d5a6d1dd4d9de21b9b3543e49b825809 |
17-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
1 != I. Fix the formulation of code-completion patterns for Objective-C method declarations with > 2 parameters. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111233 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
07f1c636bc60ee0c863003e37257f59d4fa978f4 |
17-Aug-2010 |
Benjamin Kramer <benny.kra@googlemail.com> |
Convert all uses of StringLiteral::getStrData() to StringLiteral::getString() and remove getStrData(). Patch by Peter Davies (with some tweaks). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111229 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExprObjC.cpp
|
2f4eaef37476ae6891ede8ba215d0f6fd093629b |
17-Aug-2010 |
Benjamin Kramer <benny.kra@googlemail.com> |
Convert all uses of StringLiteral::getStrData() to StringLiteral::getString() and remove getStrData(). Patch by Peter Davies (with some tweaks). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111229 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExprObjC.cpp
|
0ae379068b5281c6e12f0f1ede7066cdefde9ce4 |
17-Aug-2010 |
John McCall <rjmccall@apple.com> |
Don't try to initialize a reference with a constructed temporary if either of the classes is invalid. A class is invalid if a base is invalid. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111227 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaInit.cpp
|
572fc62b52b5b113cbaf528bd3ec00fcde19a46e |
17-Aug-2010 |
John McCall <rjmccall@apple.com> |
Don't try to initialize a reference with a constructed temporary if either of the classes is invalid. A class is invalid if a base is invalid. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111227 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaInit.cpp
|
facd22bd1f89e91de18f3d0c4c1baeac4a410592 |
17-Aug-2010 |
John McCall <rjmccall@apple.com> |
A field of incomplete type is sufficiently disruptive that we should mark the record invalid. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111211 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
2d7d2d99bc450ac1472086a6d57e77a1995297f8 |
17-Aug-2010 |
John McCall <rjmccall@apple.com> |
A field of incomplete type is sufficiently disruptive that we should mark the record invalid. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111211 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
4d161c2637ac59f9a396956092ca081a55770cb9 |
17-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement support for cached code completions for nested-name-specifiers. Also includes fixes to the generation of nested-name-specifier result in the non-cached case; we were producing lame results for namespaces and namespace aliases, which (1) didn't always have nested-name-specifiers when we want them, and (2) did not have the necessary "::" as part of the completion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111203 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
a5fb7c3b56c3698e19a7c1e97d41150de33cf6c9 |
17-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement support for cached code completions for nested-name-specifiers. Also includes fixes to the generation of nested-name-specifier result in the non-cached case; we were producing lame results for namespaces and namespace aliases, which (1) didn't always have nested-name-specifiers when we want them, and (2) did not have the necessary "::" as part of the completion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111203 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
5a29d4cffad3aa4f1dff971782c09aceb0afd0ce |
16-Aug-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Diagnose assiging to an interface object in non-fragile abi mode as sizes are not statically known. Fixes radar 8315734. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111191 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
57dae1a312e3f7591e957adc89776ef4bca6a097 |
16-Aug-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Diagnose assiging to an interface object in non-fragile abi mode as sizes are not statically known. Fixes radar 8315734. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111191 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
def7b5bc126f8c8da25fa1d7e9bd0c872b3a6700 |
16-Aug-2010 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Fix initialization for members of anonymous struct in a union. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111159 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
881b36ccbf8eaee709e7763369062a52f5961df1 |
16-Aug-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Fix initialization for members of anonymous struct in a union. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111159 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
4d5dc10bd027901dac14d305dcdc3f26bcf0029d |
16-Aug-2010 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Emit diagnostic error when the field of an anonymous struct is non trivial. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111158 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
dd7744d01e513e941f47893b16dfebae2c1c9911 |
16-Aug-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Emit diagnostic error when the field of an anonymous struct is non trivial. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111158 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
9cf955365328fd5615ede5512c0e6a3647c33e79 |
16-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When caching global completion results, keep track of the simplified type class, so that we can adjust priorities appropriately when the preferred type for the context and the actual type of the completion are similar. This gets us one step closer to parity of the cached completion results with the non-cached completion results. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111139 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
1827e10051638770ad9ccf3e285caf95f995afd1 |
16-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
When caching global completion results, keep track of the simplified type class, so that we can adjust priorities appropriately when the preferred type for the context and the actual type of the completion are similar. This gets us one step closer to parity of the cached completion results with the non-cached completion results. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111139 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
71734dbcecf25f58df4575cea422e5a7d07c8efa |
16-Aug-2010 |
Charles Davis <cdavis@mines.edu> |
Error out if reinterpret_casting between member pointers of two different sizes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111119 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
f231df318d8d937adb24f3db23c23c31ab378a82 |
16-Aug-2010 |
Charles Davis <cdavis@mines.edu> |
Error out if reinterpret_casting between member pointers of two different sizes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111119 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
6182971f718056359a4e0cb92481724fbf208d18 |
16-Aug-2010 |
Charles Davis <cdavis@mines.edu> |
Err on incomplete class types in member pointers when compiling for the Microsoft C++ ABI, for now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111118 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
d18f9f965bcfe56edcdf9b0d8375ffaad9866b3f |
16-Aug-2010 |
Charles Davis <cdavis@mines.edu> |
Err on incomplete class types in member pointers when compiling for the Microsoft C++ ABI, for now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111118 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
f9a0a1bf258304428c1f37eb461f01f323b9687a |
15-Aug-2010 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Don't warn for the common pattern of disallowing copying: class S { S(const S&); // DO NOT IMPLEMENT void operator=(const S&); // DO NOT IMPLEMENT }; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111100 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
06999f8ff61de3c63a52871bd7ac61e7ada9180b |
15-Aug-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Don't warn for the common pattern of disallowing copying: class S { S(const S&); // DO NOT IMPLEMENT void operator=(const S&); // DO NOT IMPLEMENT }; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111100 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
caea399c474ff56d8f379772bff1ebef78570717 |
15-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Extend the code-completion caching infrastructure to include global declarations (in addition to macros). Each kind of declaration maps to a certain set of completion contexts, and the ASTUnit completion logic introduces the completion strings for those declarations if the actual code-completion occurs in one of the contexts where it matters. There are a few new code-completion-context kinds. Without these, certain completions (e.g., after "using namespace") would need to suppress all global completions, which would be unfortunate. Note that we don't get the priorities right for global completions, because we don't have enough type information. We'll need a way to compare types in an ASTContext-agnostic way before this can be implemented. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111093 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
emaLookup.cpp
|
8071e4212ae08f8014e0c3ae6d18b7388003a5cc |
15-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Extend the code-completion caching infrastructure to include global declarations (in addition to macros). Each kind of declaration maps to a certain set of completion contexts, and the ASTUnit completion logic introduces the completion strings for those declarations if the actual code-completion occurs in one of the contexts where it matters. There are a few new code-completion-context kinds. Without these, certain completions (e.g., after "using namespace") would need to suppress all global completions, which would be unfortunate. Note that we don't get the priorities right for global completions, because we don't have enough type information. We'll need a way to compare types in an ASTContext-agnostic way before this can be implemented. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111093 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
emaLookup.cpp
|
b0ba616073d97f9b0037229954650f402b770044 |
15-Aug-2010 |
Eli Friedman <eli.friedman@gmail.com> |
Use Enumerators.data() instead of &Enumerators[0] to fix a potential assertion failure. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111092 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
de7a0fcdf9f30cb5a97aab614f3975d93cd9926f |
15-Aug-2010 |
Eli Friedman <eli.friedman@gmail.com> |
Use Enumerators.data() instead of &Enumerators[0] to fix a potential assertion failure. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111092 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
a256f5f41fbc9723df79ce52bf6c0855df786f06 |
15-Aug-2010 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Remove dead code, caught by unused function warnings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111091 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
ba6f816d633e3b88c38c6896c2d78d19489650f2 |
15-Aug-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Remove dead code, caught by unused function warnings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111091 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
36deee56466fd493211464cbcfef3dd4543a376c |
15-Aug-2010 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Commit improved version of 111026 & 111027. Unused warnings for functions: -static functions -functions in anonymous namespace -class methods in anonymous namespace -class method specializations in anonymous namespace -function specializations in anonymous namespace Unused warnings for variables: -static variables -variables in anonymous namespace -static data members in anonymous namespace -static data members specializations in anonymous namespace Reveals lots of opportunities for dead code removal in llvm codebase that will interest my esteemed colleagues. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111086 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDecl.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
bbc6454bb98d6a6ecbaafa715222c5db834307f2 |
15-Aug-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Commit improved version of 111026 & 111027. Unused warnings for functions: -static functions -functions in anonymous namespace -class methods in anonymous namespace -class method specializations in anonymous namespace -function specializations in anonymous namespace Unused warnings for variables: -static variables -variables in anonymous namespace -static data members in anonymous namespace -static data members specializations in anonymous namespace Reveals lots of opportunities for dead code removal in llvm codebase that will interest my esteemed colleagues. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111086 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDecl.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
fb803c306f342996367fe1facaa35851330473c2 |
14-Aug-2010 |
Eli Friedman <eli.friedman@gmail.com> |
PR3344: Downgrade "too many braces around scalar initializer" to a warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111067 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
09865a903affa9c08687859d8de65470064c7bc2 |
14-Aug-2010 |
Eli Friedman <eli.friedman@gmail.com> |
PR3344: Downgrade "too many braces around scalar initializer" to a warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111067 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
b5e64b39ff15ccc53e83c452425ac31f172ed7f6 |
14-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement caching of code-completion results for macro definitions when the CXTranslationUnit_CacheCompletionResults option is given to clang_parseTranslationUnit(). Essentially, we compute code-completion results for macro definitions after we have parsed the file, then store an ASTContext-agnostic version of those results (completion string, cursor kind, priority, and active contexts) in the ASTUnit. When performing code completion in that ASTUnit, we splice the macro definition results into the results provided by the actual code-completion (which has had macros turned off) before libclang gets those results. We use completion context information to only splice in those results that make sense for that context. With a completion involving all of the macros from Cocoa.h and a few other system libraries (totally ~8500 macro definitions) living in a precompiled header, we get about a 9% performance improvement from code completion, since we no longer have to deserialize all of the macro definitions from the precompiled header. Note that macro definitions are merely the canary; the cache is designed to also support other top-level declarations, which should be a bigger performance win. That optimization will be next. Note also that there is no mechanism for determining when to throw away the cache and recompute its contents. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111051 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
ema.cpp
emaCodeComplete.cpp
|
87c08a5d6b9e1e44ae6f554df40139d3a6f60b33 |
14-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement caching of code-completion results for macro definitions when the CXTranslationUnit_CacheCompletionResults option is given to clang_parseTranslationUnit(). Essentially, we compute code-completion results for macro definitions after we have parsed the file, then store an ASTContext-agnostic version of those results (completion string, cursor kind, priority, and active contexts) in the ASTUnit. When performing code completion in that ASTUnit, we splice the macro definition results into the results provided by the actual code-completion (which has had macros turned off) before libclang gets those results. We use completion context information to only splice in those results that make sense for that context. With a completion involving all of the macros from Cocoa.h and a few other system libraries (totally ~8500 macro definitions) living in a precompiled header, we get about a 9% performance improvement from code completion, since we no longer have to deserialize all of the macro definitions from the precompiled header. Note that macro definitions are merely the canary; the cache is designed to also support other top-level declarations, which should be a bigger performance win. That optimization will be next. Note also that there is no mechanism for determining when to throw away the cache and recompute its contents. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111051 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
ema.cpp
emaCodeComplete.cpp
|
c01a9412aa2701d5582f2c3c6e4787bb0a0c37e6 |
13-Aug-2010 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Revert 111026 & 111027, build breakage. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111036 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDecl.cpp
emaTemplateInstantiateDecl.cpp
|
05eac86d547892847ca95b5350e28d681150fa68 |
13-Aug-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Revert 111026 & 111027, build breakage. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111036 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDecl.cpp
emaTemplateInstantiateDecl.cpp
|
39e856609b8b56c5e120b48bf53d489b46dffdb2 |
13-Aug-2010 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
The unused warnings extravaganza continues. Warn for: -static variables -variables in anonymous namespace (fixes rdar://7794535) -static data members in anonymous namespace -static data members specializations in anonymous namespace git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111027 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDecl.cpp
emaTemplateInstantiateDecl.cpp
|
30c0dd86f0dc3c1a1fba29581d04e8ed0bdb659d |
13-Aug-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
The unused warnings extravaganza continues. Warn for: -static variables -variables in anonymous namespace (fixes rdar://7794535) -static data members in anonymous namespace -static data members specializations in anonymous namespace git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111027 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDecl.cpp
emaTemplateInstantiateDecl.cpp
|
04d50da8b699861aa7c631e1dd6b40376bd36690 |
13-Aug-2010 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Expand the unused warnings for functions. Warn for: -static function declarations -functions in anonymous namespace -class methods in anonymous namespace -class method specializations in anonymous namespace -function specializations in anonymous namespace git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111026 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDecl.cpp
emaTemplateInstantiateDecl.cpp
|
f6d1d43d68016e975f22264343631a55b9701495 |
13-Aug-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Expand the unused warnings for functions. Warn for: -static function declarations -functions in anonymous namespace -class methods in anonymous namespace -class method specializations in anonymous namespace -function specializations in anonymous namespace git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111026 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDecl.cpp
emaTemplateInstantiateDecl.cpp
|
85d6a41b8f1a0d389d1cacd48a838485e68b3013 |
13-Aug-2010 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Change Sema's UnusedStaticFuncs to UnusedFileScopedDecls to allow also keeping track of unused file scoped variables. This is only preparation, currently only static function definitions are tracked, as before. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111025 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDecl.cpp
|
49b96d1a382ae9f31456166f1a734d3f7f30b992 |
13-Aug-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Change Sema's UnusedStaticFuncs to UnusedFileScopedDecls to allow also keeping track of unused file scoped variables. This is only preparation, currently only static function definitions are tracked, as before. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111025 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDecl.cpp
|
7f987ac63fb3a284c1282b62de07d7bfdd995ea5 |
13-Aug-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
When issuing warning for future conflict resolution, (nonfragile-abi2), do not consider 'ivar' access in class methods. Also, improve on diagnostics. Radar 8304561. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111023 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
f759b4dc74fe8b0cc6e1350b860676ac9b853371 |
13-Aug-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
When issuing warning for future conflict resolution, (nonfragile-abi2), do not consider 'ivar' access in class methods. Also, improve on diagnostics. Radar 8304561. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111023 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
65d4b0717f8254022b2851ff8321f0a1b1b8c639 |
13-Aug-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Fixed NNS insertion in MemberPointerType. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111013 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
7bd067635df79f6ce4b9ffee394ea6d9e86e4290 |
13-Aug-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Fixed NNS insertion in MemberPointerType. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111013 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
eaf466983d13de87da816c6f460663e5dff77398 |
13-Aug-2010 |
John McCall <rjmccall@apple.com> |
Work around a crash when checking access to injected class names qua templates. The current fix suppresses the access check entirely in this case; to do better, we'd need to be able to say that a particular lookup result came from a particular injected class name, which is not easy to do with the current representation of LookupResult. This is on my known-problems list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111009 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
8ba6691248004e1a726ba5f29d717950f8054507 |
13-Aug-2010 |
John McCall <rjmccall@apple.com> |
Work around a crash when checking access to injected class names qua templates. The current fix suppresses the access check entirely in this case; to do better, we'd need to be able to say that a particular lookup result came from a particular injected class name, which is not easy to do with the current representation of LookupResult. This is on my known-problems list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111009 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
3b4b03ffddbcdc9be55c8eb54c6b490b4722b1cd |
13-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Teach ASTUnit to hold on to the Sema object and ASTConsumer that are used when parsing (or re-parsing) a file. Also, when loading a precompiled header into ASTUnit, create a Sema object that holds onto semantic-analysis information. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111003 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
914ed9d30e9abf829a62aa996b083b1e47c19ff6 |
13-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Teach ASTUnit to hold on to the Sema object and ASTConsumer that are used when parsing (or re-parsing) a file. Also, when loading a precompiled header into ASTUnit, create a Sema object that holds onto semantic-analysis information. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111003 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
054f0821dff26979423ccdfd09846d579af24781 |
13-Aug-2010 |
John McCall <rjmccall@apple.com> |
Perform access control when template lookup finds a class template. This is *really* hacky. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110997 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
b8592063413d277f6583715c9a890bd58440c1d1 |
13-Aug-2010 |
John McCall <rjmccall@apple.com> |
Perform access control when template lookup finds a class template. This is *really* hacky. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110997 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
1b21c5748eeb17fbe28d96c73e96f70001495043 |
13-Aug-2010 |
Eli Friedman <eli.friedman@gmail.com> |
Zap unused UnaryOperator::OffsetOf. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110996 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExpr.cpp
|
de7e66256b1bdfcf6526994825a8c8fced52a31c |
13-Aug-2010 |
Eli Friedman <eli.friedman@gmail.com> |
Zap unused UnaryOperator::OffsetOf. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110996 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExpr.cpp
|
735b542c2c94910a3d522283864f85c27ff602cf |
13-Aug-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Instead of modifying the ObjC AST to not modify existing declarations, teach chained PCH to overwrite declarations from earlier PCH files in dependent ones. Tell Sema to note when it changes AST nodes so that they have to be reserialized. Finally, the ObjCProtocolDecls created in forward decls, like the ObjCInterfaceDecls in @class forward decls, are not lexically part of the decl context; only the definition is. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110989 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
0b17c61e8f143901ce11b4a6e5129ac63aaeee04 |
13-Aug-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Instead of modifying the ObjC AST to not modify existing declarations, teach chained PCH to overwrite declarations from earlier PCH files in dependent ones. Tell Sema to note when it changes AST nodes so that they have to be reserialized. Finally, the ObjCProtocolDecls created in forward decls, like the ObjCInterfaceDecls in @class forward decls, are not lexically part of the decl context; only the definition is. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110989 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
ba91143029e953e8e813d3f4d2bafef96ba52770 |
13-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Add a ParseAST overload that takes a Sema object, so that the caller can create (and hold on to) the Sema object. Also, move Sema-related initialization/finalization with its various consumers and external sources into the Sema constructor and destructor, rather than placing it in ParseAST. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110973 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
ema.cpp
|
46ea32a4b54481b7575499cb9f8d275f1d4cdd54 |
13-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Add a ParseAST overload that takes a Sema object, so that the caller can create (and hold on to) the Sema object. Also, move Sema-related initialization/finalization with its various consumers and external sources into the Sema constructor and destructor, rather than placing it in ParseAST. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110973 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
ema.cpp
|
1f5939d127c655459162cc9ea5b37c8a7c830287 |
13-Aug-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Typo. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110965 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
80a785c2452c73b7c41d4a867edcf5a090c78c46 |
13-Aug-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Typo. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110965 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
75a87ecc0bd54e9daf185a2814d902fa347a4c4e |
13-Aug-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to issue warning when colllection expresion's type does not implement 'countByEnumeratingWithState' API. Implements radar 7634669. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110964 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
ea16110ce3a4fbb205735f0a55050bc11292e82c |
13-Aug-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to issue warning when colllection expresion's type does not implement 'countByEnumeratingWithState' API. Implements radar 7634669. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110964 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
2340ba00f3e312e9df014e474531270d3263550d |
12-Aug-2010 |
John McCall <rjmccall@apple.com> |
Implement -Wcast-align. The initial design of this diagnostic diverges from GCC's in that we warn on *any* increase in alignment requirements, not just those that are enforced by hardware. Please let us know if this causes major problems for you (which it shouldn't, since it's an optional warning). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110959 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaChecking.cpp
emaExpr.cpp
|
b7f4ffe073fa419613946461a2583ba2fcb72280 |
12-Aug-2010 |
John McCall <rjmccall@apple.com> |
Implement -Wcast-align. The initial design of this diagnostic diverges from GCC's in that we warn on *any* increase in alignment requirements, not just those that are enforced by hardware. Please let us know if this causes major problems for you (which it shouldn't, since it's an optional warning). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110959 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaChecking.cpp
emaExpr.cpp
|
f4053ff5bff552d63919155e5f429cead6c391e1 |
12-Aug-2010 |
John McCall <rjmccall@apple.com> |
Fixing the build isn't good enough; back out r110956 and r110953. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110958 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
ema.cpp
|
d69fd7f34fd2de35845e834e987009efec09b937 |
12-Aug-2010 |
John McCall <rjmccall@apple.com> |
Fixing the build isn't good enough; back out r110956 and r110953. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110958 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
ema.cpp
|
1f1191348d3a77353d289bef17117963d52f2cd5 |
12-Aug-2010 |
John McCall <rjmccall@apple.com> |
dgregor should write code that compiles. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110956 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
ema.cpp
|
e783d000b13283ca45fbf56e735404e86c9e990d |
12-Aug-2010 |
John McCall <rjmccall@apple.com> |
dgregor should write code that compiles. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110956 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
ema.cpp
|
2417511680a15c64abb232b984f1082d36fe3bfe |
12-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Add a ParseAST overload that takes a Sema object, so that the caller can create (and hold on to) the Sema object. Also, move Sema-related initialization/finalization with its various consumers and external sources into the Sema constructor and destructor, rather than placing it in ParseAST. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110952 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
ema.cpp
|
0eeb81baac6e82b065c0b03ad28ad1e580e78790 |
12-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Add a ParseAST overload that takes a Sema object, so that the caller can create (and hold on to) the Sema object. Also, move Sema-related initialization/finalization with its various consumers and external sources into the Sema constructor and destructor, rather than placing it in ParseAST. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110952 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
ema.cpp
|
c0e51be6ec0f57f9caaf16bdd3ef20a8b37466c9 |
12-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Move Sema's headers into include/clang/Sema, renaming a few along the way. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110945 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
nalysisBasedWarnings.h
XXFieldCollector.h
odeCompleteConsumer.cpp
dentifierResolver.cpp
dentifierResolver.h
umpDiagnostics.cpp
ookup.h
arseAST.cpp
ema.cpp
ema.h
emaAccess.cpp
emaAttr.cpp
emaCXXCast.cpp
emaCXXScopeSpec.cpp
emaChecking.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExceptionSpec.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaInit.cpp
emaInit.h
emaLookup.cpp
emaObjCProperty.cpp
emaOverload.cpp
emaOverload.h
emaStmt.cpp
emaTemplate.cpp
emaTemplate.h
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
argetAttributesSema.cpp
reeTransform.h
|
e737f5041a36d0befb39ffeed8d50ba15916d3da |
12-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Move Sema's headers into include/clang/Sema, renaming a few along the way. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110945 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
nalysisBasedWarnings.h
XXFieldCollector.h
odeCompleteConsumer.cpp
dentifierResolver.cpp
dentifierResolver.h
umpDiagnostics.cpp
ookup.h
arseAST.cpp
ema.cpp
ema.h
emaAccess.cpp
emaAttr.cpp
emaCXXCast.cpp
emaCXXScopeSpec.cpp
emaChecking.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExceptionSpec.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaInit.cpp
emaInit.h
emaLookup.cpp
emaObjCProperty.cpp
emaOverload.cpp
emaOverload.h
emaStmt.cpp
emaTemplate.cpp
emaTemplate.h
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
argetAttributesSema.cpp
reeTransform.h
|
4b95a9589ccec1a4715823cc0a6cced5b354cc0c |
12-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Downgrade error about nonnull attribute bbeing applied to a function without point arguments to a warning git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110939 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
c9ef405559c90fc98b016d00aeae8afbc31c6bf6 |
12-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Downgrade error about nonnull attribute bbeing applied to a function without point arguments to a warning git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110939 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
e58479760ac3cc56f8f59ddf7e25982298581bf2 |
12-Aug-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Added locations and type source info for DeclarationName inside UsingDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110912 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
|
ef3dce817d43faadbf21ce9102d33a9d84b02e09 |
12-Aug-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Added locations and type source info for DeclarationName inside UsingDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110912 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
|
c86cc5ddd65451de8551a9978664afe16646690f |
12-Aug-2010 |
Jordy Rose <jediknil@belkadan.com> |
Remove OwnershipAttr::Kind, since it's essentially redundant with attr::Kind the way it's being used. Also fix isa<OwnershipAttr> support, break more-than-80-char lines, and other miscellaneous ownership attr cleanup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110908 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
2a479929f70d32f626778ef6e70ef46d3a37f74e |
12-Aug-2010 |
Jordy Rose <jediknil@belkadan.com> |
Remove OwnershipAttr::Kind, since it's essentially redundant with attr::Kind the way it's being used. Also fix isa<OwnershipAttr> support, break more-than-80-char lines, and other miscellaneous ownership attr cleanup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110908 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
c31a00f249022eb3d805174e1820b2177ed25bfb |
12-Aug-2010 |
John McCall <rjmccall@apple.com> |
Handle the obvious case for diagnosing redeclarations of extern "C" functions. Fixes PR7859. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110906 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
7b49202090678f45fa0c0bb5fa560d8a27b0c604 |
12-Aug-2010 |
John McCall <rjmccall@apple.com> |
Handle the obvious case for diagnosing redeclarations of extern "C" functions. Fixes PR7859. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110906 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
ec151e5e219df8ff0a7730a529c2495d71f553ef |
12-Aug-2010 |
John McCall <rjmccall@apple.com> |
Bail out of MaybeBindToTemporary if the record type is invalid. Test case is 8.5MB, sorry. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110901 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
507384f0074498b658cc1455dbb912dd95455512 |
12-Aug-2010 |
John McCall <rjmccall@apple.com> |
Bail out of MaybeBindToTemporary if the record type is invalid. Test case is 8.5MB, sorry. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110901 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
76eb8d61627d40936bcad1033eb64b689ea3d773 |
12-Aug-2010 |
John McCall <rjmccall@apple.com> |
Fix a crash on invalid when declaring an implicit member of a class with an invalid destructor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110891 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
fcadea2556be268121a6216e367bbe3598c4008e |
12-Aug-2010 |
John McCall <rjmccall@apple.com> |
Fix a crash on invalid when declaring an implicit member of a class with an invalid destructor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110891 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
eacd78999ca9f547490a68a9790fd9679085e3e3 |
12-Aug-2010 |
John McCall <rjmccall@apple.com> |
Don't try to implicitly declare special members of an invalid class. Fixes a crash in a rather large and difficult-to-reduce test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110882 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
b3b50a8b2c91d21afda75c458ca7d210abf6ffbf |
12-Aug-2010 |
John McCall <rjmccall@apple.com> |
Don't try to implicitly declare special members of an invalid class. Fixes a crash in a rather large and difficult-to-reduce test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110882 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
f7401424f9b5b4648e180a80a6552e6e93c802ae |
12-Aug-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Added locations and type source info for DeclarationName. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110860 91177308-0d34-0410-b5e6-96231b3b80d8
ookup.h
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaLookup.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
2577743c5650c646fb705df01403707e94f2df04 |
12-Aug-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Added locations and type source info for DeclarationName. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110860 91177308-0d34-0410-b5e6-96231b3b80d8
ookup.h
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaLookup.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
142156997e12aa4eb334ce40cd75214a827854a5 |
11-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Once code completion has completed, pass a "completion context" on to the code-completion consumer. The consumer can use this information to augument, filter, or display the code-completion results. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110858 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
ema.h
emaCodeComplete.cpp
|
e6b1bb6e7fe906d164637ca33503b8fafdbc99e5 |
11-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Once code completion has completed, pass a "completion context" on to the code-completion consumer. The consumer can use this information to augument, filter, or display the code-completion results. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110858 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
ema.h
emaCodeComplete.cpp
|
4dce59ced76d0b5cf548e996524aad884b73c17c |
11-Aug-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
IRGen support for functions returning objc object types. Fixes PR7865. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110832 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
faa3449a0f8b61ff25bd6aba78c50cabab213c24 |
11-Aug-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
IRGen support for functions returning objc object types. Fixes PR7865. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110832 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
3a94ead68999280f109ffccc0a48a2a7d88e436d |
11-Aug-2010 |
Benjamin Kramer <benny.kra@googlemail.com> |
Random temporary string cleanup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110807 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExpr.cpp
emaTemplate.cpp
|
476d8b863cb65b2b5833235d97315cdb46e6f5aa |
11-Aug-2010 |
Benjamin Kramer <benny.kra@googlemail.com> |
Random temporary string cleanup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110807 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExpr.cpp
emaTemplate.cpp
|
f512ed7404e188e2aa1dcca4b53ea843b88e556c |
11-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
If name lookup finds different type declarations in different scopes that actually refer to the same underlying type, it is not an ambiguity; add uniquing support based on the canonical type of type declarations. Fixes <rdar://problem/8296180>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110806 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
7f1c547ee6cd413845f7df9713c701f99866f91d |
11-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
If name lookup finds different type declarations in different scopes that actually refer to the same underlying type, it is not an ambiguity; add uniquing support based on the canonical type of type declarations. Fixes <rdar://problem/8296180>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110806 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
5a24acfed51d1233e325f43af5b2147ad9c31e04 |
11-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Speculatively revert r110610 " Make ObjCInterfaceDecl redeclarable, and create separate decl nodes for forward declarations and the definition," which appears to be causing significant Objective-C breakage. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110803 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclObjC.cpp
|
deacbdca554298ccdf636f19c6094a8825ec6b34 |
11-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Speculatively revert r110610 " Make ObjCInterfaceDecl redeclarable, and create separate decl nodes for forward declarations and the definition," which appears to be causing significant Objective-C breakage. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110803 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclObjC.cpp
|
7aec899c576f2c168b8cd8f68324ec4493960cee |
11-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve our handling of user-defined conversions when computing implicit conversion sequences. In particular, model the "standard conversion" from a class to its own type (or a base type) directly as a standard conversion in the normal path *without* trying to determine if there is a valid copy constructor. This appears to match the intent of C++ [over.best.ics]p6 and more closely matches GCC and EDG. As part of this, model non-lvalue reference initialization via user-defined conversion in overloading the same way we handle it in InitializationSequence, separating the "general user-defined conversion" and "conversion to compatible class type" cases. The churn in the overload-call-copycon.cpp test case is because the test case was originally wrong; it assumed that we should do more checking for copy constructors that we actually should, which affected overload resolution. Fixes PR7055. Bootstrapped okay. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110773 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
604eb65686590f73551d4ea608b174d2244cdd0f |
11-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Improve our handling of user-defined conversions when computing implicit conversion sequences. In particular, model the "standard conversion" from a class to its own type (or a base type) directly as a standard conversion in the normal path *without* trying to determine if there is a valid copy constructor. This appears to match the intent of C++ [over.best.ics]p6 and more closely matches GCC and EDG. As part of this, model non-lvalue reference initialization via user-defined conversion in overloading the same way we handle it in InitializationSequence, separating the "general user-defined conversion" and "conversion to compatible class type" cases. The churn in the overload-call-copycon.cpp test case is because the test case was originally wrong; it assumed that we should do more checking for copy constructors that we actually should, which affected overload resolution. Fixes PR7055. Bootstrapped okay. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110773 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
3033151c61b805decd24edbbdff4b5d6261ab33d |
10-Aug-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Fix a spurious warning when message sent to qualified-id type receiver (pr7861). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110696 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
ba551983016ee3eac5421255d2ebe6723e61befb |
10-Aug-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Fix a spurious warning when message sent to qualified-id type receiver (pr7861). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110696 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
90d08343bc624e13ceee7e6247c1d96ca354a184 |
10-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Eliminate unnecessary uses of TemporaryBase in TreeTransform; transforming TypeSourceInfos already gives us proper (and better) source-location information. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110678 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
9bcd4d4a4b9281ba3526b0e86e6d422db93a9074 |
10-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Eliminate unnecessary uses of TemporaryBase in TreeTransform; transforming TypeSourceInfos already gives us proper (and better) source-location information. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110678 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
19b97d223f518dc56b2b20d7f676aa3172eb258e |
10-Aug-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Fixed redundant NNS loading. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110677 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaType.cpp
reeTransform.h
|
22f638a58ed05579c51ee6a35a1d16a7c2157f90 |
10-Aug-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Fixed redundant NNS loading. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110677 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaType.cpp
reeTransform.h
|
53b1f07486423ff3b40eae2530ab805fae553e82 |
10-Aug-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Added TypeLocs to VAArgExpr node. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110666 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
reeTransform.h
|
2cad900202561cdda18ea6cc51ddbf3e20e3c23a |
10-Aug-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Added TypeLocs to VAArgExpr node. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110666 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
reeTransform.h
|
8b2ab3d4c434dcd30cb229b0dfdbe35a0679d5d5 |
10-Aug-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Added TypeLocs to TypesCompatibleExpr node. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110663 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
reeTransform.h
|
3fcb73dae91be42b071cf0dde9222b7ec362146d |
10-Aug-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Added TypeLocs to TypesCompatibleExpr node. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110663 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
reeTransform.h
|
c06ecd3636336448c1a788ff532b2e23e807740e |
10-Aug-2010 |
Eli Friedman <eli.friedman@gmail.com> |
Fix redefinition of typedefs of fixable variably-modified array types; should fix an issue compiling <windows.h>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110651 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
bf87f2c1c6e2d8cb50902a6d79e8b170c19570d2 |
10-Aug-2010 |
Eli Friedman <eli.friedman@gmail.com> |
Fix redefinition of typedefs of fixable variably-modified array types; should fix an issue compiling <windows.h>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110651 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
2a28e0e5425568c7d7c936281c25fa65ece9e524 |
10-Aug-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Implements gcc's -Wstrict-selector-match. (radar 8127244). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110622 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
emaExprObjC.cpp
|
6b308f6dc7d8f1581c52095f435c0e1284b111d8 |
10-Aug-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Implements gcc's -Wstrict-selector-match. (radar 8127244). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110622 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
emaExprObjC.cpp
|
832ac55dfb8df3332313e90da0dbc62dfe720ab9 |
10-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When attempting to recover from a failed unqualified name lookup, make sure to clear out the LookupResult structure after looking into each class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110615 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e26f0432c20de7034f414809628d10bfd961ca04 |
10-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
When attempting to recover from a failed unqualified name lookup, make sure to clear out the LookupResult structure after looking into each class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110615 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
9d202272883096751921e0860f9df659d4ab66b6 |
09-Aug-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
- Make ObjCInterfaceDecl redeclarable, and create separate decl nodes for forward declarations and the definition. - Eagerly create ObjCInterfaceTypes for declarations. - The two above changes lead to a 0.5% increase in memory use and no speed regression when parsing Cocoa.h. On the other hand, now chained PCH works when there's a forward declaration in one PCH and the interface definition in another. - Add HandleInterestingDecl to ASTConsumer. PCHReader passes the "interesting" decls it finds to this function instead of HandleTopLevelDecl. The default implementation forwards to HandleTopLevelDecl, but ASTUnit's handler for example ignores them. This fixes a potential crash when lazy loading of PCH data would cause ASTUnit's "top level" declaration collection to change while being iterated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110610 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclObjC.cpp
|
74c730ad1f6818b676b0bad46d806a9176950328 |
09-Aug-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
- Make ObjCInterfaceDecl redeclarable, and create separate decl nodes for forward declarations and the definition. - Eagerly create ObjCInterfaceTypes for declarations. - The two above changes lead to a 0.5% increase in memory use and no speed regression when parsing Cocoa.h. On the other hand, now chained PCH works when there's a forward declaration in one PCH and the interface definition in another. - Add HandleInterestingDecl to ASTConsumer. PCHReader passes the "interesting" decls it finds to this function instead of HandleTopLevelDecl. The default implementation forwards to HandleTopLevelDecl, but ASTUnit's handler for example ignores them. This fixes a potential crash when lazy loading of PCH data would cause ASTUnit's "top level" declaration collection to change while being iterated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110610 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclObjC.cpp
|
f14c94246a3e098aee463411b90da4f0f2eacaaf |
09-Aug-2010 |
John Thompson <john.thompson.jtsoftware@gmail.com> |
Added vecreturn attribute parsing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110609 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
35cc9627340b15232139b3c43fcde5973e7fad30 |
09-Aug-2010 |
John Thompson <John.Thompson.JTSoftware@gmail.com> |
Added vecreturn attribute parsing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110609 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
fe8488fad82a237ad0fdc3a919261d0630f61662 |
08-Aug-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Fix a crash on template delete operators. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110542 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
09556fd1fb576144e2beda023bf3386f2292243b |
08-Aug-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Fix a crash on template delete operators. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110542 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
7046895094d6b2ef8bdf35804b24a03dddab6eb2 |
08-Aug-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Silence GCC warning about && and || without explicit grouping. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110537 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
c45eb9cad8beb8a2be275cafeaa5fe4de823ac29 |
08-Aug-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Silence GCC warning about && and || without explicit grouping. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110537 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
126ac1061a3645bb1406a34b787620a60bda141f |
08-Aug-2010 |
Eli Friedman <eli.friedman@gmail.com> |
PR7800: both virtual and non-virtual bases must be marked as used for VTTs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110526 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
0d30a87e124bb0273fedce3b62401039073fdece |
08-Aug-2010 |
Eli Friedman <eli.friedman@gmail.com> |
PR7800: both virtual and non-virtual bases must be marked as used for VTTs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110526 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
863a7698ac2f146d93bb15190ab0be260fb7ef6d |
07-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Integral-to-pointer conversions are not always null -> member pointer conversions. Fixes PR7443. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110519 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
443c21266f189ed48c32cadf72c463e9b992b3eb |
07-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Integral-to-pointer conversions are not always null -> member pointer conversions. Fixes PR7443. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110519 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
1e41bace58c717aade6f84d7ab35fe7cc0fbd2da |
07-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix an Objective-C crasher, PR7839. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110515 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
59c451ef236ec5af8fecc7291f5cb87a3ea6e799 |
07-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Fix an Objective-C crasher, PR7839. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110515 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
e004547e55aa2e69d1a7ee3d037605c5b1e9f6c3 |
07-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Allow reference binding of a reference of Objective-C object type to an lvalue of another, compatible Objective-C object type (e.g., a subclass). Introduce a new initialization sequence step kind to describe this binding, along with a new cast kind. Fixes PR7741. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110513 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXCast.cpp
emaInit.cpp
emaInit.h
emaOverload.cpp
|
569c3166874324c24011f8ade6978421f0d39b3c |
07-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Allow reference binding of a reference of Objective-C object type to an lvalue of another, compatible Objective-C object type (e.g., a subclass). Introduce a new initialization sequence step kind to describe this binding, along with a new cast kind. Fixes PR7741. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110513 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXCast.cpp
emaInit.cpp
emaInit.h
emaOverload.cpp
|
0cf5885d618c1de7806e691c328c1540fa040a19 |
07-Aug-2010 |
John McCall <rjmccall@apple.com> |
Store inheritance paths after CastExprs instead of inside them. This takes some trickery since CastExpr has subclasses (and indeed, is abstract). Also, smoosh the CastKind into the bitfield from Expr. Drops two words of storage from Expr in the common case of expressions which don't need inheritance paths. Avoids a separate allocation and another word of overhead in cases needing inheritance paths. Also has the advantage of not leaking memory, since destructors for AST nodes are never run. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110507 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaCXXCast.cpp
emaChecking.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
|
f871d0cc377a1367b519a6cce26be74607566eba |
07-Aug-2010 |
John McCall <rjmccall@apple.com> |
Store inheritance paths after CastExprs instead of inside them. This takes some trickery since CastExpr has subclasses (and indeed, is abstract). Also, smoosh the CastKind into the bitfield from Expr. Drops two words of storage from Expr in the common case of expressions which don't need inheritance paths. Avoids a separate allocation and another word of overhead in cases needing inheritance paths. Also has the advantage of not leaking memory, since destructors for AST nodes are never run. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110507 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaCXXCast.cpp
emaChecking.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
|
039bfd7e038eb852c66be03bb34c47fa2a7b79a7 |
07-Aug-2010 |
Eli Friedman <eli.friedman@gmail.com> |
PR7837: For qualified id's, make sure the decl context is complete if not dependent in ActOnIdExpression. (This issue only shows up with member operators because an operator is never a type.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110486 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
647c8b32c2a6e38ee44dde1782a629e9c03786e2 |
07-Aug-2010 |
Eli Friedman <eli.friedman@gmail.com> |
PR7837: For qualified id's, make sure the decl context is complete if not dependent in ActOnIdExpression. (This issue only shows up with member operators because an operator is never a type.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110486 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
d70fdd0b955938a8350ec5f042bea548ebecdaa5 |
06-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Remove some incorrect assertions when deduction template arguments in a template-argument-list. When template template parameters are involved, we won't already have checked the template-argument-list (it may not be known yet!). Fixes PR7807. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110444 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
caadc127fef2a5ce5dddae0d3ac6a582c285baff |
06-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Remove some incorrect assertions when deduction template arguments in a template-argument-list. When template template parameters are involved, we won't already have checked the template-argument-list (it may not be known yet!). Fixes PR7807. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110444 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
8c64d0c89b0a504e19dc51127bd8092beba90e90 |
06-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Make sure that we diagnose attribute((overloadable)) functions without prototypes. Fixes PR7738. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110443 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d945538a36642cb0f935b268acbc32a67fae85a6 |
06-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Make sure that we diagnose attribute((overloadable)) functions without prototypes. Fixes PR7738. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110443 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
3f9e851a291c4747d085f5d1390299381ffcf42d |
06-Aug-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Template keyword should not be ignored building a QualifiedTemplateName. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110441 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplate.cpp
|
7c15353ccaed24f2df932571166bf305c1b98b6d |
06-Aug-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Template keyword should not be ignored building a QualifiedTemplateName. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110441 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplate.cpp
|
a58644c271d16285cc9e46593a7a66e2367e9a08 |
06-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Diagnose the use of "inline" on block-scope function declarations in C++, from Andrea Nall! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110439 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
ed328c6129152f66771c3bed338a2e6e13e4e230 |
06-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Diagnose the use of "inline" on block-scope function declarations in C++, from Andrea Nall! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110439 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
78e544db7a28b16601365de08d4a352459b11071 |
06-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Introduce implicit conversions between AltiVec vectors and GCC vectors, from Anton Yartsev! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110437 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaOverload.cpp
|
255210ef415b9893f0e3794e8d9a704194c12f3c |
06-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Introduce implicit conversions between AltiVec vectors and GCC vectors, from Anton Yartsev! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110437 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaOverload.cpp
|
794c6eb2e42c58ba28b94e413956d60371789345 |
06-Aug-2010 |
Nick Lewycky <nicholas@mxc.ca> |
Remove the DeclaredInCondition bit now that it's no longer used. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110432 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
|
a834888ecc3ea36ea78a585209f422c7730d437a |
06-Aug-2010 |
Nick Lewycky <nicholas@mxc.ca> |
Remove the DeclaredInCondition bit now that it's no longer used. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110432 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
|
796fc882892c47774537f913814b41f885dacc2d |
06-Aug-2010 |
John McCall <rjmccall@apple.com> |
Properly pop out of Objective-C method declarations when they are (ill-formedly) found within contexts other than the translation unit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110417 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
9983d2d76c8107672b5907124266f482ba03823f |
06-Aug-2010 |
John McCall <rjmccall@apple.com> |
Properly pop out of Objective-C method declarations when they are (ill-formedly) found within contexts other than the translation unit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110417 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
52c93a458b1d37820827068e0af88f338faadf16 |
05-Aug-2010 |
Eli Friedman <eli.friedman@gmail.com> |
Flip the switch to use OffsetOfExpr unconditionally; feel free to revert if this breaks something. I'll wait a few days before cleaning out UnaryOperator::OffsetOf. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110328 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
5a15dc1a4348338e9a026a24c8d9a59f2bdd5ecf |
05-Aug-2010 |
Eli Friedman <eli.friedman@gmail.com> |
Flip the switch to use OffsetOfExpr unconditionally; feel free to revert if this breaks something. I'll wait a few days before cleaning out UnaryOperator::OffsetOf. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110328 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
f604370f01d0571ce31c6cad16bb5da6a1c82451 |
05-Aug-2010 |
Eli Friedman <eli.friedman@gmail.com> |
PR7769: Fix references to anonymous structs/unions in base classes in offsetof expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110327 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
19410a7e8ff6df550eb776574950d352a1de2bd8 |
05-Aug-2010 |
Eli Friedman <eli.friedman@gmail.com> |
PR7769: Fix references to anonymous structs/unions in base classes in offsetof expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110327 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
89cc2c329f847a0130e07320136ebd80003076be |
05-Aug-2010 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Store the pending implicit instantiations in the PCH and perform them at the end of the translation unit that included the PCH, as God intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110324 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
0e0363866792b309d70e9c8e92b4c239773af89c |
05-Aug-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Store the pending implicit instantiations in the PCH and perform them at the end of the translation unit that included the PCH, as God intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110324 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
eace58812aa8b0d5c0d21acb5d4f796579306528 |
05-Aug-2010 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Support #pragma weak for PCH. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110323 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
72b90571b1783b17c3f2204cec5ca440edc38bee |
05-Aug-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Support #pragma weak for PCH. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110323 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
ca106a69001c59799e84703ddc619d4ecf6d84b1 |
05-Aug-2010 |
John McCall <rjmccall@apple.com> |
TDK_InconsistentQuals is really totally different from TDK_Inconsistent. Rename it to TDK_Underqualified to avoid this sort of confusion and give it its own diagnostic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110318 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaOverload.cpp
emaTemplateDeduction.cpp
|
57e97786433e70197a089360228d8f0d82e3ad4c |
05-Aug-2010 |
John McCall <rjmccall@apple.com> |
TDK_InconsistentQuals is really totally different from TDK_Inconsistent. Rename it to TDK_Underqualified to avoid this sort of confusion and give it its own diagnostic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110318 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaOverload.cpp
emaTemplateDeduction.cpp
|
0629e6403126369d15585aeed9a7f6faf7f5cf17 |
05-Aug-2010 |
Eli Friedman <eli.friedman@gmail.com> |
Implement #pragma GCC visibility. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110315 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaAttr.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
|
aa8b0d19244a6e7e8e5798fcc6aef003c274d3e0 |
05-Aug-2010 |
Eli Friedman <eli.friedman@gmail.com> |
Implement #pragma GCC visibility. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110315 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaAttr.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
|
d3ce05fd7c50d631742c866e62da87fa2bd32dc9 |
05-Aug-2010 |
Nick Lewycky <nicholas@mxc.ca> |
Remove the warning for variables declared in the if-expression being used in the else clause. The problem is that it's overly zealous and will respond to uses in assignments, or after assignments. We should bring this back once we can do it right. Fixes PR7100. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110314 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
c133e9ea17d61062bcfb3bd6009c300c9a78161f |
05-Aug-2010 |
Nick Lewycky <nicholas@mxc.ca> |
Remove the warning for variables declared in the if-expression being used in the else clause. The problem is that it's overly zealous and will respond to uses in assignments, or after assignments. We should bring this back once we can do it right. Fixes PR7100. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110314 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
af9bd0d681bb885f7cc43b3585dc8d6d28af4eb9 |
05-Aug-2010 |
John McCall <rjmccall@apple.com> |
Permit template argument deduction to add qualifiers within ObjC object pointers like it can with normal and member pointers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110313 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
db0bc4706c4bda8e9166f40b5c7cfda656100818 |
05-Aug-2010 |
John McCall <rjmccall@apple.com> |
Permit template argument deduction to add qualifiers within ObjC object pointers like it can with normal and member pointers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110313 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
f98434632e9c9825fffbd2ecb23625ff5d222f14 |
05-Aug-2010 |
Eli Friedman <eli.friedman@gmail.com> |
Preserve calling convention etc. across template instantiations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110304 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateDeduction.cpp
emaType.cpp
reeTransform.h
|
fa869547eb1cab12d7e0c0dfa8ba594e336b9b32 |
05-Aug-2010 |
Eli Friedman <eli.friedman@gmail.com> |
Preserve calling convention etc. across template instantiations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110304 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateDeduction.cpp
emaType.cpp
reeTransform.h
|
2fd2f7e034165b23a762bf9221adaee5c0599786 |
05-Aug-2010 |
Eli Friedman <eli.friedman@gmail.com> |
Get rid of isObjectType; when C++ says "object type", it generally just means "not a function type", not "not a function type or void". This changes behavior slightly, but generally in a way which accepts more code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110303 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaOverload.cpp
emaTemplate.cpp
|
1357869bc5983cdfbc986db1f3d18265bb34cb0e |
05-Aug-2010 |
Eli Friedman <eli.friedman@gmail.com> |
Get rid of isObjectType; when C++ says "object type", it generally just means "not a function type", not "not a function type or void". This changes behavior slightly, but generally in a way which accepts more code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110303 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaOverload.cpp
emaTemplate.cpp
|
a97f688443c01361b6c6bf706767a5cd154e5d7d |
05-Aug-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Remove a redundant and broken check. Fixes PR7810. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110294 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
58e5539df7d9d1f003912fccb8d524d4f2c6846a |
05-Aug-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Remove a redundant and broken check. Fixes PR7810. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110294 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
45d601d89d224db758b2c7f7dab655751a57e510 |
04-Aug-2010 |
Ted Kremenek <kremenek@apple.com> |
Teach SemaChecking::CheckReturnStackAddr about ImplicitCastExprs that convert values to an lvalue. This allows us to warn (again) about returning references to stack variables. (fixes PR 7812). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110242 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
68957a919084ab8bbd1f01d534db1d6f31d0f459 |
04-Aug-2010 |
Ted Kremenek <kremenek@apple.com> |
Teach SemaChecking::CheckReturnStackAddr about ImplicitCastExprs that convert values to an lvalue. This allows us to warn (again) about returning references to stack variables. (fixes PR 7812). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110242 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
032a73441a64b80e3afb55c58cd3690acc990357 |
04-Aug-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Add code-completion support directly to ASTUnit, which performs code completion within the translation unit using the same command-line arguments for parsing the translation unit. Eventually, we'll reuse the precompiled preamble to improve code-completion performance, and this also gives us a place to cache results. Expose this function via the new libclang function clang_codeCompleteAt(), which performs the code completion within a CXTranslationUnit. The completion occurs in-process (clang_codeCompletion() runs code completion out-of-process). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110210 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
|
1abc6bca3d7fb0e7b1e40fbcad6cfb5e10594548 |
04-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Add code-completion support directly to ASTUnit, which performs code completion within the translation unit using the same command-line arguments for parsing the translation unit. Eventually, we'll reuse the precompiled preamble to improve code-completion performance, and this also gives us a place to cache results. Expose this function via the new libclang function clang_codeCompleteAt(), which performs the code completion within a CXTranslationUnit. The completion occurs in-process (clang_codeCompletion() runs code completion out-of-process). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110210 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
|
885daed738829d453b12d7dd675d54a1f1292d3e |
04-Aug-2010 |
John McCall <rjmccall@apple.com> |
Only look up an 'operator delete' on the definition of a destructor, not on a declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110175 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
15442825bb2c3f2cc48f3ed753d172beb8ed1232 |
04-Aug-2010 |
John McCall <rjmccall@apple.com> |
Only look up an 'operator delete' on the definition of a destructor, not on a declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110175 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
7ac0d594faf06d021ec6cf817ffa3c0903776167 |
04-Aug-2010 |
John McCall <rjmccall@apple.com> |
Look through using declarations when deciding whether to use an operator delete for a virtual destructor. Diagnose ambiguities. Fixes PR7803. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110173 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
046a7466f23107bd752d9a8106aada85061699bc |
04-Aug-2010 |
John McCall <rjmccall@apple.com> |
Look through using declarations when deciding whether to use an operator delete for a virtual destructor. Diagnose ambiguities. Fixes PR7803. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110173 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
eaf2382b16f01a328174d92be05a2e084895533a |
03-Aug-2010 |
Nate Begeman <natebegeman@mac.com> |
Add support for VFP status & control operations for ARM. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110153 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
99c40bb13b523d58d7aeb6446e4f486d6918ca58 |
03-Aug-2010 |
Nate Begeman <natebegeman@mac.com> |
Add support for VFP status & control operations for ARM. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110153 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
e92e36c8a596ce3805b94bbbeb2daf50a8209380 |
03-Aug-2010 |
John McCall <rjmccall@apple.com> |
Labels (and case statement) don't create independent scope parents for the purposes of the jump checker. Also extend Ted's iteration fix to labels. Fixes PR7789. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110082 91177308-0d34-0410-b5e6-96231b3b80d8
umpDiagnostics.cpp
|
97ba481f3f45e5b63b4a354bfb471ce146b7de57 |
03-Aug-2010 |
John McCall <rjmccall@apple.com> |
Labels (and case statement) don't create independent scope parents for the purposes of the jump checker. Also extend Ted's iteration fix to labels. Fixes PR7789. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110082 91177308-0d34-0410-b5e6-96231b3b80d8
umpDiagnostics.cpp
|
bed047d6d8212b07caa84c04cd21bedabd95cd4f |
03-Aug-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Simplify global method pool implementation in Sema. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110078 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
emaDeclObjC.cpp
emaExprObjC.cpp
|
db9d2145f1d85f64dba2c9b92416621ce01090a6 |
03-Aug-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Simplify global method pool implementation in Sema. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110078 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
emaDeclObjC.cpp
emaExprObjC.cpp
|
b2868f4311a3eae9d2479623dd8eb08522006159 |
03-Aug-2010 |
Ted Kremenek <kremenek@apple.com> |
Fix another case (this time in JumpScopeChecker) where walking deeply nested CaseStmts can blow out the stack. Fixes <rdar://problem/8125165>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110071 91177308-0d34-0410-b5e6-96231b3b80d8
umpDiagnostics.cpp
|
f8dcf1a1d3c4f28fc96a45d7159e1a9c95484632 |
03-Aug-2010 |
Ted Kremenek <kremenek@apple.com> |
Fix another case (this time in JumpScopeChecker) where walking deeply nested CaseStmts can blow out the stack. Fixes <rdar://problem/8125165>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110071 91177308-0d34-0410-b5e6-96231b3b80d8
umpDiagnostics.cpp
|
d1fbcf83ba134e32a48362e4e8349ba86bf6409c |
02-Aug-2010 |
John McCall <rjmccall@apple.com> |
Further adjustments to -Wglobal-constructors; works for references and direct initializations now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110063 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
4204f07fc8bffe6d320b2de95fea274ccf37a17b |
02-Aug-2010 |
John McCall <rjmccall@apple.com> |
Further adjustments to -Wglobal-constructors; works for references and direct initializations now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110063 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
738e778a32a604d13a3c9decbe36f7015bd41763 |
02-Aug-2010 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Read/write in PCH Sema's StdNamespace and StdBadAlloc and use a LazyDeclPtr for them that will deserialize them when needed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110031 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
|
76c38d385447b7acdff2d7e6b13fa8580e7174a7 |
02-Aug-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Read/write in PCH Sema's StdNamespace and StdBadAlloc and use a LazyDeclPtr for them that will deserialize them when needed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110031 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
|
2120aeb07a4bf7a433b2cf289b17d44d8bc34f13 |
02-Aug-2010 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Rename getStdNamespace -> getOrCreateStdNamespace, to better reflect its functionality. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110030 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExprCXX.cpp
|
26faaac4b636eafc2d686516f068170652c83fd9 |
02-Aug-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Rename getStdNamespace -> getOrCreateStdNamespace, to better reflect its functionality. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110030 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExprCXX.cpp
|
b59a623ae9a1f22cfa30a92c2cca645face971d8 |
01-Aug-2010 |
John McCall <rjmccall@apple.com> |
Kill off RequiresGlobalConstructor in favor of isConstantInitializer. Note some obvious false positives in the test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109986 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
b4b9b15c597a923a03ad0a33cdc49b67e5cc4450 |
01-Aug-2010 |
John McCall <rjmccall@apple.com> |
Kill off RequiresGlobalConstructor in favor of isConstantInitializer. Note some obvious false positives in the test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109986 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
6309a12671a1416f621a9162892836c2bb4cd981 |
01-Aug-2010 |
John McCall <rjmccall@apple.com> |
Make a first pass at implementing -Wglobal-constructors. I'm worried that this will end up bizarrely mirroring CGExprConstant, but that might be the hazard of this feature. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109984 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
626e96e2874698a6736fd33672fa9c28da91d77e |
01-Aug-2010 |
John McCall <rjmccall@apple.com> |
Make a first pass at implementing -Wglobal-constructors. I'm worried that this will end up bizarrely mirroring CGExprConstant, but that might be the hazard of this feature. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109984 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
65dedc26687385b4fdc094fd51f3776e0a63f479 |
01-Aug-2010 |
John McCall <rjmccall@apple.com> |
Instantiate attributes from the pattern record when instantiating a class template. Fixes rdar://problem/8243419. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109967 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
1d8d1ccd36888f1120b3a1df9e76f35dc2edb81d |
01-Aug-2010 |
John McCall <rjmccall@apple.com> |
Instantiate attributes from the pattern record when instantiating a class template. Fixes rdar://problem/8243419. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109967 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
de1fccf2573638df99e291effaecea0c7f57efb8 |
01-Aug-2010 |
John McCall <rjmccall@apple.com> |
Fix indentation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109965 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
b567a8b94c1067e2518e50eb58d13421550a2e02 |
01-Aug-2010 |
John McCall <rjmccall@apple.com> |
Fix indentation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109965 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
1c98936477648a7594080e78be2588965f93528e |
01-Aug-2010 |
John McCall <rjmccall@apple.com> |
Don't consider all local variables in C++ to mandate scope-checking, just those with initializers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109964 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
e46f62cbaaa6294d84be09f3c9b910a2031be913 |
01-Aug-2010 |
John McCall <rjmccall@apple.com> |
Don't consider all local variables in C++ to mandate scope-checking, just those with initializers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109964 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
017966bbda46af00a913c4618db6dcf07b1df64c |
01-Aug-2010 |
John McCall <rjmccall@apple.com> |
Only run the jump-checker if there's a branch-protected scope *and* there's a switch or goto somewhere in the function. Indirect gotos trigger the jump-checker regardless, because the conditions there are slightly more elaborate and it's too marginal a case to be worth optimizing. Turns off the jump-checker in a lot of cases in C++. rdar://problem/7702918 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109962 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
emaStmt.cpp
|
b60a77e453d32db0ab1914d28e175c2defc0eb65 |
01-Aug-2010 |
John McCall <rjmccall@apple.com> |
Only run the jump-checker if there's a branch-protected scope *and* there's a switch or goto somewhere in the function. Indirect gotos trigger the jump-checker regardless, because the conditions there are slightly more elaborate and it's too marginal a case to be worth optimizing. Turns off the jump-checker in a lot of cases in C++. rdar://problem/7702918 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109962 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
emaStmt.cpp
|
49ce9b642327c1a3f94c38c0b5211daa14a54f48 |
31-Jul-2010 |
Ted Kremenek <kremenek@apple.com> |
After a lengthy design discussion, add support for "ownership attributes" for malloc/free checking. Patch by Andrew McGregor! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109939 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
dd0e490c24aeade2c59ca4cae171199f6af9f02e |
31-Jul-2010 |
Ted Kremenek <kremenek@apple.com> |
After a lengthy design discussion, add support for "ownership attributes" for malloc/free checking. Patch by Andrew McGregor! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109939 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
fbe65b44a800f77d5dca9b214913e94803ad5339 |
30-Jul-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Correctly deal with using names for both functions and structs in chained PCH. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109871 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
|
1450ef99896d66ba67e2ddd2798a29be1bf560b8 |
30-Jul-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Correctly deal with using names for both functions and structs in chained PCH. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109871 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
|
d4bce886725a2195e18d8b7ac9a9265a63bb3121 |
30-Jul-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Tighten the rules when deciding if an ivar must be auto-synthesized (nonfragile-abi2 specific). Fixes radar 8251648. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109866 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
73f666ff7cd47c334aa051aa5a778a8fa71ae9ab |
30-Jul-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Tighten the rules when deciding if an ivar must be auto-synthesized (nonfragile-abi2 specific). Fixes radar 8251648. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109866 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
fc0b423215072e968754c113f1bb34ba4e08c6a4 |
30-Jul-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Fixed typedef inside extern "C". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109865 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
35f9a196ef897b9559de25aaecd957208f0b4f59 |
30-Jul-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Fixed typedef inside extern "C". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109865 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
c84301311db1bb22ac4c75b4202c5aa09d5ac081 |
30-Jul-2010 |
John McCall <rjmccall@apple.com> |
If a TST_typename has a null type, mark the declarator invalid. Prevents some downstream crashes, among them rdar://problem/8229840. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109850 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
27940d2fb346325d6001a7661e4ada099cd8e59c |
30-Jul-2010 |
John McCall <rjmccall@apple.com> |
If a TST_typename has a null type, mark the declarator invalid. Prevents some downstream crashes, among them rdar://problem/8229840. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109850 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
25242a5ea93028688a80ecd5981815efa349e9cb |
30-Jul-2010 |
Nate Begeman <natebegeman@mac.com> |
Wire up sema checking for __builtin_arm_usat and __builtin_arm_ssat immediates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109814 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
bb37f50c2d0d72e1fa5b349d5f6a11fdc5acb86e |
30-Jul-2010 |
Nate Begeman <natebegeman@mac.com> |
Wire up sema checking for __builtin_arm_usat and __builtin_arm_ssat immediates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109814 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
084e7f0c766b9f78fa06d6b735026e398a0d5776 |
29-Jul-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Tigthen the condition for issung ivar shadowing variables to those in file scope (nonfragile-abi2). Fixes radar 8248681. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109758 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b1d58e3a625d027165ff1c084d367ee4281cae7a |
29-Jul-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Tigthen the condition for issung ivar shadowing variables to those in file scope (nonfragile-abi2). Fixes radar 8248681. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109758 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
f2845646e3a01aae95b256a85b52941bdfb57036 |
29-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When dynamic_cast'ing from a type to itself, fill in the cast kind with CK_NoOp. Fixes PR7727. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109757 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
5492b02e263b8801f3987dee280646e274de0417 |
29-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
When dynamic_cast'ing from a type to itself, fill in the cast kind with CK_NoOp. Fixes PR7727. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109757 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
d587febd4653fadd6d2c9c431037aeae538451dd |
29-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When taking the address of a value of Objective-C object type (e.g., one because we're referencing a variable of type NSString &), the resulting type is an ObjCObjectPointerType. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109753 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
8f70ddb5576f338d409caa1404cebd40d6a05951 |
29-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
When taking the address of a value of Objective-C object type (e.g., one because we're referencing a variable of type NSString &), the resulting type is an ObjCObjectPointerType. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109753 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
5e8bf80a15e1d16cfb67c9776f743aabba28060e |
29-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Allow a looser form of compatibility checking (which ignores qualifiers) when checking a K&R function definition against a previous prototype. Fixes <rdar://problem/8193107>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109751 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
447234dd459a00a5ed9b7c3e066162cd7a75bf2d |
29-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Allow a looser form of compatibility checking (which ignores qualifiers) when checking a K&R function definition against a previous prototype. Fixes <rdar://problem/8193107>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109751 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
76315f394707cf7a1f1627a36da37ae49458afa5 |
29-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When deleting a value of class type, make sure that type is complete before looking for conversions to pointer type. Fixes <rdar://problem/8248780>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109749 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
254a9427ff84d694724fdecd0642dad8ceaa0645 |
29-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
When deleting a value of class type, make sure that type is complete before looking for conversions to pointer type. Fixes <rdar://problem/8248780>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109749 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
9f1ea246a6cf043b83a152a36b9bee01258166b4 |
29-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Don't set out-of-line template specialization/definition information for AST nodes that aren't actually out-of-line (i.e., require a nested-name-specifier). Fixes <rdar://problem/8204126>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109704 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplate.cpp
|
98c2e6248fa4152cd6a6aea9a8d894f7fe21f394 |
29-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Don't set out-of-line template specialization/definition information for AST nodes that aren't actually out-of-line (i.e., require a nested-name-specifier). Fixes <rdar://problem/8204126>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109704 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplate.cpp
|
8d5362e05e3dbf4f91430bc831309e3db9f7c863 |
29-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Don't die when a member access refers to a non-class member via a qualified name. Fixes <rdar://problem/8231724>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109682 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
9d4bb946269303996edadffce642301bee87a62f |
29-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Don't die when a member access refers to a non-class member via a qualified name. Fixes <rdar://problem/8231724>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109682 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
21cf4cbb7b4ba8ea4df2185adf149142ef4be156 |
28-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When performing code completion for a case statement in a switch whose condition is not of enumeration type, provide code-completion results containing all values of integral or enumeral type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109677 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
|
f9578436414e4a5e4af8b77567b89c1679f99519 |
28-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
When performing code completion for a case statement in a switch whose condition is not of enumeration type, provide code-completion results containing all values of integral or enumeral type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109677 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
|
5057601208a5ec12814568de502a466be632c38b |
28-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Enable expression transformations in the current-instantiation rebuilder, i.e., remove a silly short-sighted hack from long ago. Thanks to Abramo Bagnara for the test case/bug report! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109583 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
6813d7ba5fa79e36bdb3986e7f3f8100915a61ab |
28-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Enable expression transformations in the current-instantiation rebuilder, i.e., remove a silly short-sighted hack from long ago. Thanks to Abramo Bagnara for the test case/bug report! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109583 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
25124641457760fa42dd1d677e1ffa240567005c |
28-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When a nested-name-specifier refers into a current instantiation that has dependent bases, construct a dependent nested-name-specifier rather than complaining that the name could not be found within the current instantiation itself. Fixes PR7725. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109582 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
|
ac7cbd8102a944c7e988b066fc52c03fdd536dc0 |
28-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
When a nested-name-specifier refers into a current instantiation that has dependent bases, construct a dependent nested-name-specifier rather than complaining that the name could not be found within the current instantiation itself. Fixes PR7725. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109582 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
|
25d3c7d832808427880af3a321205b25d47add9c |
27-Jul-2010 |
Eli Friedman <eli.friedman@gmail.com> |
Fix a minor crash bug with constructs like Obj.Class::ENUM_VALUE. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109537 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
0246376203474718e0ec7e4025b1820c6e72a3da |
27-Jul-2010 |
Eli Friedman <eli.friedman@gmail.com> |
Fix a minor crash bug with constructs like Obj.Class::ENUM_VALUE. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109537 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
19b0b3bc946b528e75b854548927ab7c8e31f466 |
27-Jul-2010 |
Eli Friedman <eli.friedman@gmail.com> |
PR7724: Don't try to evaluate value-dependent expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109532 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
787b0946959d1203d5bb95a298ee2e7286ded995 |
27-Jul-2010 |
Eli Friedman <eli.friedman@gmail.com> |
PR7724: Don't try to evaluate value-dependent expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109532 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
017b4f655ede9fe69febc14fae4353f746ecb0cb |
27-Jul-2010 |
Michael J. Spencer <bigcheesegs@gmail.com> |
Revert r109428 "Hoist argument type checking into CheckFormatHandler. This is prep for scanf format" Got errors about ASTContext being undefined with Visual Studio 2010. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109491 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
96827eb52405a71c65c200949f3e644368e86454 |
27-Jul-2010 |
Michael J. Spencer <bigcheesegs@gmail.com> |
Revert r109428 "Hoist argument type checking into CheckFormatHandler. This is prep for scanf format" Got errors about ASTContext being undefined with Visual Studio 2010. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109491 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
b94a8d729b0da813a9765fcb59ee3d4007d874f5 |
26-Jul-2010 |
Dan Gohman <gohman@apple.com> |
Minor code simplification. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109443 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
|
6bdeb4024a7422bbd61fad403383af76b0581d45 |
26-Jul-2010 |
Dan Gohman <gohman@apple.com> |
Minor code simplification. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109443 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
|
c0dd65e0f3e986a09729455447f3ef6d40bf3256 |
26-Jul-2010 |
Dan Gohman <gohman@apple.com> |
Fix namespace polution. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109440 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
emaCXXCast.cpp
emaDecl.cpp
emaStmt.cpp
|
3c46e8db99196179b30e7ac5c20c4efd5f3926d7 |
26-Jul-2010 |
Dan Gohman <gohman@apple.com> |
Fix namespace polution. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109440 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
emaCXXCast.cpp
emaDecl.cpp
emaStmt.cpp
|
5c5576bc9d26fc929291975b93761cfe978b31f1 |
26-Jul-2010 |
Ted Kremenek <kremenek@apple.com> |
Hoist argument type checking into CheckFormatHandler. This is prep for scanf format string argument type checking. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109428 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
f762905bdefad77f91c7c6782a9c17e6b274d393 |
26-Jul-2010 |
Ted Kremenek <kremenek@apple.com> |
Hoist argument type checking into CheckFormatHandler. This is prep for scanf format string argument type checking. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109428 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
e06cbfcede756effc33fe5521c4f5fa74043a5ef |
26-Jul-2010 |
Ted Kremenek <kremenek@apple.com> |
Consolidate #args checking for scanf/printf format strings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109427 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
666a197deb75d95c78ddd39274af1a54240828d8 |
26-Jul-2010 |
Ted Kremenek <kremenek@apple.com> |
Consolidate #args checking for scanf/printf format strings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109427 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
1c1a98c7a85639411a7d86b90efa78c9ae5e6bda |
26-Jul-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Make sure that implicit qualification and derived-to-base conversions of xvalues preserve xvalue-ness. Unfortunately I have no idea how to test this property; there doesn't seem to be a syntactical construct that triggers such a conversion and still allows the distinction between prvalues and xvalues to be made. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109406 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
66d0acd5f1010625df9987a89b8cc4df3d378d5e |
26-Jul-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Make sure that implicit qualification and derived-to-base conversions of xvalues preserve xvalue-ness. Unfortunately I have no idea how to test this property; there doesn't seem to be a syntactical construct that triggers such a conversion and still allows the distinction between prvalues and xvalues to be made. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109406 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
b2e3e246d5d736b72f0bd1190324a1029b09ffba |
26-Jul-2010 |
Nick Lewycky <nicholas@mxc.ca> |
Add source location information to C++ base specifiers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109396 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaTemplateInstantiate.cpp
|
5606220447c7901ba8d80147ddab893bb7949dd5 |
26-Jul-2010 |
Nick Lewycky <nicholas@mxc.ca> |
Add source location information to C++ base specifiers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109396 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaTemplateInstantiate.cpp
|
4359888554d723e2c91fa470c0651044f771cc06 |
25-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Kill off the last Destroy method in the AST library git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109378 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
37db4db11b95e32d4ba205d9246c940025666f97 |
25-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Kill off the last Destroy method in the AST library git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109378 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
1994615488b9c729eb7c3c854a6d5e1c1ca78bde |
25-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Remove the vast majority of the Destroy methods from the AST library, since we aren't going to be calling them ever. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109377 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaAttr.cpp
emaChecking.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaOverload.cpp
emaStmt.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
reeTransform.h
|
ff331c15729f7d4439d253c97f4d60f2a7ffd0c6 |
25-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Remove the vast majority of the Destroy methods from the AST library, since we aren't going to be calling them ever. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109377 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaAttr.cpp
emaChecking.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaOverload.cpp
emaStmt.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
reeTransform.h
|
6379faeba43b2cbe5fa3355f24ca0026700c1a9e |
24-Jul-2010 |
Eli Friedman <eli.friedman@gmail.com> |
Remove dead code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109358 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
9557f5387a6b3f4636101298d0cf029538b60ded |
24-Jul-2010 |
Eli Friedman <eli.friedman@gmail.com> |
Remove dead code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109358 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
b4baa06b6289c8b377785d53c8437d906e61511e |
24-Jul-2010 |
Eli Friedman <eli.friedman@gmail.com> |
PR7698: Make sure we correctly handle the initialization of an array with dependent size. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109356 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
0f2b97d1b0bfbcec727a386dc9e5cf06051cb29b |
24-Jul-2010 |
Eli Friedman <eli.friedman@gmail.com> |
PR7698: Make sure we correctly handle the initialization of an array with dependent size. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109356 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
3616099081efe2dd1b3ff5da76fe09703fc04f67 |
24-Jul-2010 |
Chris Lattner <sabre@nondot.org> |
turn down the logical bitwise confusion warning to not warn when the RHS of the ||/&& is ever 0 or 1. This handles a variety of creative idioms for "true" used in C programs and fixes many false positives at the expense of a few false negatives. This fixes rdar://8230351. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109314 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b7690b425845b636849f25074d64d30aad646473 |
24-Jul-2010 |
Chris Lattner <sabre@nondot.org> |
turn down the logical bitwise confusion warning to not warn when the RHS of the ||/&& is ever 0 or 1. This handles a variety of creative idioms for "true" used in C programs and fixes many false positives at the expense of a few false negatives. This fixes rdar://8230351. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109314 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b4a5c049da5e66d6f9214520fb5c00fe68b7289b |
24-Jul-2010 |
John McCall <rjmccall@apple.com> |
Support catching Objective C pointers in C++ under the non-fragile NeXT runtime. Diagnose attempts to do this under the GNU or fragile NeXT runtimes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109298 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
5a180397870944548aaadeaebf58e415885b9489 |
24-Jul-2010 |
John McCall <rjmccall@apple.com> |
Support catching Objective C pointers in C++ under the non-fragile NeXT runtime. Diagnose attempts to do this under the GNU or fragile NeXT runtimes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109298 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
db072a98dd3aea62dbc0e2dfcee29eb8cb754f3a |
24-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Be careful; even though we had a proper name at the beginning of Sema::ActOnDeclarator doesn't mean that the Decl we ended up creating has a useful name. <rdar://problem/8229910> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109296 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f178dcab504ac47901dc99ff51b0d0fe07dddbe1 |
24-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Be careful; even though we had a proper name at the beginning of Sema::ActOnDeclarator doesn't mean that the Decl we ended up creating has a useful name. <rdar://problem/8229910> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109296 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
8cb11f3bca3fb94f6f5fd14e8ec33a5f016560bc |
24-Jul-2010 |
John McCall <rjmccall@apple.com> |
We never want to pop the translation unit DC, so assert if this happens. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109280 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
acb7039ca3a39d564b765d31e7e8e35d3c17f261 |
24-Jul-2010 |
John McCall <rjmccall@apple.com> |
We never want to pop the translation unit DC, so assert if this happens. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109280 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
e4e24f1e025c99e791d265e3aecec72d0dbee20e |
23-Jul-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Allow __func__ and __FUNCTION__ and __PRETTY_FUNCTION__ inside blocks. Radar 8218839. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109272 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
eb024acef8a8fef3cb5e01a2e0c3efb90372c8af |
23-Jul-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Allow __func__ and __FUNCTION__ and __PRETTY_FUNCTION__ inside blocks. Radar 8218839. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109272 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
427569eb5ada5d6da87b725033b94b662558aca7 |
23-Jul-2010 |
Eli Friedman <eli.friedman@gmail.com> |
Fix for PR7694: make sure to pass in a RecordType to CheckBaseClassAccess; fixes crashes on both valid and invalid code. The diagnostic here could potentially be improved, but it's good enough as-is. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109257 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
0fab8cd9bd9093ce16b6ce64a152d861ba408652 |
23-Jul-2010 |
Eli Friedman <eli.friedman@gmail.com> |
Fix for PR7694: make sure to pass in a RecordType to CheckBaseClassAccess; fixes crashes on both valid and invalid code. The diagnostic here could potentially be improved, but it's good enough as-is. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109257 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
57cff32124cd5b95f3e1a5da12d3fff7e8892943 |
23-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Vectors are not integer types, so the type system should not classify them as such. Type::is(Signed|Unsigned|)IntegerType() now return false for vector types, and new functions has(Signed|Unsigned|)IntegerRepresentation() cover integer types and vector-of-integer types. This fixes a bunch of latent bugs. Patch from Anton Yartsev! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109229 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExpr.cpp
emaExprObjC.cpp
emaType.cpp
|
f60946222721d9ba3c059563935c17b84703187a |
23-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Vectors are not integer types, so the type system should not classify them as such. Type::is(Signed|Unsigned|)IntegerType() now return false for vector types, and new functions has(Signed|Unsigned|)IntegerRepresentation() cover integer types and vector-of-integer types. This fixes a bunch of latent bugs. Patch from Anton Yartsev! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109229 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExpr.cpp
emaExprObjC.cpp
emaType.cpp
|
5828286cf8b9f490d2d882c2e67431367b6c4f9f |
23-Jul-2010 |
Bill Wendling <isanbard@gmail.com> |
Remove unneeded iostream include. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109219 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
67a213b1efffe854f924737af2bc8322ac138328 |
23-Jul-2010 |
Bill Wendling <isanbard@gmail.com> |
Remove unneeded iostream include. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109219 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
f72c738a4eec22b6942d111856715a8f08a729e4 |
23-Jul-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Warn when property ivar lookup finds a global variable of same name. In nonfragile-abi2, lookup accesses a synthesized ivar. This is a transition warning. Radar 8225011. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109197 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
69d5624644dad6b5117f8fee8fc4b09427861367 |
23-Jul-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Warn when property ivar lookup finds a global variable of same name. In nonfragile-abi2, lookup accesses a synthesized ivar. This is a transition warning. Radar 8225011. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109197 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
c3024bdaee612382a1eee67b77aff7a6450feaa6 |
22-Jul-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
atch for implementation of objective-c's -Wselector warning flag in clang. Little more to do for a PCH issue. Radar 6507158. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109129 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
ema.h
emaDeclObjC.cpp
emaExprObjC.cpp
emaObjCProperty.cpp
|
3fe104154dd2e8ffb351142d74f308938b5c99bf |
22-Jul-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
atch for implementation of objective-c's -Wselector warning flag in clang. Little more to do for a PCH issue. Radar 6507158. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109129 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
ema.h
emaDeclObjC.cpp
emaExprObjC.cpp
emaObjCProperty.cpp
|
175234c1d796055b82668672bc957efd252558a3 |
21-Jul-2010 |
Ted Kremenek <kremenek@apple.com> |
Upgrade "'X' is unavailable" from a warning to an error. This matches GCC's behavior. Note that GCC emits a warning instead of an error when using an unavailable Objective-C protocol, so now Clang's behavior is more strict in this case, but more consistent. We will need to see how much this fires on real code and determine whether this case should be downgraded to a warning. Fixes <rdar://problem/8213093>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109033 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
042411cc447f9b120086a6e4650583044f66fd12 |
21-Jul-2010 |
Ted Kremenek <kremenek@apple.com> |
Upgrade "'X' is unavailable" from a warning to an error. This matches GCC's behavior. Note that GCC emits a warning instead of an error when using an unavailable Objective-C protocol, so now Clang's behavior is more strict in this case, but more consistent. We will need to see how much this fires on real code and determine whether this case should be downgraded to a warning. Fixes <rdar://problem/8213093>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109033 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b05df86bbf0135b8b490850c9c63fd6d72e02088 |
21-Jul-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Added extra check when looking for location of '=' in a copy initialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109025 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
0a2eb5685aaef78ce33e84dd8c70ad3ff31b0e11 |
21-Jul-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Added extra check when looking for location of '=' in a copy initialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109025 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
1d945449562646860ded8098314c2dcd06cef97c |
21-Jul-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Fix source location of the initializer in a copy initialization. Back out hack in objc rewriter. fixes radar 8213998. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109024 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
emaInit.h
|
10f8e319569c8b8b4603d8a72ce01a7a01502c85 |
21-Jul-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Fix source location of the initializer in a copy initialization. Back out hack in objc rewriter. fixes radar 8213998. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109024 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
emaInit.h
|
379712602da8d13e31c836f3c8df36a9f629e424 |
20-Jul-2010 |
Ted Kremenek <kremenek@apple.com> |
Hookup checking for invalid length modifiers in scanf format strings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108907 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
1e51c200b17cb6b0238c10a8760ae04765688f16 |
20-Jul-2010 |
Ted Kremenek <kremenek@apple.com> |
Hookup checking for invalid length modifiers in scanf format strings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108907 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
f00ee7a76eb78ada4a0654e029f750c2baf5475b |
20-Jul-2010 |
Ted Kremenek <kremenek@apple.com> |
Add 'ConversionSpecifier' root class in 'analyze_format_string' namespace and derived 'PrintfConversionSpecifier' from this class. We will do the same for 'ScanfConversionSpecifier'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108903 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
6ecb950c65329f8d6ce9ad0514632df35a5ab61f |
20-Jul-2010 |
Ted Kremenek <kremenek@apple.com> |
Add 'ConversionSpecifier' root class in 'analyze_format_string' namespace and derived 'PrintfConversionSpecifier' from this class. We will do the same for 'ScanfConversionSpecifier'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108903 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
2723632e84df3e0fb87ef1bac6b2a7473198d3a2 |
20-Jul-2010 |
Ted Kremenek <kremenek@apple.com> |
Rename 'ConsumedSoFarArg' -> 'nArg' and 'OutIntPtrArg' to 'nArg' (scanf and printf checking). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108900 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
35d353b47bce29200b910371dd9b8ba7f3058ab8 |
20-Jul-2010 |
Ted Kremenek <kremenek@apple.com> |
Rename 'ConsumedSoFarArg' -> 'nArg' and 'OutIntPtrArg' to 'nArg' (scanf and printf checking). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108900 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
6edf7abf47fecf9caa524da33bb19eb0c3d6cebb |
20-Jul-2010 |
Ted Kremenek <kremenek@apple.com> |
Rename diagnostic so that it can be reused with scanf checking. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108896 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
649aecf55670682efb2a04a85810eef4d038c527 |
20-Jul-2010 |
Ted Kremenek <kremenek@apple.com> |
Rename diagnostic so that it can be reused with scanf checking. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108896 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
5416a2ad2fd6ad18846b9c2f6122ae0d417e24dd |
20-Jul-2010 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Hide FunctionTemplateDecl's specializations folding set as implementation detail and introduce FunctionTemplateDecl::findSpecialization. Redeclarations of specializations will not cause the previous decl to be removed from the set, the set will keep the canonical decl. findSpecialization will return the most recent redeclaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108834 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
2c853e401ca406d417eb916e867226050e7be06b |
20-Jul-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Hide FunctionTemplateDecl's specializations folding set as implementation detail and introduce FunctionTemplateDecl::findSpecialization. Redeclarations of specializations will not cause the previous decl to be removed from the set, the set will keep the canonical decl. findSpecialization will return the most recent redeclaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108834 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
7b659e613e7fe157ad5202cab1c972e64b4f357e |
20-Jul-2010 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Hide the specializations folding sets of ClassTemplateDecl as an implementation detail (InsertPos leaks though) and add methods to its interface for adding/finding specializations. Simplifies its users a bit and we no longer need to replace specializations in the folding set with their redeclarations. We just return the most recent redeclarations. As a bonus, it fixes http://llvm.org/PR7670. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108832 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
cc0b1bc979b650a8a8b34b2032a074fd7724a90d |
20-Jul-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Hide the specializations folding sets of ClassTemplateDecl as an implementation detail (InsertPos leaks though) and add methods to its interface for adding/finding specializations. Simplifies its users a bit and we no longer need to replace specializations in the folding set with their redeclarations. We just return the most recent redeclarations. As a bonus, it fixes http://llvm.org/PR7670. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108832 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
a7a77ab274626a371e240b9e49c9231bdb7df092 |
20-Jul-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Update ImplicitCastExpr to be able to represent an XValue. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108807 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaInit.h
emaOverload.cpp
emaTemplate.cpp
|
906082edf2aea1c6de2926f93a8d7121e49d2a54 |
20-Jul-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Update ImplicitCastExpr to be able to represent an XValue. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108807 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaInit.h
emaOverload.cpp
emaTemplate.cpp
|
a7ad0ee1f662489139e26ac9680a50dbb42b6ea7 |
20-Jul-2010 |
Ted Kremenek <kremenek@apple.com> |
Don't warn when a '%%' or '%*d' (scanf) is used in a format string with positional arguments, since these don't actually consume an argument. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108757 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
baa400654bd6f8396f9a07188445ae7955b060a3 |
20-Jul-2010 |
Ted Kremenek <kremenek@apple.com> |
Don't warn when a '%%' or '%*d' (scanf) is used in a format string with positional arguments, since these don't actually consume an argument. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108757 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
6692735282aa26ce46e96d61ce61f27a0f43507f |
19-Jul-2010 |
Ted Kremenek <kremenek@apple.com> |
Hook up 'invalid conversion' warning for scanf format strings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108750 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
c09b6a59e02ae265fce51b8c11e2a045bcdaa888 |
19-Jul-2010 |
Ted Kremenek <kremenek@apple.com> |
Hook up 'invalid conversion' warning for scanf format strings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108750 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
27801f1359e598fd444b6ecf7b8b2071d06cc2fa |
19-Jul-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Categories cannot synthesize property ivars, and a minor cleanup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108707 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
84ef4b20b323e76b3eb51e436b300bc877aee5c0 |
19-Jul-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Categories cannot synthesize property ivars, and a minor cleanup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108707 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
1d618a015adf1bcef6db644e331943c54b3eb81e |
19-Jul-2010 |
Zhongxing Xu <xuzhongxing@gmail.com> |
Fix construction of AnalysisContext. Thanks Daniel. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108694 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
7a42054b18b48ee0d09c7ecc65aaf283e5be78ec |
19-Jul-2010 |
Zhongxing Xu <xuzhongxing@gmail.com> |
Fix construction of AnalysisContext. Thanks Daniel. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108694 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
0791d5ddfa5092cfaca6abe0f58d0b8ad50c4de9 |
19-Jul-2010 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Fix http://llvm.org/PR7660 A ParmVarDecl instantiated from a FunctionProtoType may have Record as DeclContext, in which case isStaticDataMember() will erroneously return true. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108692 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
e3041be307d4c133605544a74f40c42c7531b5bb |
19-Jul-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Fix http://llvm.org/PR7660 A ParmVarDecl instantiated from a FunctionProtoType may have Record as DeclContext, in which case isStaticDataMember() will erroneously return true. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108692 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
2d390f97ee86b50c64d7441641664c1ee3b559ae |
18-Jul-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Fix a goof in my previous patch -- not all of the builtins return a value, some fixed return types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108657 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
8d13d221cf7c1657404c611efaadf3ac19d899b3 |
18-Jul-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Fix a goof in my previous patch -- not all of the builtins return a value, some fixed return types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108657 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
07b438f7942dd0e6a5362456b23a70009227725c |
18-Jul-2010 |
Peter Collingbourne <peter@pcc.me.uk> |
When instantiating function definitions set parameter names to those used in template The rationale is that we are copying the entire definition including parameter names which may differ between the declaration and the definition. This is particularly important if any parameters are unnamed in the declaration, as a DeclRef to an unnamed ParmVarDecl would cause the pretty printer to produce invalid output. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108643 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
8a6c0f1a48b8167ca1457c9f05288fa637033dc9 |
18-Jul-2010 |
Peter Collingbourne <peter@pcc.me.uk> |
When instantiating function definitions set parameter names to those used in template The rationale is that we are copying the entire definition including parameter names which may differ between the declaration and the definition. This is particularly important if any parameters are unnamed in the declaration, as a DeclRef to an unnamed ParmVarDecl would cause the pretty printer to produce invalid output. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108643 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
b075f1de60c17bd36ec1eaaf9e560224f8dbf7e4 |
18-Jul-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Improve the representation of the atomic builtins in a few ways. First, we make their call expressions synthetically have the "deduced" types based on their first argument. We only insert conversions in the AST for arguments whose values require conversion to match the value type expected. This keeps PR7600 closed by maintaining the return type, but avoids assertions due to unexpected implicit casts making the type unsigned (test case added from Daniel). The magic is moved into the codegen for the atomic builtin which inserts the casts as needed at the IR level to raise the type to an integer suitable for the LLVM intrinsic. This shouldn't cause any real change in functionality, but now we can make the builtin be more truly polymorphic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108638 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
db4325b098eff5e9e660db19f0148423fb21f27f |
18-Jul-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Improve the representation of the atomic builtins in a few ways. First, we make their call expressions synthetically have the "deduced" types based on their first argument. We only insert conversions in the AST for arguments whose values require conversion to match the value type expected. This keeps PR7600 closed by maintaining the return type, but avoids assertions due to unexpected implicit casts making the type unsigned (test case added from Daniel). The magic is moved into the codegen for the atomic builtin which inserts the casts as needed at the IR level to raise the type to an integer suitable for the LLVM intrinsic. This shouldn't cause any real change in functionality, but now we can make the builtin be more truly polymorphic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108638 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
ef006823ecd2344aa0b47065d6d2b2bcbe95a853 |
18-Jul-2010 |
Chris Lattner <sabre@nondot.org> |
BUILD_ARCHIVE is the default for libraries, no need to set it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108633 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
|
9638eef7e3b2ca30406c5d369a44aa49ff26b201 |
18-Jul-2010 |
Chris Lattner <sabre@nondot.org> |
BUILD_ARCHIVE is the default for libraries, no need to set it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108633 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
|
b05de1e40a134b5f47a224577e189dca3872f423 |
17-Jul-2010 |
Eli Friedman <eli.friedman@gmail.com> |
Check for casts to an incomplete type in C. Improves diagnostics for cast to incomplete union (PR5692) and incomplete enum, and fixes obscure accepts-invalid on cast to incomplete struct. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108630 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
8d438087bd7120990663e4df78a9c9fdb02c5209 |
17-Jul-2010 |
Eli Friedman <eli.friedman@gmail.com> |
Check for casts to an incomplete type in C. Improves diagnostics for cast to incomplete union (PR5692) and incomplete enum, and fixes obscure accepts-invalid on cast to incomplete struct. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108630 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
630a33b8918966620dfc5ced0f9ef17eab76ec94 |
17-Jul-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to synthesize property ivars on demand as part of the new property synthesis by default. wip. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108599 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaObjCProperty.cpp
|
ad51e74030a59a8aa4ef0ebca1d7a701602ef53b |
17-Jul-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to synthesize property ivars on demand as part of the new property synthesis by default. wip. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108599 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaObjCProperty.cpp
|
00c2e4e8816756f62ca6effa97a3e98d71c07a87 |
16-Jul-2010 |
Anders Carlsson <andersca@mac.com> |
When checking whether to bind an expression to a temporary, don't bind Obj-C message send expressions who call methods that return references. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108559 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
0ea4dfd0eb56b065460c1696933748e765120fe0 |
16-Jul-2010 |
Anders Carlsson <andersca@mac.com> |
When checking whether to bind an expression to a temporary, don't bind Obj-C message send expressions who call methods that return references. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108559 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
71b86be7f07080a3f6acd8e08647813bde2d2a3b |
16-Jul-2010 |
Ted Kremenek <kremenek@apple.com> |
Hook up warning for an incomplete scanlist in scanf format strings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108542 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
b7c21018ec1049580cf6df88db09e606550a7baa |
16-Jul-2010 |
Ted Kremenek <kremenek@apple.com> |
Hook up warning for an incomplete scanlist in scanf format strings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108542 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
d932f49130281e436ce9c75fa18cb8a2802e6324 |
16-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When performing template name lookup for a dependent member access expression such as the "foo" in "this->blah.foo<1, 2>", and we can't look into the type of "this->blah" (e.g., because it is dependent), look into the local scope of a template of the same name. Fixes <rdar://problem/8198511>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108531 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
f9f97a0ea15456dca52ba7962e5d8017f996cd4a |
16-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
When performing template name lookup for a dependent member access expression such as the "foo" in "this->blah.foo<1, 2>", and we can't look into the type of "this->blah" (e.g., because it is dependent), look into the local scope of a template of the same name. Fixes <rdar://problem/8198511>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108531 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
d5004ca6ba5e3d2b2c9f8e22a89e1c32bdc884c0 |
16-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Revert Microsoft-specific override of the "typedef requires a name" diagnostic. Instead, put it and the "declaration does not declare anything" warning into -Wmissing-declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108527 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
a0ebd60bfda56c161a87adb01f1b9a1d0e7ae32f |
16-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Revert Microsoft-specific override of the "typedef requires a name" diagnostic. Instead, put it and the "declaration does not declare anything" warning into -Wmissing-declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108527 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
9da33f35ded5db5aa735c9f4f04d978b2725ed5b |
16-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Suppress the "typedef requires a name" warning in Microsoft-extensions mode git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108526 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
0c99ec6d229b49085ec3c364d5c6090b33438a93 |
16-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Suppress the "typedef requires a name" warning in Microsoft-extensions mode git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108526 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
770088a007f7aeb684a17e6cc8295f13c4a18a7c |
16-Jul-2010 |
John McCall <rjmccall@apple.com> |
Treat template parameters as part of the declaration-specifiers for the purpose of access control. Fixes PR7644. I can't actually find anything directly justifying this, but it seems obvious. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108521 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
c9068d7dd94d439cec66c421115d15303e481025 |
16-Jul-2010 |
John McCall <rjmccall@apple.com> |
Treat template parameters as part of the declaration-specifiers for the purpose of access control. Fixes PR7644. I can't actually find anything directly justifying this, but it seems obvious. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108521 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
116e023e59c440532bcd833263b7748c6ccfeff6 |
16-Jul-2010 |
Daniel Dunbar <daniel@zuster.org> |
Sema: Fix a bug with #pragma options align=reset, reset against an empty stack is well defined, it resets to the default alignment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108508 91177308-0d34-0410-b5e6-96231b3b80d8
emaAttr.cpp
|
ddc6ff6b9aff656504c1e84ee7dc9f617a20f866 |
16-Jul-2010 |
Daniel Dunbar <daniel@zuster.org> |
Sema: Fix a bug with #pragma options align=reset, reset against an empty stack is well defined, it resets to the default alignment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108508 91177308-0d34-0410-b5e6-96231b3b80d8
emaAttr.cpp
|
da8cb2a9f4d91af40f09a967e73a6e5769fb938a |
16-Jul-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Butcher a perfectly reasonable diagnostic to pacify old versions of SWIG. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108505 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
b21fc4a4c17fdf7d3de4fd3cd36a1ad4d8af6f55 |
16-Jul-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Butcher a perfectly reasonable diagnostic to pacify old versions of SWIG. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108505 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
ffd394a182427b2727f0a4002da939e629e12006 |
16-Jul-2010 |
Ted Kremenek <kremenek@apple.com> |
Add most of the boilerplate support for scanf format string checking. This includes handling the parsing of scanf format strings and hooking the checking into Sema. Most of this checking logic piggybacks on what was already there for checking printf format strings, but the checking logic has been refactored to support both. What is left to be done is to support argument type checking in format strings and of course fix the usual tail of bugs that will follow. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108500 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
|
826a3457f737f1fc45a22954fd1bfde38160c165 |
16-Jul-2010 |
Ted Kremenek <kremenek@apple.com> |
Add most of the boilerplate support for scanf format string checking. This includes handling the parsing of scanf format strings and hooking the checking into Sema. Most of this checking logic piggybacks on what was already there for checking printf format strings, but the checking logic has been refactored to support both. What is left to be done is to support argument type checking in format strings and of course fix the usual tail of bugs that will follow. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108500 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
|
3e57483debad96ec894bb53d856df066f89089a3 |
16-Jul-2010 |
Ted Kremenek <kremenek@apple.com> |
Add builtin definition for scanf, including extending the builtin encoding to represent builtins that have the "scanf" attribution (via the format attribute) just like we do with printf functions. Follow-up work is needed to add similar support for fscanf et al. This is to support format-string checking for scanf functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108499 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
bee05c1206dcd525e0a1f066d166ad3e972a500e |
16-Jul-2010 |
Ted Kremenek <kremenek@apple.com> |
Add builtin definition for scanf, including extending the builtin encoding to represent builtins that have the "scanf" attribution (via the format attribute) just like we do with printf functions. Follow-up work is needed to add similar support for fscanf et al. This is to support format-string checking for scanf functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108499 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
b5b841ed6877b80a688ae23ac696f5b85ad8052f |
15-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Make the "unused result" warning a warning about run-time behavior, so that we don't warn when there isn't going to be any computation anyway. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108442 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
35e12c90c1b107a75c5615aa76fdbd403661aaa6 |
15-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Make the "unused result" warning a warning about run-time behavior, so that we don't warn when there isn't going to be any computation anyway. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108442 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
d6e4fbb0a6b2a8121fe677c7ddec0708db1041df |
15-Jul-2010 |
Chris Lattner <sabre@nondot.org> |
restrict the && -> & warning to cover a case daniel noted. Don't warn about "logically bool" expressions on the RHS, even if they fold to a constant. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108388 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
23ef3e4f044d701d0f84980fd9816fedf17fc0cb |
15-Jul-2010 |
Chris Lattner <sabre@nondot.org> |
restrict the && -> & warning to cover a case daniel noted. Don't warn about "logically bool" expressions on the RHS, even if they fold to a constant. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108388 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
229f3b3ebd5cee39a2cc81e2f707de5a7e88ddfd |
15-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When determining whether an overload set with explicit template arguments only resolves to a single specialization, make sure to look through using declarations. Fixes PR7641. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108376 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
66a8c9a6b1f9bcd78779e5d414f3c9ae3cabdd93 |
15-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
When determining whether an overload set with explicit template arguments only resolves to a single specialization, make sure to look through using declarations. Fixes PR7641. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108376 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
a3833b4836f59df7920e514dc56247c4b6fc9bc8 |
15-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When there are extra or missing template parameter lists in a template definition, we're likely going to end up breaking the invariants of the template system, e.g., that the depths of template parameter lists match up with the nesting template of the template. So, make sure we mark such ill-formed declarations as invalid or don't even build them at all. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108372 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplate.cpp
|
0167f3c25581c39cd024d7a924553959c4893381 |
15-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
When there are extra or missing template parameter lists in a template definition, we're likely going to end up breaking the invariants of the template system, e.g., that the depths of template parameter lists match up with the nesting template of the template. So, make sure we mark such ill-formed declarations as invalid or don't even build them at all. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108372 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplate.cpp
|
98f3b4f4191ae9c952074396637b9ecaf35490be |
14-Jul-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Don't error when doing default property synthesis and some are already synthesized by user declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108341 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
d3635b9681daaef74974932f77080910b032b9fd |
14-Jul-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Don't error when doing default property synthesis and some are already synthesized by user declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108341 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
0fb5ba8572e62b87dca3397ebf7e12e5b8b2d1ab |
14-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Only filter out names reserved for the implementation (e.g., __blah or _Foo) from code-completion results when they come from a system header. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108338 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
797efb51ce0825eb4cce2864a5cea2b30e85f06c |
14-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Only filter out names reserved for the implementation (e.g., __blah or _Foo) from code-completion results when they come from a system header. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108338 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
2fd72b6061b1e9d59d6681efd848c2301982d1d3 |
14-Jul-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Consider obective-c pointer arguments as valid sentinel args as well. Fixes radar 7975788. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108333 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
9ccd7251047d5177c2ef5f5dfea324d47c5d18f3 |
14-Jul-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Consider obective-c pointer arguments as valid sentinel args as well. Fixes radar 7975788. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108333 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
8c90b02120e2f49bf695e6013049ab9d3caac2e7 |
14-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Introduce a new cast kind for an "lvalue bitcast", which handles reinterpret_casts (possibly indirectly via C-style/functional casts) on values, e.g., int i; reinterpret_cast<short&>(i); The IR generated for this is essentially the same as for *reinterpret_cast<short*>(&i). Fixes PR6437, PR7593, and PR7344. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108294 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
e39a3894513349908cdb3beba2614e53cb288e6c |
14-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Introduce a new cast kind for an "lvalue bitcast", which handles reinterpret_casts (possibly indirectly via C-style/functional casts) on values, e.g., int i; reinterpret_cast<short&>(i); The IR generated for this is essentially the same as for *reinterpret_cast<short*>(&i). Fixes PR6437, PR7593, and PR7344. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108294 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
cdd70ac739266abc7d1b0d01bc94ac82e22c0399 |
14-Jul-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Check on property attributes which are declared in class extensions (radar 8171968). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108283 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
ae415dc21ee6402cee1675ec8bb965a24f9e5b6b |
14-Jul-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Check on property attributes which are declared in class extensions (radar 8171968). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108283 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
c3f6c958f8a2679f8d6a6b88b1966176edeee512 |
13-Jul-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Set DeclContext of ParamVarDecl only. No need to set that of VarDecl for block variables (they are already set). Per Doug's comment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108273 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
55a17c057c5293e517609a91438342737ef51545 |
13-Jul-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Set DeclContext of ParamVarDecl only. No need to set that of VarDecl for block variables (they are already set). Per Doug's comment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108273 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
1256f453f8810ed2df1e33f17378872dd1cb1a0b |
13-Jul-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
More block instantiation stuff. Set variable/param DeclContext to block context when first instantiating them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108266 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
e7ffbe233ed04f921a008ed893672ee759d1a0ad |
13-Jul-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
More block instantiation stuff. Set variable/param DeclContext to block context when first instantiating them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108266 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
d5082e3268e45d1390738306c0675a0e1fd77c53 |
13-Jul-2010 |
Chris Lattner <sabre@nondot.org> |
Add a warning to catch a bug recently caught by code review, like this: t2.c:2:12: warning: use of logical && with constant operand; switch to bitwise & or remove constant [-Wlogical-bitwise-confusion] return x && 4; ^ ~ wording improvement suggestions are welcome. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108260 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
90a8f27f144233b53cac0c88a1595f7f05105b7e |
13-Jul-2010 |
Chris Lattner <sabre@nondot.org> |
Add a warning to catch a bug recently caught by code review, like this: t2.c:2:12: warning: use of logical && with constant operand; switch to bitwise & or remove constant [-Wlogical-bitwise-confusion] return x && 4; ^ ~ wording improvement suggestions are welcome. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108260 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
90c9d4dd1d7d2921ce1109767d0c7ab5895ccaf1 |
13-Jul-2010 |
Chris Lattner <sabre@nondot.org> |
80 column issues. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108257 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
|
3d4b482b5f2cacc7686f65bb231ad666a5adad4a |
13-Jul-2010 |
Chris Lattner <sabre@nondot.org> |
80 column issues. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108257 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
|
2350fb26d59692c6006ec5d33b8215e96055bdb6 |
13-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Whenever we're creating an expression that is typically an rvalue (e.g., a call, cast, etc.), immediately adjust the expression's type to strip cv-qualifiers off of all non-class types (in C++) or all types (in C). This effectively extends my previous fix for PR7463, which was restricted to calls, to other kinds of expressions within similar characteristics. I've audited every use of getNonReferenceType() in the code base, switching to the newly-renamed getNonLValueExprType() where necessary. Big thanks to Eli for pointing out just how incomplete my original fix for PR7463 actually was. We've been handling cv-qualifiers on rvalues wrong for a very, very long time. Fixes PR7463. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108253 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
|
6398235d7890a81b785ea5af3b6e66d86bf184cc |
13-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Whenever we're creating an expression that is typically an rvalue (e.g., a call, cast, etc.), immediately adjust the expression's type to strip cv-qualifiers off of all non-class types (in C++) or all types (in C). This effectively extends my previous fix for PR7463, which was restricted to calls, to other kinds of expressions within similar characteristics. I've audited every use of getNonReferenceType() in the code base, switching to the newly-renamed getNonLValueExprType() where necessary. Big thanks to Eli for pointing out just how incomplete my original fix for PR7463 actually was. We've been handling cv-qualifiers on rvalues wrong for a very, very long time. Fixes PR7463. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108253 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
|
13767543229d759e3c51dea5fa1cc531effb08ce |
13-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Downgrade the "when type is in parentheses, array cannot have dynamic size" error for code like new (int [size]) to a warning, add a Fix-It to remove the parentheses, and make this diagnostic work properly when it occurs in a template instantiation. <rdar://problem/8018245>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108242 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
reeTransform.h
|
4bd40318cbea15310a37343db46de96c4fcc15e6 |
13-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Downgrade the "when type is in parentheses, array cannot have dynamic size" error for code like new (int [size]) to a warning, add a Fix-It to remove the parentheses, and make this diagnostic work properly when it occurs in a template instantiation. <rdar://problem/8018245>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108242 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
reeTransform.h
|
9c12aaaac057518b52015e01a569741643d5c8f9 |
13-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve diagnostics for the "type qualifier on return type has no effect warning" by printing the qualifiers we saw and correctly pluralizing the message, e.g., test/SemaCXX/conditional-expr.cpp:295:3: warning: 'const volatile' type qualifiers on return type have no effect const volatile Enum g2() { ^~~~~ ~~~~~~~~ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108236 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
de80ec1fa947855d2e53722a8cd71367ff513481 |
13-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Improve diagnostics for the "type qualifier on return type has no effect warning" by printing the qualifiers we saw and correctly pluralizing the message, e.g., test/SemaCXX/conditional-expr.cpp:295:3: warning: 'const volatile' type qualifiers on return type have no effect const volatile Enum g2() { ^~~~~ ~~~~~~~~ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108236 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
8079eee9128444d02bebf24410126f9d55399f84 |
13-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When forming a function call or message send expression, be sure to strip cv-qualifiers from the expression's type when the language calls for it: in C, that's all the time, while C++ only does it for non-class types. Centralized the computation of the call expression type in QualType::getCallResultType() and some helper functions in other nodes (FunctionDecl, ObjCMethodDecl, FunctionType), and updated all relevant callers of getResultType() to getCallResultType(). Fixes PR7598 and PR7463, along with a bunch of getResultType() call sites that weren't stripping references off the result type (nothing stripped cv-qualifiers properly before this change). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108234 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaCodeComplete.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaInit.cpp
emaOverload.cpp
emaType.cpp
reeTransform.h
|
5291c3cec0dbe8ad1d8e7e67e93af2b1586d5400 |
13-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
When forming a function call or message send expression, be sure to strip cv-qualifiers from the expression's type when the language calls for it: in C, that's all the time, while C++ only does it for non-class types. Centralized the computation of the call expression type in QualType::getCallResultType() and some helper functions in other nodes (FunctionDecl, ObjCMethodDecl, FunctionType), and updated all relevant callers of getResultType() to getCallResultType(). Fixes PR7598 and PR7463, along with a bunch of getResultType() call sites that weren't stripping references off the result type (nothing stripped cv-qualifiers properly before this change). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108234 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaCodeComplete.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaInit.cpp
emaOverload.cpp
emaType.cpp
reeTransform.h
|
240b977ca72a3a4a0c5b364373d2f19559c5942f |
13-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Diagnose typedef of an operator name. Fixes PR7462 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108233 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
aef01998af5bbfc1cdfac091248ff7d30ec31456 |
13-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Diagnose typedef of an operator name. Fixes PR7462 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108233 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
e9e376ad54aa605cca1e42e43c8368dff3d65737 |
13-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Complain when an unnamed enumeration has no enumerations (in C++). Fixes PR7466. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108231 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
a131d0fc0af9f79c90e7654231041b2495d355a9 |
13-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Complain when an unnamed enumeration has no enumerations (in C++). Fixes PR7466. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108231 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
a351bf90f109c26fe7d943cd09dcee711dc387d9 |
13-Jul-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Instantiate attributes when first building an instantiated VarDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108218 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
8dd0c5626455cdf94280783e85e413eed6cbf3d9 |
13-Jul-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Instantiate attributes when first building an instantiated VarDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108218 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
ac8737c6cd9d627e9f36e287d6f6d3aa1062b55f |
13-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Provide a special diagnostic for attempts to explicitly specialize class templates within class scope (which is ill-formed), and recover by dropping the explicit specialization entirely. Fixes the infinite loop in PR7622. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108217 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
669eed8d676458c701f45f7fd686f01de2dee53b |
13-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Provide a special diagnostic for attempts to explicitly specialize class templates within class scope (which is ill-formed), and recover by dropping the explicit specialization entirely. Fixes the infinite loop in PR7622. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108217 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
853aafec0694b69b5533be7066b4aea9cb34bf67 |
13-Jul-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Produce an error on encountering a pointer or reference to a qualified function type. Fixes PR7470. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108209 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f9ea1f392ab8946f7bfc3f98802a8e5e6fe073f3 |
13-Jul-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Produce an error on encountering a pointer or reference to a qualified function type. Fixes PR7470. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108209 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
bd9046ee7f084d316e5d2e92bdb9c266529767ef |
12-Jul-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Copy over attributes to instantiated variable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108195 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
cad8d31117800f804ee4f313134162edac8f8813 |
12-Jul-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Copy over attributes to instantiated variable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108195 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
24e6b6992a0b022e02aa2510703c2a94184e3c7d |
12-Jul-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Compute Type dependent-ness of BlockDeclRefExpr on the fly when constructing it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108166 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
84ca008a462b515f63871253f494d53c9190363c |
12-Jul-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Compute Type dependent-ness of BlockDeclRefExpr on the fly when constructing it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108166 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
cfff00f10ba49c4fdb902824378f72ab62fcd759 |
12-Jul-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Move setting of Dependent Type to BlockDeclRefExpr's constructor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108157 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
52bc56a296b11b4fc6bf5ddf4ded5262f6484bdb |
12-Jul-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Move setting of Dependent Type to BlockDeclRefExpr's constructor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108157 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
0737f2e65032a3715a9b10be1400d581bb96bd49 |
12-Jul-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Fix another aspect of PR7047, macro expansions. Previously, this was hacked around by exempting enums from the check, but this doesn't handle a lot of cases. A better approach is to directly check if the operator comes from a macro expansion. I've removed a reference to the rdar that originally led to the enum suppression when removing it's overly contrived test case. Let me know if that number or a more reasilistic test case involving enums is still needed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108128 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
64d092c232bc282762430df9eb67beafffaa2fdc |
12-Jul-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Fix another aspect of PR7047, macro expansions. Previously, this was hacked around by exempting enums from the check, but this doesn't handle a lot of cases. A better approach is to directly check if the operator comes from a macro expansion. I've removed a reference to the rdar that originally led to the enum suppression when removing it's overly contrived test case. Let me know if that number or a more reasilistic test case involving enums is still needed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108128 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
88992141c10c2a8814c38f0c37141fc62bc1000b |
10-Jul-2010 |
Dale Johannesen <dalej@apple.com> |
Fix compile error. Per Fariborz. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108051 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
720b6392f901085f851f1575feaaa291f26731d3 |
10-Jul-2010 |
Dale Johannesen <dalej@apple.com> |
Fix compile error. Per Fariborz. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108051 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
26ed985bf8e3d4859e4a7fec6e4983041c81aa44 |
10-Jul-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Lay the ground work for resoving PR7047. This doesn't actually fix it because default arguments to template parameters don't have a DeclContext when instantiated, and so we can't detect that we're in an instantiation context as opposed to the definition context. However, it fixes the more commonly-occuring cases in TMP code that use devolve to this type of tautology after substitution. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108044 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
999194739e3a2d35b5a1e563ba514cba8b4ab252 |
10-Jul-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Lay the ground work for resoving PR7047. This doesn't actually fix it because default arguments to template parameters don't have a DeclContext when instantiated, and so we can't detect that we're in an instantiation context as opposed to the definition context. However, it fixes the more commonly-occuring cases in TMP code that use devolve to this type of tautology after substitution. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108044 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
6bb9f78d13adc4adb57e32a16fc3380b47608e56 |
10-Jul-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
BlockDeclRefExpr of a dependent type must be a dependent expression when its is built. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108026 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
833f42e32754515bc108b9b1ccccc6e373915a6c |
10-Jul-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
BlockDeclRefExpr of a dependent type must be a dependent expression when its is built. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108026 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
bc9011559b6fd32cf4755bf62652f2950f193f15 |
09-Jul-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Instantiation of byref variable in block literal expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108019 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
5750b81beb0d508278011c410b01acabc9c7ca05 |
09-Jul-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Instantiation of byref variable in block literal expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108019 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
95d551400c4605ccbab8a59965aa7d1b09b14389 |
09-Jul-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Slightly improve the diagnostic when using a qualified function typedef to declare nonmember or static member functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108018 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
c61bb2056148891375bfa591fa2859b9b6ec2734 |
09-Jul-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Slightly improve the diagnostic when using a qualified function typedef to declare nonmember or static member functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108018 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
79eeb26ae7b2a87477e8f78688ce75f41811787d |
09-Jul-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Rip out the floating point return type handling from the atomic builtin. It's wrong, and we don't handle floating point value type arguments yet anyways. Will add correct logic for both when I finish the patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108004 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
7479ef6b5dd4903a7d832b4a4207045d7005a812 |
09-Jul-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Rip out the floating point return type handling from the atomic builtin. It's wrong, and we don't handle floating point value type arguments yet anyways. Will add correct logic for both when I finish the patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108004 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
0ae3d2480fff8fbdc4c5bf75ff69c25a234e036d |
09-Jul-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Fix PR7600, and correctly convert the result of an atomic builtin to the expected value type. This is necessary as the builtin is internally represented as only operating on integral types. Also, add a FIXME to add support for floating point value types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108002 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
|
d201457cc781f1b13d0f4b1268ff934e6004cbff |
09-Jul-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Fix PR7600, and correctly convert the result of an atomic builtin to the expected value type. This is necessary as the builtin is internally represented as only operating on integral types. Also, add a FIXME to add support for floating point value types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108002 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
|
eea08b18fa4fa0218be75845d1b77e2ccfe7bd3f |
09-Jul-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Instantiation of block literal expressions. wip. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108000 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
reeTransform.h
|
a729da2c29e7df26319acf2675d51e377287a139 |
09-Jul-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Instantiation of block literal expressions. wip. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108000 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
reeTransform.h
|
b615eefeb4419b77f5ce726813aaa3a5cf352536 |
09-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Introduce -f{no-}spell-checking options to enable/disable spell-checking. By default, spell-checking is enabled for Clang (obviously) but disabled in CIndex for performance reasons. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107992 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
a0068fc64351db9c47916566e3b85ab733cd8d6d |
09-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Introduce -f{no-}spell-checking options to enable/disable spell-checking. By default, spell-checking is enabled for Clang (obviously) but disabled in CIndex for performance reasons. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107992 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
f34557fb0a31a136c2d32897735e58a1aea64466 |
09-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Support code completion for parameter names in Objective-C method declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107933 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
|
40ed9a13f5b67b2941f5a9521616e57e9e31ba97 |
09-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Support code completion for parameter names in Objective-C method declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107933 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
|
6c48f6dad23720c01edca5ae407dcfdf3ada76fb |
09-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Introduce a new code-completion point prior to an identifier in the selector of an Objective-C method declaration, e.g., given - (int)first:(int)x second:(int)y; this code completion point triggers at the location of "second". It will provide completions that fill out the method declaration for any known method, anywhere in the translation unit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107929 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
|
1f5537aaac1e775aff1d523f2cc59a9a3bd6c946 |
09-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Introduce a new code-completion point prior to an identifier in the selector of an Objective-C method declaration, e.g., given - (int)first:(int)x second:(int)y; this code completion point triggers at the location of "second". It will provide completions that fill out the method declaration for any known method, anywhere in the translation unit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107929 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
|
a6135f1ac34b755f056613a0d26e05cbc953f73a |
09-Jul-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
When looking for an entity's Scope, don't consider scopes that can't contain declarations. Fixes PR7594. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107927 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
cddc69fc3fe17b043a287a41e3706766c3d09a79 |
09-Jul-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
When looking for an entity's Scope, don't consider scopes that can't contain declarations. Fixes PR7594. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107927 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
aa00a1f0e45a4dd150d3b1e36c8a2bcd8328e530 |
08-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
During code completion, give the "nil" and "NULL" macros the same priority as other constants. And, if we're in a place where we prefer a pointer type, consider "nil" and "NULL" to be close matches. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107910 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
590c7d5e79d350162d485f039018cbeb47f3b547 |
08-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
During code completion, give the "nil" and "NULL" macros the same priority as other constants. And, if we're in a place where we prefer a pointer type, consider "nil" and "NULL" to be close matches. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107910 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
19a086464234c1cdc33f8a6d9b8ecede482dab01 |
08-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Allow C-style casts and reinterpret_casts between block pointers and either integer values or other pointers. Fixes <rdar://problem/8134521>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107905 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
bf9fb88e29e565061c1e91d790af6b43c25915a7 |
08-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Allow C-style casts and reinterpret_casts between block pointers and either integer values or other pointers. Fixes <rdar://problem/8134521>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107905 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
2d562147b4d12f5ca3f1d3265c4703244182603b |
08-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When performing substitution of template arguments within the body of a template, be sure to include the template arguments from the injected-class-name. Fixes PR7587. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107895 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
emaExpr.cpp
emaTemplate.cpp
emaTemplate.h
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
24bae92f08ae098cc50a602d8cf1273b423e14da |
08-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
When performing substitution of template arguments within the body of a template, be sure to include the template arguments from the injected-class-name. Fixes PR7587. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107895 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
emaExpr.cpp
emaTemplate.cpp
emaTemplate.h
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
09d0c1016307a83bb023584d6ce40d2949a13a41 |
08-Jul-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Add support for differentiating between attributes ignored when handled and unknown attributes that we discard. Add a diagnostic group for unknown attribute warnings to allow turning these off when we don't care. Also consolidates the tests for this case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107864 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
7d5c45ed9dc2842ce8e65ea26ced0957be36a569 |
08-Jul-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Add support for differentiating between attributes ignored when handled and unknown attributes that we discard. Add a diagnostic group for unknown attribute warnings to allow turning these off when we don't care. Also consolidates the tests for this case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107864 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
0ec494632efdc9cd55608bc98d175a68084acbad |
08-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Reinstate the fix for PR7556. A silly use of isTrivial() was suppressing copies of objects with trivial copy constructors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107857 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaInit.cpp
emaStmt.cpp
reeTransform.h
|
ed8abf18329df67b0abcbb3a10458bd8c1d2a595 |
08-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Reinstate the fix for PR7556. A silly use of isTrivial() was suppressing copies of objects with trivial copy constructors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107857 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaInit.cpp
emaStmt.cpp
reeTransform.h
|
fa0b6fca56fc75c359c07a5fb1a6f328c93e61ca |
08-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Revert r107828 and r107827, the fix for PR7556, which seems to be breaking bootstrap on Linux. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107837 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaInit.cpp
emaStmt.cpp
reeTransform.h
|
84745677f64863e025a6733cb29d0b94bc3a6ae2 |
08-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Revert r107828 and r107827, the fix for PR7556, which seems to be breaking bootstrap on Linux. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107837 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaInit.cpp
emaStmt.cpp
reeTransform.h
|
0980ed1b5d22bf5cd723b41f3f745c545db613bc |
08-Jul-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Rip out the C++0x-specific handling of destructor names. The specification is still in flux and unclear, and our interim workaround was broken. Fixes PR7467. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107835 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
c0fee50ce432a63b7c4ee73e73a464af1bf388a0 |
08-Jul-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Rip out the C++0x-specific handling of destructor names. The specification is still in flux and unclear, and our interim workaround was broken. Fixes PR7467. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107835 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
3ab37982f83665f2c80e400b1149aff6ed5e21a0 |
08-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
A using declaration can redeclare a typedef to the same type. These typedefs won't have the same canonical declaration (since they are distinct), so we need to check for this case specifically. Fixes <rdar://problem/8018262>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107833 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
09acc9863fe422dc83725f77991bf80551664ada |
08-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
A using declaration can redeclare a typedef to the same type. These typedefs won't have the same canonical declaration (since they are distinct), so we need to check for this case specifically. Fixes <rdar://problem/8018262>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107833 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
38c8fe9cdead9e73d84548a6e3c8a9fb680bcb98 |
08-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Rename CXXZeroInitValueExpr to CXXScalarValueInitExpr, to reflect its newly-narrowed scope. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107828 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaInit.cpp
reeTransform.h
|
016a4a90c8e75d59de731fa3aa98f0a55656e66c |
08-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Rename CXXZeroInitValueExpr to CXXScalarValueInitExpr, to reflect its newly-narrowed scope. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107828 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaInit.cpp
reeTransform.h
|
9448d6386902e18259ccbf440e0d3787fc340b0f |
08-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Do not use CXXZeroValueInitExpr for class types. Instead, use CXXConstructExpr/CXXTemporaryObjectExpr/CXXNewExpr as appropriate. Fixes PR7556, and provides a slide codegen improvement when copy-initializing a POD class type from a value-initialized temporary. Previously, we weren't eliding the copy. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107827 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaInit.cpp
emaStmt.cpp
|
63ef464c3fad1e8b9f9360baa6c81f974b712e90 |
08-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Do not use CXXZeroValueInitExpr for class types. Instead, use CXXConstructExpr/CXXTemporaryObjectExpr/CXXNewExpr as appropriate. Fixes PR7556, and provides a slide codegen improvement when copy-initializing a POD class type from a value-initialized temporary. Previously, we weren't eliding the copy. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107827 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaInit.cpp
emaStmt.cpp
|
02d033c51048c645e793c7b1369901407a70d86d |
08-Jul-2010 |
Nate Begeman <natebegeman@mac.com> |
Fix an issue with opencl init list checking. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107824 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
3e31552aed7c6e9c915bbc8d457ec84bb4a8d7e9 |
08-Jul-2010 |
Nate Begeman <natebegeman@mac.com> |
Fix an issue with opencl init list checking. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107824 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
327727783bbdf4a7f2bc08b6aa7d3a58a5ee412c |
07-Jul-2010 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Introduce Decl::hasBody() and FunctionDecl::hasBody() and use them instead of getBody() when we are just checking the existence of a body, to avoid de-serialization of the body from PCH. Makes de-serialization of the function body even more "lazier". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107768 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
06a54a38be5054c910ffc92db60edab23f9ea105 |
07-Jul-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Introduce Decl::hasBody() and FunctionDecl::hasBody() and use them instead of getBody() when we are just checking the existence of a body, to avoid de-serialization of the body from PCH. Makes de-serialization of the function body even more "lazier". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107768 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
424e7f0c61c2c8e4c76087880abf279d1872c661 |
07-Jul-2010 |
Chris Lattner <sabre@nondot.org> |
implement PR7569, warning about assignment to null, which people seem to write when they want a deterministic trap. Suggest instead that they use a volatile pointer or __builtin_trap. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107756 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
8b5dec3002bd3e17061a8bf1fc35ba82912ec768 |
07-Jul-2010 |
Chris Lattner <sabre@nondot.org> |
implement PR7569, warning about assignment to null, which people seem to write when they want a deterministic trap. Suggest instead that they use a volatile pointer or __builtin_trap. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107756 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
5195bbb1a924cd1942da624fa30765e695f1225b |
06-Jul-2010 |
Nick Lewycky <nicholas@mxc.ca> |
Fix multiple emission of the this-> fixit for each instantiation by fixing the AST during the instantiation. Fixes PR7417! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107690 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaTemplateInstantiate.cpp
|
03d98c5d592d74ae97aa3f93f80441b64960e4b6 |
06-Jul-2010 |
Nick Lewycky <nicholas@mxc.ca> |
Fix multiple emission of the this-> fixit for each instantiation by fixing the AST during the instantiation. Fixes PR7417! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107690 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaTemplateInstantiate.cpp
|
50a7dba5b0e7701cc60ffcf6256483d3d2cf5577 |
06-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Correctly set the location of the "template" keyword for a class template specialization, from Peter Collingbourne. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107682 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
7e9b57b9db85704e0e18204343301826fd020101 |
06-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Correctly set the location of the "template" keyword for a class template specialization, from Peter Collingbourne. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107682 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
b1ffdee25c96ee80d91affdf5bdb511cf17b9f46 |
06-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Remove my egregious hack that forced deserialization of visible declarations when implicitly declaring the default constructor, copy constructor, destructor, and copy-assignment operators of a class. Argiris fixed the underlying problem in r107596. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107681 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
af57280ff8f5df43c413becfbf2415e0cdce9437 |
06-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Remove my egregious hack that forced deserialization of visible declarations when implicitly declaring the default constructor, copy constructor, destructor, and copy-assignment operators of a class. Argiris fixed the underlying problem in r107596. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107681 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
8f33423d3428ad03cfa698bbdeabeaa09510016e |
05-Jul-2010 |
Chris Lattner <sabre@nondot.org> |
fix a bug I introduced in r107624 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107626 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
c721ae85bac9bccd8494d43c1c1ec596030ffbd0 |
05-Jul-2010 |
Chris Lattner <sabre@nondot.org> |
fix a bug I introduced in r107624 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107626 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
bd401ed3b6237b51b1b46b04e492c7b0f9ed9615 |
05-Jul-2010 |
Chris Lattner <sabre@nondot.org> |
rearrange some logic, no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107624 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
fd79a9d403943c01fd6650878a86b96a9378beaf |
05-Jul-2010 |
Chris Lattner <sabre@nondot.org> |
rearrange some logic, no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107624 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
a0b52cc3c2161509acf2c0b9470cb8db105d2ff8 |
04-Jul-2010 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Don't try to install the __[u]int128_t identifier if it is already installed by PCHReader. Currently, adding it to visible decls of a PCH'ed translation unit has no effect because adding visible decls before deserialization has no effect (the decls won't be visible). This will be fixed in a future commit; then it will force deserialization of visible decls, so avoid pointlessly installing it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107595 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
006113841bdae1edb77aef75ba1ffdf2e55a3094 |
04-Jul-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Don't try to install the __[u]int128_t identifier if it is already installed by PCHReader. Currently, adding it to visible decls of a PCH'ed translation unit has no effect because adding visible decls before deserialization has no effect (the decls won't be visible). This will be fixed in a future commit; then it will force deserialization of visible decls, so avoid pointlessly installing it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107595 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
c81ccdc3e4942353b4bf245e1739e9f1d8a7250f |
03-Jul-2010 |
John McCall <rjmccall@apple.com> |
Mark the operator delete associated with a virtual destructor as referenced. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107573 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
5efd91a3b58e59006f8a3e8c9256ec00c38dba95 |
03-Jul-2010 |
John McCall <rjmccall@apple.com> |
Mark the operator delete associated with a virtual destructor as referenced. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107573 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
8894af18af4f933e99fef9641fc225b9823a385c |
03-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Lazily declare default constructors. We now delay the construction of declarations for implicit default constructors, copy constructors, copy assignment operators, and destructors. On a "simple" translation unit that includes a bunch of C++ standard library headers, we generate relatively few of these implicit declarations now: 4/159 implicit default constructors created 18/236 implicit copy constructors created 70/241 implicit copy assignment operators created 0/173 implicit destructors created And, on this translation unit, this optimization doesn't really provide any benefit. I'll do some more performance measurements soon, but this completes the implementation work for <rdar://problem/8151045>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107551 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaLookup.cpp
|
1827403a7138946305c0058f262e02b595cf882f |
03-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Lazily declare default constructors. We now delay the construction of declarations for implicit default constructors, copy constructors, copy assignment operators, and destructors. On a "simple" translation unit that includes a bunch of C++ standard library headers, we generate relatively few of these implicit declarations now: 4/159 implicit default constructors created 18/236 implicit copy constructors created 70/241 implicit copy assignment operators created 0/173 implicit destructors created And, on this translation unit, this optimization doesn't really provide any benefit. I'll do some more performance measurements soon, but this completes the implementation work for <rdar://problem/8151045>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107551 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaLookup.cpp
|
1cdf4d0686667b7f80c37cdc87679d824819bb5a |
03-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Lazily declare implicit copy constructors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107543 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaLookup.cpp
|
225843186e3972ce798d3de00f86da9008b15a0e |
03-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Lazily declare implicit copy constructors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107543 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaLookup.cpp
|
e6fc74b525021ab5f9f419c28cc00b04e2cda68f |
03-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Introduce a new routine, LookupConstructors(), and use it for all constructor-name lookup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107536 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaInit.cpp
emaLookup.cpp
emaOverload.cpp
|
e5eee5a52d98021de862b7965c88577598d52ccb |
03-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Introduce a new routine, LookupConstructors(), and use it for all constructor-name lookup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107536 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaInit.cpp
emaLookup.cpp
emaOverload.cpp
|
cbc2ab01c76cc7dea081cd23071514d88bc9fae9 |
02-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Lazily declare copy-assignment operators. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107521 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaLookup.cpp
|
a376d10acfacf19d6dfa41069f7929739a18dd7a |
02-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Lazily declare copy-assignment operators. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107521 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaLookup.cpp
|
b9aa39a0fad9109684a960bf91e13ceeeb2425e3 |
02-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Lazily declare the implicitly-declared destructor in a C++ class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107510 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaLookup.cpp
|
4923aa25eb39d64106a5817c02d560a3aecf8b2c |
02-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Lazily declare the implicitly-declared destructor in a C++ class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107510 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaLookup.cpp
|
be7344921919edd8955b2d2f43563d89bf012aee |
02-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Move the "current scope" state from the Parser into Action. This allows Sema some limited access to the current scope, which we only use in one way: when Sema is performing some kind of declaration that is not directly driven by the parser (e.g., due to template instantiatio or lazy declaration of a member), we can find the Scope associated with a DeclContext, if that DeclContext is still in the process of being parsed. Use this to make the implicit declaration of special member functions in a C++ class more "scope-less", rather than using the NULL Scope hack. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107491 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDeclCXX.cpp
emaTemplateInstantiate.cpp
|
23c94dbb6631fecdb55ba401aa93722803d980c6 |
02-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Move the "current scope" state from the Parser into Action. This allows Sema some limited access to the current scope, which we only use in one way: when Sema is performing some kind of declaration that is not directly driven by the parser (e.g., due to template instantiatio or lazy declaration of a member), we can find the Scope associated with a DeclContext, if that DeclContext is still in the process of being parsed. Use this to make the implicit declaration of special member functions in a C++ class more "scope-less", rather than using the NULL Scope hack. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107491 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDeclCXX.cpp
emaTemplateInstantiate.cpp
|
c259eacc7de93cef9aca8f01403c8c9d1c387688 |
02-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Add a new routine Sema::LookupDestructor and make all destructor-lookup calls use that routine git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107444 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaInit.cpp
emaLookup.cpp
|
db89f289a22897f1031c92f3e49f7a9ba7bae61e |
02-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Add a new routine Sema::LookupDestructor and make all destructor-lookup calls use that routine git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107444 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaInit.cpp
emaLookup.cpp
|
eb04f8714fcf4b01aa74718a54a058186babeb10 |
02-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Provide exception specifications for implicitly-declared default constructors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107437 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
eb8c670d2949eb62005eca36c64c9461f2a2173e |
02-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Provide exception specifications for implicitly-declared default constructors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107437 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
f6e57d373b333d5296f0de3661f366f60961175a |
02-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Move the implicit declaration of a default constructor into a separate routine; no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107434 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
32df23e749f12a1eaf2a8c7a31e6e69ad0ec64d8 |
02-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Move the implicit declaration of a default constructor into a separate routine; no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107434 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
29922ee81076649d7be599b7258bcdfc84c26ebd |
01-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Provide exception specifications for implicitly-declared copy constructors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107429 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
0d405db2d847acba979a74d747894bcf4d580fe3 |
01-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Provide exception specifications for implicitly-declared copy constructors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107429 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
830a8659127dd71236cde4203826099870a098c5 |
01-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Move the implicit declaration of a constructor out to a separate method. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107415 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
fabd43a5e3e9e5b8950ea7d110bbf1cd962365c0 |
01-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Move the implicit declaration of a constructor out to a separate method. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107415 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
597168f53fae44f9c409a38441f85601b54134b6 |
01-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Teach DeclareImplicitCopyConstructor how to cope with virtual bases and multi-dimensional array fields. Fixes several bugs found by inspection. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107411 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
598a8543ec4c22e7f0a27e7ff2cf7e49cfa4e4ff |
01-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Teach DeclareImplicitCopyConstructor how to cope with virtual bases and multi-dimensional array fields. Fixes several bugs found by inspection. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107411 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
cb7f870cc4cc5de94174cbbf1d3367397c50d914 |
01-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Move declaration of a class's implicit copy constructor into a separate function. Aside from making the loops infinitely faster, no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107407 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
4a0c26f57ffe685dfc795f04eaef9b805997b65e |
01-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Move declaration of a class's implicit copy constructor into a separate function. Aside from making the loops infinitely faster, no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107407 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
45c5e7c236f638b5a783dd5843c7a52b3d279a89 |
01-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Provide an exception-specification for an implicitly-declared copy-assignment operator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107406 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
b87786f045d798b070980c108c922e1475d27b15 |
01-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Provide an exception-specification for an implicitly-declared copy-assignment operator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107406 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
f02e61402b1e4d2ef4afea034143b9ad387331fa |
01-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Move the implicit declaration of a class's copy-assignment operator into a separate routine. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107402 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
d3c359041bce38e2a117b82a5bb37eba7f68b0c8 |
01-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Move the implicit declaration of a class's copy-assignment operator into a separate routine. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107402 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
a4ff76502f2a42374b8a1394efa4d21d2dfec43c |
01-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Make loops infinitely faster. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107398 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
4681ca84003bd52efbe05995a5a6853e4d9d6a60 |
01-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Make loops infinitely faster. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107398 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
5ece84ce202e7747e58ccacf24f1a7b85f9a2335 |
01-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Remove unnecessary ASTContext parameter from CXXRecordDecl::getDestructor(); no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107394 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaInit.cpp
|
1d110e05e0ff48c1c7a483d6b7fd094cdf28316a |
01-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Remove unnecessary ASTContext parameter from CXXRecordDecl::getDestructor(); no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107394 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaInit.cpp
|
6b52c7ede91b706f44b3ba50edd6380993b0bcfc |
01-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Reinstate fix for PR7526, which was failing because, now that we aren't dropping all exception specifications on destructors, the exception specifications on implicitly-declared destructors were detected as being wrong (which they were). Introduce logic to provide a proper exception-specification for implicitly-declared destructors. This also fixes PR6972. Note that the other implicitly-declared special member functions also need to get exception-specifications. I'll deal with that in a subsequent commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107385 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
d92ec474faeb6133e0d41f0de4526b22778476f2 |
01-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Reinstate fix for PR7526, which was failing because, now that we aren't dropping all exception specifications on destructors, the exception specifications on implicitly-declared destructors were detected as being wrong (which they were). Introduce logic to provide a proper exception-specification for implicitly-declared destructors. This also fixes PR6972. Note that the other implicitly-declared special member functions also need to get exception-specifications. I'll deal with that in a subsequent commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107385 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
8c4a42e8dd5f64c88b94272e38ad296c4b9332b5 |
01-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When performing copy initialization via user-defined conversions, don't allow two user-defined conversions. Fixes PR6595 (again). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107379 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
4712c02c1550a72612c07f5aaee455dcd8273b96 |
01-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
When performing copy initialization via user-defined conversions, don't allow two user-defined conversions. Fixes PR6595 (again). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107379 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
63898a869b7c0e4b2a65b1f2a1a91be7ae4d955c |
01-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Revert r107374, which broke bootstrap. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107378 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
4b662a5684d41ea4ff6b52711929e00fefb00db1 |
01-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Revert r107374, which broke bootstrap. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107378 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
9208d66801d98d54d2159701ac731a7b41b66a0f |
01-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When building the type of a destructor, make sure to keep the exception specification. Fixes PR7526. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107374 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
2fef752aebece6786e5f3d54984272ef85564af8 |
01-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
When building the type of a destructor, make sure to keep the exception specification. Fixes PR7526. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107374 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
82a2ae24f51d2821d6caef1cf4d9374b4948959d |
01-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Extend the "cannot convert from base class pointer to derived class pointer" diagnostic to handle references, too. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107372 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
2f9d8740f557bc1f8746a2d5c4498b324b63eeb9 |
01-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Extend the "cannot convert from base class pointer to derived class pointer" diagnostic to handle references, too. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107372 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
2bff3276d2c32ad78beaf85dd74ac48c9fb13174 |
01-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Be a bit more careful with undefined CXXRecordDecls. Fixes rdar://problem/8124080 and PR7118. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107358 91177308-0d34-0410-b5e6-96231b3b80d8
umpDiagnostics.cpp
emaLookup.cpp
|
025291b591a528d8a3f303991f65e19fa1e90a9d |
01-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Be a bit more careful with undefined CXXRecordDecls. Fixes rdar://problem/8124080 and PR7118. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107358 91177308-0d34-0410-b5e6-96231b3b80d8
umpDiagnostics.cpp
emaLookup.cpp
|
c384faf30bfffe88697bf36e765ecbdd531a0bfc |
01-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement C++ DR481, which clarifies that the scope of template parameters starts at the end of the template-parameter rather than at the point where the template parameter name is encounted. For example, given: typedef unsigned char T; template<typename T = T> struct X0 { }; The "T" in the default argument refers to the typedef of "unsigned char", rather than referring to the newly-introduced template type parameter 'T'. Addresses <rdar://problem/8122812>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107354 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
|
bb3310a5fd9c08741b5272ed2665bdeab76a99a6 |
01-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement C++ DR481, which clarifies that the scope of template parameters starts at the end of the template-parameter rather than at the point where the template parameter name is encounted. For example, given: typedef unsigned char T; template<typename T = T> struct X0 { }; The "T" in the default argument refers to the typedef of "unsigned char", rather than referring to the newly-introduced template type parameter 'T'. Addresses <rdar://problem/8122812>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107354 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
|
cd14694e765ad9c5f664d476e6c8b8a68579c772 |
01-Jul-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve diagnostic when we fail to pick an overload because it would require a base-to-derived pointer conversion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107349 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
8578981ada66dae44a5a0752f949a5e65b477588 |
01-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Improve diagnostic when we fail to pick an overload because it would require a base-to-derived pointer conversion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107349 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
765bc14141b7f45ee8069d7d3e80774d0b9ec62c |
01-Jul-2010 |
John Thompson <john.thompson.jtsoftware@gmail.com> |
Fix vector literal/cast confusion - bug 6895. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107347 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
8bb59a828ef21d0b2ed2b0efab60e4eddcb81c62 |
01-Jul-2010 |
John Thompson <John.Thompson.JTSoftware@gmail.com> |
Fix vector literal/cast confusion - bug 6895. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107347 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
42e3f614f9763ad353c6abf57fd847a02a67abf9 |
30-Jun-2010 |
Eric Christopher <echristo@apple.com> |
Add a return to silence a warning. Alternately a default: return false would work. Sebastian: figure out which one you want :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107305 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
1c3d5029dbfb5bb01ab38d53e7d4dc29e9a8591f |
30-Jun-2010 |
Eric Christopher <echristo@apple.com> |
Add a return to silence a warning. Alternately a default: return false would work. Sebastian: figure out which one you want :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107305 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
f95e74eb9e9c8bf56c6cc23d2fd09da574a81c0a |
30-Jun-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Make both old and new versions of reference binding use the new classification functions, and updated them for N3092. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107301 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
emaOverload.cpp
|
4680bf233caeebe89aa297eb5a25709dd15a4b11 |
30-Jun-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Make both old and new versions of reference binding use the new classification functions, and updated them for N3092. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107301 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
emaOverload.cpp
|
3cb6ec521c6f86ecae206bdf68edaf6b9ba7654d |
30-Jun-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Complain about the application of a transparent_union attribute to a union whose first field has integral vector type. Also, clean up this diagnostic a bit. Thanks to Eli for spotting this change in semantics last week. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107296 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
90cd672ed107d5986936c577ce47ad7374096bd2 |
30-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
Complain about the application of a transparent_union attribute to a union whose first field has integral vector type. Also, clean up this diagnostic a bit. Thanks to Eli for spotting this change in semantics last week. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107296 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
14a9d2c47ae6f6686ff264f235ac43fdba856d6e |
30-Jun-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Fix a comment typo. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107290 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
36c28db83d2141ca4e74c4d2e92be5a3a772e2c3 |
30-Jun-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Fix a comment typo. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107290 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
c18db1629e1486945287bc6b17e0a213f5247752 |
30-Jun-2010 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Fix rdar://8139785 "implement warning on dead expression in comma operator" As a bonus, fix the warning for || and && operators; it was emitted even if one of the operands had side effects, e.g: x || test_logical_foo1(); emitted a bogus "expression result unused" for 'x'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107274 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
25973455aed1cdc9c40b208c792b5db4f8f1297d |
30-Jun-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Fix rdar://8139785 "implement warning on dead expression in comma operator" As a bonus, fix the warning for || and && operators; it was emitted even if one of the operands had side effects, e.g: x || test_logical_foo1(); emitted a bogus "expression result unused" for 'x'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107274 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
2ab6745166b59f4c9288dbd55153deb3842c8238 |
30-Jun-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Reapply r107235, this time with both my typo fixed, and a logical bug fixed. Previously we relied on the presence of a member which needs no initialization to prevent us from creating an additional initialization of the outer anonymous union field. We have already correctly marked that field as initialized by the member of the union (repeatedly due to the original bug this patch fixes) so we simply need to bail out. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107242 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
e861c60bde74cf495447f50844d7ee7ea3a8a7a0 |
30-Jun-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Reapply r107235, this time with both my typo fixed, and a logical bug fixed. Previously we relied on the presence of a member which needs no initialization to prevent us from creating an additional initialization of the outer anonymous union field. We have already correctly marked that field as initialized by the member of the union (repeatedly due to the original bug this patch fixes) so we simply need to bail out. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107242 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
6132d65b49e62037e81ae980e92e3e2e41415fe6 |
30-Jun-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Revert r107235, it had a silly typo in it, and fixing the typo breaks something else. Get the build bots happy while I debug. Very sorry for the delay fixing this... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107239 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
ec29b352b7ab2a2e99f7a9b78ce27c5e2a08d0e1 |
30-Jun-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Revert r107235, it had a silly typo in it, and fixing the typo breaks something else. Get the build bots happy while I debug. Very sorry for the delay fixing this... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107239 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
5ad049dd314db7ee4d748c58a62de38f9ff22f3e |
30-Jun-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Fix PR7402: We were creating implicit member initializers for every field in an anonymous union under the presumption that they didn't do anything. While this is true, our checks for redundant initialization of an anonymous union still fire when these overlap with explicit user initialization. A cleaner approach is to avoid initializing multiple members of a union altogether, but this still is in a rather fuzzy are especially when C++0x allows non-POD types into unions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107235 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
e9c9d15ef9429257136564c5bab76dbe286e37c7 |
30-Jun-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Fix PR7402: We were creating implicit member initializers for every field in an anonymous union under the presumption that they didn't do anything. While this is true, our checks for redundant initialization of an anonymous union still fire when these overlap with explicit user initialization. A cleaner approach is to avoid initializing multiple members of a union altogether, but this still is in a rather fuzzy are especially when C++0x allows non-POD types into unions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107235 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
b9b01751b9f0468f1833f85505dbd48473baaf6f |
30-Jun-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement C++ DR299, which allows an implicit conversion from a class type to an integral or enumeration type in the size of an array new expression, e.g., new int[ConvertibleToInt(10)]; This is a GNU and C++0x extension. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107229 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
emaOverload.cpp
emaStmt.cpp
|
6bc574daab3d3571d888cc4a21df67f2e2a14792 |
30-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement C++ DR299, which allows an implicit conversion from a class type to an integral or enumeration type in the size of an array new expression, e.g., new int[ConvertibleToInt(10)]; This is a GNU and C++0x extension. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107229 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
emaOverload.cpp
emaStmt.cpp
|
92b4ef60e7697241c129a082715156f0b2e8c6c7 |
30-Jun-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Retain the source location of the constructor when building an implicit member initialization. I tried several ideas but couldn't come up with a test case for this that didn't rely on a Clang bug to report a diagnostic after template instantiation of the constructor due to the implicit initializers. Suggestions welcome. This fixes the source location aspect of PR7402. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107226 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
f186b54cc68e13a819736a54bc11d37179029154 |
30-Jun-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Retain the source location of the constructor when building an implicit member initialization. I tried several ideas but couldn't come up with a test case for this that didn't rely on a Clang bug to report a diagnostic after template instantiation of the constructor due to the implicit initializers. Suggestions welcome. This fixes the source location aspect of PR7402. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107226 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
89f63bf0759d6d5908ec6ee07dc05dfebf1437b3 |
30-Jun-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Re-improve recovery when the condition of a switch statement does not have integral or enumeration type, so that we still check the contents of the switch body. My previous patch made this worse; now we're back to where we were previously. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107223 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaStmt.cpp
|
acb0bd85d30ecacbe872ca9d9cfac5d7b6038a43 |
30-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
Re-improve recovery when the condition of a switch statement does not have integral or enumeration type, so that we still check the contents of the switch body. My previous patch made this worse; now we're back to where we were previously. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107223 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaStmt.cpp
|
39267a4293a8c24fdb95c83998bea0c4f129db50 |
30-Jun-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Factor the conversion from a switch condition to an integral or enumeration type out into a separate, reusable routine. The only functionality change here is that we recover a little more aggressively from ill-formed switch conditions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107222 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
emaOverload.cpp
emaStmt.cpp
|
c30614b7e2bad089f2509499379de509f33162d6 |
30-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
Factor the conversion from a switch condition to an integral or enumeration type out into a separate, reusable routine. The only functionality change here is that we recover a little more aggressively from ill-formed switch conditions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107222 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
emaOverload.cpp
emaStmt.cpp
|
de0a95b8662e0267a5bf81801e87477d67d74c17 |
29-Jun-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When typo correction produces a result that is not of the kind we're looking for, reset the name within the LookupResult structure in addition to clearing out the results. Fixes PR7508. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107197 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaTemplate.cpp
|
12eb5d6aa882eb247a6c22225b625eee04217105 |
29-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
When typo correction produces a result that is not of the kind we're looking for, reset the name within the LookupResult structure in addition to clearing out the results. Fixes PR7508. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107197 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaTemplate.cpp
|
a5f779d2672f5a4d4d7e467b46ab868108102701 |
29-Jun-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Typo correction for namespace alias definitions git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107191 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
0e8c4b9fac447c6c9849e3ef8beb1ef273ac0f97 |
29-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
Typo correction for namespace alias definitions git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107191 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
89054716d4628f7b4301c9c2d06ea1db132ca41d |
29-Jun-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
This patch fixes a bug whereby, clang skipped unimplemented property warning for properties coming from class's conformin protocol. It also simplifies the algorithm in the process. Fixes radar 8035776. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107174 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaObjCProperty.cpp
|
cfa6a27f3cc5add888c6ac84dbcc45854cfd8666 |
29-Jun-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
This patch fixes a bug whereby, clang skipped unimplemented property warning for properties coming from class's conformin protocol. It also simplifies the algorithm in the process. Fixes radar 8035776. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107174 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaObjCProperty.cpp
|
6c80d32157032a7f66dc587e74ae36ac11d7f5b4 |
29-Jun-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Allow a using directive to refer to the implicitly-defined namespace "std", with a warning, to improve GCC compatibility. Fixes PR7517. As a drive-by, add typo correction for using directives. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107172 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExprCXX.cpp
|
6699220f73f11e471b5e5aa42eaf064afeaa079e |
29-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
Allow a using directive to refer to the implicitly-defined namespace "std", with a warning, to improve GCC compatibility. Fixes PR7517. As a drive-by, add typo correction for using directives. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107172 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExprCXX.cpp
|
603ddc799fb9fe380fe065fca33521fb8d9f2f22 |
29-Jun-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
With packed enums, an enumerator's value may be stored in more bits than the enumeration type itself takes. Fixes PR7477. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107163 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
6623584c0ec508110d75572eef092bf98fedf3f4 |
29-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
With packed enums, an enumerator's value may be stored in more bits than the enumeration type itself takes. Fixes PR7477. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107163 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
0161c3c6f1882f87a61266cb7fc20fcc2b83ea5f |
28-Jun-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Partial fix for PR7267 based on comments by John McCall on an earlier patch. This is more targeted, as it simply provides toggle actions for the parser to turn access checking on and off. We then use these to suppress access checking only while we parse the template-id (included scope specifier) of an explicit instantiation and explicit specialization of a class template. The specialization behavior is an extension, as it seems likely a defect that the standard did not exempt them as it does explicit instantiations. This allows the very common practice of specializing trait classes to work for private, internal types. This doesn't address instantiating or specializing function templates, although those apparently already partially work. The naming and style for the Action layer isn't my favorite, comments and suggestions would be appreciated there. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106993 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaAccess.cpp
|
926c4b486a08f698cd3a367fd6f1a3a07604358d |
28-Jun-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Partial fix for PR7267 based on comments by John McCall on an earlier patch. This is more targeted, as it simply provides toggle actions for the parser to turn access checking on and off. We then use these to suppress access checking only while we parse the template-id (included scope specifier) of an explicit instantiation and explicit specialization of a class template. The specialization behavior is an extension, as it seems likely a defect that the standard did not exempt them as it does explicit instantiations. This allows the very common practice of specializing trait classes to work for private, internal types. This doesn't address instantiating or specializing function templates, although those apparently already partially work. The naming and style for the Action layer isn't my favorite, comments and suggestions would be appreciated there. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106993 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaAccess.cpp
|
7bcb644a671f64a753b729f0e6bdfdfed553cd48 |
28-Jun-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Suppress diagnosing access violations while looking up deallocation functions much as we already do for allocation function lookup. Explicitly check access for the function we actually select in one case that was previously missing, but being caught behind the blanket diagnostics for all overload candidates. This fixs PR7436. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106986 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
2389324eb73a1c99d5dfc1dc9eed047ddc96a7b4 |
28-Jun-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Suppress diagnosing access violations while looking up deallocation functions much as we already do for allocation function lookup. Explicitly check access for the function we actually select in one case that was previously missing, but being caught behind the blanket diagnostics for all overload candidates. This fixs PR7436. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106986 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
b81364e24c119de244dd6e8c638a10970c4b8fd5 |
26-Jun-2010 |
Ted Kremenek <kremenek@apple.com> |
Use TypeSourceInfo to help determine the SourceRange of a CXXNewExpr. This fixes several cases where we generated an invalid SourceRange for this expression. Thanks to John McCall for helping me figure this out. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106903 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
f9d5bac60bce072a754ca629d3899e8c6c0b5018 |
26-Jun-2010 |
Ted Kremenek <kremenek@apple.com> |
Use TypeSourceInfo to help determine the SourceRange of a CXXNewExpr. This fixes several cases where we generated an invalid SourceRange for this expression. Thanks to John McCall for helping me figure this out. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106903 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
39683dcf7e2465bdab8bd33c8b39f096be7dcf38 |
25-Jun-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Implement dependent alignment attribute support. This is a bit gross given the current attribute system, but it is enough to handle class templates which specify parts of their alignment in terms of their template parameters. This also replaces the attributes test in SemaTemplate with one that actually tests working attributes instead of broken ones. I plan to add more tests here for non-dependent attributes in a subsequent patch. Thanks to John for walking me through some of this. =D git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106818 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclAttr.cpp
emaTemplateInstantiateDecl.cpp
|
4ced79f0971592e6e7122037de69ee9ae534ce72 |
25-Jun-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Implement dependent alignment attribute support. This is a bit gross given the current attribute system, but it is enough to handle class templates which specify parts of their alignment in terms of their template parameters. This also replaces the attributes test in SemaTemplate with one that actually tests working attributes instead of broken ones. I plan to add more tests here for non-dependent attributes in a subsequent patch. Thanks to John for walking me through some of this. =D git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106818 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclAttr.cpp
emaTemplateInstantiateDecl.cpp
|
5b445e2c55a05a802bc191f49f1e87360c6936b4 |
25-Jun-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Add comment for my last patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106813 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
fba9e8f85b3043da0e045cd653bcba9b6c60e067 |
25-Jun-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Add comment for my last patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106813 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
93f0a1fac26d2541f44b041d1dd849bc43297394 |
24-Jun-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Fixes a regression when redeclaration of a global satic is an extern local to a function. Radar 8125274. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106773 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
7d99e989c1a20e358f472e35d615313f2fe223db |
24-Jun-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Fixes a regression when redeclaration of a global satic is an extern local to a function. Radar 8125274. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106773 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
9484f8eade39f9d22deb26abdd6c1c804b820eac |
23-Jun-2010 |
Chris Lattner <sabre@nondot.org> |
improve altivec vector bool/pixel support, patch by Anton Yartsev with several tweaks by me. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106619 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaType.cpp
reeTransform.h
|
788b0fd67e1992f23555454efcdb16a19dfefac3 |
23-Jun-2010 |
Chris Lattner <sabre@nondot.org> |
improve altivec vector bool/pixel support, patch by Anton Yartsev with several tweaks by me. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106619 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaType.cpp
reeTransform.h
|
91f3b565b48829a1a9993b512a11c7c3a382ce31 |
23-Jun-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
String literals enclosed in parentheses are still string literals. Fixes PR7488. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106607 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
1984eb9a1522ad56e1310643a85f66b2b3424c91 |
23-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
String literals enclosed in parentheses are still string literals. Fixes PR7488. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106607 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
ce492a32789c503d84c777bbf16cd40b07884c2b |
23-Jun-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Vector types are not arithmetic types, either. Note that we now ban __real myvec and __imag myvec, since they aren't all that useful (it's just an identity function) but we might want to use them in more restricted cases in the future (e.g., "__real mycomplexvec" could extract the real parts of a vector of complex numbers). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106601 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaOverload.cpp
|
00619623af0b9d3271e31402ec1a95e84c2c4526 |
23-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
Vector types are not arithmetic types, either. Note that we now ban __real myvec and __imag myvec, since they aren't all that useful (it's just an identity function) but we might want to use them in more restricted cases in the future (e.g., "__real mycomplexvec" could extract the real parts of a vector of complex numbers). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106601 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaOverload.cpp
|
a20e00282c792f039b1abecec2b00fb392a19dae |
23-Jun-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to provide separate ASTs for multiple ObjC class extension declarations (implements radar 7928731). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106597 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
emaDeclObjC.cpp
emaObjCProperty.cpp
|
80aa1cd7973561889e51c1c152c8990a8de9c953 |
23-Jun-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to provide separate ASTs for multiple ObjC class extension declarations (implements radar 7928731). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106597 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
emaDeclObjC.cpp
emaObjCProperty.cpp
|
e4a621552c52b7733af4b8c684abc54769ff0ec6 |
23-Jun-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Type Type::isRealFloatingType() that vectors are not floating-point types, updating callers of both isFloatingType() and isRealFloatingType() accordingly. Caught at least one issue where we allowed one to declare a vector of vectors (!), along with cleaning up the standard-conversion logic for C++. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106595 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaOverload.cpp
emaStmt.cpp
|
0c293ea13d452c1a47a05ada5a5ee9acc69c66cc |
23-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
Type Type::isRealFloatingType() that vectors are not floating-point types, updating callers of both isFloatingType() and isRealFloatingType() accordingly. Caught at least one issue where we allowed one to declare a vector of vectors (!), along with cleaning up the standard-conversion logic for C++. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106595 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaOverload.cpp
emaStmt.cpp
|
1a7c1b12a61ed17f914c9d557dd6666e0253c133 |
23-Jun-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Change Type::isFloatingType() to reflect the actual definition of a "floating type" in C, which does not include vector types. Introduce Type::hasFloatingRepresentation() for the places where we want to know whether the underlying representation is one or more floating-point values. Remove some hacks we had where the former behavior of Type::isFloatingType() was at odds with the language definition of the term. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106584 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaExpr.cpp
emaOverload.cpp
|
8eee119bf4f1693dde17b8552c1f9f81bf2b681e |
23-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
Change Type::isFloatingType() to reflect the actual definition of a "floating type" in C, which does not include vector types. Introduce Type::hasFloatingRepresentation() for the places where we want to know whether the underlying representation is one or more floating-point values. Remove some hacks we had where the former behavior of Type::isFloatingType() was at odds with the language definition of the term. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106584 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaExpr.cpp
emaOverload.cpp
|
502b73d70b0a88732980940ca535f741040f1406 |
22-Jun-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Don't allow vector conversions to sneak in under the guise of floating-point conversions or floating-integral conversions. We really, really, really need to make isFloatingType() and friends not apply to vector types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106551 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
7c5b1097f5833326b4f5046d6a7d5cb7b9060145 |
22-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
Don't allow vector conversions to sneak in under the guise of floating-point conversions or floating-integral conversions. We really, really, really need to make isFloatingType() and friends not apply to vector types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106551 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
978e59a58b8f241c5767939a68cfd272b4b98686 |
22-Jun-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
In C++, allow a declaration of an enum to follow a definition of that enum as a GNU extension. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106540 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f3a7b7cfacf802db5458874842b71a74845f0023 |
22-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
In C++, allow a declaration of an enum to follow a definition of that enum as a GNU extension. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106540 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
ffb8eaf81324290c108ab3107c1ddda379a83eb0 |
22-Jun-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Apply array-to-pointer decay when instantiating a MemberExpr. Fixes PR7405, patch by Kyle Lippincott! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106523 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
83c9abcce26422420dcdb9d2741bced21ee2477f |
22-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
Apply array-to-pointer decay when instantiating a MemberExpr. Fixes PR7405, patch by Kyle Lippincott! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106523 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
b377aed9fc0a90a0788af717c5a37c871061b7ce |
22-Jun-2010 |
Chris Lattner <sabre@nondot.org> |
implement support for -finstrument-functions, patch by Nelson Elhage! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106507 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
7255a2d997b15beae82e627052fdb1b2474495c2 |
22-Jun-2010 |
Chris Lattner <sabre@nondot.org> |
implement support for -finstrument-functions, patch by Nelson Elhage! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106507 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
880e7654b8ac173f0275d947ccd0d328efc2926b |
22-Jun-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Alter the internal representation of the condition variable in if/while/switch/for statements to ensure that walking the children of these statements actually works. Previously, we stored the condition variable as a VarDecl. However, StmtIterator isn't able to walk from a VarDecl to a set of statements, and would (in some circumstances) walk beyond the end of the list of statements, cause Bad Behavior. In this change, we've gone back to representing the condition variables as DeclStmts. While not as memory-efficient as VarDecls, it greatly simplifies iteration over the children. Fixes the remainder of <rdar://problem/8104754>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106504 91177308-0d34-0410-b5e6-96231b3b80d8
umpDiagnostics.cpp
emaStmt.cpp
|
43dec6bbde2d0a16c35978983761c8b7030c8e18 |
22-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
Alter the internal representation of the condition variable in if/while/switch/for statements to ensure that walking the children of these statements actually works. Previously, we stored the condition variable as a VarDecl. However, StmtIterator isn't able to walk from a VarDecl to a set of statements, and would (in some circumstances) walk beyond the end of the list of statements, cause Bad Behavior. In this change, we've gone back to representing the condition variables as DeclStmts. While not as memory-efficient as VarDecls, it greatly simplifies iteration over the children. Fixes the remainder of <rdar://problem/8104754>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106504 91177308-0d34-0410-b5e6-96231b3b80d8
umpDiagnostics.cpp
emaStmt.cpp
|
421ecac76ccf3cb93bea4104ed1b41088bf93c89 |
22-Jun-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Zero out a stale pointer git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106497 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
f918b8328add31b17075def5f56e53a3c572b084 |
22-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
Zero out a stale pointer git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106497 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e9eecb2c037cebd9074b23bb571313ba6ab39bee |
21-Jun-2010 |
Tom Care <tcare@apple.com> |
Bug 7377: printf checking fails to flag some undefined behavior http://llvm.org/bugs/show_bug.cgi?id=7377 Updated format string highlighting and fixits to take advantage of the new CharSourceRange class. - Change HighlightRange to allow highlighting whitespace only in a CharSourceRange (for warnings about the ' ' (space) flag) - Change format specifier range helper function to allow for half-open ranges (+1 to end) - Enabled previously failing tests (FIXMEs/XFAILs removed) - Small fixes and additions to format string test cases M test/Sema/format-strings.c M test/Sema/format-strings-fixit.c M lib/Frontend/TextDiagnosticPrinter.cpp M lib/Sema/SemaChecking.cpp git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106480 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
45f9b7e8f23072d662ee1cc758f4ecb0da5e3322 |
21-Jun-2010 |
Tom Care <tcare@apple.com> |
Bug 7377: printf checking fails to flag some undefined behavior http://llvm.org/bugs/show_bug.cgi?id=7377 Updated format string highlighting and fixits to take advantage of the new CharSourceRange class. - Change HighlightRange to allow highlighting whitespace only in a CharSourceRange (for warnings about the ' ' (space) flag) - Change format specifier range helper function to allow for half-open ranges (+1 to end) - Enabled previously failing tests (FIXMEs/XFAILs removed) - Small fixes and additions to format string test cases M test/Sema/format-strings.c M test/Sema/format-strings-fixit.c M lib/Frontend/TextDiagnosticPrinter.cpp M lib/Sema/SemaChecking.cpp git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106480 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
0016e5c027e2efc965a1f01c95da85ba716c11b0 |
21-Jun-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
IRGen for implementation of init-priority attribute. Test case will be checked in llvm test suite. (finishes off radar 8076356). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106441 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
9f967c5e4bbeb48caf6d0e62056b3d3fee20bf7c |
21-Jun-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
IRGen for implementation of init-priority attribute. Test case will be checked in llvm test suite. (finishes off radar 8076356). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106441 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
6e86ecc546446a3ccc3b42f44afb458b8d2f2c30 |
21-Jun-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Fixes a corner case bug whereby declaring and defining an extern variable in a particular sequence causes its definition to not be generated in the object file. (fixes radar 8071804). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106424 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
2bf6d7b1f7406ca4dfe841d4f6ef4b91dce195e4 |
21-Jun-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Fixes a corner case bug whereby declaring and defining an extern variable in a particular sequence causes its definition to not be generated in the object file. (fixes radar 8071804). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106424 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
83d9019aa4da071f1ac5be3f59bde623a702108f |
19-Jun-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
More Sema Check and a test case for init_priority attr. (radar 8076356). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106350 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
b9d5c22529c3f2bf3b03348021c0fd1c723d8516 |
19-Jun-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
More Sema Check and a test case for init_priority attr. (radar 8076356). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106350 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
ae7d343644a8872aef6f1642ef429c51e47ab5dc |
19-Jun-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
A trivial fix for a test case that's too horrible to commit. Fixes <rdar://problem/8108088>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106328 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
96fb42ea29253cf2b34848dfdb3e40ef14ca8ebc |
19-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
A trivial fix for a test case that's too horrible to commit. Fixes <rdar://problem/8108088>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106328 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
2f08858b0aa8e90be4e3682aac0797582624f7cd |
18-Jun-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Implements Sema part of init_priority(priority) attribute (radar 8076356) - wip. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106322 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
521f12d3dfdbb0e93d1bcb503d074e67acdc489c |
18-Jun-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Implements Sema part of init_priority(priority) attribute (radar 8076356) - wip. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106322 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
405785c8a3d5e71dee0232e2864a4eacc7f1ddbe |
18-Jun-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Don't complain about missing field initializers when the initializer list is completely empty, from Lasse Kärkkäinen! Fixes PR7413. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106320 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
8e19890c329279c5ac35ab71a35423d429d80165 |
18-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
Don't complain about missing field initializers when the initializer list is completely empty, from Lasse Kärkkäinen! Fixes PR7413. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106320 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
fbe5d221177a87d2d30c17586a09ca7c0218d475 |
18-Jun-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Merge the "regparm" attribute from a previous declaration of a function to redeclarations of that function. Fixes PR7025. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106317 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d2c6490385555eaabfaf611d1cf6e89544163c4a |
18-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
Merge the "regparm" attribute from a previous declaration of a function to redeclarations of that function. Fixes PR7025. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106317 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
b2f395069145e9853bfc33a63dd0aa0efb5ff1e2 |
18-Jun-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Given Decl::isUsed() a flag indicating when to consider the "used" attribute as part of the calculation. Sema::MarkDeclReferenced(), and a few other places, want only to consider the "used" bit to determine, e.g, whether to perform template instantiation. Fixes a linkage issue with Boost.Serialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106252 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaTemplateInstantiateDecl.cpp
|
c070cc602d6eefea881f71a60de09e05b54c3fdd |
18-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
Given Decl::isUsed() a flag indicating when to consider the "used" attribute as part of the calculation. Sema::MarkDeclReferenced(), and a few other places, want only to consider the "used" bit to determine, e.g, whether to perform template instantiation. Fixes a linkage issue with Boost.Serialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106252 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaTemplateInstantiateDecl.cpp
|
3f783a68df59e3cbdbfc6d1220db3524bd81a530 |
17-Jun-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Do not treat @selector as lvalue (unlike g++). Patch by Nico Weber (pr7390). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106242 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
949bd4b611f4be575d63da36c94c3662dfa4d459 |
17-Jun-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Do not treat @selector as lvalue (unlike g++). Patch by Nico Weber (pr7390). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106242 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
cc9aa159c15c524f4a5fc73ac90e02a8578e9d29 |
17-Jun-2010 |
Tom Care <tcare@apple.com> |
Bug 7377: Fixed several bad printf format string bugs. - Added warning for undefined behavior when using field specifier - Added warning for undefined behavior when using length modifier - Fixed warnings for invalid flags - Added warning for ignored flags - Added fixits for the above warnings - Fixed accuracy of detecting several undefined behavior conditions - Receive normal warnings in addition to security warnings when using %n - Fix bug where '+' flag would remain on unsigned conversion suggestions Summary of changes: - Added expanded tests - Added/expanded warnings - Added position info to OptionalAmounts for fixits - Extracted optional flags to a wrapper class with position info for fixits - Added several methods to validate a FormatSpecifier by component, each checking for undefined behavior - Fixed conversion specifier checking to conform to C99 standard - Added hooks to detect the invalid states in CheckPrintfHandler::HandleFormatSpecifier Note: warnings involving the ' ' (space) flag are temporarily disabled until whitespace highlighting no longer triggers assertions. I will make a post about this on cfe-dev shortly. M test/Sema/format-strings.c M include/clang/Basic/DiagnosticSemaKinds.td M include/clang/Analysis/Analyses/PrintfFormatString.h M lib/Analysis/PrintfFormatString.cpp M lib/Sema/SemaChecking.cpp git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106233 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
e4ee9663168dfb2b4122c768091e30217328c9fa |
17-Jun-2010 |
Tom Care <tcare@apple.com> |
Bug 7377: Fixed several bad printf format string bugs. - Added warning for undefined behavior when using field specifier - Added warning for undefined behavior when using length modifier - Fixed warnings for invalid flags - Added warning for ignored flags - Added fixits for the above warnings - Fixed accuracy of detecting several undefined behavior conditions - Receive normal warnings in addition to security warnings when using %n - Fix bug where '+' flag would remain on unsigned conversion suggestions Summary of changes: - Added expanded tests - Added/expanded warnings - Added position info to OptionalAmounts for fixits - Extracted optional flags to a wrapper class with position info for fixits - Added several methods to validate a FormatSpecifier by component, each checking for undefined behavior - Fixed conversion specifier checking to conform to C99 standard - Added hooks to detect the invalid states in CheckPrintfHandler::HandleFormatSpecifier Note: warnings involving the ' ' (space) flag are temporarily disabled until whitespace highlighting no longer triggers assertions. I will make a post about this on cfe-dev shortly. M test/Sema/format-strings.c M include/clang/Basic/DiagnosticSemaKinds.td M include/clang/Analysis/Analyses/PrintfFormatString.h M lib/Analysis/PrintfFormatString.cpp M lib/Sema/SemaChecking.cpp git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106233 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
3b942ee808738ae598d1d3649dda9128009892a1 |
17-Jun-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When pushing a copy of the TypeLoc information for a dependent template specialization type, copy the location information but use the new type. Fixes PR7385. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106224 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
e2872d0bda1d209d4409de2ed13648e6811628b7 |
17-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
When pushing a copy of the TypeLoc information for a dependent template specialization type, copy the location information but use the new type. Fixes PR7385. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106224 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
5ea49394ba0686a939818b44c0417cefae4a3f60 |
17-Jun-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Use UnaryOperator as the representation of dependent expressions when no overloaded operators were found in scope, mirroring what we already do for BinaryOperator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106222 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
1ec8ef7cd60e9615979e618ec39ab88305917949 |
17-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
Use UnaryOperator as the representation of dependent expressions when no overloaded operators were found in scope, mirroring what we already do for BinaryOperator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106222 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
976d174ca7df21123db7901c5d8d0af328bc1568 |
17-Jun-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Update CMake build system for ARM NEON generation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106220 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
|
2390b62f3afd9cc83d03a1972d4533eb52c246a4 |
17-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
Update CMake build system for ARM NEON generation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106220 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
|
18b01bd5d2e05de5e6789f153d160dbb86f465c9 |
17-Jun-2010 |
Gabor Greif <ggreif@gmail.com> |
fix some more gcc3.4 constness warnings git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106216 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
170e5080011acc60e33ec9b53f96c569a1078aa9 |
17-Jun-2010 |
Gabor Greif <ggreif@gmail.com> |
fix some more gcc3.4 constness warnings git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106216 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
8e68334c94fee2c342d0279077399313b3b14a67 |
17-Jun-2010 |
Nate Begeman <natebegeman@mac.com> |
Generate arm_neon.inc in include/clang/Basic, which provides: 1. builtins definitions for BuiltinsARM.def 2. intrinsic validation code for SemaChecking Unsure as to whether this is the best way to handle the make dependencies or not. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106208 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
a23326b5c244a03bf61ebb86db60a777ea26f926 |
17-Jun-2010 |
Nate Begeman <natebegeman@mac.com> |
Generate arm_neon.inc in include/clang/Basic, which provides: 1. builtins definitions for BuiltinsARM.def 2. intrinsic validation code for SemaChecking Unsure as to whether this is the best way to handle the make dependencies or not. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106208 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
4998ed0a1e51e2bb3ab6feef9340a23e53badbeb |
17-Jun-2010 |
Nate Begeman <natebegeman@mac.com> |
Remove last of the bool shifts for MS VC++, patch by dimitry andric git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106206 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
d69ec16b1b03b4a97c571ff14f15769fe13c1e5a |
17-Jun-2010 |
Nate Begeman <natebegeman@mac.com> |
Remove last of the bool shifts for MS VC++, patch by dimitry andric git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106206 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
00f90b974369ccd699c3d29e4edef8526d78083c |
17-Jun-2010 |
Sean Hunt <rideau3@gmail.com> |
Update CMake build for new attribute changes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106188 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
|
ee6e4b4baa1acd85ba8b142862ac5986621aaffd |
17-Jun-2010 |
Sean Hunt <rideau3@gmail.com> |
Update CMake build for new attribute changes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106188 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
|
16b009cf11f3c61b871d2f25b1f521225ba86f3c |
17-Jun-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When we see a 'template' disambiguator that marks the next identifier (or operator-function-id) as a template, but the context is actually non-dependent or the current instantiation, allow us to use knowledge of what kind of template it is, e.g., type template vs. function template, for further syntactic disambiguation. This allows us to parse properly in the presence of stray "template" keywords, which is necessary in C++0x and it's good recovery in C++98/03. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106167 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
reeTransform.h
|
d6ab232bb3ec9847de5af06249afb63078b5f2ee |
17-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
When we see a 'template' disambiguator that marks the next identifier (or operator-function-id) as a template, but the context is actually non-dependent or the current instantiation, allow us to use knowledge of what kind of template it is, e.g., type template vs. function template, for further syntactic disambiguation. This allows us to parse properly in the presence of stray "template" keywords, which is necessary in C++0x and it's good recovery in C++98/03. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106167 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
reeTransform.h
|
2a5941c3fbd9b1601c64959295c47f13a14bf7c0 |
17-Jun-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix the recently-added warning about 'typename' and 'template' disambiguation keywords outside of templates in C++98/03. Previously, the warning would fire when the associated nested-name-specifier was not dependent, but that was a misreading of the C++98/03 standard: now, we complain only when we're outside of any template. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106161 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplate.cpp
reeTransform.h
|
1a15dae8be2b28e02b6639aa92b832465c5be420 |
17-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
Fix the recently-added warning about 'typename' and 'template' disambiguation keywords outside of templates in C++98/03. Previously, the warning would fire when the associated nested-name-specifier was not dependent, but that was a misreading of the C++98/03 standard: now, we complain only when we're outside of any template. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106161 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplate.cpp
reeTransform.h
|
f2c3f403486c6577b0d2adb1db3761dbade325cc |
16-Jun-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
C return types must be complete as well. Moved check before we build the ObjCMessageExpr node. (PR7386 related). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106139 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
da59e09f1fd53350fcd949adbadd8148117f21b2 |
16-Jun-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
C return types must be complete as well. Moved check before we build the ObjCMessageExpr node. (PR7386 related). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106139 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
1e1c7b4b83b25babcc6c6685a201721288b1341e |
16-Jun-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Make sure result type of objc++ message expression is complete before attempting to bind it to a temporary. Fixes PR7386. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106130 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaExprObjC.cpp
|
d4266629ed62e3a0de5e2cb2dfb8e806f9bdc5f6 |
16-Jun-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Make sure result type of objc++ message expression is complete before attempting to bind it to a temporary. Fixes PR7386. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106130 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaExprObjC.cpp
|
31e757e8eadfbd42d4a5fd9209eef7a4b5561f3c |
16-Jun-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Don't poke at an undefined class type of a field. Fixes PR7355. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106111 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d27e50cd839760880a73cfaaa93f912c01cb2171 |
16-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
Don't poke at an undefined class type of a field. Fixes PR7355. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106111 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f3445fac2dbed94a87389bab434a2fefe5d419c2 |
16-Jun-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Downgrade the error when using a typedef in the nested-name-specifier of an explicit instantiation to an ExtWarn, since nobody else seems to diagnose this problem. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106109 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
a2dd828ce66a67bc21c3a553e2d99ca4f182d923 |
16-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
Downgrade the error when using a typedef in the nested-name-specifier of an explicit instantiation to an ExtWarn, since nobody else seems to diagnose this problem. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106109 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
0f030642dd0f7a166feefb692626e2527a49909d |
16-Jun-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Fixed conflict between objc_memmove_collectable builtin decl. and one ddefined in darwin header file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106107 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
8e2eab27056a78bf1db50ee09929438ed5ea9d93 |
16-Jun-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Fixed conflict between objc_memmove_collectable builtin decl. and one ddefined in darwin header file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106107 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
9b543da731f9948d89a1878ba72aafc0c4ab5bcb |
16-Jun-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
If a non-dependent base class initializer fails to match any direct or virtual base class, but the class still has dependent base classes, then don't diagnose the failed match as an error: the right base class might magically appear. Fixes PR7259. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106103 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
3956b1ab303139d9e952c2c30ed16643fad0c325 |
16-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
If a non-dependent base class initializer fails to match any direct or virtual base class, but the class still has dependent base classes, then don't diagnose the failed match as an error: the right base class might magically appear. Fixes PR7259. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106103 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
25560122fbc4a39c864695b170e4ff9009e1f273 |
16-Jun-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Revert r106099; it broke self-host. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106100 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
efed5c832de630715dd42211dd3b2aab5dd97a1b |
16-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
Revert r106099; it broke self-host. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106100 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
a7bf34440df135029859cedd15a83072dc08ae66 |
16-Jun-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Added TemplateTypeParmType::getDecl(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106099 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
6cd8087e66d706f2317865f86c865fd9bc6969c9 |
16-Jun-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Added TemplateTypeParmType::getDecl(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106099 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
616d0eb2cc557f7e9cff678f9300954079bb0d19 |
16-Jun-2010 |
John McCall <rjmccall@apple.com> |
Fix the build. Using declarations should not be considering when looking for overridden virtual methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106096 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
52a02758fb81723e16c46721152c6ad0528b2fc3 |
16-Jun-2010 |
John McCall <rjmccall@apple.com> |
Fix the build. Using declarations should not be considering when looking for overridden virtual methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106096 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
01db8975797c53d40fc6ffeee878e4d3511c234b |
16-Jun-2010 |
John McCall <rjmccall@apple.com> |
Fix a point of semantics with using declaration hiding: method templates introduced by using decls are hidden even if their template parameter lists or return types differ from the "overriding" declaration. Propagate using shadow declarations around more effectively when looking up template-ids. Reperform lookup for template-ids in member expressions so that access control is properly set up. Fix some number of latent bugs involving template-ids with totally invalid base types. You can only actually get these with a scope specifier, since otherwise the template-id won't parse as a template-id. Fixes PR7384. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106093 91177308-0d34-0410-b5e6-96231b3b80d8
ookup.h
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaOverload.cpp
emaTemplate.cpp
reeTransform.h
|
ad00b7705f9bbee81beeac428e7c6587734ab5a6 |
16-Jun-2010 |
John McCall <rjmccall@apple.com> |
Fix a point of semantics with using declaration hiding: method templates introduced by using decls are hidden even if their template parameter lists or return types differ from the "overriding" declaration. Propagate using shadow declarations around more effectively when looking up template-ids. Reperform lookup for template-ids in member expressions so that access control is properly set up. Fix some number of latent bugs involving template-ids with totally invalid base types. You can only actually get these with a scope specifier, since otherwise the template-id won't parse as a template-id. Fixes PR7384. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106093 91177308-0d34-0410-b5e6-96231b3b80d8
ookup.h
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaOverload.cpp
emaTemplate.cpp
reeTransform.h
|
7fcbab0d9ed96afbdcc3dd4ad876bcbf452fd25f |
16-Jun-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Give Type::isIntegralType() an ASTContext parameter, so that it provides C "integer type" semantics in C and C++ "integral type" semantics in C++. Note that I still need to update isIntegerType (and possibly other predicates) using the same approach I've taken for isIntegralType(). The two should have the same meaning, but currently don't (!). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106074 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaDecl.cpp
emaExpr.cpp
emaOverload.cpp
|
9d3347a5887d2d25afe8b0bd35783a72ec86cce2 |
16-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
Give Type::isIntegralType() an ASTContext parameter, so that it provides C "integer type" semantics in C and C++ "integral type" semantics in C++. Note that I still need to update isIntegerType (and possibly other predicates) using the same approach I've taken for isIntegralType(). The two should have the same meaning, but currently don't (!). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106074 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaDecl.cpp
emaExpr.cpp
emaOverload.cpp
|
59327f06fa557d652e0560e6895c93db70ea5ec7 |
16-Jun-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Introduce Type::isIntegralOrEnumerationType(), to cover those places in C++ that involve both integral and enumeration types. Convert all of the callers to Type::isIntegralType() that are meant to work with both integral and enumeration types over to Type::isIntegralOrEnumerationType(), to prepare to eliminate enumeration types as integral types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106071 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaExpr.cpp
emaExprCXX.cpp
emaOverload.cpp
emaStmt.cpp
emaTemplate.cpp
|
2ade35e2cfd554e49d35a52047cea98a82787af9 |
16-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
Introduce Type::isIntegralOrEnumerationType(), to cover those places in C++ that involve both integral and enumeration types. Convert all of the callers to Type::isIntegralType() that are meant to work with both integral and enumeration types over to Type::isIntegralOrEnumerationType(), to prepare to eliminate enumeration types as integral types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106071 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaExpr.cpp
emaExprCXX.cpp
emaOverload.cpp
emaStmt.cpp
emaTemplate.cpp
|
3aa58cb8f43dfda9164e98aab0bb5560f224843c |
16-Jun-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Workaround a possible VS C++ bug. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106070 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
ff2d05f653948e4bb2877c210f9fa7a2888ceb5c |
16-Jun-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Workaround a possible VS C++ bug. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106070 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
3c4b2d89607c852447bc632b4962add54d321fa7 |
16-Jun-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch adds support for copying of those objective-c++ class objects which have GC'able objc object pointers and need to use ObjC's objc_memmove_collectable API (radar 8070772). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106061 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
55bcace250e1ff366e4482714b344b8cbc8be5f3 |
16-Jun-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch adds support for copying of those objective-c++ class objects which have GC'able objc object pointers and need to use ObjC's objc_memmove_collectable API (radar 8070772). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106061 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
07022fe28c83b67459b518649842c570dc4eda42 |
15-Jun-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Update equality and relationship comparisons of pointers to reflect C++ semantics, eliminating an extension diagnostic that doesn't match C++ semantics (ordered comparison with NULL) and tightening some extwarns to errors in C++ to match GCC and maintain conformance in SFINAE contexts. Fixes <rdar://problem/7941392>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106050 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
6e5122c8ce152e19355b707d952ab53fe58bd7ad |
15-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
Update equality and relationship comparisons of pointers to reflect C++ semantics, eliminating an extension diagnostic that doesn't match C++ semantics (ordered comparison with NULL) and tightening some extwarns to errors in C++ to match GCC and maintain conformance in SFINAE contexts. Fixes <rdar://problem/7941392>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106050 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
64548df772ca2af69e6739216dfd2714b8835032 |
15-Jun-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Remove a completely useless and utterly incorrect assertion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106040 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
410a1da2c87486f529856857aa3388cf67c7bdb9 |
15-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
Remove a completely useless and utterly incorrect assertion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106040 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
fa28bec2bcd6852356bdd91bc38e1d77b6dfff02 |
15-Jun-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Teach code completion not to ignore data members when performing code completion for expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106037 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
9b30b267e77d1778e1e9b7c44b6852489c2c5096 |
15-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
Teach code completion not to ignore data members when performing code completion for expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106037 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
d40e781da4f46e39ad4f633832584930b94a81d2 |
15-Jun-2010 |
Chris Lattner <sabre@nondot.org> |
tidy up git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106011 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
7dc480fa428beceaa784b8a3b35d7df0bf849a58 |
15-Jun-2010 |
Chris Lattner <sabre@nondot.org> |
tidy up git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106011 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e20fe742fcb704d5ba9dcafa1bb47488053e6652 |
15-Jun-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Allocate template parameter lists for out-of-line definitions via the ASTContext rather than via the normal heap. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106008 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplate.cpp
|
c722ea4fbf886d6460b256b5e819a4ee751d5fff |
15-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
Allocate template parameter lists for out-of-line definitions via the ASTContext rather than via the normal heap. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106008 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplate.cpp
|
2951755e71ff826af2b7ab12b34b5c6e4d662222 |
15-Jun-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement -fvisibility-inlines-hidden. <rdar://problem/7819834> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106003 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
7cf84d66965a7706004d8590b5af5fe54b85f525 |
15-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement -fvisibility-inlines-hidden. <rdar://problem/7819834> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106003 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
0c123813d1e8fc0228038be10844b107ce34573e |
15-Jun-2010 |
Nick Lewycky <nicholas@mxc.ca> |
When analyzing for member self-assignment, don't attempt to dereference null Stmt* such as those which occur in ?: . Fixes PR7378. Also, generally whip the code into shape fixing several coding style violations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105992 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
43ad182474fac1e9d68ea4d1bcb80f8f9720245d |
15-Jun-2010 |
Nick Lewycky <nicholas@mxc.ca> |
When analyzing for member self-assignment, don't attempt to dereference null Stmt* such as those which occur in ?: . Fixes PR7378. Also, generally whip the code into shape fixing several coding style violations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105992 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
113737e3e3516a0196de4665041736046aefb73e |
15-Jun-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Warn when a 'typename' or a 'template' keyword refers to a non-dependent type or template name, respectively, in C++98/03. Fixes PR7111 and <rdar://problem/8002682>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105968 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
732281de5d518fca96c449ae185ee56bde422c4f |
15-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
Warn when a 'typename' or a 'template' keyword refers to a non-dependent type or template name, respectively, in C++98/03. Fixes PR7111 and <rdar://problem/8002682>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105968 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
179553dae02b9be490f2fe808f30ae16b5ab2cad |
14-Jun-2010 |
Nate Begeman <natebegeman@mac.com> |
Add some missing shifts Fix multiplies by scalar Add SemaChecking code for all immediates Add SemaChecking-gen support to arm_neon.td git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105930 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
61eecf5aea018ea65c9ab0bccacd2996b15c632d |
14-Jun-2010 |
Nate Begeman <natebegeman@mac.com> |
Add some missing shifts Fix multiplies by scalar Add SemaChecking code for all immediates Add SemaChecking-gen support to arm_neon.td git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105930 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
486c883ca29f6b50bb8ded372ad5bb2970fd4101 |
13-Jun-2010 |
John McCall <rjmccall@apple.com> |
TemplateSpecializationType's isCurrentInstantiation bit can be derived from its canonical type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105912 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
71d74bc0d6e522ce7c21a599db8e19d3883b518f |
13-Jun-2010 |
John McCall <rjmccall@apple.com> |
TemplateSpecializationType's isCurrentInstantiation bit can be derived from its canonical type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105912 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
5dd8130f302adfcefee70419418748c5d9853cae |
13-Jun-2010 |
Nate Begeman <natebegeman@mac.com> |
Most of NEON sema checking & fix to polynomial type detection git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105908 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
0d15c5321a11a5fee53b17ca8e9e0d72d6192b23 |
13-Jun-2010 |
Nate Begeman <natebegeman@mac.com> |
Most of NEON sema checking & fix to polynomial type detection git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105908 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
e126f73aaca758b4076d26ab25ef02ed99e9240b |
12-Jun-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Added template parameters info for out-of-line definitions of class template methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105882 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplate.cpp
|
9b9348889d85fc9daf943c64e3ac3fb021a4f028 |
12-Jun-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Added template parameters info for out-of-line definitions of class template methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105882 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplate.cpp
|
f6ac61987ba4f5b95eb97817253664121c69cab5 |
12-Jun-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Don't omit class explicit instantiation from AST. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105880 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
c98971d5c994caed9452aeadd0122c855e0f4de1 |
12-Jun-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Don't omit class explicit instantiation from AST. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105880 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
a9fdd99688dccae42721e8ca24433f6e6f6ba48b |
12-Jun-2010 |
John McCall <rjmccall@apple.com> |
When deciding whether an expression has the boolean nature, don't look through explicit casts. Fixes PR7359. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105871 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
6907fbe758d23e1aec4c0a67e7b633d1d855feb4 |
12-Jun-2010 |
John McCall <rjmccall@apple.com> |
When deciding whether an expression has the boolean nature, don't look through explicit casts. Fixes PR7359. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105871 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
e909ea23d847a2766b5aa405d2f1a78e2e480a36 |
11-Jun-2010 |
John McCall <rjmccall@apple.com> |
Allow pseudo-destructors to be called on qualified pointers. Patch by Troy Straszheim! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105823 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
81e317a444dd756a1cafe94031e4b3f3c138dac6 |
11-Jun-2010 |
John McCall <rjmccall@apple.com> |
Allow pseudo-destructors to be called on qualified pointers. Patch by Troy Straszheim! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105823 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
c57630a0c1c2dad90c42626eb08010f228dc4c16 |
11-Jun-2010 |
John McCall <rjmccall@apple.com> |
Conversions from Objective C object pointers to bool are "pointer conversions to bool" in the sense of C++ [over.ics.rank]p4 bullet 1. I have decreed it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105817 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
ddb0ce750c425af474008f091fb7a3483e980335 |
11-Jun-2010 |
John McCall <rjmccall@apple.com> |
Conversions from Objective C object pointers to bool are "pointer conversions to bool" in the sense of C++ [over.ics.rank]p4 bullet 1. I have decreed it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105817 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
503a3250f19fc4fa5e85e18c3229b5f6fb9467f5 |
11-Jun-2010 |
Jeffrey Yasskin <jyasskin@google.com> |
Fix the 64-bit build. operator<<(DiagnosticBuilder, long) doesn't exist, so ptrdiff_t (long on 64-bit, apparently) is ambiguous between the int and unsigned int overloads. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105816 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
258de301b6b219b21c53e75924ad945291c5af08 |
11-Jun-2010 |
Jeffrey Yasskin <jyasskin@google.com> |
Fix the 64-bit build. operator<<(DiagnosticBuilder, long) doesn't exist, so ptrdiff_t (long on 64-bit, apparently) is ambiguous between the int and unsigned int overloads. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105816 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
4bf99130178f92af4eb958837bff9d6266f06227 |
11-Jun-2010 |
Jeffrey Yasskin <jyasskin@google.com> |
Add an option -fshow-overloads=best|all to limit the number of overload candidates printed. We default to 'all'. At the moment, 'best' prints only the first 4 overloads, but we'll improve that over time. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105815 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
5edbdcc62098e305cd55654814dcf783a3f3c477 |
11-Jun-2010 |
Jeffrey Yasskin <jyasskin@google.com> |
Add an option -fshow-overloads=best|all to limit the number of overload candidates printed. We default to 'all'. At the moment, 'best' prints only the first 4 overloads, but we'll improve that over time. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105815 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
52b136ace347ee82e11145927e37980157bacb35 |
11-Jun-2010 |
John McCall <rjmccall@apple.com> |
Split DependentNameType into two types. DependentNameType represents the case of an elaborated-type-specifier like 'typename A<T>::foo', and DependentTemplateSpecializationType represents the case of an elaborated-type-specifier like 'typename A<T>::template B<T>'. The TypeLoc representation of a DependentTST conveniently exactly matches that of an ElaboratedType wrapping a TST. Kill off the explicit rebuild methods for RebuildInCurrentInstantiation; the standard implementations work fine because the nested name specifier is computable in the newly-entered context. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105801 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaType.cpp
reeTransform.h
|
33500955d731c73717af52088b7fc0e7a85681e7 |
11-Jun-2010 |
John McCall <rjmccall@apple.com> |
Split DependentNameType into two types. DependentNameType represents the case of an elaborated-type-specifier like 'typename A<T>::foo', and DependentTemplateSpecializationType represents the case of an elaborated-type-specifier like 'typename A<T>::template B<T>'. The TypeLoc representation of a DependentTST conveniently exactly matches that of an ElaboratedType wrapping a TST. Kill off the explicit rebuild methods for RebuildInCurrentInstantiation; the standard implementations work fine because the nested name specifier is computable in the newly-entered context. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105801 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaType.cpp
reeTransform.h
|
a91bdaf5ba082ab564e6833ce3c0bff95bcc0d3c |
10-Jun-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Another chunk of the new RecursiveASTVisitor implementation: switch the return value semantics such that we recurse while the visitors return true, and halt as soon as one returns false. Patch by csilvers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105787 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e3e210c3aa3c1b289eee669a1d235fc16df384a0 |
10-Jun-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Another chunk of the new RecursiveASTVisitor implementation: switch the return value semantics such that we recurse while the visitors return true, and halt as soon as one returns false. Patch by csilvers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105787 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
077deeb599b293fc9c6cb1bec6794b4e66b704c0 |
09-Jun-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Commit my WIP on constexpr support. This commit: an XFAILed test and treating constexpr as a top-level const. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105752 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
737801257f795632175517ffce4a80c62fc7bff7 |
09-Jun-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Commit my WIP on constexpr support. This commit: an XFAILed test and treating constexpr as a top-level const. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105752 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
c121a01d04475a5e6b36de7e30adc67914c86c4c |
09-Jun-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Fix two typos in comments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105751 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
515ddd8f7a36fc2684492c13665642153fc690c0 |
09-Jun-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Fix two typos in comments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105751 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
e6a9c1e8077cbcd71419141a50c5637294ad98a5 |
09-Jun-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Added inherited info to template and non-type arguments of templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105716 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
d92f7a297c0ed3f7d0ebcbb557e1d4c1925b8c72 |
09-Jun-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Added inherited info to template and non-type arguments of templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105716 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
8b88f6aaa408a4b026615a2fb474e5fe6032c0f7 |
09-Jun-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Major redesign of the RecursiveASTVisitor. This implements the majority of the new design discussed on cfe-dev, with further steps in that direction to come. It is already much more complete than the previous visitor. Patch by Zhanyong and Craig with 80 column wraps and one missing declaration added by me. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105709 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
dfc35e33177a433b56454f1d2b5e53734f65b288 |
09-Jun-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Major redesign of the RecursiveASTVisitor. This implements the majority of the new design discussed on cfe-dev, with further steps in that direction to come. It is already much more complete than the previous visitor. Patch by Zhanyong and Craig with 80 column wraps and one missing declaration added by me. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105709 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
c040236caae574e37816ac38f8b48b8fbeab0d41 |
09-Jun-2010 |
Tom Care <tcare@apple.com> |
Added FixIt support to printf format string checking. - Refactored LengthModifier to be a class. - Added toString methods in all member classes of FormatSpecifier. - FixIt suggestions keep user specified flags unless incorrect. Limitations: - The suggestions are not conversion specifier sensitive. For example, if we have a 'pad with zeroes' flag, and the correction is a string conversion specifier, we do not remove the flag. Clang will warn us on the next compilation. A test/Sema/format-strings-fixit.c M include/clang/Analysis/Analyses/PrintfFormatString.h M lib/Analysis/PrintfFormatString.cpp M lib/Sema/SemaChecking.cpp git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105680 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
3bfc5f49e0e37e235bb0d33bcbcb36af9d1f84ab |
09-Jun-2010 |
Tom Care <tcare@apple.com> |
Added FixIt support to printf format string checking. - Refactored LengthModifier to be a class. - Added toString methods in all member classes of FormatSpecifier. - FixIt suggestions keep user specified flags unless incorrect. Limitations: - The suggestions are not conversion specifier sensitive. For example, if we have a 'pad with zeroes' flag, and the correction is a string conversion specifier, we do not remove the flag. Clang will warn us on the next compilation. A test/Sema/format-strings-fixit.c M include/clang/Analysis/Analyses/PrintfFormatString.h M lib/Analysis/PrintfFormatString.cpp M lib/Sema/SemaChecking.cpp git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105680 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
68d94c7f72d49fad4aaf3eaaf472f9047934fd4a |
09-Jun-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Tweak our handling of the notion of a standard conversion sequence being a subsequence of another standard conversion sequence. Instead of requiring exact type equality for the second conversion step, require type *similarity*, which is type equality with cv-qualifiers removed at all levels. This appears to match the behavior of EDG and VC++ (albeit not GCC), and feels more intuitive. Big thanks to John for the line of reasoning that supports this change: since cv-qualifiers are orthogonal to the second conversion step, we should ignore them in the type comparison. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105678 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXCast.cpp
emaOverload.cpp
emaType.cpp
|
5a57efd7bf88a4a13018e0471ded8063a4abe8af |
09-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
Tweak our handling of the notion of a standard conversion sequence being a subsequence of another standard conversion sequence. Instead of requiring exact type equality for the second conversion step, require type *similarity*, which is type equality with cv-qualifiers removed at all levels. This appears to match the behavior of EDG and VC++ (albeit not GCC), and feels more intuitive. Big thanks to John for the line of reasoning that supports this change: since cv-qualifiers are orthogonal to the second conversion step, we should ignore them in the type comparison. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105678 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXCast.cpp
emaOverload.cpp
emaType.cpp
|
453bb15609d94a406796543f4b9421c97f8f40b6 |
09-Jun-2010 |
Nate Begeman <natebegeman@mac.com> |
Implement transpose/zip/unzip & table lookup. Test out some basic constant-checking. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105667 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
1c2a88cfaeb11227d3a6bf7204207e0c8cf6de6f |
09-Jun-2010 |
Nate Begeman <natebegeman@mac.com> |
Implement transpose/zip/unzip & table lookup. Test out some basic constant-checking. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105667 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
e28bcacc89c72d9f757ad2c1ebf427ec15cdd28c |
08-Jun-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When referring to a tag that was previously declared only as a friend, build a new declaration for that tag type that will be visible for future lookups of that tag. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105643 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
e1aa9f3a5d3e2c0f8a5606e82eef3c65a6f30672 |
08-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
When referring to a tag that was previously declared only as a friend, build a new declaration for that tag type that will be visible for future lookups of that tag. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105643 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
44d428c2f2402055fd4664a04d11bb08438b1c3c |
08-Jun-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
A built-in overload candidate is consider a non-template function when determining whether one overload candidate is better than another. Fixes PR7319. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105642 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
ccd471341d2edbb18ac9c46a7c65d280d9c6223e |
08-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
A built-in overload candidate is consider a non-template function when determining whether one overload candidate is better than another. Fixes PR7319. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105642 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
ed5bf62969af84e508b62c0a9b19756bbfb2ce38 |
08-Jun-2010 |
Daniel Dunbar <daniel@zuster.org> |
Makefiles: Set Clang CPP compiler flags in a single location, instead of scattered throughout the project Makefiles. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105638 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
|
c4dec1c58eeb2ef46cdb64120eb6b819c6927afb |
08-Jun-2010 |
Daniel Dunbar <daniel@zuster.org> |
Makefiles: Set Clang CPP compiler flags in a single location, instead of scattered throughout the project Makefiles. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105638 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
|
e55e5e35d511ea62e635374aeca1c09ba7ce6d88 |
08-Jun-2010 |
Daniel Dunbar <daniel@zuster.org> |
Makefile: Switch Clang Makefiles to always include the top-level Clang Makefile. - This eliminates most dependencies on how Clang is installed relative to LLVM. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105637 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
|
afed099bd2e759efd4bb63fdc525d3445f94cc13 |
08-Jun-2010 |
Daniel Dunbar <daniel@zuster.org> |
Makefile: Switch Clang Makefiles to always include the top-level Clang Makefile. - This eliminates most dependencies on how Clang is installed relative to LLVM. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105637 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
|
5d8e67ed117c2e0a19acaa8d8f7c7dd900011b60 |
08-Jun-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Warn about comparisons between arrays and improve self-comparison warnings, from Troy Straszheim! Fixes PR6163. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105631 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
d64fdd0c056f1e50488519254f852fa8050f0470 |
08-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
Warn about comparisons between arrays and improve self-comparison warnings, from Troy Straszheim! Fixes PR6163. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105631 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
46a5c5aed460675fd2b5741a40b9883fee7f71f8 |
08-Jun-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Fixes a typo which prevented proper code gen. for copy-in of c++ class objects into blocks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105622 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
d7c7338dd7bf1a35179ec3521f7438c0fbd98e9c |
08-Jun-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Fixes a typo which prevented proper code gen. for copy-in of c++ class objects into blocks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105622 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
6b9f87087f4df474a5d3daee287f01618644150c |
08-Jun-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement a warning when converting the literal 'false' to a pointer. Original patch by Troy D. Straszheim; fixes PR7283. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105621 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
d7a95971bd91b21922e5e878ba05bbe42b585cc9 |
08-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement a warning when converting the literal 'false' to a pointer. Original patch by Troy D. Straszheim; fixes PR7283. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105621 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
c8bfd0f8bb22ea019c673898bbdb07a834f0d821 |
08-Jun-2010 |
Shih-wei Liao <sliao@google.com> |
Git hiccup. Retry.... Change-Id: I5a329137a43f36bab32ea62386ade11da550c0b0
ndroid.mk
|
200213f20fef82c10b7da00873c99b93cee6da63 |
08-Jun-2010 |
Shih-wei Liao <sliao@google.com> |
Fix llvm.mk and the other 49 mk files Change-Id: I5aa02363c1083297d163a575f5a35c495f950230
ndroid.mk
|
14d7b174c72af199d62174027aa17ccf61423ff3 |
08-Jun-2010 |
Nate Begeman <natebegeman@mac.com> |
Since the enum values for each arch's builtins overlap, it is not appropriate to check them when compiling or other archs. Fixes a problem where compiling for NEON would use x86 sema rules. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105593 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
|
26a31428f130b66f61834d1b4d1cf72f590f70b9 |
08-Jun-2010 |
Nate Begeman <natebegeman@mac.com> |
Since the enum values for each arch's builtins overlap, it is not appropriate to check them when compiling or other archs. Fixes a problem where compiling for NEON would use x86 sema rules. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105593 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
|
515bb02ac1add48cd0ea9e7b1348d21abb29d157 |
08-Jun-2010 |
Nate Begeman <natebegeman@mac.com> |
Extend __builtin_shufflevector to expose the full power of the llvm shufflevector instruction. This means it can now be used for vector truncation and concatenation. This will be used for the ARM NEON implementation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105589 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
37b6a5731a47f811d754f0d48aa93edf30e30513 |
08-Jun-2010 |
Nate Begeman <natebegeman@mac.com> |
Extend __builtin_shufflevector to expose the full power of the llvm shufflevector instruction. This means it can now be used for vector truncation and concatenation. This will be used for the ARM NEON implementation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105589 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
8e3545f860596c0c755c3c48c2b6ebeca82bc39a |
08-Jun-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
When using property-dot assignment syntax to call a setter method, type of rhs need be compared to setter's argument and not the getter type. Fixes radar 8062778 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105560 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e2a901a1883a74469bdcd22e38f52b3f877bc6ca |
08-Jun-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
When using property-dot assignment syntax to call a setter method, type of rhs need be compared to setter's argument and not the getter type. Fixes radar 8062778 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105560 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
7bea05174bfcc93c960b8171c270c367b2a6f596 |
07-Jun-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Use MaybeCreateCXXExprWithTemporaries for potential destruction of created temporary. Use own initialized entity for copied in block variables. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105533 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaInit.cpp
emaInit.h
|
310b1c421665241d9b135c517d5031716d4a3221 |
07-Jun-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Use MaybeCreateCXXExprWithTemporaries for potential destruction of created temporary. Use own initialized entity for copied in block variables. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105533 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaInit.cpp
emaInit.h
|
e75208a31edf92f979fc2a75bf4887ae0b599357 |
07-Jun-2010 |
Jeffrey Yasskin <jyasskin@google.com> |
PR7245: Make binding a reference to a temporary without a usable copy constructor into an extension warning into the error that C++98 requires. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105529 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaAccess.cpp
emaInit.cpp
|
57d12fd4a2bc739c4a4d62a364b7f08cd483c59e |
07-Jun-2010 |
Jeffrey Yasskin <jyasskin@google.com> |
PR7245: Make binding a reference to a temporary without a usable copy constructor into an extension warning into the error that C++98 requires. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105529 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaAccess.cpp
emaInit.cpp
|
a00309973bb135c7e65c0df9ce0a51e9f55acb6f |
05-Jun-2010 |
John McCall <rjmccall@apple.com> |
Simplify the methods for creating a pointer, reference, member-pointer, or block-pointer type by removing the qualifiers parameter. Introduce a method to perform semantic checking when adding qualifiers to a type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105526 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaType.cpp
reeTransform.h
|
2865474261a608c7873b87ba4af110d17907896d |
05-Jun-2010 |
John McCall <rjmccall@apple.com> |
Simplify the methods for creating a pointer, reference, member-pointer, or block-pointer type by removing the qualifiers parameter. Introduce a method to perform semantic checking when adding qualifiers to a type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105526 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaType.cpp
reeTransform.h
|
b9805b6ffe18062027f2150f0b701d2873617fc5 |
05-Jun-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Added AccessSpecDecl node. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105525 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
|
6206d53f67613958ae1b023aba337ebb46f11a8b |
05-Jun-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Added AccessSpecDecl node. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105525 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
|
6dd301e90d114d029f51f8e2eff3328b8bf21a8c |
05-Jun-2010 |
Jeffrey Yasskin <jyasskin@google.com> |
Add an extension to avoid an error when a global template has the same name as a member template, and you try to call the member template with an explicit template argument. See PR7247 For example, this downgrades the error to a warning in: template<typename T> struct set{}; struct Value { template<typename T> void set(T value) { } }; void foo() { Value v; v.set<double>(3.2); // Warning here. } git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105518 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
21d07e499e108752c9d63d7418f7d9b485f4e0e6 |
05-Jun-2010 |
Jeffrey Yasskin <jyasskin@google.com> |
Add an extension to avoid an error when a global template has the same name as a member template, and you try to call the member template with an explicit template argument. See PR7247 For example, this downgrades the error to a warning in: template<typename T> struct set{}; struct Value { template<typename T> void set(T value) { } }; void foo() { Value v; v.set<double>(3.2); // Warning here. } git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105518 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
dd7031f9abb330acaca44755b499988cba487f00 |
05-Jun-2010 |
John McCall <rjmccall@apple.com> |
Alter the interface of GetTypeForDeclarator to return a TypeSourceInfo*. This is never null, but the associated type might be. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105503 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaObjCProperty.cpp
emaTemplate.cpp
emaType.cpp
|
bf1a028246d884a540aeafa38e89be59a269b072 |
05-Jun-2010 |
John McCall <rjmccall@apple.com> |
Alter the interface of GetTypeForDeclarator to return a TypeSourceInfo*. This is never null, but the associated type might be. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105503 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaObjCProperty.cpp
emaTemplate.cpp
emaType.cpp
|
f9a14d7cf9e1cb7a74e80ee3a839d0de84c4aef4 |
05-Jun-2010 |
Anders Carlsson <andersca@mac.com> |
When deciding whether reinterpret_cast casts away constness we need to look at array qualifiers. Fixes rdar://problem/8018292. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105494 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
52647c63c3cbdf0c87fe8db3ef6f475bfd49725d |
05-Jun-2010 |
Anders Carlsson <andersca@mac.com> |
When deciding whether reinterpret_cast casts away constness we need to look at array qualifiers. Fixes rdar://problem/8018292. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105494 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
8ca17e2090c50c45ac58561da8240c020e76956c |
04-Jun-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Build AST for copy-construction of copied-in class object in blocks and carry it to IRGen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105487 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
59da45a1fc10a3af4f3b3152f45504b4c5ca7385 |
04-Jun-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Build AST for copy-construction of copied-in class object in blocks and carry it to IRGen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105487 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
c3b388c3d05f654a6c8e2effe6025ba53df5b7f2 |
04-Jun-2010 |
John McCall <rjmccall@apple.com> |
Remember type source information for Objective C property declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105484 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaObjCProperty.cpp
|
83a230c83a54190366138c1a4f4310ef838b88fc |
04-Jun-2010 |
John McCall <rjmccall@apple.com> |
Remember type source information for Objective C property declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105484 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaObjCProperty.cpp
|
ea285162342df160e7860e26528bc7110bc6c0cd |
04-Jun-2010 |
Shih-wei Liao <sliao@google.com> |
Initial slang. Change-Id: I4f84a741e5fbc440cd4c251406d2b611a237f713
nalysisBasedWarnings.cpp
nalysisBasedWarnings.h
ndroid.mk
MakeLists.txt
XXFieldCollector.h
odeCompleteConsumer.cpp
dentifierResolver.cpp
dentifierResolver.h
umpDiagnostics.cpp
ookup.h
akefile
arseAST.cpp
ema.cpp
ema.h
emaAccess.cpp
emaAttr.cpp
emaCXXCast.cpp
emaCXXScopeSpec.cpp
emaChecking.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExceptionSpec.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaInit.cpp
emaInit.h
emaLookup.cpp
emaObjCProperty.cpp
emaOverload.cpp
emaOverload.h
emaStmt.cpp
emaTemplate.cpp
emaTemplate.h
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
argetAttributesSema.cpp
argetAttributesSema.h
reeTransform.h
|
ca8b08f69aab18583db68507e89982b1481bf35a |
04-Jun-2010 |
John McCall <rjmccall@apple.com> |
Preserve more information from a block's original function declarator, if one was given. Remove some unnecessary accounting from BlockScopeInfo. Handle typedef'ed function types until such time as we decide not. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105478 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
emaExpr.cpp
|
c71a4915ca216847599d03cab4ed1c5086b0eb43 |
04-Jun-2010 |
John McCall <rjmccall@apple.com> |
Preserve more information from a block's original function declarator, if one was given. Remove some unnecessary accounting from BlockScopeInfo. Handle typedef'ed function types until such time as we decide not. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105478 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
emaExpr.cpp
|
a43dea209d7c936286e7f1099fde4e9dae27f1a1 |
04-Jun-2010 |
John McCall <rjmccall@apple.com> |
Restructure how we interpret block-literal declarators. Correctly handle the case where we pick up block arguments from a typedef. Save the block signature as it was written, and preserve same through PCH. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105466 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaExpr.cpp
|
82dc00948fe7116edd31bfa07a728fda98648be1 |
04-Jun-2010 |
John McCall <rjmccall@apple.com> |
Restructure how we interpret block-literal declarators. Correctly handle the case where we pick up block arguments from a typedef. Save the block signature as it was written, and preserve same through PCH. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105466 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaExpr.cpp
|
73399a26cb3831d59c5792486200226fdfdee4e6 |
04-Jun-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Don't insert in lexical context implicit definitions of static member instances. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105465 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
ea7b4880bc07cd99b3994c2a95d722a06ab56594 |
04-Jun-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Don't insert in lexical context implicit definitions of static member instances. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105465 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
67e508d3f226b9c1efd099b418fa44d6fa8f2414 |
04-Jun-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When checking for equality of template parameter lists, a template type parameter pack is distinct from a template type parameter. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105464 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
a417b87e5d0f0508c7b18824d89d489bb55b7bd1 |
04-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
When checking for equality of template parameter lists, a template type parameter pack is distinct from a template type parameter. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105464 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
3cc0dda41d0513ceb56c12f37000a888a88d03c9 |
04-Jun-2010 |
John McCall <rjmccall@apple.com> |
Delay checking for mutable const fields until we're checking the field. Allows this check to work properly for instantiated fields and removes an unnecessary GetTypeForDeclarator call. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105463 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
4bde1e13d39e43581f7da872e4d7676ebf4a3ee7 |
04-Jun-2010 |
John McCall <rjmccall@apple.com> |
Delay checking for mutable const fields until we're checking the field. Allows this check to work properly for instantiated fields and removes an unnecessary GetTypeForDeclarator call. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105463 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
db90e6b257349793b32e3ad42f6f3894751a468e |
04-Jun-2010 |
John McCall <rjmccall@apple.com> |
More refactoring. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105458 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaInit.cpp
|
369371ce0c2b0d8051a8089e620eb41513fce9a2 |
04-Jun-2010 |
John McCall <rjmccall@apple.com> |
More refactoring. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105458 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaInit.cpp
|
2ee47bf9aeaf534430f2a62e05ef5b62de7eb2f0 |
04-Jun-2010 |
John McCall <rjmccall@apple.com> |
Remove a couple of unnecessary uses of IsStandardConversion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105445 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
75f7c0f5a82689c5abe1f4c5b93bfe1fbe5feaa8 |
04-Jun-2010 |
John McCall <rjmccall@apple.com> |
Remove a couple of unnecessary uses of IsStandardConversion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105445 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
40841dd0785cd6d61ff75a5547b68ff18dc77d53 |
03-Jun-2010 |
Eli Friedman <eli.friedman@gmail.com> |
Make sure to check the accessibility of and mark the destructor for the operand of a throw expression. Fixes PR7281. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105408 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
5ed9b93c596c3926b6680b47de28c8ff6a8ff4b7 |
03-Jun-2010 |
Eli Friedman <eli.friedman@gmail.com> |
Make sure to check the accessibility of and mark the destructor for the operand of a throw expression. Fixes PR7281. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105408 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
1d512f28ed192aecb039c8178d57a103221ab393 |
03-Jun-2010 |
Anders Carlsson <andersca@mac.com> |
Add all final overriders to the map. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105374 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
ffdb2d2a8860c601b35575855494f45d85cf14d9 |
03-Jun-2010 |
Anders Carlsson <andersca@mac.com> |
Add all final overriders to the map. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105374 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
d0a4b72f3195f06b0c151233b5eb422e12e2617d |
02-Jun-2010 |
Daniel Dunbar <daniel@zuster.org> |
Fix unintentional method call due to false -> pointer conversion; patch by Dimitry Andric! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105327 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
dc32cdf2a92de17901496d064db83786d552137f |
02-Jun-2010 |
Daniel Dunbar <daniel@zuster.org> |
Fix unintentional method call due to false -> pointer conversion; patch by Dimitry Andric! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105327 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
3cff40b9f31ef0f636c7b07d4a6f06a62eb75a0f |
02-Jun-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
typeid() produces type information for the cv-unqualified version of the type. Thanks to Anders for the bug report! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105314 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
d1c1d7bd14dce533e8755164ff59988f2ea5da94 |
02-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
typeid() produces type information for the cv-unqualified version of the type. Thanks to Anders for the bug report! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105314 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
60d14ff16083101abbc6348f09103f753473c090 |
01-Jun-2010 |
John McCall <rjmccall@apple.com> |
Alter the ExternalASTSource interface to permit by-name lookups. PCH continues to bring in the entire lookup table at once. Also, give ExternalSemaSource's vtable a home. This is important because otherwise any reference to it will cause RTTI to be emitted, and since clang is compiled with -fno-rtti, that RTTI will contain unresolved references (to ExternalASTSource's RTTI). So this change makes it possible to subclass ExternalSemaSource from projects compiled with RTTI, as long as the subclass's home is compiled with -fno-rtti. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105268 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaCodeComplete.cpp
|
76bd1f387e6a7b7abfe53f63b3bd429b97bb80f0 |
01-Jun-2010 |
John McCall <rjmccall@apple.com> |
Alter the ExternalASTSource interface to permit by-name lookups. PCH continues to bring in the entire lookup table at once. Also, give ExternalSemaSource's vtable a home. This is important because otherwise any reference to it will cause RTTI to be emitted, and since clang is compiled with -fno-rtti, that RTTI will contain unresolved references (to ExternalASTSource's RTTI). So this change makes it possible to subclass ExternalSemaSource from projects compiled with RTTI, as long as the subclass's home is compiled with -fno-rtti. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105268 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaCodeComplete.cpp
|
41bcf8c077749e407e5b69dd23a6b8df68102964 |
31-May-2010 |
Ted Kremenek <kremenek@apple.com> |
Fix crash in code completion when an ObjCMethodDecl doesn't have an associated @interface. Fixes <rdar://problem/8026215>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105256 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
681e256048cf9d3d226b9d0699f3df22c2500ef4 |
31-May-2010 |
Ted Kremenek <kremenek@apple.com> |
Fix crash in code completion when an ObjCMethodDecl doesn't have an associated @interface. Fixes <rdar://problem/8026215>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105256 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
b7be965ff561d784a5de8d794b56a442085c8760 |
30-May-2010 |
Sean Hunt <rideau3@gmail.com> |
Convert DeclNodes to use TableGen. The macros required for DeclNodes use have changed to match the use of StmtNodes. The FooFirst enumerator constants have been named firstFoo to match usage elsewhere. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105165 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
emaTemplateInstantiateDecl.cpp
|
9a55591af3e5506b95a9718e15380129fbfc5ebc |
30-May-2010 |
Sean Hunt <rideau3@gmail.com> |
Convert DeclNodes to use TableGen. The macros required for DeclNodes use have changed to match the use of StmtNodes. The FooFirst enumerator constants have been named firstFoo to match usage elsewhere. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105165 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
emaTemplateInstantiateDecl.cpp
|
713964dc45c4a8d9630a70f9a9a1d2f25b461d19 |
30-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Teach code-completion for calls to be more careful with a potentially-NULL "function" argument. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105152 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
d28dcd76c78d17ff6196893761cc9c71d97cc02f |
30-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Teach code-completion for calls to be more careful with a potentially-NULL "function" argument. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105152 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
a147bc905efda975cc9ec691291e565efed7b8e5 |
30-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Teach code completion to adjust its completion priorities based on the type that we expect to see at a given point in the grammar, e.g., when initializing a variable, returning a result, or calling a function. We don't prune the candidate set at all, just adjust priorities to favor things that should type-check, using an ultra-simplified type system. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105128 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
|
5ac3bdb2cb0113b640c54f01468d21985c08b252 |
30-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Teach code completion to adjust its completion priorities based on the type that we expect to see at a given point in the grammar, e.g., when initializing a variable, returning a result, or calling a function. We don't prune the candidate set at all, just adjust priorities to favor things that should type-check, using an ultra-simplified type system. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105128 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
|
3d38ac201ef3e3385bd6696a16a99602b5c373a7 |
29-May-2010 |
John McCall <rjmccall@apple.com> |
Copy source information for the inner type of an elaborated type; fixes some valgrind problems. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105062 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
4e449836c0deee9cfd92d32cb7d843759fa6452b |
29-May-2010 |
John McCall <rjmccall@apple.com> |
Copy source information for the inner type of an elaborated type; fixes some valgrind problems. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105062 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
3c4ca2598cb534d6f6e9e173742cae260fa25088 |
28-May-2010 |
Daniel Dunbar <daniel@zuster.org> |
Sema: Fix comment, apparently #pragma options align=power is just the same as align=native, at least for the platforms we support. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105000 91177308-0d34-0410-b5e6-96231b3b80d8
emaAttr.cpp
|
d6b305dcba95fc4928a2baa6bbeb15d22db9d061 |
28-May-2010 |
Daniel Dunbar <daniel@zuster.org> |
Sema: Fix comment, apparently #pragma options align=power is just the same as align=native, at least for the platforms we support. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105000 91177308-0d34-0410-b5e6-96231b3b80d8
emaAttr.cpp
|
fea1fc5b554b912813e20fe53ee2155e0cd19943 |
28-May-2010 |
Daniel Dunbar <daniel@zuster.org> |
Sema: Just ignore '#pragma options align=power' for now, this is no worse than what we used to be doing, and makes sure that paired '#pragma options align=reset' won't fail. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104998 91177308-0d34-0410-b5e6-96231b3b80d8
emaAttr.cpp
|
450f79340808e54cd4b39738f943217f6fc0c2be |
28-May-2010 |
Daniel Dunbar <daniel@zuster.org> |
Sema: Just ignore '#pragma options align=power' for now, this is no worse than what we used to be doing, and makes sure that paired '#pragma options align=reset' won't fail. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104998 91177308-0d34-0410-b5e6-96231b3b80d8
emaAttr.cpp
|
f71b595f9eb237f28563d8247ce603a4c435d595 |
28-May-2010 |
John McCall <rjmccall@apple.com> |
A more minimal fix for PR6762. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104991 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaLookup.cpp
|
c7e04dad588a30c94648b9bd70cdbe25688d7629 |
28-May-2010 |
John McCall <rjmccall@apple.com> |
A more minimal fix for PR6762. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104991 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaLookup.cpp
|
33bf24b6c409519bd3bff02fca66988e073d85e4 |
28-May-2010 |
John McCall <rjmccall@apple.com> |
Roll back r104941. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104990 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaLookup.cpp
|
2b7baf0816a40af3fde3a3e174192a549b785a50 |
28-May-2010 |
John McCall <rjmccall@apple.com> |
Roll back r104941. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104990 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaLookup.cpp
|
f83666fa77978ea6939452d54a9525e4ca46ae01 |
28-May-2010 |
John McCall <rjmccall@apple.com> |
Disable exception-spec compatibility checking under -fno-exceptions. Fixes PR7243. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104942 91177308-0d34-0410-b5e6-96231b3b80d8
emaExceptionSpec.cpp
|
811d0bec4d4eb6a8ff373f97f98354d6e0e54ecb |
28-May-2010 |
John McCall <rjmccall@apple.com> |
Disable exception-spec compatibility checking under -fno-exceptions. Fixes PR7243. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104942 91177308-0d34-0410-b5e6-96231b3b80d8
emaExceptionSpec.cpp
|
65c142e3f6681b65406f8c9f0ac7cf3de866e010 |
28-May-2010 |
John McCall <rjmccall@apple.com> |
Add a new attribute on records, __attribute__((adl_invisible)), and define the x86-64 __va_list_tag with this attribute. The attribute causes the affected type to behave like a fundamental type when considered by ADL. (x86-64 is the only target we currently provide with a struct-based __builtin_va_list) Fixes PR6762. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104941 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaLookup.cpp
|
1d0a5856d066f9030efbe3e0d9bbbb50ea597b99 |
28-May-2010 |
John McCall <rjmccall@apple.com> |
Add a new attribute on records, __attribute__((adl_invisible)), and define the x86-64 __va_list_tag with this attribute. The attribute causes the affected type to behave like a fundamental type when considered by ADL. (x86-64 is the only target we currently provide with a struct-based __builtin_va_list) Fixes PR6762. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104941 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaLookup.cpp
|
9df48377f9a91d8f645ef5680a2f4ee84f6f56a6 |
28-May-2010 |
John McCall <rjmccall@apple.com> |
Optimize and complete associated-class-and-namespace collection from a type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104938 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
fa4edcf2639415bd3430a61e6d5bfc71d5b8981e |
28-May-2010 |
John McCall <rjmccall@apple.com> |
Optimize and complete associated-class-and-namespace collection from a type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104938 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
fa8dbea559e1eb3df1807fd417032e36c10894ed |
28-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When we complain about a member being inaccessible due to a constraint along an access path, add another note pointing at the member we actually found. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104937 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
76ef658c703faf72c00f324fb9edc03169718e3e |
28-May-2010 |
Douglas Gregor <dgregor@apple.com> |
When we complain about a member being inaccessible due to a constraint along an access path, add another note pointing at the member we actually found. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104937 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
b3fe3e3a24618ae5e25d5c98ed4843016e01dad2 |
28-May-2010 |
John McCall <rjmccall@apple.com> |
When filtering out previous declarations of friend functions, consider the lookup context, not the direct semantic context. Fixes PR7230. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104917 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
9da9cdfd5ac5fcbb8c6a9fc38938e845e53af1ed |
28-May-2010 |
John McCall <rjmccall@apple.com> |
When filtering out previous declarations of friend functions, consider the lookup context, not the direct semantic context. Fixes PR7230. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104917 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
7195081a602fa4a8b0c614045cdc0949d9897ae3 |
28-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Don't put method bodies into code completions unless code patterns are turned on. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104909 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
447107dfff705ab79d1dbf33ce79b524d63572fd |
28-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Don't put method bodies into code completions unless code patterns are turned on. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104909 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
68725db903a9688c7c4ca8ed13829e37f37d6901 |
28-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Do not produce types as valid code completions when we're in an expression context in C/Objective-C, or when we're in an @interface/@implementation/@protocol in Objective-C(++). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104908 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
4710e5b12b58dda87d82c5875f13ab9c8979cd8c |
28-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Do not produce types as valid code completions when we're in an expression context in C/Objective-C, or when we're in an @interface/@implementation/@protocol in Objective-C(++). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104908 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
78d2fda9403bf61e9d2b8a0686b88d03064a12f0 |
28-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Make -code-completion-patterns only cover multi-line code completions. Plus, tweak a few completion patterns to better reflect the language grammar. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104905 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
c8bddde82135ab25a36ff60fbd2ad50fabe42e63 |
28-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Make -code-completion-patterns only cover multi-line code completions. Plus, tweak a few completion patterns to better reflect the language grammar. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104905 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
854ad9590e3487cce804481cbc05c5e186ef6289 |
28-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement a code-completion hook for the receiver of an Objective-C message. This completion gives better results than just using the "expression" completion, which is effectively what happened before. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104895 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
|
8e254cfe5a6ab4202c7fcc4b64bdd1ca0fe071ac |
28-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement a code-completion hook for the receiver of an Objective-C message. This completion gives better results than just using the "expression" completion, which is effectively what happened before. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104895 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
|
3ce2801142c3ad9cd13752018dadfa817f032b1d |
27-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Tweak the fix-it for a copy constructor declared to take its argument by-value. We now only prepend a space if it is needed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104889 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
aeb4a28256a924d57b111842647cbd40ab67f6f0 |
27-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Tweak the fix-it for a copy constructor declared to take its argument by-value. We now only prepend a space if it is needed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104889 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
4c48d4d3633e9da77c7707bc44ef6d476ef0ddc8 |
27-May-2010 |
Daniel Dunbar <daniel@zuster.org> |
Parse/Sema: Add support for '#pragma options align=packed', which, it should be noted, is not the same as __attribute__((packed)). That would be ridiculous! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104865 91177308-0d34-0410-b5e6-96231b3b80d8
emaAttr.cpp
|
6f739145b94ede1ca98b5a5e0e179c817c405d7b |
27-May-2010 |
Daniel Dunbar <daniel@zuster.org> |
Parse/Sema: Add support for '#pragma options align=packed', which, it should be noted, is not the same as __attribute__((packed)). That would be ridiculous! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104865 91177308-0d34-0410-b5e6-96231b3b80d8
emaAttr.cpp
|
245e2498f97ef68d19756afddef04763a949a026 |
27-May-2010 |
Daniel Dunbar <daniel@zuster.org> |
Parse/Sema: Add support for '#pragma options align=native'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104864 91177308-0d34-0410-b5e6-96231b3b80d8
emaAttr.cpp
|
638e7cf3a09436dce7f3150ff8e4f27d190bd2ed |
27-May-2010 |
Daniel Dunbar <daniel@zuster.org> |
Parse/Sema: Add support for '#pragma options align=native'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104864 91177308-0d34-0410-b5e6-96231b3b80d8
emaAttr.cpp
|
42b3e093043fb85031a1b10d66f248d811643d47 |
27-May-2010 |
John McCall <rjmccall@apple.com> |
Require a complete type when performing the qualified lookup during instantiation of a dependent elaborated type specifier. Fixes PR 7199. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104822 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
5613876991c80a684595fe8de1f039296a0657ff |
27-May-2010 |
John McCall <rjmccall@apple.com> |
Require a complete type when performing the qualified lookup during instantiation of a dependent elaborated type specifier. Fixes PR 7199. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104822 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
3cfaa6cdce59d7f14090daa8b5d5a2f60347215c |
27-May-2010 |
Daniel Dunbar <daniel@zuster.org> |
Sema: Add initial support for '#pragma options align=mac68k'. - Docs are fairly sketchy, if someone wants to pore through gcc to look for holes I'd appreciate any failing test cases! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104809 91177308-0d34-0410-b5e6-96231b3b80d8
emaAttr.cpp
|
c6082fe347a414a2e19f2ad8fe41720f10733296 |
27-May-2010 |
Daniel Dunbar <daniel@zuster.org> |
Sema: Add initial support for '#pragma options align=mac68k'. - Docs are fairly sketchy, if someone wants to pore through gcc to look for holes I'd appreciate any failing test cases! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104809 91177308-0d34-0410-b5e6-96231b3b80d8
emaAttr.cpp
|
ff214ccaf21d9165c10c89ba0a63659969a8cdbb |
27-May-2010 |
Daniel Dunbar <daniel@zuster.org> |
Sema: Factor out struct for alignment stack entries. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104799 91177308-0d34-0410-b5e6-96231b3b80d8
emaAttr.cpp
|
ae2232b9957302374ee8d8626aeedcb4e4c0441e |
27-May-2010 |
Daniel Dunbar <daniel@zuster.org> |
Sema: Factor out struct for alignment stack entries. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104799 91177308-0d34-0410-b5e6-96231b3b80d8
emaAttr.cpp
|
a18232ac5ef0fd80516da121f77f0fbb4c19014b |
27-May-2010 |
Daniel Dunbar <daniel@zuster.org> |
Sema: Replace getPragmaPackAlignment with AddAlignmentAttributesForRecord, which exposes less details. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104797 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaAttr.cpp
emaDecl.cpp
|
9f21f89c323ccf32f6b27acd2e739f6535440df0 |
27-May-2010 |
Daniel Dunbar <daniel@zuster.org> |
Sema: Replace getPragmaPackAlignment with AddAlignmentAttributesForRecord, which exposes less details. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104797 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaAttr.cpp
emaDecl.cpp
|
8df8ff1b1d982e97d323d354379234802b6b9b3d |
27-May-2010 |
Daniel Dunbar <daniel@zuster.org> |
AST: Rename PragmaPackAttr to MaxFieldAlignmentAttr, which is more accurate. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104795 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
8a2c92cab213bd7e28ff669577e815cd70bafbe3 |
27-May-2010 |
Daniel Dunbar <daniel@zuster.org> |
AST: Rename PragmaPackAttr to MaxFieldAlignmentAttr, which is more accurate. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104795 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
9451c5428d52c675c93eb968c2fc3e595f8d2f01 |
27-May-2010 |
Daniel Dunbar <daniel@zuster.org> |
Sema: Reject '#pragma options align=mac68k' everywhere except i386-apple-darwin. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104789 91177308-0d34-0410-b5e6-96231b3b80d8
emaAttr.cpp
|
613fd67e575ff1c038535b18dafebca070f3ed91 |
27-May-2010 |
Daniel Dunbar <daniel@zuster.org> |
Sema: Reject '#pragma options align=mac68k' everywhere except i386-apple-darwin. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104789 91177308-0d34-0410-b5e6-96231b3b80d8
emaAttr.cpp
|
4b3e90d9c924862933f15b67d8550f3d579db99a |
27-May-2010 |
Daniel Dunbar <daniel@zuster.org> |
Sema: Support for #pragma options align={reset,natural}. '#pragma options align' shares the stack with '#pragma pack', who knew!? git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104786 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaAttr.cpp
|
ea75a8286fb87ce7549e08d9dcb597f91479f54d |
27-May-2010 |
Daniel Dunbar <daniel@zuster.org> |
Sema: Support for #pragma options align={reset,natural}. '#pragma options align' shares the stack with '#pragma pack', who knew!? git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104786 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaAttr.cpp
|
d914a9c586b15f09028624ee8815ee4e6f30aea9 |
27-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Introduce priorities into the code-completion results. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104751 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
|
12e131385e892e3723483a1081a89bcad29c8a84 |
27-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Introduce priorities into the code-completion results. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104751 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
|
5efd361ffeae941a9212f44fe3eecc9d501faeaa |
26-May-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Improve on flexible array diagnostics (PR7029). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104739 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
2c0a54031c98721460806e78e0e10da093d3fd72 |
26-May-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Improve on flexible array diagnostics (PR7029). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104739 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
3abc1353833e0b2bb9f6dd2803daa49660939b9f |
26-May-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Fixes misc. flexible array bugs in c++ (PR7029). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104733 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
4142cebf70fe6c3855570c98b8042431797a65fd |
26-May-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Fixes misc. flexible array bugs in c++ (PR7029). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104733 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
5dfbaf6afc3278ee7164daf8454712acbb83f086 |
26-May-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Added source order to CXXBaseOrMemberInitializer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104712 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
a0af3b453160fc4c67363c204da13820b0586909 |
26-May-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Added source order to CXXBaseOrMemberInitializer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104712 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
6d10a8a246505c4ebe05f7693cda74480f0ab05b |
26-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When transforming a C++ "new" expression's constructor arguments, drop any arguments that are default-argument expressions. The can show up when we have a new expression whose constructor arguments are not type-dependent and whose allocated type is not dependent and has a constructor with default arguments. Fixes PR7202. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104690 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
ff2e4f44e56aef84fa423af4ca5c1fe56886b4aa |
26-May-2010 |
Douglas Gregor <dgregor@apple.com> |
When transforming a C++ "new" expression's constructor arguments, drop any arguments that are default-argument expressions. The can show up when we have a new expression whose constructor arguments are not type-dependent and whose allocated type is not dependent and has a constructor with default arguments. Fixes PR7202. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104690 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
07a3b1c020b491d5a59e7a991023df836073ce9d |
26-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Tell the string literal parser when it's not permitted to emit diagnostics. That would be while we're parsing string literals for the sole purpose of producing a diagnostic about them. Fixes <rdar://problem/8026030>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104684 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
b90f4b3fb94056609da9cca5eef7358d95a363b2 |
26-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Tell the string literal parser when it's not permitted to emit diagnostics. That would be while we're parsing string literals for the sole purpose of producing a diagnostic about them. Fixes <rdar://problem/8026030>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104684 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
5c336528495f889677e7ab8b3297f290242cedd1 |
25-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Only enable code patterns (e.g., try { statements } catch (...) { statements }) in the code-completion results if explicitly requested. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104637 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
d8e8a58ee35ab334ab9d0c2154dca029c1822e8a |
25-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Only enable code patterns (e.g., try { statements } catch (...) { statements }) in the code-completion results if explicitly requested. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104637 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
8eff6c3daa2199fb34371f7049d102a425ddda18 |
25-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Make sure to strip off top-level cv-qualifiers as part of a derived-to-base conversion on a pointer. Fixes PR7224. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104607 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
af7bea5fb496921c386459dc695485490bb06963 |
25-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Make sure to strip off top-level cv-qualifiers as part of a derived-to-base conversion on a pointer. Fixes PR7224. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104607 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
d64251d5282af2290094048cd9c2c44b8b6f86b9 |
25-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve code completion in failure cases in two ways: 1) Suppress diagnostics as soon as we form the code-completion token, so we don't get any error/warning spew from the early end-of-file. 2) If we consume a code-completion token when we weren't expecting one, go into a code-completion recovery path that produces the best results it can based on the context that the parser is in. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104585 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
|
dc8453422bec3bbf70c03920e01498d75783d122 |
25-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Improve code completion in failure cases in two ways: 1) Suppress diagnostics as soon as we form the code-completion token, so we don't get any error/warning spew from the early end-of-file. 2) If we consume a code-completion token when we weren't expecting one, go into a code-completion recovery path that produces the best results it can based on the context that the parser is in. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104585 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
|
75b2e55ab6ad3af739e802b2e2a80301e517ae6e |
25-May-2010 |
Daniel Dunbar <daniel@zuster.org> |
IRgen/C++: When mark vtables used, make sure to still append to the VTableUse array if we promote a vtable from being just used to having its definition required. This ensures that we properly inform the consumer about whether the vtable is required or not, previously we could fail to do so when the vtable was in the VTableUses array before the decl which marked it as required. - I think this can be cleaned up, since this means we may notify the consumer about the vtable twice, but I didn't see an easy fix for this without more substantial refactoring. - Doug, please review! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104577 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
b9aefa775158b68c453e4ac0e4e2ada561900d26 |
25-May-2010 |
Daniel Dunbar <daniel@zuster.org> |
IRgen/C++: When mark vtables used, make sure to still append to the VTableUse array if we promote a vtable from being just used to having its definition required. This ensures that we properly inform the consumer about whether the vtable is required or not, previously we could fail to do so when the vtable was in the VTableUses array before the decl which marked it as required. - I think this can be cleaned up, since this means we may notify the consumer about the vtable twice, but I didn't see an easy fix for this without more substantial refactoring. - Doug, please review! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104577 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
46884fdc57a256be0e5f8f04f0c4b3be363463eb |
25-May-2010 |
Daniel Dunbar <daniel@zuster.org> |
Simplify. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104576 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
e669f89e613029d4e21869b90f6d3f6cd299ff2a |
25-May-2010 |
Daniel Dunbar <daniel@zuster.org> |
Simplify. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104576 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
ea2ff6c133b6ea3b3bb6a3164f24e15dff7e1368 |
24-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Don't complain about VLAs of non-POD types when the array type is dependent. Fixes <rdar://problem/8021385>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104550 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
204ce17e0cfd9bbe229627e1e5a20c3f2f587c8c |
24-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Don't complain about VLAs of non-POD types when the array type is dependent. Fixes <rdar://problem/8021385>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104550 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
7477f55c58b5ae5d19c8815f19eb517838e62a83 |
24-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Make sure that we instantiate variably modified types, even if they aren't dependent. Fixes <rdar://problem/8020206>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104511 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
836adf6771d5170d936599dfcce21687e37e9bbf |
24-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Make sure that we instantiate variably modified types, even if they aren't dependent. Fixes <rdar://problem/8020206>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104511 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
9cc1849b2f77272958824dc3e9663d5980a2c69d |
24-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Downgrade deletion of a void* from an error (which is should be) to an extension warning (which other compilers seem to use). Works around a known bug in Xalan. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104509 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
94a615718d06704816c6e31a811f823c05e39f52 |
24-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Downgrade deletion of a void* from an error (which is should be) to an extension warning (which other compilers seem to use). Works around a known bug in Xalan. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104509 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
cb8ac5e324c2ed6e8ba9f2676eabde04967c2ffc |
24-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
An identity conversion is better than any non-identity conversion. Fixes PR7095. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104476 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaOverload.h
|
ae65f4bd588f5f5ec26ed188830bf6d14800b09e |
24-May-2010 |
Douglas Gregor <dgregor@apple.com> |
An identity conversion is better than any non-identity conversion. Fixes PR7095. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104476 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaOverload.h
|
43f9c73847847dbd6c1d908b688036d52228299f |
23-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
In C++, one cannot assign from an arithmetic type to an enumeration type. Fixes PR7051. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104475 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
88623ade9599d2a2f4e21e80bce00fb4cb9e7d5f |
23-May-2010 |
Douglas Gregor <dgregor@apple.com> |
In C++, one cannot assign from an arithmetic type to an enumeration type. Fixes PR7051. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104475 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
6e629b8ba96edc3ff60af670b32381843da8270d |
23-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
It turns out that people love using VLAs in templates, too. Weaken our VLA restrictions so that one can use VLAs in templates (even accidentally), but not as part of a non-type template parameter (which would be very bad). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104471 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaType.cpp
|
a481ec4150ad203440852a2bfee0883dd26f7530 |
23-May-2010 |
Douglas Gregor <dgregor@apple.com> |
It turns out that people love using VLAs in templates, too. Weaken our VLA restrictions so that one can use VLAs in templates (even accidentally), but not as part of a non-type template parameter (which would be very bad). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104471 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaType.cpp
|
bf157ea685aa3251115f4dddb8b8836e355e004a |
23-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Complain about sizeof(overloaded function) rather than crashing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104470 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
9ba6af8bedba28d10a6906c62c19d43f81c5d386 |
23-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Complain about sizeof(overloaded function) rather than crashing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104470 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
d6a9427b13d3f1d5762de2d683268821c7853fdd |
23-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Provide the overloaded functions for UnresolvedLookupExpr and UnresolvedMemberExpr in their constructors, rather than adding them after the fact. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104468 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaOverload.cpp
emaTemplate.cpp
|
5a84dec38cfa9e084377a3167b474c79283c82fa |
23-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Provide the overloaded functions for UnresolvedLookupExpr and UnresolvedMemberExpr in their constructors, rather than adding them after the fact. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104468 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaOverload.cpp
emaTemplate.cpp
|
986c341ff1f5fcda5a4b4531363bc6c2e2f3712c |
22-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Don't look for a destructor in a dependent type. Fixes PR7198. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104445 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
fb2db4657dc1e305c98d0c48fb1009a9f65b337a |
22-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Don't look for a destructor in a dependent type. Fixes PR7198. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104445 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
fab6df2b522a46fb70e0eddd574616471b96ae52 |
22-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When determining whether we can use "this", make sure to look through enum contexts (along with block contexts, which we already did). Fixes PR7196. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104444 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
d9008318fe395dcbb9049cfb4f2b87cfb5a75f3a |
22-May-2010 |
Douglas Gregor <dgregor@apple.com> |
When determining whether we can use "this", make sure to look through enum contexts (along with block contexts, which we already did). Fixes PR7196. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104444 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
603794e83eaaaf4230626b7fc27aa87499378f5b |
22-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement support for variable length arrays in C++. VLAs are limited in several important ways: - VLAs of non-POD types are not permitted. - VLAs cannot be used in conjunction with C++ templates. These restrictions are intended to keep VLAs out of the parts of the C++ type system where they cause the most trouble. Fixes PR5678 and <rdar://problem/8013618>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104443 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaType.cpp
|
0fddb97901dbe36a8253dee29961cba8e0a87cf6 |
22-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement support for variable length arrays in C++. VLAs are limited in several important ways: - VLAs of non-POD types are not permitted. - VLAs cannot be used in conjunction with C++ templates. These restrictions are intended to keep VLAs out of the parts of the C++ type system where they cause the most trouble. Fixes PR5678 and <rdar://problem/8013618>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104443 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaType.cpp
|
ee82da709d153ed9633efdd8838f2e0ca7434429 |
22-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve our handling of reference binding for subobjects of temporaries. There are actually several interrelated fixes here: - When converting an object to a base class, it's only an lvalue cast when the original object was an lvalue and we aren't casting pointer-to-derived to pointer-to-base. Previously, we were misclassifying derived-to-base casts of class rvalues as lvalues, causing various oddities (including problems with reference binding not extending the lifetimes of some temporaries). - Teach the code for emitting a reference binding how to look through no-op casts and parentheses directly, since Expr::IgnoreParenNoOpCasts is just plain wrong for this. Also, make sure that we properly look through multiple levels of indirection from the temporary object, but destroy the actual temporary object; this fixes the reference-binding issue mentioned above. - Teach Objective-C message sends to bind the result as a temporary when needed. This is actually John's change, but it triggered the reference-binding problem above, so it's included here. Now John can actually test his return-slot improvements. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104434 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprObjC.cpp
|
2d6b0e94db30c0e2754d270753c6f75478e451bf |
22-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Improve our handling of reference binding for subobjects of temporaries. There are actually several interrelated fixes here: - When converting an object to a base class, it's only an lvalue cast when the original object was an lvalue and we aren't casting pointer-to-derived to pointer-to-base. Previously, we were misclassifying derived-to-base casts of class rvalues as lvalues, causing various oddities (including problems with reference binding not extending the lifetimes of some temporaries). - Teach the code for emitting a reference binding how to look through no-op casts and parentheses directly, since Expr::IgnoreParenNoOpCasts is just plain wrong for this. Also, make sure that we properly look through multiple levels of indirection from the temporary object, but destroy the actual temporary object; this fixes the reference-binding issue mentioned above. - Teach Objective-C message sends to bind the result as a temporary when needed. This is actually John's change, but it triggered the reference-binding problem above, so it's included here. Now John can actually test his return-slot improvements. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104434 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprObjC.cpp
|
fdc4c1323390741f6cd57a4fe2a667fe2fbb9633 |
22-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve recovery when we see a dependent template name that is missing the required "template" keyword, using the same heuristics we do for dependent template names in member access expressions, e.g., test/SemaTemplate/dependent-template-recover.cpp:11:8: error: use 'template' keyword to treat 'getAs' as a dependent template name T::getAs<U>(); ^ template Fixes PR5404. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104409 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
d5ab9b0a0ae24f7d0f49f6f10fd1b247e64b3306 |
22-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Improve recovery when we see a dependent template name that is missing the required "template" keyword, using the same heuristics we do for dependent template names in member access expressions, e.g., test/SemaTemplate/dependent-template-recover.cpp:11:8: error: use 'template' keyword to treat 'getAs' as a dependent template name T::getAs<U>(); ^ template Fixes PR5404. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104409 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
e0e3fb07040d590422f63ece1bcac9b46ba8516f |
22-May-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Clang missing warning about conflicting declaration vs. definition for variable arguments list methods. (radar 8006060). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104407 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
561da7e046ea6b39f4e632c68128fd01c985b46b |
22-May-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Clang missing warning about conflicting declaration vs. definition for variable arguments list methods. (radar 8006060). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104407 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
2f8de9c5c052392e2f10e7ac0a73e97c5a8b5a3a |
22-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve parser recovery when we encounter a dependent template name that is missing the 'template' keyword, e.g., t->getAs<T>() where getAs is a member of an unknown specialization. C++ requires that we treat "getAs" as a value, but that would fail to parse since T is the name of a type. We would then fail at the '>', since a type cannot be followed by a '>'. This is a very common error for C++ programmers to make, especially since GCC occasionally allows it when it shouldn't (as does Visual C++). So, when we are in this case, we use tentative parsing to see if the tokens starting at "<" can only be parsed as a template argument list. If so, we produce a diagnostic with a fix-it that states that the 'template' keyword is needed: test/SemaTemplate/dependent-template-recover.cpp:5:8: error: 'template' keyword is required to treat 'getAs' as a dependent template name t->getAs<T>(); ^ template This is just a start of this patch; I'd like to apply the same approach to everywhere that a template-id with dependent template name can be parsed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104406 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaExpr.cpp
emaTemplate.cpp
|
1fd6d44d7ca97631497551bbf98866263143d706 |
22-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Improve parser recovery when we encounter a dependent template name that is missing the 'template' keyword, e.g., t->getAs<T>() where getAs is a member of an unknown specialization. C++ requires that we treat "getAs" as a value, but that would fail to parse since T is the name of a type. We would then fail at the '>', since a type cannot be followed by a '>'. This is a very common error for C++ programmers to make, especially since GCC occasionally allows it when it shouldn't (as does Visual C++). So, when we are in this case, we use tentative parsing to see if the tokens starting at "<" can only be parsed as a template argument list. If so, we produce a diagnostic with a fix-it that states that the 'template' keyword is needed: test/SemaTemplate/dependent-template-recover.cpp:5:8: error: 'template' keyword is required to treat 'getAs' as a dependent template name t->getAs<T>(); ^ template This is just a start of this patch; I'd like to apply the same approach to everywhere that a template-id with dependent template name can be parsed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104406 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaExpr.cpp
emaTemplate.cpp
|
acd1ce1db6d185eb3f28f2b9584fa8d1ab0687b8 |
21-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When instantiating a function declaration within a function template, be sure to merge its parameter scope with its parent's scope. Fixes PR7184. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104386 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
b212d9a8e10308cde5b7a1ce07bd59d8df14fa06 |
21-May-2010 |
Douglas Gregor <dgregor@apple.com> |
When instantiating a function declaration within a function template, be sure to merge its parameter scope with its parent's scope. Fixes PR7184. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104386 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
973cacc0c894666f112192441f78e8eb3c27736b |
21-May-2010 |
John McCall <rjmccall@apple.com> |
Propagate access specifiers to anonymous union members nested within classes. Fixes <rdar://problem/7987650>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104376 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
aec0371e62be013a2e6466688ccf6a7460880262 |
21-May-2010 |
John McCall <rjmccall@apple.com> |
Propagate access specifiers to anonymous union members nested within classes. Fixes <rdar://problem/7987650>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104376 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
90f2dca178e6c2076cd74dc78fb4b22128e0f048 |
21-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Use CanQualType to enforce the use of a canonical type argument to CXXBasePaths::isAmbiguous(), rather than just asserting that we have a canonical type. Fixes PR7176. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104374 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaExceptionSpec.cpp
|
e0d5fe2a417b84ac8b51927ebeb8f1c9ae492760 |
21-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Use CanQualType to enforce the use of a canonical type argument to CXXBasePaths::isAmbiguous(), rather than just asserting that we have a canonical type. Fixes PR7176. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104374 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaExceptionSpec.cpp
|
b3f7ed710d899ec70a2aa0b65c82f37a04e4e340 |
21-May-2010 |
John McCall <rjmccall@apple.com> |
Introduce a method to get from an anonymous struct or union record declaration to the associated object declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104309 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
bc365c53606ab90537576cb48d93a54ce3fb0cb5 |
21-May-2010 |
John McCall <rjmccall@apple.com> |
Introduce a method to get from an anonymous struct or union record declaration to the associated object declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104309 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
659107b190503e2588bec81f92af1d5f745f9580 |
21-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When instantiating anonymous structs/unions within a function, make sure that the anonymous struct/union record declaration gets instantiated before the variable declaration, and that it and its fields (recursively) get entries in the local instantiation map. Fixes PR7088. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104305 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
9901c57806f7e36736ed1616e6ab3eebcc99b78c |
21-May-2010 |
Douglas Gregor <dgregor@apple.com> |
When instantiating anonymous structs/unions within a function, make sure that the anonymous struct/union record declaration gets instantiated before the variable declaration, and that it and its fields (recursively) get entries in the local instantiation map. Fixes PR7088. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104305 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
da624d75283f829b33221a232baedae9c6ce2027 |
21-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix a crasher in constructor-initializer reordering warnings (PR7179). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104299 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
fe2d379dbf570d49dc5d98a086cf43c4e675f5ce |
21-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Fix a crasher in constructor-initializer reordering warnings (PR7179). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104299 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
db0bc1523ccc9517c3d4cc322aeae8349d460264 |
21-May-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Generate objc_memmove_collectable write-barrier for classes whose base class have GC'able object pointers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104296 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
0ed5c5d90d89563265a408d8c9d8953f0cea036e |
21-May-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Generate objc_memmove_collectable write-barrier for classes whose base class have GC'able object pointers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104296 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
848d2c5285cd031e2da82ba534dd59696e666019 |
21-May-2010 |
John McCall <rjmccall@apple.com> |
Be sure to apply initializers to members of anonymous structs and unions recursively, e.g. so that members of anonymous unions inside anonymous structs still get initialized. Also generate default constructor calls for anonymous struct members when necessary. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104292 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
f1860e5c381a2710fcebe6d55d799c6b25c21041 |
21-May-2010 |
John McCall <rjmccall@apple.com> |
Be sure to apply initializers to members of anonymous structs and unions recursively, e.g. so that members of anonymous unions inside anonymous structs still get initialized. Also generate default constructor calls for anonymous struct members when necessary. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104292 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
72480e5292c1950721a8ab8483305037f08ae08c |
21-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Add a new failure kind, FK_Incomplete, to InitializationSequence, to capture failures when we try to initialize an incomplete type. Previously, we would (ab)use FK_ConversionFailed, then occasionally dereference a null pointer when trying to diagnose the failure. Fixes <rdar://problem/7959007>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104286 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaInit.cpp
emaInit.h
|
72a43bbf6802c8fcfd04dcb2be8eafcb0b8fe29c |
21-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Add a new failure kind, FK_Incomplete, to InitializationSequence, to capture failures when we try to initialize an incomplete type. Previously, we would (ab)use FK_ConversionFailed, then occasionally dereference a null pointer when trying to diagnose the failure. Fixes <rdar://problem/7959007>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104286 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaInit.cpp
emaInit.h
|
7bf13384495893ba091403efff0fdf840f3b1687 |
20-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Reinstate r104117, Chandler Carruth's change that "[provides] a naming class for UnresolvedLookupExprs, even when occuring on template names" along with a fix for an Objective-C++ crasher it introduced. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104277 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaLookup.cpp
|
d2235f60e7bbd9e690c05fced371df9da76adc2b |
20-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Reinstate r104117, Chandler Carruth's change that "[provides] a naming class for UnresolvedLookupExprs, even when occuring on template names" along with a fix for an Objective-C++ crasher it introduced. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104277 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaLookup.cpp
|
ff92ad2e768122cf2adf1d4ac818bde68491c4c0 |
20-May-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Added TemplateArgumentListInfo to FunctionTemplateSpecializationInfo. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104226 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
e03db98d67111ebf7622d9086951aacc24406b66 |
20-May-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Added TemplateArgumentListInfo to FunctionTemplateSpecializationInfo. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104226 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
77e8e18b02560741e07052f35f29894f0a787091 |
20-May-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Renamed misleading getSourceRange -> getLocalSourceRange and getFullSourceRange -> getSourceRange for TypeLoc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104220 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaTemplate.cpp
|
bd054dba8a3023821f2a0951b0fae05e3522a7c9 |
20-May-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Renamed misleading getSourceRange -> getLocalSourceRange and getFullSourceRange -> getSourceRange for TypeLoc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104220 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaTemplate.cpp
|
32a9e81e19db565507ad29bfaca712e13fb9f808 |
20-May-2010 |
John McCall <rjmccall@apple.com> |
Whoops. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104218 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
8a2ca744c259882304ebd387fcda30eb68321211 |
20-May-2010 |
John McCall <rjmccall@apple.com> |
Whoops. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104218 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
76b1cffeffd5c6a52bff4c4777a1e4c7c181cef1 |
20-May-2010 |
John McCall <rjmccall@apple.com> |
Don't try to check jump scopes in invalid functions. Fixes <rdar://problem/7995494>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104217 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
dae69ef4c59fd4b75b956796909592debd7e9bc7 |
20-May-2010 |
John McCall <rjmccall@apple.com> |
Don't try to check jump scopes in invalid functions. Fixes <rdar://problem/7995494>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104217 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
229535d2111dda24a2a827c5f949aca7e3db4f6f |
20-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Remove accidental commit git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104207 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
4e58c25aa579d30cd1e4b0bfb36321c14652be12 |
20-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Remove accidental commit git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104207 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
0e9cf205e0a9094757d3b415a3c691e934161710 |
20-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Various small fixes for construction/destruction of Objective-C++ instance variables: - Use isRecordType() rather than isa<RecordType>(), so that we see through typedefs in ivar types. - Mark the destructor as referenced - Perform C++ access control on the destructor git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104206 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaDeclObjC.cpp
emaLookup.cpp
|
68dd3ee3b5ae5b7694b4a21e34b4355431ed0457 |
20-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Various small fixes for construction/destruction of Objective-C++ instance variables: - Use isRecordType() rather than isa<RecordType>(), so that we see through typedefs in ivar types. - Mark the destructor as referenced - Perform C++ access control on the destructor git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104206 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaDeclObjC.cpp
emaLookup.cpp
|
357f3b377abe85dd33a59122c90a361ea4226353 |
20-May-2010 |
John McCall <rjmccall@apple.com> |
Support implicitly closing on 'this' in a block. Fixed PR7165. (the codegen works here, too, but that's annoying to test without execution) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104202 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprCXX.cpp
emaTemplate.cpp
|
ea1471e0e967548c596a71469702f8846dbaf3c0 |
20-May-2010 |
John McCall <rjmccall@apple.com> |
Support implicitly closing on 'this' in a block. Fixed PR7165. (the codegen works here, too, but that's annoying to test without execution) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104202 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprCXX.cpp
emaTemplate.cpp
|
8f782aa0b75cff1481e87720af7c22aed21cb7ff |
20-May-2010 |
Chris Lattner <sabre@nondot.org> |
fix the TemplateArgumentList copy constructor to not be a copy constructor (since it isn't one semantically) and fix the ownership bits it sets to be correct! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104192 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
885989109ade7cb4dc493e25da41456c64b3cf6a |
20-May-2010 |
Chris Lattner <sabre@nondot.org> |
fix the TemplateArgumentList copy constructor to not be a copy constructor (since it isn't one semantically) and fix the ownership bits it sets to be correct! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104192 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
95338f1131ff841cae63908ef2deedf5e2ac3d43 |
20-May-2010 |
Jim Grosbach <grosbach@apple.com> |
tweak to (hopefully) fix darwin[89] buildbots. Thanks to Doug for the suggested modification. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104188 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
9cbb4d81b98ee84795e267d51c1fa530ef6723bf |
20-May-2010 |
Jim Grosbach <grosbach@apple.com> |
tweak to (hopefully) fix darwin[89] buildbots. Thanks to Doug for the suggested modification. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104188 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
5fc81c9d3247a3dab5933be4446f3197145337e6 |
20-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When a conditional operator is an rvalue of class type, we need to create a temporary copy of both the "true" and "false" results. Fixes the Boost.Interprocess failures. Daniel did all the hard work of tracking down the issue, I get to type up the trivial fix for this horrible miscompile. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104184 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
b65a45835afcc93fa99e22b14b4c9734c261d831 |
20-May-2010 |
Douglas Gregor <dgregor@apple.com> |
When a conditional operator is an rvalue of class type, we need to create a temporary copy of both the "true" and "false" results. Fixes the Boost.Interprocess failures. Daniel did all the hard work of tracking down the issue, I get to type up the trivial fix for this horrible miscompile. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104184 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
50be5101831a8e3679e18775b41816c9ddfc39ca |
19-May-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Added basic source locations to Elaborated and DependentName types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104169 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaTemplate.cpp
emaType.cpp
reeTransform.h
|
e4da7a034a2fcf4b14d0bcc28d05de0878159061 |
19-May-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Added basic source locations to Elaborated and DependentName types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104169 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaTemplate.cpp
emaType.cpp
reeTransform.h
|
3fc091df2d07bc3b13e91d915050d5309cb83c11 |
19-May-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Adds support for ObjC++'s GC attribute on declaration of object variables and functions returning such objects. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104168 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
2390a72a3ebd37737fec5ba1385db9c3bb22fc59 |
19-May-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Adds support for ObjC++'s GC attribute on declaration of object variables and functions returning such objects. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104168 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
85ec4e1686ca331b10ef7ba3f0d0ccad2cd5dc44 |
19-May-2010 |
Daniel Dunbar <daniel@zuster.org> |
Revert r104117, "Provide a naming class for UnresolvedLookupExprs, even when occuring on..." which breaks some Objective-C code. Working on getting a test case... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104150 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaLookup.cpp
|
bf1cbaf1b0ac9d967ff6abf27788cc98f0f5e7da |
19-May-2010 |
Daniel Dunbar <daniel@zuster.org> |
Revert r104117, "Provide a naming class for UnresolvedLookupExprs, even when occuring on..." which breaks some Objective-C code. Working on getting a test case... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104150 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaLookup.cpp
|
dc4d6feb0c4f81110cef67e785e3e8374384ba5f |
19-May-2010 |
Ted Kremenek <kremenek@apple.com> |
Add clang support for IBOutletCollection. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104135 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
857e918a8a40deb128840308a318bf623d68295f |
19-May-2010 |
Ted Kremenek <kremenek@apple.com> |
Add clang support for IBOutletCollection. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104135 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
147afd11b504d6a4dc6f321c45989860ed2af16a |
19-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Revert r104106; it's breaking linking of Boost.Serialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104121 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
4469e8a97cdca3725b4f8f366916143113c029ac |
19-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Revert r104106; it's breaking linking of Boost.Serialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104121 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
a129fdec5b5adf63e602e8d4f3cd0ac616a4898e |
19-May-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Provide a naming class for UnresolvedLookupExprs, even when occuring on template names. We were completely missing naming classes for many unqualified lookups, but this didn't trigger code paths that need it. This removes part of an optimization that re-uses the template name lookup done by the parser to determine if explicit template arguments actually form a template-id. Unfortunately the technique for avoiding the duplicate lookup lost needed data such as the class context in which the lookup succeeded. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104117 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaLookup.cpp
|
c3f984fa13364520f4a2c447d1d213db77db3309 |
19-May-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Provide a naming class for UnresolvedLookupExprs, even when occuring on template names. We were completely missing naming classes for many unqualified lookups, but this didn't trigger code paths that need it. This removes part of an optimization that re-uses the template name lookup done by the parser to determine if explicit template arguments actually form a template-id. Unfortunately the technique for avoiding the duplicate lookup lost needed data such as the class context in which the lookup succeeded. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104117 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaLookup.cpp
|
6b4b63608b31bcc0f03c0626b8c53a7059830584 |
19-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Teach clang to instantiate attributes on more declarations. Fixes PR7102. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104106 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
7d2bcc74fd32875b737dabe3b4f867fe4c907ca0 |
19-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Teach clang to instantiate attributes on more declarations. Fixes PR7102. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104106 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
2eb9a68bc79237fc8131c1de3d2e0e1815c4bff4 |
19-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement C++ builtin operator candidates for vector types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104105 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaOverload.cpp
|
26bcf67d0156e2aec6ea184f8c2fb6186ec7b1e3 |
19-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement C++ builtin operator candidates for vector types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104105 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaOverload.cpp
|
9669e18931747b7625bf5ad4aa44169153cdc5c7 |
19-May-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Fix a GCC warning about inline functions not being defined. Until r104081, only the same .cpp file as provided the definitions referenced these functions, hiding the issue. However, they are clearly no longer inline. Let me know if there is a reason to move their definitions to the header and make them truly inline. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104104 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
|
8069a7323c50c67916ea37c98a27ba0dfef35ae8 |
19-May-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Fix a GCC warning about inline functions not being defined. Until r104081, only the same .cpp file as provided the definitions referenced these functions, hiding the issue. However, they are clearly no longer inline. Let me know if there is a reason to move their definitions to the header and make them truly inline. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104104 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
|
ed123d0f5c573b365fed398c25d4bc2ba1a3aa89 |
19-May-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Fix an obvious goof that rjmccall found by inspection. No testcase, suggestions welcome for one. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104101 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
042d6f98ea73d781e43cc17077e8fc84a4201eef |
19-May-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Fix an obvious goof that rjmccall found by inspection. No testcase, suggestions welcome for one. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104101 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
b9409b8aa2f313876610d35c7b75db8dc898a438 |
19-May-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Misc. fixes to bring Objetive-C++'s handling of gc attributes to be inline with Objective-C (for radar 7925141). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104084 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
emaOverload.cpp
|
62ac5d01aade35790a6d8e814edb21062da5d3f7 |
19-May-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Misc. fixes to bring Objetive-C++'s handling of gc attributes to be inline with Objective-C (for radar 7925141). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104084 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
emaOverload.cpp
|
a164a43f29667a93684c4352d8bb0a500c45a8ec |
19-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Protect isIntegerConstantExpr from seeing type- or value-dependent expressions in attributes, pragmas. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104083 91177308-0d34-0410-b5e6-96231b3b80d8
emaAttr.cpp
emaDeclAttr.cpp
emaType.cpp
|
ac06a0e1e3feb95c2ffd352c086882b492a65b99 |
19-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Protect isIntegerConstantExpr from seeing type- or value-dependent expressions in attributes, pragmas. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104083 91177308-0d34-0410-b5e6-96231b3b80d8
emaAttr.cpp
emaDeclAttr.cpp
emaType.cpp
|
0e1d9086c4b939c1657a0cc1bc637f5a4ca34289 |
19-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement C++ support for vector and extended vector types. This involves extending implicit conversion sequences to model vector conversions and vector splats, along with teaching the C++ conditional operator-checking code about vector types. Fixes <rdar://problem/7983501>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104081 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaOverload.cpp
emaOverload.h
|
fb4a5436839aae5f5599f2970997e23ee6b895b6 |
19-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement C++ support for vector and extended vector types. This involves extending implicit conversion sequences to model vector conversions and vector splats, along with teaching the C++ conditional operator-checking code about vector types. Fixes <rdar://problem/7983501>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104081 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaOverload.cpp
emaOverload.h
|
bf4816493264947f6018572b1bde1c26072bfafd |
18-May-2010 |
Ted Kremenek <kremenek@apple.com> |
Teach CursorVisitor about duplicate ObjCPropertyDecls that can arise because of a current design limitation in how we handle Objective-C class extensions. This was causing the CursorVisitor to essentially visit an @property twice (once in the @interface, the other in the class extension). Fixes <rdar://problem/7410145>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104055 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaObjCProperty.cpp
|
23173d7f029f430611caceea72ae61ba6b80af1c |
18-May-2010 |
Ted Kremenek <kremenek@apple.com> |
Teach CursorVisitor about duplicate ObjCPropertyDecls that can arise because of a current design limitation in how we handle Objective-C class extensions. This was causing the CursorVisitor to essentially visit an @property twice (once in the @interface, the other in the class extension). Fixes <rdar://problem/7410145>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104055 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaObjCProperty.cpp
|
01890a8487ae3330abc501b455e2092545d54775 |
18-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Add support for Microsoft's __thiscall, from Steven Watanabe! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104026 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaType.cpp
|
f813a2c03fcb05381b3252010435f557eb6b3cde |
18-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Add support for Microsoft's __thiscall, from Steven Watanabe! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104026 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaType.cpp
|
e879d76c75158b64b7be12abd8c34da90bba8431 |
18-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Give a slight edge to the context-sensitive keyword 'super' over non-function-local declarations with names similar to what the user typed. For example, this allows us to correct 'supper' to 'super' in an Objective-C message send, even though the C function 'isupper' has the same edit distance. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104023 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
d0785ea6c4c37a7fa4fcd4840e6e036ffb44e13e |
18-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Give a slight edge to the context-sensitive keyword 'super' over non-function-local declarations with names similar to what the user typed. For example, this allows us to correct 'supper' to 'super' in an Objective-C message send, even though the C function 'isupper' has the same edit distance. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104023 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
c6a6852d2d570541d9a3c29cd96bca497802ba8b |
18-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Tweak typo-correction logic a bit regarding "super", so that we consider "super" as a candidate whenever we're parsing an expression within an Objective-C method in an interface that has a superclass. At some point, we'd like to give "super" a little edge over non-local names; that will come later. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104022 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaLookup.cpp
emaOverload.cpp
|
91f7ac7e20ba03b8cd711974e2611231077bbe81 |
18-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Tweak typo-correction logic a bit regarding "super", so that we consider "super" as a candidate whenever we're parsing an expression within an Objective-C method in an interface that has a superclass. At some point, we'd like to give "super" a little edge over non-local names; that will come later. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104022 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaLookup.cpp
emaOverload.cpp
|
2dbc44b5023c73335f7869494a98a67673591809 |
18-May-2010 |
John McCall <rjmccall@apple.com> |
Permit Objective C object pointers to be const_casted. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104019 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaType.cpp
|
d425d2b78665f42dddda56da31d6a3f576493474 |
18-May-2010 |
John McCall <rjmccall@apple.com> |
Permit Objective C object pointers to be const_casted. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104019 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaType.cpp
|
f4d35912dc6a2f46a9ea2a4392aa29098af661be |
18-May-2010 |
Sean Hunt <rideau3@gmail.com> |
Switch over the tablegen to use much prettier range technology Also rename ABSTRACT to ABSTRACT_STMT, in keeping with the other .def files git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104017 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
7381d5cfbd599fa2b9e215011ad7cbd449de231a |
18-May-2010 |
Sean Hunt <rideau3@gmail.com> |
Switch over the tablegen to use much prettier range technology Also rename ABSTRACT to ABSTRACT_STMT, in keeping with the other .def files git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104017 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
7216009e14ca3351400da22ffe3aecfbeb6b6aaa |
18-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
I hate this commit. Revert much of the implementation of C++98/03 [temp.friend]p5 in r103943 and its follow-ons r103948 and r103952. While our implementation was technically correct, other compilers don't seem to implement this paragraph (which forces the instantiation of friend functions defined in a class template when a class template specialization is instantiated), and doing so broke a bunch of Boost libraries. Since this behavior has changed in C++0x (which instantiates the friend function definitions when they are used), we're going to skip the nowhere-implemented C++98/03 semantics and go straight to the C++0x semantics. This commit is a band-aid to get Boost up and running again. It doesn't really fix PR6952 (which this commit un-fixes), but it does deal with the way Boost.Units abuses this particular paragraph. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104014 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
238058c372cfb7bdaf489f51171eb1380ebfd6a6 |
18-May-2010 |
Douglas Gregor <dgregor@apple.com> |
I hate this commit. Revert much of the implementation of C++98/03 [temp.friend]p5 in r103943 and its follow-ons r103948 and r103952. While our implementation was technically correct, other compilers don't seem to implement this paragraph (which forces the instantiation of friend functions defined in a class template when a class template specialization is instantiated), and doing so broke a bunch of Boost libraries. Since this behavior has changed in C++0x (which instantiates the friend function definitions when they are used), we're going to skip the nowhere-implemented C++98/03 semantics and go straight to the C++0x semantics. This commit is a band-aid to get Boost up and running again. It doesn't really fix PR6952 (which this commit un-fixes), but it does deal with the way Boost.Units abuses this particular paragraph. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104014 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
623d389d3c6690af472c88aa6abce59135facce1 |
18-May-2010 |
John McCall <rjmccall@apple.com> |
If a switch condition is constant, don't warn about missing enum cases. If a switch condition is constant, warn if there's no case for it. Constant switch conditions do come up in reasonable template code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104010 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
0fb97083cc0f8a82e404e22991ae80d2216e71d5 |
18-May-2010 |
John McCall <rjmccall@apple.com> |
If a switch condition is constant, don't warn about missing enum cases. If a switch condition is constant, warn if there's no case for it. Constant switch conditions do come up in reasonable template code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104010 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
2a897dbda75942d82d3b74f09653c67b6aa7eedb |
18-May-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Add a hack to silence warnings about failing to return from functions after a temporary with a noreturn destructor has been created. Fixes PR6884 for now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104000 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
00e9cbb13d3e5deb8ee27288e0ed816266ec9e5b |
18-May-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Add a hack to silence warnings about failing to return from functions after a temporary with a noreturn destructor has been created. Fixes PR6884 for now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104000 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
79e8303f24b8cf409b8338a5434ee364bd401094 |
18-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Instantiate attributes on typedefs. This is a quick fix for PR7148, when we really need a proper audit of our handling of attributes in templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103999 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
a6b0907a71c66e6bf65e2477a6f9783d9fec4d47 |
18-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Instantiate attributes on typedefs. This is a quick fix for PR7148, when we really need a proper audit of our handling of attributes in templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103999 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
1618cd6e889cc500331f22b88f66af4ae2cce3d5 |
17-May-2010 |
John McCall <rjmccall@apple.com> |
Clean up some more uses of getAs<ObjCInterfaceType>() that Fariborz pointed out. The remaining ones are okay. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103973 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
506b57e8b79d7dc2c367bf2ee7ec95420ad3fc8f |
17-May-2010 |
John McCall <rjmccall@apple.com> |
Clean up some more uses of getAs<ObjCInterfaceType>() that Fariborz pointed out. The remaining ones are okay. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103973 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
6503fa539a8911da4e68d51499b46766335c138d |
17-May-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Don't attempt to poke into an invalid field's class type to mark its destructors as referenced which may cause a crash. Fixes radar 7896920 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103953 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
9614dc0f76af9707a07d656056d2ec08cdd04b3a |
17-May-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Don't attempt to poke into an invalid field's class type to mark its destructors as referenced which may cause a crash. Fixes radar 7896920 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103953 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
b13287e0ccb03bcf7018d52044a6cae80ccde1c1 |
17-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Diagnose a redefinition error when there are two instantiations of friend functions defined inside a class template. Fixes PR6952, the last Boost.Units failure. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103952 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
cfe833be882f600206f1587f157b025b368497d7 |
17-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Diagnose a redefinition error when there are two instantiations of friend functions defined inside a class template. Fixes PR6952, the last Boost.Units failure. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103952 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
0ffa1562cac74870592f234ebd5aa8360ee8d2d5 |
17-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Determine when the instantiation of a friend function defined inside a class template conflicts with an existing (non-template) definition. This is another part of PR6952. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103948 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaTemplateInstantiateDecl.cpp
|
6cfacfe54c75baa4d67f1fbdf4f80644b662818e |
17-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Determine when the instantiation of a friend function defined inside a class template conflicts with an existing (non-template) definition. This is another part of PR6952. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103948 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaTemplateInstantiateDecl.cpp
|
2823938636416657c26c25d46e08a84798284c68 |
17-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
C++98/03 [temp.friend]p4 requires that inline function definitions within class templates be instantiated along with each class template specialization, even if the functions are not used. Do so, as a baby step toward PR6952. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103943 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
ac7c2c8a9d47df7d652364af3043c41816a18fa4 |
17-May-2010 |
Douglas Gregor <dgregor@apple.com> |
C++98/03 [temp.friend]p4 requires that inline function definitions within class templates be instantiated along with each class template specialization, even if the functions are not used. Do so, as a baby step toward PR6952. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103943 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
d1537273c0cb15538ab1a8d1fef51d086c01ab6b |
17-May-2010 |
Eli Friedman <eli.friedman@gmail.com> |
PR7117: Make sure we don't lose the calling convention for K&R-style definitions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103932 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
9a0fcfe659b65e1e1bba4ba5f35a12ffcd088ea0 |
17-May-2010 |
Eli Friedman <eli.friedman@gmail.com> |
PR7117: Make sure we don't lose the calling convention for K&R-style definitions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103932 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
96860a0f784c8c4e11274de470fcfca585229de5 |
16-May-2010 |
Anders Carlsson <andersca@mac.com> |
Correctly diagnose array 'new' with initialization arguments when the new type is a typedef to an array type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103909 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
55cbd6e51fdca832c31bf8c179c40978a5d1f892 |
16-May-2010 |
Anders Carlsson <andersca@mac.com> |
Correctly diagnose array 'new' with initialization arguments when the new type is a typedef to an array type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103909 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
b830dda6311777aae5905efb2e40d0793e03523a |
16-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When the type-id or new-type-id of a C++ "new" expression is a typedef of an array type, use the outermost array bound as the number of elements to allocate. Fixes PR7147. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103908 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
3caf04ea0c01ff6822209c4621c3fa64a48029a4 |
16-May-2010 |
Douglas Gregor <dgregor@apple.com> |
When the type-id or new-type-id of a C++ "new" expression is a typedef of an array type, use the outermost array bound as the number of elements to allocate. Fixes PR7147. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103908 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
183c5aee71e76f0ef1492e2a86c228edc85b1989 |
16-May-2010 |
John McCall <rjmccall@apple.com> |
Don't emit any fallthrough / missing-noreturn warnings if we can't compute a CFG for a function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103905 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
16565aa95b086fb239baf82335dccc1b1ec93942 |
16-May-2010 |
John McCall <rjmccall@apple.com> |
Don't emit any fallthrough / missing-noreturn warnings if we can't compute a CFG for a function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103905 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
f165af067e6eb57a817b9502adee2c1eef059ec1 |
16-May-2010 |
Chris Lattner <sabre@nondot.org> |
fix rdar://7985267 - Don't emit an error about a non-pod argument passed to va_start, it doesn't actually pass it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103899 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprObjC.cpp
emaOverload.cpp
|
403783337fc06ce46bc2adeb7f09e0c0471f758e |
16-May-2010 |
Chris Lattner <sabre@nondot.org> |
fix rdar://7985267 - Don't emit an error about a non-pod argument passed to va_start, it doesn't actually pass it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103899 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprObjC.cpp
emaOverload.cpp
|
f4f254c60f644f08dea9cfbe0865016a5ef748a6 |
15-May-2010 |
John McCall <rjmccall@apple.com> |
Substantially alter the design of the Objective C type AST by introducing ObjCObjectType, which is basically just a pair of one of {primitive-id, primitive-Class, user-defined @class} with a list of protocols. An ObjCObjectPointerType is therefore just a pointer which always points to one of these types (possibly sugared). ObjCInterfaceType is now just a kind of ObjCObjectType which happens to not carry any protocols. Alter a rather large number of use sites to use ObjCObjectType instead of ObjCInterfaceType. Store an ObjCInterfaceType as a pointer on the decl rather than hashing them in a FoldingSet. Remove some number of methods that are no longer used, at least after this patch. By simplifying ObjCObjectPointerType, we are now able to easily remove and apply pointers to Objective-C types, which is crucial for a certain kind of ObjC++ metaprogramming common in WebKit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103870 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprObjC.cpp
emaInit.cpp
emaObjCProperty.cpp
emaOverload.cpp
emaStmt.cpp
emaTemplateDeduction.cpp
emaType.cpp
reeTransform.h
|
c12c5bba6ceb6acd4e51e7a0fc03257da9cfd44e |
15-May-2010 |
John McCall <rjmccall@apple.com> |
Substantially alter the design of the Objective C type AST by introducing ObjCObjectType, which is basically just a pair of one of {primitive-id, primitive-Class, user-defined @class} with a list of protocols. An ObjCObjectPointerType is therefore just a pointer which always points to one of these types (possibly sugared). ObjCInterfaceType is now just a kind of ObjCObjectType which happens to not carry any protocols. Alter a rather large number of use sites to use ObjCObjectType instead of ObjCInterfaceType. Store an ObjCInterfaceType as a pointer on the decl rather than hashing them in a FoldingSet. Remove some number of methods that are no longer used, at least after this patch. By simplifying ObjCObjectPointerType, we are now able to easily remove and apply pointers to Objective-C types, which is crucial for a certain kind of ObjC++ metaprogramming common in WebKit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103870 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprObjC.cpp
emaInit.cpp
emaObjCProperty.cpp
emaOverload.cpp
emaStmt.cpp
emaTemplateDeduction.cpp
emaType.cpp
reeTransform.h
|
b7d79b3cff07dd63db778f369deb3d0f1060202b |
15-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement a simple form of the C++ named return value optimization for return statements. We perform NRVO only when all of the return statements in the function return the same variable. Fixes some link failures in Boost.Interprocess (which is relying on NRVO), and probably improves performance for some C++ applications. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103867 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
d86c477fb5d3fc34864afecbbb5443da9355e8fb |
15-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement a simple form of the C++ named return value optimization for return statements. We perform NRVO only when all of the return statements in the function return the same variable. Fixes some link failures in Boost.Interprocess (which is relying on NRVO), and probably improves performance for some C++ applications. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103867 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
8b9ae4311f89abe3c417577a4e6e23a504f5d33f |
15-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement semantic analysis and an AST representation for the named return value optimization. Sema marks return statements with their NRVO candidates (which may or may not end up using the NRVO), then, at the end of a function body, computes and marks those variables that can be allocated into the return slot. I've checked this locally with some debugging statements (not committed), but there won't be any tests until CodeGen comes along. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103865 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
emaStmt.cpp
|
5077c3876beeaed32280af88244e8050078619a8 |
15-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement semantic analysis and an AST representation for the named return value optimization. Sema marks return statements with their NRVO candidates (which may or may not end up using the NRVO), then, at the end of a function body, computes and marks those variables that can be allocated into the return slot. I've checked this locally with some debugging statements (not committed), but there won't be any tests until CodeGen comes along. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103865 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
emaStmt.cpp
|
7424ed8f5eff898e865a2efceca5ef14b81d6b76 |
15-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Recognize when the named return value optimization applies in a "return" statement and mark the corresponding CXXConstructExpr as elidable. Teach CodeGen that eliding a temporary is different from eliding an object construction. This is just a baby step toward NRVO. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103849 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaInit.cpp
emaInit.h
emaObjCProperty.cpp
emaStmt.cpp
|
3c9034cb7ff1d6c1e4ecd1b44c98f553df013c7c |
15-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Recognize when the named return value optimization applies in a "return" statement and mark the corresponding CXXConstructExpr as elidable. Teach CodeGen that eliding a temporary is different from eliding an object construction. This is just a baby step toward NRVO. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103849 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaInit.cpp
emaInit.h
emaObjCProperty.cpp
emaStmt.cpp
|
dd5c97fc81abbdd4275b99e20ba8c46405034b38 |
14-May-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to fix a crash on incomplete class declaration. Radar 7923673. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103812 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
4fb20533baff585c27531fe90c9bf7b004e07bb7 |
14-May-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to fix a crash on incomplete class declaration. Radar 7923673. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103812 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
4341d80260f9337a505e0875f3006e052c28e6d7 |
14-May-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Implement new default property synthesis rules. Essentially, no longer user directive is needed to force a property implementation. It is decided based on those propeties which are declared in the class (or in its protocols) but not those which must be default implemented by one of its super classes. Implements radar 7923851. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103787 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
emaObjCProperty.cpp
|
509d477ae5a24282719320fe92038ccf57358840 |
14-May-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Implement new default property synthesis rules. Essentially, no longer user directive is needed to force a property implementation. It is decided based on those propeties which are declared in the class (or in its protocols) but not those which must be default implemented by one of its super classes. Implements radar 7923851. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103787 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
emaObjCProperty.cpp
|
4d7353a63e9957701befb8527d7d59de89d000e0 |
14-May-2010 |
Daniel Dunbar <daniel@zuster.org> |
Revert r103770, "Added basic source locations to Elaborated and DependentName types.", it is breaking Clang bootstrap. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103775 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaType.cpp
reeTransform.h
|
a63db84b164d3f1c987a3ea6251e3092db4f317b |
14-May-2010 |
Daniel Dunbar <daniel@zuster.org> |
Revert r103770, "Added basic source locations to Elaborated and DependentName types.", it is breaking Clang bootstrap. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103775 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaType.cpp
reeTransform.h
|
ef012445d431eb51de6ce033e117106624a1dc73 |
14-May-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Added basic source locations to Elaborated and DependentName types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103770 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaType.cpp
reeTransform.h
|
5431299f6e1e1d14b39b924fe24bf04035f4ae42 |
14-May-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Added basic source locations to Elaborated and DependentName types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103770 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaType.cpp
reeTransform.h
|
2bcda8c1cf367dcc5d4fb4b244be48bdee191d8f |
14-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Make sure to search semantic scopes and appropriate template-parameter scopes during unqualified name lookup that has fallen out to namespace scope. Fixes PR7133. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103766 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
00b4b039f02d338ae4774797053235a7e65abbde |
14-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Make sure to search semantic scopes and appropriate template-parameter scopes during unqualified name lookup that has fallen out to namespace scope. Fixes PR7133. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103766 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
537843d3486ff835c507bfb91848aba9af14dc69 |
14-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
A vtable is used if the key function is defined... even if that key function's definition is an out-of-class definition marked "inline". Fixes an assertion in WebKit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103763 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
ca4aa379fcae53c50760cdf3632d8d801b795046 |
14-May-2010 |
Douglas Gregor <dgregor@apple.com> |
A vtable is used if the key function is defined... even if that key function's definition is an out-of-class definition marked "inline". Fixes an assertion in WebKit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103763 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
86d52597771624580affc3eeced3da33ac059318 |
13-May-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Objective-C++ Sema. Fix a bug in instantiation of receivers. Completes radar 7963410. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103719 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
3ba606199be8056ae83596260bd6fd5872942905 |
13-May-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Objective-C++ Sema. Fix a bug in instantiation of receivers. Completes radar 7963410. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103719 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
a78927d6476067d6c7a68d6bc21c93d66f265594 |
13-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Rework when and how vtables are emitted, by tracking where vtables are "used" (e.g., we will refer to the vtable in the generated code) and when they are defined (i.e., because we've seen the key function definition). Previously, we were effectively tracking "potential definitions" rather than uses, so we were a bit too eager about emitting vtables for classes without key functions. The new scheme: - For every use of a vtable, Sema calls MarkVTableUsed() to indicate the use. For example, this occurs when calling a virtual member function of the class, defining a constructor of that class type, dynamic_cast'ing from that type to a derived class, casting to/through a virtual base class, etc. - For every definition of a vtable, Sema calls MarkVTableUsed() to indicate the definition. This happens at the end of the translation unit for classes whose key function has been defined (so we can delay computation of the key function; see PR6564), and will also occur with explicit template instantiation definitions. - For every vtable defined/used, we mark all of the virtual member functions of that vtable as defined/used, unless we know that the key function is in another translation unit. This instantiates virtual member functions when needed. - At the end of the translation unit, Sema tells CodeGen (via the ASTConsumer) which vtables must be defined (CodeGen will define them) and which may be used (for which CodeGen will define the vtables lazily). From a language perspective, both the old and the new schemes are permissible: we're allowed to instantiate virtual member functions whenever we want per the standard. However, all other C++ compilers were more lazy than we were, and our eagerness was both a performance issue (we instantiated too much) and a portability problem (we broke Boost test cases, which now pass). Notes: (1) There's a ton of churn in the tests, because the order in which vtables get emitted to IR has changed. I've tried to isolate some of the larger tests from these issues. (2) Some diagnostics related to implicitly-instantiated/implicitly-defined virtual member functions have moved to the point of first use/definition. It's better this way. (3) I could use a review of the places where we MarkVTableUsed, to see if I missed any place where the language effectively requires a vtable. Fixes PR7114 and PR6564. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103718 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaCXXCast.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
|
6fb745bdf1ff1e32caf07e42093a7920726892c1 |
13-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Rework when and how vtables are emitted, by tracking where vtables are "used" (e.g., we will refer to the vtable in the generated code) and when they are defined (i.e., because we've seen the key function definition). Previously, we were effectively tracking "potential definitions" rather than uses, so we were a bit too eager about emitting vtables for classes without key functions. The new scheme: - For every use of a vtable, Sema calls MarkVTableUsed() to indicate the use. For example, this occurs when calling a virtual member function of the class, defining a constructor of that class type, dynamic_cast'ing from that type to a derived class, casting to/through a virtual base class, etc. - For every definition of a vtable, Sema calls MarkVTableUsed() to indicate the definition. This happens at the end of the translation unit for classes whose key function has been defined (so we can delay computation of the key function; see PR6564), and will also occur with explicit template instantiation definitions. - For every vtable defined/used, we mark all of the virtual member functions of that vtable as defined/used, unless we know that the key function is in another translation unit. This instantiates virtual member functions when needed. - At the end of the translation unit, Sema tells CodeGen (via the ASTConsumer) which vtables must be defined (CodeGen will define them) and which may be used (for which CodeGen will define the vtables lazily). From a language perspective, both the old and the new schemes are permissible: we're allowed to instantiate virtual member functions whenever we want per the standard. However, all other C++ compilers were more lazy than we were, and our eagerness was both a performance issue (we instantiated too much) and a portability problem (we broke Boost test cases, which now pass). Notes: (1) There's a ton of churn in the tests, because the order in which vtables get emitted to IR has changed. I've tried to isolate some of the larger tests from these issues. (2) Some diagnostics related to implicitly-instantiated/implicitly-defined virtual member functions have moved to the point of first use/definition. It's better this way. (3) I could use a review of the places where we MarkVTableUsed, to see if I missed any place where the language effectively requires a vtable. Fixes PR7114 and PR6564. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103718 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaCXXCast.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
|
6c03d4bd4cab61996904fad91fcdb830edf38d41 |
13-May-2010 |
John McCall <rjmccall@apple.com> |
Rebuild builtin_id * as an ObjCObjectPointerType, where builtin_id is the magic type that 'id' is a pointer to. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103708 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
5d7c29a278c4ef95d68c3a0d059ef5fe59b8bb45 |
13-May-2010 |
John McCall <rjmccall@apple.com> |
Rebuild builtin_id * as an ObjCObjectPointerType, where builtin_id is the magic type that 'id' is a pointer to. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103708 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
0f4cbb892086113a4538610c938e48c3ec74e0a9 |
13-May-2010 |
John McCall <rjmccall@apple.com> |
When performing template argument deduction, match Objective C pointers against pointer patterns. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103706 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
c0008349f233e70e3ffabe7b31eab5d9859bc25f |
13-May-2010 |
John McCall <rjmccall@apple.com> |
When performing template argument deduction, match Objective C pointers against pointer patterns. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103706 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
9746f96736398e75923595be8e0b38993b6c67e8 |
13-May-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Delete a dead function at sabre's request. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103705 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
197113b2c41f49224c83f901c2bb0d822b75d480 |
13-May-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Delete a dead function at sabre's request. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103705 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
98d07257795cc2fac66c9650ed53eca9f6713b43 |
13-May-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Objective-C++ Sema. Support for conversion of a C++ class object used as a receiver to an objective-c pointer via a converwsion function. wip. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103672 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprObjC.cpp
emaOverload.cpp
|
79d3f04688497857d29fe1f009bbc7b4b830a21b |
13-May-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Objective-C++ Sema. Support for conversion of a C++ class object used as a receiver to an objective-c pointer via a converwsion function. wip. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103672 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprObjC.cpp
emaOverload.cpp
|
9f6520b9fa527a58711d00527c44236874dfef53 |
13-May-2010 |
Chris Lattner <sabre@nondot.org> |
improve comments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103670 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
face9818b52a6d47e4aa055a4bfcd435aed6010f |
13-May-2010 |
Chris Lattner <sabre@nondot.org> |
improve comments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103670 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
ad17014e6446cdedb662ece928f4c44425f080a9 |
12-May-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Objective-C++ Sema - Allow static_cast of one objc pointer to another. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103630 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
65267b233b167c9276075376a97147f586d37a69 |
12-May-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Objective-C++ Sema - Allow static_cast of one objc pointer to another. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103630 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
3655efa50f6dd445a2f3f26efd6d30df1aaf89b4 |
12-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Whenever we instantiate a function definition or class, enter a new potentially-evaluated expression context, to ensure that used declarations get properly marked. Fixes PR7123. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103624 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
9679cafc6368cceed1a5e69d3038d0316401b352 |
12-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Whenever we instantiate a function definition or class, enter a new potentially-evaluated expression context, to ensure that used declarations get properly marked. Fixes PR7123. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103624 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
03a5c472b71b24f35ffb0c5cd346794d54eaeb35 |
12-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When we emit an error during the implicit definition of a special member function (default constructor, copy constructor, copy assignment operator, destructor), emit a note showing where that implicit definition was required. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103619 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
c63d2c8469d6b96712b324f76b4af07e1852313f |
12-May-2010 |
Douglas Gregor <dgregor@apple.com> |
When we emit an error during the implicit definition of a special member function (default constructor, copy constructor, copy assignment operator, destructor), emit a note showing where that implicit definition was required. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103619 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
45c8e22294b1f30db797cbd9196b2c8e0fcb43df |
12-May-2010 |
John McCall <rjmccall@apple.com> |
Improve commentary on the indirect-goto jump scope checker and extract a convenience routine to find the innermost common ancestor of two scopes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103565 91177308-0d34-0410-b5e6-96231b3b80d8
umpDiagnostics.cpp
|
5e2a7acbdc9e4aee4da54e1e2f560a78bf6fb3c1 |
12-May-2010 |
John McCall <rjmccall@apple.com> |
Improve commentary on the indirect-goto jump scope checker and extract a convenience routine to find the innermost common ancestor of two scopes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103565 91177308-0d34-0410-b5e6-96231b3b80d8
umpDiagnostics.cpp
|
b6a682e09b458a1e123b0bb6b7c415eb62fe2ecc |
12-May-2010 |
John McCall <rjmccall@apple.com> |
When checking scopes for indirect goto, be more permissive (but still safe) about the permitted scopes. Specifically: 1) Permit labels and gotos to appear after a prologue of variable initializations. 2) Permit indirect gotos to jump out of scopes that don't require cleanup. 3) Diagnose possible attempts to indirect-jump out of scopes that do require cleanup. This requires a substantial reinvention of the algorithm for checking indirect goto. The current algorithm is Omega(M*N), with M = the number of unique scopes being jumped from and N = the number of unique scopes being jumped to, with an additional factor that is probably (worst-case) linear in the depth of scopes. Thus the entire thing is likely cubic given some truly bizarre ill-formed code; on well-formed code the additional factor collapses to an amortized constant (when amortized over the entire function) and so the algorithm is quadratic. Even this requires every label to appear in its own scope, which would be very unusual for indirect-goto code (and extremely unlikely for well-formed code); it is far more likely that all labels will be in the same scope and so the algorithm becomes linear. For such a marginal feature, I am fairly happy with this result. (this is using JumpDiagnostic's definition of scope, where successive variables in a block appear in their own scope) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103536 91177308-0d34-0410-b5e6-96231b3b80d8
umpDiagnostics.cpp
|
ddb0b4d5391d3e6bc9dcf93dc42310b20c96b6fc |
12-May-2010 |
John McCall <rjmccall@apple.com> |
When checking scopes for indirect goto, be more permissive (but still safe) about the permitted scopes. Specifically: 1) Permit labels and gotos to appear after a prologue of variable initializations. 2) Permit indirect gotos to jump out of scopes that don't require cleanup. 3) Diagnose possible attempts to indirect-jump out of scopes that do require cleanup. This requires a substantial reinvention of the algorithm for checking indirect goto. The current algorithm is Omega(M*N), with M = the number of unique scopes being jumped from and N = the number of unique scopes being jumped to, with an additional factor that is probably (worst-case) linear in the depth of scopes. Thus the entire thing is likely cubic given some truly bizarre ill-formed code; on well-formed code the additional factor collapses to an amortized constant (when amortized over the entire function) and so the algorithm is quadratic. Even this requires every label to appear in its own scope, which would be very unusual for indirect-goto code (and extremely unlikely for well-formed code); it is far more likely that all labels will be in the same scope and so the algorithm becomes linear. For such a marginal feature, I am fairly happy with this result. (this is using JumpDiagnostic's definition of scope, where successive variables in a block appear in their own scope) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103536 91177308-0d34-0410-b5e6-96231b3b80d8
umpDiagnostics.cpp
|
ab1f1819386bd718899582eb6426b2619b11e2cf |
11-May-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Merged Elaborated and QualifiedName types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103517 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaCodeComplete.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaInit.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaType.cpp
reeTransform.h
|
465d41b92b2c862f3062c412a0538db65c6a2661 |
11-May-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Merged Elaborated and QualifiedName types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103517 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaCodeComplete.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaInit.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaType.cpp
reeTransform.h
|
852f9e19378c38b1cd8c325586d71979307c6c16 |
11-May-2010 |
Daniel Dunbar <daniel@zuster.org> |
Speculatively revert r103497, "Do not mark the virtual members of an implicitly-instantiated class as ...", which seems to have broken bootstrap. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103515 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExprCXX.cpp
|
380c2139959d8608782292984b457640a143a70d |
11-May-2010 |
Daniel Dunbar <daniel@zuster.org> |
Speculatively revert r103497, "Do not mark the virtual members of an implicitly-instantiated class as ...", which seems to have broken bootstrap. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103515 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExprCXX.cpp
|
701607b7c6a01afe6d529f593ba72173bcaa5a1c |
11-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Do not mark the virtual members of an implicitly-instantiated class as referenced unless we see one of them defined (or the key function defined, if it as one) or if we need the vtable for something. Fixes PR7114. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103497 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExprCXX.cpp
|
bbbe074566a8defed299ff676bc65b3631861768 |
11-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Do not mark the virtual members of an implicitly-instantiated class as referenced unless we see one of them defined (or the key function defined, if it as one) or if we need the vtable for something. Fixes PR7114. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103497 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExprCXX.cpp
|
dec66e7d561ef6363f0cf77832b105c960e2a80a |
11-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
The C++98/03 standard is disturbingly silent about out-of-scope explicit instantiations of template. C++0x clarifies the intent (they're ill-formed in some cases; see [temp.explicit] for details). However, one could squint at the C++98/03 standard and conclude they are permitted, so reduce the error to a warning (controlled by -Wc++0x-compat) in C++98/03 mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103482 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
2166beba8d939d2938c5401af2c8d3687afd5d8c |
11-May-2010 |
Douglas Gregor <dgregor@apple.com> |
The C++98/03 standard is disturbingly silent about out-of-scope explicit instantiations of template. C++0x clarifies the intent (they're ill-formed in some cases; see [temp.explicit] for details). However, one could squint at the C++98/03 standard and conclude they are permitted, so reduce the error to a warning (controlled by -Wc++0x-compat) in C++98/03 mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103482 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
60632de5a09fbb33ebe0f65adacdc759dde2ae01 |
11-May-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Allow static_cast to objective-c pointers. Fixes radar 7952457. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103447 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
2f6c5506958dc3b84bef0671be6a2d979ab4c284 |
11-May-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Allow static_cast to objective-c pointers. Fixes radar 7952457. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103447 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
e40f545a495c863236aa35ed0e086f51654d2b61 |
09-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Be more careful about picking a template parameter when we fail to substitute explicit template arguments into a function template git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103369 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
fe52c91dcd1ecda90b579f789baf70f7a992e3c9 |
09-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Be more careful about picking a template parameter when we fail to substitute explicit template arguments into a function template git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103369 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
ee77da17f2b6d23f2e04b959b74f54d4bb253a1d |
09-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix a silly bootstrap-breaking thinko, where we were trying to convert non-existent condition expressions to boolean values during template instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103364 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
afa0fefb573f74ac7836daf1601c214eda946212 |
09-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Fix a silly bootstrap-breaking thinko, where we were trying to convert non-existent condition expressions to boolean values during template instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103364 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
7d03f837cc8360ff3899d4f93d97692c3a0dcabb |
09-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve our handling of the -Wunused-variable warning in templates. In particular, don't complain about unused variables that have dependent type until instantiation time, so that we can look at the type of the variable. Moreover, only complain about unused variables that have neither a user-declared constructor nor a non-trivial destructor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103362 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplateInstantiateDecl.cpp
|
5764f613e61cb3183f3d7ceeafd23396de96ed16 |
09-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Improve our handling of the -Wunused-variable warning in templates. In particular, don't complain about unused variables that have dependent type until instantiation time, so that we can look at the type of the variable. Moreover, only complain about unused variables that have neither a user-declared constructor nor a non-trivial destructor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103362 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplateInstantiateDecl.cpp
|
57f57f6e54ac1fee2cf920545b95e4c52ac7ded7 |
09-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Don't complain about an __builtin_va_arg expression's result being unused, since the operation has side effects. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103360 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
c6dfe194f623b02c123759f235b504d4850fc178 |
09-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Don't complain about an __builtin_va_arg expression's result being unused, since the operation has side effects. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103360 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
3d7c66979dcdb69c804d257f9ab355ac4a03e99e |
09-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When instantiating statements that involve conditions (if, while, do, for, and switch), be careful to construct the full expressions as soon as we perform template instantation, so we don't either forget to call temporary destructors or destroy temporaries at the wrong time. This is the template-instantiation analogue to r103187, during which I hadn't realized that the issue would affect the handling of these constructs differently inside and outside of templates. Fixes a regression in Boost.Function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103357 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
eaa18e449bb09c1e580aa35f9606ff2ca682f4cb |
09-May-2010 |
Douglas Gregor <dgregor@apple.com> |
When instantiating statements that involve conditions (if, while, do, for, and switch), be careful to construct the full expressions as soon as we perform template instantation, so we don't either forget to call temporary destructors or destroy temporaries at the wrong time. This is the template-instantiation analogue to r103187, during which I hadn't realized that the issue would affect the handling of these constructs differently inside and outside of templates. Fixes a regression in Boost.Function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103357 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
9cb6babd65548c6583643fdd944906231365e7ac |
08-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Don't destroy the data associated with an overload resolution candidate; it's ASTContext-allocated now git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103350 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
aaa045dbe74366f9dba334fd01c797087898c1cc |
08-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Don't destroy the data associated with an overload resolution candidate; it's ASTContext-allocated now git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103350 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
674a59e98591954a1e24fa1b91b8b8227370f459 |
08-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Record template argument deduction failures for member function templates and conversion function templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103349 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
ff5adac099e9be58e16cf118ca3eb3f3e570c616 |
08-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Record template argument deduction failures for member function templates and conversion function templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103349 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
e5ae4387a39699967565520bc4169dec43d7f147 |
08-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When printing an overload candidate that failed due to SFINAE, print a specific message that includes the template arguments, e.g., test/SemaTemplate/overload-candidates.cpp:27:20: note: candidate template ignored: substitution failure [with T = int *] typename T::type get_type(const T&); // expected-note{{candidate ... ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103348 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaOverload.h
emaTemplateDeduction.cpp
|
ec20f46740a59758b12c22108002395bcf5b6f9b |
08-May-2010 |
Douglas Gregor <dgregor@apple.com> |
When printing an overload candidate that failed due to SFINAE, print a specific message that includes the template arguments, e.g., test/SemaTemplate/overload-candidates.cpp:27:20: note: candidate template ignored: substitution failure [with T = int *] typename T::type get_type(const T&); // expected-note{{candidate ... ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103348 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaOverload.h
emaTemplateDeduction.cpp
|
afb1d517a6c0a9802685cbd6a93aeba7290a12cf |
08-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve overload-candidate diagnostic for a function template that failed because the explicitly-specified template arguments did not match its template parameters, e.g., test/SemaTemplate/overload-candidates.cpp:18:8: note: candidate template ignored: invalid explicitly-specified argument for template parameter 'I' void get(const T&); ^ test/SemaTemplate/overload-candidates.cpp:20:8: note: candidate template ignored: invalid explicitly-specified argument for 1st template parameter void get(const T&); ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103344 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaTemplateDeduction.cpp
|
f1a8445036a2d047c7165d4170e3058cdeaba6eb |
08-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Improve overload-candidate diagnostic for a function template that failed because the explicitly-specified template arguments did not match its template parameters, e.g., test/SemaTemplate/overload-candidates.cpp:18:8: note: candidate template ignored: invalid explicitly-specified argument for template parameter 'I' void get(const T&); ^ test/SemaTemplate/overload-candidates.cpp:20:8: note: candidate template ignored: invalid explicitly-specified argument for 1st template parameter void get(const T&); ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103344 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaTemplateDeduction.cpp
|
38795dff68f9b45f6510666aef3698f6f4b744c7 |
08-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
A leak is better than a double-free while I figure out how to address this issue. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103343 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
a95342c9d4209379c07ac8da553688eacf500f98 |
08-May-2010 |
Douglas Gregor <dgregor@apple.com> |
A leak is better than a double-free while I figure out how to address this issue. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103343 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
7fdfdf7c4fca6e2c71f588548bea04d515fbd71b |
08-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Minor cleanup, and ban copying of OverloadCandidateSets. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103342 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaOverload.h
|
0ca4c58cba09ea4cb45348ea223227234a363e94 |
08-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Minor cleanup, and ban copying of OverloadCandidateSets. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103342 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaOverload.h
|
ca8d79a0dc1b31a73626e366e17f0ddb95250b19 |
08-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When template argument deduction fails because the call had too many/too few arguments, use the same diagnostic we use for arity mismatches in non-templates (but note that it's a function template). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103341 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
a18592ec62e898aed7ed71e1f09c314590ce9ec7 |
08-May-2010 |
Douglas Gregor <dgregor@apple.com> |
When template argument deduction fails because the call had too many/too few arguments, use the same diagnostic we use for arity mismatches in non-templates (but note that it's a function template). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103341 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
a4f7ff4959c7a5a0ff5e093facad76671e176f28 |
08-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When printing a non-viable overload candidate that failed due to conflicting deduced template argument values, give a more specific reason along with those values, e.g., test/SemaTemplate/overload-candidates.cpp:4:10: note: candidate template ignored: deduced conflicting types for parameter 'T' ('int' vs. 'long') const T& min(const T&, const T&); ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103339 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaOverload.h
|
a933319ebf754396623165f9dc0a29c2a48879f5 |
08-May-2010 |
Douglas Gregor <dgregor@apple.com> |
When printing a non-viable overload candidate that failed due to conflicting deduced template argument values, give a more specific reason along with those values, e.g., test/SemaTemplate/overload-candidates.cpp:4:10: note: candidate template ignored: deduced conflicting types for parameter 'T' ('int' vs. 'long') const T& min(const T&, const T&); ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103339 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaOverload.h
|
15d6c2fb6d490811b41792b7d90331fb9c16694e |
08-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When we encounter a non-dependent type during template instantiation, mark any declarations we see inside of that type as "referenced". Fixes PR7079. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103323 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
b4eeaff1595b7d0a8fbc2b3c8bec7dc63f48b7fd |
08-May-2010 |
Douglas Gregor <dgregor@apple.com> |
When we encounter a non-dependent type during template instantiation, mark any declarations we see inside of that type as "referenced". Fixes PR7079. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103323 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
3433868e0375ce974580cdab3a79aac756151efa |
07-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Reapply the reference-binding patch applied below, along with a fix to ensure that we complete the type when we need to look at constructors during reference binding. When determining whether the two types involved in reference binding are reference-compatible, reference-related, etc., do not complete the type of the reference itself because it is not necessary to determine well-formedness of the program. Complete the type that we are binding to, since that can affect whether we know about a derived-to-base conversion. Re-fixes PR7080. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103283 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
emaOverload.cpp
|
6b6d01fbc297d703f7ad1e605aa97afc6289a64f |
07-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Reapply the reference-binding patch applied below, along with a fix to ensure that we complete the type when we need to look at constructors during reference binding. When determining whether the two types involved in reference binding are reference-compatible, reference-related, etc., do not complete the type of the reference itself because it is not necessary to determine well-formedness of the program. Complete the type that we are binding to, since that can affect whether we know about a derived-to-base conversion. Re-fixes PR7080. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103283 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
emaOverload.cpp
|
0a648c11fe59293a89ecd2d494052efac12037f4 |
07-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Revert r103220. It seems to be breaking self-host git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103259 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
44c980611525b607ea3ad5c816bd91f37d1b5df5 |
07-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Revert r103220. It seems to be breaking self-host git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103259 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
73b22310e93fad67904b22f971c9491f6b1cdbdd |
07-May-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
A correct fix for bug 6466. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103250 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
f3e63374ac1f711486cb541896669712847a5457 |
07-May-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
A correct fix for bug 6466. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103250 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
708c7b8d2509e62c513262714902e0a3ba35c3dc |
07-May-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Revert 103247, it causes lots of test failures. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103248 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
0aa866f955deea1851918c2c9fbf60d7afd0ce1f |
07-May-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Revert 103247, it causes lots of test failures. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103248 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ff6a56eba58a4637da1eb9c7b6e50864a8ca5861 |
07-May-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Pass the correct type to BuildMemberReferenceExpr. Fixes bug 6466. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103247 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
44094690918dec25409d1c5968c80d623fecc8b2 |
07-May-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Pass the correct type to BuildMemberReferenceExpr. Fixes bug 6466. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103247 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
7a4281924afc3ce0c56ec69287d8fe61c84b9985 |
07-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When determining whether the two types involved in reference binding are reference-compatible, reference-related, etc., do not complete the type of the reference itself because it is not necessary to determine well-formedness of the program. Complete the type that we are binding to, since that can affect whether we know about a derived-to-base conversion. Fixes PR7080. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103220 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
abfe1925e7cb0fbc36944f376b0695a68eebb455 |
07-May-2010 |
Douglas Gregor <dgregor@apple.com> |
When determining whether the two types involved in reference binding are reference-compatible, reference-related, etc., do not complete the type of the reference itself because it is not necessary to determine well-formedness of the program. Complete the type that we are binding to, since that can affect whether we know about a derived-to-base conversion. Fixes PR7080. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103220 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
6fc124b96abd8a78185f6bf1c99eeeb37c74e7c4 |
07-May-2010 |
John McCall <rjmccall@apple.com> |
After some discussion, conservatively extend our sentinel check to discard casts, but still require the (casted) type to be a pointer. Fixes PR5685. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103216 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
8eb662ed5e04bd0f494c7dbefacb7d45660ab9fa |
07-May-2010 |
John McCall <rjmccall@apple.com> |
After some discussion, conservatively extend our sentinel check to discard casts, but still require the (casted) type to be a pointer. Fixes PR5685. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103216 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
2d04a90ca2f5c40da742bae370021dd98ea6fe67 |
07-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
It turns out that we should be allowing redeclarations within function scope. Thanks to Steven Watanabe for correcting me. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103210 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
a97badf8a59368d69dea7e24b18e72c482f055a0 |
07-May-2010 |
Douglas Gregor <dgregor@apple.com> |
It turns out that we should be allowing redeclarations within function scope. Thanks to Steven Watanabe for correcting me. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103210 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
da6871e83713cd3fe914a4c44fd4b03898c465e3 |
06-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Fixed DISABLE_SMART_POINTERS breakage git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103198 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprCXX.cpp
emaStmt.cpp
reeTransform.h
|
eecf38f821fe8e113722096b77da7d68b26d28d1 |
06-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Fixed DISABLE_SMART_POINTERS breakage git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103198 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprCXX.cpp
emaStmt.cpp
reeTransform.h
|
0cc29ac5ab49d4af5d2aa840ea33fe05b5b81feb |
06-May-2010 |
John McCall <rjmccall@apple.com> |
Diagnose deprecated/unavailable functions selected by overload resolution. Fixes rdar://problem/4232969, or at least the clang parts of it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103191 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
emaOverload.cpp
|
b697e084341185a08b3946df032fbc75f76a66e0 |
06-May-2010 |
John McCall <rjmccall@apple.com> |
Diagnose deprecated/unavailable functions selected by overload resolution. Fixes rdar://problem/4232969, or at least the clang parts of it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103191 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
emaOverload.cpp
|
ceb8f0bff12c7c148c9e64c7d133d5ac0f01c653 |
06-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Rework our handling of temporary objects within the conditions of if/switch/while/do/for statements. Previously, we would end up either: (1) Forgetting to destroy temporaries created in the condition (!), (2) Destroying the temporaries created in the condition *before* converting the condition to a boolean value (or, in the case of a switch statement, to an integral or enumeral value), or (3) In a for statement, destroying the condition's temporaries at the end of the increment expression (!). We now destroy temporaries in conditions at the right times. This required some tweaking of the Parse/Sema interaction, since the parser was building full expressions too early in many places. Fixes PR7067. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103187 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprCXX.cpp
emaStmt.cpp
reeTransform.h
|
586596fd7f7a336a2847b300c80614dcf39ab6d5 |
06-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Rework our handling of temporary objects within the conditions of if/switch/while/do/for statements. Previously, we would end up either: (1) Forgetting to destroy temporaries created in the condition (!), (2) Destroying the temporaries created in the condition *before* converting the condition to a boolean value (or, in the case of a switch statement, to an integral or enumeral value), or (3) In a for statement, destroying the condition's temporaries at the end of the increment expression (!). We now destroy temporaries in conditions at the right times. This required some tweaking of the Parse/Sema interaction, since the parser was building full expressions too early in many places. Fixes PR7067. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103187 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprCXX.cpp
emaStmt.cpp
reeTransform.h
|
1060a03c4a8637ff3b7da7ad4c688201068cd4ac |
06-May-2010 |
John McCall <rjmccall@apple.com> |
Rearchitect -Wconversion and -Wsign-compare. Instead of computing them "bottom-up" when implicit casts and comparisons are inserted, compute them "top-down" when the full expression is finished. Makes it easier to coordinate warnings and thus implement -Wconversion for signedness conversions without double-warning with -Wsign-compare. Also makes it possible to realize that a signedness conversion is okay because the context is performing the inverse conversion. Also simplifies some logic that was trying to calculate the ultimate comparison/result type and getting it wrong. Also fixes a problem with the C++ explicit casts which are often "implemented" in the AST with a series of implicit cast expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103174 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaChecking.cpp
emaExpr.cpp
emaExprCXX.cpp
|
323ed74658bc8375278eabf074b4777458376540 |
06-May-2010 |
John McCall <rjmccall@apple.com> |
Rearchitect -Wconversion and -Wsign-compare. Instead of computing them "bottom-up" when implicit casts and comparisons are inserted, compute them "top-down" when the full expression is finished. Makes it easier to coordinate warnings and thus implement -Wconversion for signedness conversions without double-warning with -Wsign-compare. Also makes it possible to realize that a signedness conversion is okay because the context is performing the inverse conversion. Also simplifies some logic that was trying to calculate the ultimate comparison/result type and getting it wrong. Also fixes a problem with the C++ explicit casts which are often "implemented" in the AST with a series of implicit cast expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103174 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaChecking.cpp
emaExpr.cpp
emaExprCXX.cpp
|
e2ba5f6ed00499333dc72435d27c59a500d0f6ec |
06-May-2010 |
John McCall <rjmccall@apple.com> |
Remember the number of positive and negative bits used by the enumerators of an enum in the enum decl itself. Use some spare bits from TagDecl for this purpose. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103173 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
1b5a618c59025898806160ed5e7f0ff5bb79e482 |
06-May-2010 |
John McCall <rjmccall@apple.com> |
Remember the number of positive and negative bits used by the enumerators of an enum in the enum decl itself. Use some spare bits from TagDecl for this purpose. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103173 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
a6b1eb3d242eee189d630a75460765b4b4ec8f0d |
06-May-2010 |
Chris Lattner <sabre@nondot.org> |
optimize builtin_isnan/isinf to not do an extraneous extension from float -> double (which happens because they are modelled as int(...) functions), and add a testcase for isinf. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103167 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
81368fbfd6d57150f66c993dc9041d62a7a32c4f |
06-May-2010 |
Chris Lattner <sabre@nondot.org> |
optimize builtin_isnan/isinf to not do an extraneous extension from float -> double (which happens because they are modelled as int(...) functions), and add a testcase for isinf. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103167 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
84e55065156b3e56d6997b97daf748c99953e9c4 |
06-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Partial and full specializations of a class template may have a different tag kind ("struct" vs. "class") than the primary template, which has an affect on access control. Should fix the last remaining Boost.Accumulors failure. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103144 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
13c8577201e4fc0ddac5f09d05fd1778832137d1 |
06-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Partial and full specializations of a class template may have a different tag kind ("struct" vs. "class") than the primary template, which has an affect on access control. Should fix the last remaining Boost.Accumulors failure. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103144 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
ad517574c8fe0250e3eca1fa10c596bfebfbe099 |
06-May-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Silence a pedantic GCC warning by making the grouping of && and || explicit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103141 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
0ee93de27c2546fae9a1c7262ebe7eef85c89b66 |
06-May-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Silence a pedantic GCC warning by making the grouping of && and || explicit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103141 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
a40fff7d516495febf9f69314074d15e6386b136 |
06-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When implicit definition of the copy-assignment operator fails, provide a note that shows where the copy-assignment operator was needed. We used to have this, but I broke it during refactoring. Finishes PR6999. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103127 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
60a8fbb4242e2535ccddd1fa2d8257ec1bf749c2 |
06-May-2010 |
Douglas Gregor <dgregor@apple.com> |
When implicit definition of the copy-assignment operator fails, provide a note that shows where the copy-assignment operator was needed. We used to have this, but I broke it during refactoring. Finishes PR6999. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103127 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
10250b5323c9c3d19a405b6ff110092038e9a6f6 |
05-May-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
This patch deals with Sema Part of Setter/Getter synthesis of properties which are of C++ objects. Code Gen to follow (Radar 7468090). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103123 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
emaObjCProperty.cpp
|
17cb326cb62a59f53d92236394af40eaae4eddbd |
05-May-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
This patch deals with Sema Part of Setter/Getter synthesis of properties which are of C++ objects. Code Gen to follow (Radar 7468090). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103123 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
emaObjCProperty.cpp
|
ef2008e92d1b320db947c63bc9e795d2ae39e2a2 |
05-May-2010 |
Sean Hunt <rideau3@gmail.com> |
Reapplying patch to change StmtNodes.def to StmtNodes.td, this time with no whitespace. This will allow statements to be referred to in attribute TableGen files. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103087 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
4bfe1968410ea8ffe3b4f629addd7c4bcf484765 |
05-May-2010 |
Sean Hunt <rideau3@gmail.com> |
Reapplying patch to change StmtNodes.def to StmtNodes.td, this time with no whitespace. This will allow statements to be referred to in attribute TableGen files. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103087 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
fa2ce27369f457c7a0c5ae5f682a793316cc587d |
05-May-2010 |
Sean Hunt <rideau3@gmail.com> |
Revert r103072; I accidentally ended up deleting a bunch of trailing whitespace which makes this patch unreadable. Will recommit without the whitespace. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103086 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
c302113179a1c2b1254224ea9b6f5316ceeb375c |
05-May-2010 |
Sean Hunt <rideau3@gmail.com> |
Revert r103072; I accidentally ended up deleting a bunch of trailing whitespace which makes this patch unreadable. Will recommit without the whitespace. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103086 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
420114dbe1c13c99e6246675e10ee916ad4d1cca |
05-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Support for 'template' as a disambiguator (PR7030) ParseOptionalCXXScopeSpecifier() only annotates the subset of template-ids which are not subject to lexical ambiguity. Add support for the more general case in ParseUnqualifiedId() to handle cases such as A::template B(). Also improve some diagnostic locations. Fixes PR7030, from Alp Toker! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103081 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
0278e123b4606ea15dbfa717e9c5a76a5ef2bc7d |
05-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Support for 'template' as a disambiguator (PR7030) ParseOptionalCXXScopeSpecifier() only annotates the subset of template-ids which are not subject to lexical ambiguity. Add support for the more general case in ParseUnqualifiedId() to handle cases such as A::template B(). Also improve some diagnostic locations. Fixes PR7030, from Alp Toker! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103081 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
d131290ee2068b996311073e68d5aba798632cb7 |
05-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Reimplement code generation for copying fields in the implicitly-generated copy constructor. Previously, Sema would perform some checking and instantiation to determine which copy constructors, etc., would be called, then CodeGen would attempt to figure out which copy constructor to call... but would get it wrong, or poke at an uninstantiated default argument, or fail in other ways. The new scheme is similar to what we now do for the implicit copy-assignment operator, where Sema performs all of the semantic analysis and builds specific ASTs that look similar to the ASTs we'd get from explicitly writing the copy constructor, so that CodeGen need only do a direct translation. However, it's not quite that simple because one cannot explicit write elementwise copy-construction of an array. So, I've extended CXXBaseOrMemberInitializer to contain a list of indexing variables used to copy-construct the elements. For example, if we have: struct A { A(const A&); }; struct B { A array[2][3]; }; then we generate an implicit copy assignment operator for B that looks something like this: B::B(const B &other) : array[i0][i1](other.array[i0][i1]) { } CodeGen will loop over the invented variables i0 and i1 to visit all elements in the array, so that each element in the destination array will be copy-constructed from the corresponding element in the source array. Of course, if we're dealing with arrays of scalars or class types with trivial copy-assignment operators, we just generate a memcpy rather than a loop. Fixes PR6928, PR5989, and PR6887. Boost.Regex now compiles and passes all of its regression tests. Conspicuously missing from this patch is handling for the exceptional case, where we need to destruct those objects that we have constructed. I'll address that case separately. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103079 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
fb8cc253420e93cee33d29df5a2bdae6aaf16e39 |
05-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Reimplement code generation for copying fields in the implicitly-generated copy constructor. Previously, Sema would perform some checking and instantiation to determine which copy constructors, etc., would be called, then CodeGen would attempt to figure out which copy constructor to call... but would get it wrong, or poke at an uninstantiated default argument, or fail in other ways. The new scheme is similar to what we now do for the implicit copy-assignment operator, where Sema performs all of the semantic analysis and builds specific ASTs that look similar to the ASTs we'd get from explicitly writing the copy constructor, so that CodeGen need only do a direct translation. However, it's not quite that simple because one cannot explicit write elementwise copy-construction of an array. So, I've extended CXXBaseOrMemberInitializer to contain a list of indexing variables used to copy-construct the elements. For example, if we have: struct A { A(const A&); }; struct B { A array[2][3]; }; then we generate an implicit copy assignment operator for B that looks something like this: B::B(const B &other) : array[i0][i1](other.array[i0][i1]) { } CodeGen will loop over the invented variables i0 and i1 to visit all elements in the array, so that each element in the destination array will be copy-constructed from the corresponding element in the source array. Of course, if we're dealing with arrays of scalars or class types with trivial copy-assignment operators, we just generate a memcpy rather than a loop. Fixes PR6928, PR5989, and PR6887. Boost.Regex now compiles and passes all of its regression tests. Conspicuously missing from this patch is handling for the exceptional case, where we need to destruct those objects that we have constructed. I'll address that case separately. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103079 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
468e42e9ca5531889f8f1aa4fa467d277c701638 |
05-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Unbreak CMake build. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103077 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
|
71b1d0e5f07de274af2b3c48955af66b1b7f0403 |
05-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Unbreak CMake build. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103077 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
|
c418cd479d17c9f5ded9cb0f54b07d6bfe12ac73 |
05-May-2010 |
Sean Hunt <rideau3@gmail.com> |
Change StmtNodes.def to StmtNodes.td in anticipation of a rewrite of attributes git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103072 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
9d90d62e1661720d9cf533290b4227c4fde780a4 |
05-May-2010 |
Sean Hunt <rideau3@gmail.com> |
Change StmtNodes.def to StmtNodes.td in anticipation of a rewrite of attributes git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103072 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
070700a777f857c65cec18d01405d2d240ba1914 |
04-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When instantiating a function that was declared via a typedef, e.g., typedef int functype(int, int); functype func; also instantiate the synthesized function parameters for the resulting function declaration. With this change, Boost.Wave builds and passes all of its regression tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103025 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
emaOverload.cpp
emaTemplateInstantiateDecl.cpp
|
5f970eee81372dfc6a1457c3d6d052af04e32a38 |
04-May-2010 |
Douglas Gregor <dgregor@apple.com> |
When instantiating a function that was declared via a typedef, e.g., typedef int functype(int, int); functype func; also instantiate the synthesized function parameters for the resulting function declaration. With this change, Boost.Wave builds and passes all of its regression tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103025 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
emaOverload.cpp
emaTemplateInstantiateDecl.cpp
|
34381083e2621df53741e829d718f898cebb9fed |
04-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When creating a call to a base subobject's operator= in an implicitly-defined copy assignment operator, suppress the protected access check. This eliminates the remaining failure in the Boost.SmartPtr library (that was a product of the copy-assignment generation rewrite) and, presumably, the Boost.TR1 library as well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103010 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
6cdc161527a513f28dfc6f6ec27eb287f8268024 |
04-May-2010 |
Douglas Gregor <dgregor@apple.com> |
When creating a call to a base subobject's operator= in an implicitly-defined copy assignment operator, suppress the protected access check. This eliminates the remaining failure in the Boost.SmartPtr library (that was a product of the copy-assignment generation rewrite) and, presumably, the Boost.TR1 library as well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103010 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
f676df5c1cb02cdfc076306da8e80bad12248b4d |
04-May-2010 |
John McCall <rjmccall@apple.com> |
An access is permitted if the current template instantiates to the appropriate class. Add some conservative support for the idea. Fixes PR 7024. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102999 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
01ebd9d1883e82c4188325900a4eb9c1e16353bb |
04-May-2010 |
John McCall <rjmccall@apple.com> |
An access is permitted if the current template instantiates to the appropriate class. Add some conservative support for the idea. Fixes PR 7024. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102999 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
bdc90c31939e0a500494bb7a3b70e4938281fd7e |
04-May-2010 |
John McCall <rjmccall@apple.com> |
When inheriting a default argument expression, inherit the full expression, not just the inner expression. This is important if the expression has any temporaries. Fixes PR 7028. Basically a symptom of really tragic method names. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102998 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
3d6c1782c4fc2ed3e6a924c15042edb1f56fee36 |
04-May-2010 |
John McCall <rjmccall@apple.com> |
When inheriting a default argument expression, inherit the full expression, not just the inner expression. This is important if the expression has any temporaries. Fixes PR 7028. Basically a symptom of really tragic method names. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102998 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
516ae13071406c8580f9728f643f713d3c7d62f8 |
04-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When computing the template arguments for the instantiation of a friend function template, be sure to adjust the computed template argument lists based on the location of the definition of the function template: it's possible that the definition we're instantiating with and the template declaration that we found when creating the specialization are in different contexts, which meant that we would end up using the wrong template arguments for instantiation. Fixes PR7013; all Boost.DynamicBitset tests now pass. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102974 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
e7089b0c6ffe8a8854150b60df00fb544099f77d |
04-May-2010 |
Douglas Gregor <dgregor@apple.com> |
When computing the template arguments for the instantiation of a friend function template, be sure to adjust the computed template argument lists based on the location of the definition of the function template: it's possible that the definition we're instantiating with and the template declaration that we found when creating the specialization are in different contexts, which meant that we would end up using the wrong template arguments for instantiation. Fixes PR7013; all Boost.DynamicBitset tests now pass. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102974 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
65e4303cf1b33bb2928d0b0ae02cf3b51d67ab13 |
03-May-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
For the sake of Objective-c++ overload resolution, treat argument types of objective-c pointer types which only differ in their protocol qualifiers as the same type (radar 7925668). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102955 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaOverload.cpp
|
d8d344191149652bb0f49d4c6e756b2f1bb63cac |
03-May-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
For the sake of Objective-c++ overload resolution, treat argument types of objective-c pointer types which only differ in their protocol qualifiers as the same type (radar 7925668). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102955 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaOverload.cpp
|
ecff18521f106440b6b7b599a1515182b917d909 |
03-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When instantiating a function-local variable definition, introduce the mapping from the declaration in the template to the instantiated declaration before transforming the initializer, in case some crazy lunatic decides to use a variable in its own initializer. Fixes PR7016. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102945 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
f7d72f5a4a3f0e610d77c6779ca3c21920a14bc7 |
03-May-2010 |
Douglas Gregor <dgregor@apple.com> |
When instantiating a function-local variable definition, introduce the mapping from the declaration in the template to the instantiated declaration before transforming the initializer, in case some crazy lunatic decides to use a variable in its own initializer. Fixes PR7016. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102945 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
736558e2d2981e16f7d75a1000cf52d76090ed91 |
03-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Diagnose unused exception parameters under a different warning group (-Wunused-exception-parameter) than normal variables, since it's more common to name and then ignore an exception parameter. This warning is neither enabled by default nor by -Wall. Fixes <rdar://problem/7931045>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102931 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
|
324b54d3f60d92a82815512119791ce1c285b63e |
03-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Diagnose unused exception parameters under a different warning group (-Wunused-exception-parameter) than normal variables, since it's more common to name and then ignore an exception parameter. This warning is neither enabled by default nor by -Wall. Fixes <rdar://problem/7931045>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102931 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
|
3226ea3e3a18b9c7e1914d127ff554c70cf3347c |
03-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Complain when we try to initialize an object of Objective-C class type (which is ill-formed) with an initializer list. Also, change the fallback from an assertion to a generic error message, which is far friendlier. Fixes <rdar://problem/7730948>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102930 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
4d9e7388ccdfdab97f92caac5db9b87a530742f4 |
03-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Complain when we try to initialize an object of Objective-C class type (which is ill-formed) with an initializer list. Also, change the fallback from an assertion to a generic error message, which is far friendlier. Fixes <rdar://problem/7730948>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102930 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
4c4817e00c9379a391195b7ec5359aa5a57829ec |
03-May-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Do not issue warning on unimplemented property in the class, if it conforms to a protocol as one of its super classes does. This is because conforming super class will implement the property. This implements new warning rules for unimplemented properties (radar 7884086). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102919 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaObjCProperty.cpp
|
738698d9d2e1ab0b1ae6a04874d521814907b8a5 |
03-May-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Do not issue warning on unimplemented property in the class, if it conforms to a protocol as one of its super classes does. This is because conforming super class will implement the property. This implements new warning rules for unimplemented properties (radar 7884086). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102919 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaObjCProperty.cpp
|
9908c93616ef57e9278b825c735fdd4a3a86cba1 |
03-May-2010 |
Anders Carlsson <andersca@mac.com> |
The array form of 'new' can never have initializers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102917 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
48c950137e4318abb1080f438208fda8c14ca8b9 |
03-May-2010 |
Anders Carlsson <andersca@mac.com> |
The array form of 'new' can never have initializers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102917 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
9bf9315741ba47837e090c19f10c41cab3c03ee7 |
03-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When creating the declaration reference for implicit copy-construction of a base class, give it real source-location information. Fixes PR7017. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102916 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
62b71f489ec9735cfaa379ee604d0e12dde78975 |
03-May-2010 |
Douglas Gregor <dgregor@apple.com> |
When creating the declaration reference for implicit copy-construction of a base class, give it real source-location information. Fixes PR7017. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102916 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
d3f5497d5f8d9c0011f009783949895a9460dc97 |
03-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When declaring a namespace alias, ignore previous declarations that aren't in scope. Fixes PR7014. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102915 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
ae374759fce6c74d5be29dfe058d4a727154115c |
03-May-2010 |
Douglas Gregor <dgregor@apple.com> |
When declaring a namespace alias, ignore previous declarations that aren't in scope. Fixes PR7014. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102915 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
75296527c30e28cb26d0874587453a568de2014a |
03-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When instantiating a member function declared via a typedef, don't try to enter the instantiated parameter declarations into the local instantiation scope; they can't be referenced anyway. Fixes PR7022. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102914 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
6920cdce298ac9ba50dc7ebb7dea982a300b0664 |
03-May-2010 |
Douglas Gregor <dgregor@apple.com> |
When instantiating a member function declared via a typedef, don't try to enter the instantiated parameter declarations into the local instantiation scope; they can't be referenced anyway. Fixes PR7022. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102914 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
99a9923a335589b768e03ab0a7d0cdbd13255236 |
03-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When a class contains a non-empty anonymous union or struct, mark is as non-empty. Fixes PR7021. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102913 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
fe60f84c4f201c9ca8126066779da8ee004a70fc |
03-May-2010 |
Douglas Gregor <dgregor@apple.com> |
When a class contains a non-empty anonymous union or struct, mark is as non-empty. Fixes PR7021. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102913 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
128fc95d96572a0f2282acaab4dd77a74052ce17 |
03-May-2010 |
Benjamin Kramer <benny.kra@googlemail.com> |
Replace a char*/size pair with stringref. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102902 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
d56638180014e60538cd666cd11fde6d4698e051 |
03-May-2010 |
Benjamin Kramer <benny.kra@googlemail.com> |
Replace a char*/size pair with stringref. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102902 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
1b6a56287d0547a446d03d66be5cec4a49de8200 |
03-May-2010 |
Anders Carlsson <andersca@mac.com> |
Simplify. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102896 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
28e9483a1994cb3615a123379b3b299fd5248e22 |
03-May-2010 |
Anders Carlsson <andersca@mac.com> |
Simplify. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102896 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
f6920f6e926e81aa5e5815d011e8b85e3d252b89 |
03-May-2010 |
Anders Carlsson <andersca@mac.com> |
Add an enum to CXXConstructExpr so we can determine if the construction expression constructs a non-virtual or virtual base. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102879 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaInit.cpp
|
72e96fd181b19b8d01144a685cda6e955584c7ea |
03-May-2010 |
Anders Carlsson <andersca@mac.com> |
Add an enum to CXXConstructExpr so we can determine if the construction expression constructs a non-virtual or virtual base. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102879 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaInit.cpp
|
82ffffd44d4de0ccb064b855cbcbe7916a693393 |
01-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Complete reimplementation of the synthesis for implicitly-defined copy assignment operators. Previously, Sema provided type-checking and template instantiation for copy assignment operators, then CodeGen would synthesize the actual body of the copy constructor. Unfortunately, the two were not in sync, and CodeGen might pick a copy-assignment operator that is different from what Sema chose, leading to strange failures, e.g., link-time failures when CodeGen called a copy-assignment operator that was not instantiation, run-time failures when copy-assignment operators were overloaded for const/non-const references and the wrong one was picked, and run-time failures when by-value copy-assignment operators did not have their arguments properly copy-initialized. This implementation synthesizes the implicitly-defined copy assignment operator bodies in Sema, so that the resulting ASTs encode exactly what CodeGen needs to do; there is no longer any special code in CodeGen to synthesize copy-assignment operators. The synthesis of the body is relatively simple, and we generate one of three different kinds of copy statements for each base or member: - For a class subobject, call the appropriate copy-assignment operator, after overload resolution has determined what that is. - For an array of scalar types or an array of class types that have trivial copy assignment operators, construct a call to __builtin_memcpy. - For an array of class types with non-trivial copy assignment operators, synthesize a (possibly nested!) for loop whose inner statement calls the copy constructor. - For a scalar type, use built-in assignment. This patch fixes at least a few tests cases in Boost.Spirit that were failing because CodeGen picked the wrong copy-assignment operator (leading to link-time failures), and I suspect a number of undiagnosed problems will also go away with this change. Some of the diagnostics we had previously have gotten worse with this change, since we're going through generic code for our type-checking. I will improve this in a subsequent patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102853 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExpr.cpp
|
06a9f3680d22529a2fcf20c52d71cf221d99d910 |
01-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Complete reimplementation of the synthesis for implicitly-defined copy assignment operators. Previously, Sema provided type-checking and template instantiation for copy assignment operators, then CodeGen would synthesize the actual body of the copy constructor. Unfortunately, the two were not in sync, and CodeGen might pick a copy-assignment operator that is different from what Sema chose, leading to strange failures, e.g., link-time failures when CodeGen called a copy-assignment operator that was not instantiation, run-time failures when copy-assignment operators were overloaded for const/non-const references and the wrong one was picked, and run-time failures when by-value copy-assignment operators did not have their arguments properly copy-initialized. This implementation synthesizes the implicitly-defined copy assignment operator bodies in Sema, so that the resulting ASTs encode exactly what CodeGen needs to do; there is no longer any special code in CodeGen to synthesize copy-assignment operators. The synthesis of the body is relatively simple, and we generate one of three different kinds of copy statements for each base or member: - For a class subobject, call the appropriate copy-assignment operator, after overload resolution has determined what that is. - For an array of scalar types or an array of class types that have trivial copy assignment operators, construct a call to __builtin_memcpy. - For an array of class types with non-trivial copy assignment operators, synthesize a (possibly nested!) for loop whose inner statement calls the copy constructor. - For a scalar type, use built-in assignment. This patch fixes at least a few tests cases in Boost.Spirit that were failing because CodeGen picked the wrong copy-assignment operator (leading to link-time failures), and I suspect a number of undiagnosed problems will also go away with this change. Some of the diagnostics we had previously have gotten worse with this change, since we're going through generic code for our type-checking. I will improve this in a subsequent patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102853 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExpr.cpp
|
10fe8b04cce65887181fd8a395e73e2b155184b5 |
01-May-2010 |
Anders Carlsson <andersca@mac.com> |
When defining implicit copy constructors, use SetBaseOrMemberInitializers to initialize the bases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102842 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
59b7f1538d9d4c4f7c3932e3e3f95d2cb0fca7e4 |
01-May-2010 |
Anders Carlsson <andersca@mac.com> |
When defining implicit copy constructors, use SetBaseOrMemberInitializers to initialize the bases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102842 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
bf5e67649d416416cdd121b9626639ba46cccae9 |
01-May-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Added an RAII object that helps set up/tear down the Sema context information required to implicitly define a C++ special member function. Use it rather than explicitly setting CurContext on entry and exit, which is fragile. Use this RAII object for the implicitly-defined default constructor, copy constructor, copy assignment operator, and destructor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102840 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExpr.cpp
|
39957dce3df743023906926b40108d99bc8b0ce2 |
01-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Added an RAII object that helps set up/tear down the Sema context information required to implicitly define a C++ special member function. Use it rather than explicitly setting CurContext on entry and exit, which is fragile. Use this RAII object for the implicitly-defined default constructor, copy constructor, copy assignment operator, and destructor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102840 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExpr.cpp
|
006698a32e6fbde4d8919d0612b747a661870c7d |
01-May-2010 |
John McCall <rjmccall@apple.com> |
It turns out that basically every caller to RequireCompleteDeclContext already knows what context it's looking in. Just pass that context in instead of (questionably) recalculating it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102818 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaLookup.cpp
emaTemplate.cpp
|
77bb1aa78bcd26e42c0382043e65a2b03242be4d |
01-May-2010 |
John McCall <rjmccall@apple.com> |
It turns out that basically every caller to RequireCompleteDeclContext already knows what context it's looking in. Just pass that context in instead of (questionably) recalculating it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102818 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaLookup.cpp
emaTemplate.cpp
|
69a171bc0a3ffed1931471a024d33b2fd00291bb |
30-Apr-2010 |
Ted Kremenek <kremenek@apple.com> |
Don't perform AnalysisBasedWarnings in Sema or run the static analyzer when a fatal error has occurred. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102778 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
99e8192c4c8f1f596f9969e5f2cdafcee64ddaac |
30-Apr-2010 |
Ted Kremenek <kremenek@apple.com> |
Don't perform AnalysisBasedWarnings in Sema or run the static analyzer when a fatal error has occurred. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102778 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
392b3b0eae976ad447aeec64be5ec394f57cbca3 |
30-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
After substituting a template argument for a non-type template parameter with pointer-to-member type, we may have to perform a qualification conversion, since the pointee type of the parameter might be more qualified than the pointee type of the argument we form from the declaration. Fixes PR6986. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102777 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
c0c8300329718b45df259c49310d3c2b377a6e0f |
30-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
After substituting a template argument for a non-type template parameter with pointer-to-member type, we may have to perform a qualification conversion, since the pointee type of the parameter might be more qualified than the pointee type of the argument we form from the declaration. Fixes PR6986. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102777 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
2561ef1c48e1d2b579440add8664245adb58d541 |
30-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix a thinko that caused us not to compute __builtin_offset as a constant expression in C. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102762 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
72be24f39c162448e53dd73cf57cc6357114361e |
30-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Fix a thinko that caused us not to compute __builtin_offset as a constant expression in C. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102762 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
cf6cc5410fafb0ac9b16499f335103c73c40bc27 |
30-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Clean up our handling of local instantiation scopes, which keep track of the mapping from local declarations to their instantiated counterparts during template instantiation. Previously, we tried to do some unholy merging of local instantiation scopes that involved storing a single hash table along with an "undo" list on the side... which was ugly, and never handled function parameters properly. Now, we just keep separate hash tables for each local instantiation scope, and "combining" two scopes means that we'll look in each of the combined hash tables. The combined scope stack is rarely deep, and this makes it easy to avoid the "undo" issues we were hitting. Also, I've simplified the logic for function parameters: if we're declaring a function and we need the function parameters to live longer, we just push them back into the local instantiation scope where we need them. Fixes PR6990. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102732 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
895162da2d52f4243f61081d7436de66af4503fc |
30-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Clean up our handling of local instantiation scopes, which keep track of the mapping from local declarations to their instantiated counterparts during template instantiation. Previously, we tried to do some unholy merging of local instantiation scopes that involved storing a single hash table along with an "undo" list on the side... which was ugly, and never handled function parameters properly. Now, we just keep separate hash tables for each local instantiation scope, and "combining" two scopes means that we'll look in each of the combined hash tables. The combined scope stack is rarely deep, and this makes it easy to avoid the "undo" issues we were hitting. Also, I've simplified the logic for function parameters: if we're declaring a function and we need the function parameters to live longer, we just push them back into the local instantiation scope where we need them. Fixes PR6990. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102732 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
36f4117b6022697e305ecfda8ddfe135e982274c |
30-Apr-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Add calling convention related attributes to related declaration. Mark attributes invalid on type related checking so to add them to declarations only when everything is ok. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102710 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaType.cpp
|
e215f7232dd4aa65ebf2a1ecd07cd95fe1ce3481 |
30-Apr-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Add calling convention related attributes to related declaration. Mark attributes invalid on type related checking so to add them to declarations only when everything is ok. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102710 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaType.cpp
|
13d4dd133a042a70f23acb6b1a764138452ce54a |
30-Apr-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Attribute noreturn is now put in declaration attributes. Fixed a double warning generation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102705 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaType.cpp
|
b1f1b267351be74013f966f4834cde1eddbe0233 |
30-Apr-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Attribute noreturn is now put in declaration attributes. Fixed a double warning generation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102705 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaType.cpp
|
2811e946231905b0d7acd3c8f83a8cb459b6319d |
30-Apr-2010 |
John McCall <rjmccall@apple.com> |
An edge from a call expression to the exit block is only an abnormal edge if *none* of the successors of the call expression is the exit block. This matters when a call of bool type is the condition of (say) a while loop in a function with no statements after the loop. This *can* happen in C, but it's much more common in C++ because of overloaded operators. Suppresses some substantial number of spurious -Wmissing-noreturn warnings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102696 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
259d48e1486044093131c8c078f70a28b1503e70 |
30-Apr-2010 |
John McCall <rjmccall@apple.com> |
An edge from a call expression to the exit block is only an abnormal edge if *none* of the successors of the call expression is the exit block. This matters when a call of bool type is the condition of (say) a while loop in a function with no statements after the loop. This *can* happen in C, but it's much more common in C++ because of overloaded operators. Suppresses some substantial number of spurious -Wmissing-noreturn warnings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102696 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
ac4dc832013175a66053d14f93f903dedaa97858 |
30-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix ADL for types declared in transparent decls, from Alp Toker! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102695 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
54022952450beff428a30ef5adfb82874063603d |
30-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Fix ADL for types declared in transparent decls, from Alp Toker! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102695 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
8375c580a7e7511e13d2ffdacfc9da7e2dd48af1 |
30-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Introduce a sequence number into class template partial specializations, which keeps track of the order in which they were originally declared. We use this number so that we can always walk the list of partial specializations in a predictable order during matching or template instantiation. This also fixes a failure in Boost.Proto, where SourceManager::isBeforeInTranslationUnit was behaving poorly in inconsistent ways. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102693 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
dc60c1eb4acbde6edcec9760de92f9098593d915 |
30-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Introduce a sequence number into class template partial specializations, which keeps track of the order in which they were originally declared. We use this number so that we can always walk the list of partial specializations in a predictable order during matching or template instantiation. This also fixes a failure in Boost.Proto, where SourceManager::isBeforeInTranslationUnit was behaving poorly in inconsistent ways. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102693 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
e756f222f58d9e94b7e3eb6322f8a47e997211fd |
30-Apr-2010 |
John McCall <rjmccall@apple.com> |
Rebuild the nested name specifiers in member-pointer declarator chunks when entering the current instantiation. Set up a little to preserve type location information for typename types while we're in there. Fixes a Boost failure. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102673 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplate.cpp
|
63b4385822857374d035128dff3feac131465496 |
30-Apr-2010 |
John McCall <rjmccall@apple.com> |
Rebuild the nested name specifiers in member-pointer declarator chunks when entering the current instantiation. Set up a little to preserve type location information for typename types while we're in there. Fixes a Boost failure. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102673 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplate.cpp
|
bdb04c06a2028c650aa189cbd763b5129905c662 |
29-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When determining a standard conversion sequence involves resolving the address of an overloaded function (or function template), perform that resolution prior to determining the implicit conversion sequence. This resolution is not part of the implicit conversion sequence itself. Previously, we would always consider this resolution to be a function pointer decay, which was a lie: there might be an explicit & in the expression, in which case decay should not occur. This caused the CodeGen assertion in PR6973 (where we created a pointer to a pointer to a function when we should have had a pointer to a function), but it's likely that there are corner cases of overload resolution where this would have failed. Cleaned up the code involved in determining the type that will produced afer resolving the overloaded function reference, and added an assertion to make sure the result is correct. Fixes PR6973. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102650 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaOverload.cpp
|
ad4e02f1711e5e90f4e653397b626e0d1929002c |
29-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
When determining a standard conversion sequence involves resolving the address of an overloaded function (or function template), perform that resolution prior to determining the implicit conversion sequence. This resolution is not part of the implicit conversion sequence itself. Previously, we would always consider this resolution to be a function pointer decay, which was a lie: there might be an explicit & in the expression, in which case decay should not occur. This caused the CodeGen assertion in PR6973 (where we created a pointer to a pointer to a function when we should have had a pointer to a function), but it's likely that there are corner cases of overload resolution where this would have failed. Cleaned up the code involved in determining the type that will produced afer resolving the overloaded function reference, and added an assertion to make sure the result is correct. Fixes PR6973. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102650 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaOverload.cpp
|
b573124060de7cbcd0b4e54d88e4d5611d92e007 |
29-Apr-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Properties cannot be synthesized by-dafult in categories. Issue usual warnings instead of confusing error message. Radar 7920807 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102645 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
9d8463253a073f94af5c3892240c43cad86f3dac |
29-Apr-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Properties cannot be synthesized by-dafult in categories. Issue usual warnings instead of confusing error message. Radar 7920807 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102645 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
584dfa221f1428b2164e375c4137339e3ab7d6d7 |
29-Apr-2010 |
Ted Kremenek <kremenek@apple.com> |
Add FunctionDecl::isVariadic() to match BlockDecl::isVariadic() and ObjCMethodDecl::isVariadic(). Do some minor refactoring along the way. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102635 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
9498d388810d284d3970aef0d69fa4d069fd6caf |
29-Apr-2010 |
Ted Kremenek <kremenek@apple.com> |
Add FunctionDecl::isVariadic() to match BlockDecl::isVariadic() and ObjCMethodDecl::isVariadic(). Do some minor refactoring along the way. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102635 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
f9898e8c59239c9737a57c6b1a3d1a007347d2fa |
29-Apr-2010 |
Ted Kremenek <kremenek@apple.com> |
Rename BlockDecl::IsVariadic() to BlockDecl::isVariadic() to match the casing for similar methods. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102634 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
db9a0aec04cfd95830d3745b17b0bab5b87b16d1 |
29-Apr-2010 |
Ted Kremenek <kremenek@apple.com> |
Rename BlockDecl::IsVariadic() to BlockDecl::isVariadic() to match the casing for similar methods. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102634 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
a101c324ac9a53b114a4f6698df169bddf9d6084 |
29-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When performing partial ordering of class template partial specializations, substitute the deduced template arguments and check the resulting substitution before concluding that template argument deduction succeeds. This marvelous little fix makes a bunch of Boost.Spirit tests start working. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102601 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
516e6e09821a61e8975c787e189949723249e7c5 |
29-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
When performing partial ordering of class template partial specializations, substitute the deduced template arguments and check the resulting substitution before concluding that template argument deduction succeeds. This marvelous little fix makes a bunch of Boost.Spirit tests start working. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102601 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
caa32ea7d992a8a32d8fe7c60be16ec2adf60d75 |
29-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
For template argument deduction from class template partial specializations, separate out the deduction part from the checking and substitution of the deduced arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102600 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
31dce8f606c5ff4a51db67caa24ac3312ccea3f3 |
29-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
For template argument deduction from class template partial specializations, separate out the deduction part from the checking and substitution of the deduced arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102600 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
c5e3d2c50ccdea4f6177b3064a259adc7ce2cae5 |
29-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
It turns out that we *can* end up having to display template argument bindings when the template argument is still an expression; it happens while checking the template arguments of a class template partial specializations. Fixes PR6964. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102595 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
77e2c67411084c47b1cf511a191b31adf38662ba |
29-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
It turns out that we *can* end up having to display template argument bindings when the template argument is still an expression; it happens while checking the template arguments of a class template partial specializations. Fixes PR6964. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102595 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
4df80e6bca7050c320bf41def83573f54826812f |
29-Apr-2010 |
John McCall <rjmccall@apple.com> |
Access-check during template argument deduction from the context of the template decl itself, not its context. Testcase to follow; fixes selfhost. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102578 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
96db310ab7ca59e1890ddef25a3701bc2909d20f |
29-Apr-2010 |
John McCall <rjmccall@apple.com> |
Access-check during template argument deduction from the context of the template decl itself, not its context. Testcase to follow; fixes selfhost. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102578 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
8d8e5ce078d62be1e745d4a94b963c885c77958e |
29-Apr-2010 |
John McCall <rjmccall@apple.com> |
Properly switch into the declaring scope of a template when performing template argument deduction or (more importantly) the final substitution required by such deduction. Makes access control magically work in these cases. Fixes PR6967. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102572 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
|
f5813826802c2e76cdc13cae834ebfd4518d74a6 |
29-Apr-2010 |
John McCall <rjmccall@apple.com> |
Properly switch into the declaring scope of a template when performing template argument deduction or (more importantly) the final substitution required by such deduction. Makes access control magically work in these cases. Fixes PR6967. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102572 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
|
089b1bece1d6f9ecb72db87e0e01965be9a91742 |
29-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Teach __builtin_offsetof to compute the offsets of members of base classes, since we only warn (not error) on offsetof() for non-POD types. We store the base path within the OffsetOfExpr itself, then evaluate the offsets within the constant evaluator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102571 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
reeTransform.h
|
cc8a5d5f90bbbbcb46f342117b851b7e07ec34f1 |
29-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Teach __builtin_offsetof to compute the offsets of members of base classes, since we only warn (not error) on offsetof() for non-POD types. We store the base path within the OffsetOfExpr itself, then evaluate the offsets within the constant evaluator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102571 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
reeTransform.h
|
f00765e84e8e9166144e72b610e760e0648c715b |
29-Apr-2010 |
Sean Hunt <rideau3@gmail.com> |
Ensure that cv-qualifiers are correctly removed for post-inc/decrements as well as pre- and post-inc/decrements in C (not that I think it matters for any C code). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102552 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
1e3f5bab00661c612044675c1a9d3ec3237802da |
29-Apr-2010 |
Sean Hunt <rideau3@gmail.com> |
Ensure that cv-qualifiers are correctly removed for post-inc/decrements as well as pre- and post-inc/decrements in C (not that I think it matters for any C code). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102552 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
100824319bc791ec31b384f77160d043b7ccaac7 |
29-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix template instantiation for __builtin_offfsetof expressions that refer to members of anonymous structs/unions git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102551 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
29d2fd56b5eeeb52f7fdbdd232229e570c30d62b |
29-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Fix template instantiation for __builtin_offfsetof expressions that refer to members of anonymous structs/unions git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102551 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
39cbe124df5cfa1223669ff61f49f6d02edc8995 |
29-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Diagnose __builtin_offsetof expressions that refer to bit-fields git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102548 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
9d5d60ff8d7991234abcc6a9fe9903db930be0a1 |
29-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Diagnose __builtin_offsetof expressions that refer to bit-fields git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102548 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ce6b353d4b551b98c4282486fd13ef3b3bcf6e31 |
29-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Completely reimplement __builtin_offsetof, based on a patch by Roberto Amadini. This change introduces a new expression node type, OffsetOfExpr, that describes __builtin_offsetof. Previously, __builtin_offsetof was implemented using a unary operator whose subexpression involved various synthesized array-subscript and member-reference expressions, which was ugly and made it very hard to instantiate as a template. OffsetOfExpr represents the AST more faithfully, with proper type source information and a more compact representation. OffsetOfExpr also has support for dependent __builtin_offsetof expressions; it can be value-dependent, but will never be type-dependent (like sizeof or alignof). This commit introduces template instantiation for __builtin_offsetof as well. There are two major caveats to this patch: 1) CodeGen cannot handle the case where __builtin_offsetof is not a constant expression, so it produces an error. So, to avoid regressing in C, we retain the old UnaryOperator-based __builtin_offsetof implementation in C while using the shiny new OffsetOfExpr implementation in C++. The old implementation can go away once we have proper CodeGen support for this case, which we expect won't cause much trouble in C++. 2) __builtin_offsetof doesn't work well with non-POD class types, particularly when the designated field is found within a base class. I will address this in a subsequent patch. Fixes PR5880 and a bunch of assertions when building Boost.Python tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102542 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
emaExpr.cpp
reeTransform.h
|
8ecdb65716cd7914ffb2eeee993fa9039fcd31e8 |
29-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Completely reimplement __builtin_offsetof, based on a patch by Roberto Amadini. This change introduces a new expression node type, OffsetOfExpr, that describes __builtin_offsetof. Previously, __builtin_offsetof was implemented using a unary operator whose subexpression involved various synthesized array-subscript and member-reference expressions, which was ugly and made it very hard to instantiate as a template. OffsetOfExpr represents the AST more faithfully, with proper type source information and a more compact representation. OffsetOfExpr also has support for dependent __builtin_offsetof expressions; it can be value-dependent, but will never be type-dependent (like sizeof or alignof). This commit introduces template instantiation for __builtin_offsetof as well. There are two major caveats to this patch: 1) CodeGen cannot handle the case where __builtin_offsetof is not a constant expression, so it produces an error. So, to avoid regressing in C, we retain the old UnaryOperator-based __builtin_offsetof implementation in C while using the shiny new OffsetOfExpr implementation in C++. The old implementation can go away once we have proper CodeGen support for this case, which we expect won't cause much trouble in C++. 2) __builtin_offsetof doesn't work well with non-POD class types, particularly when the designated field is found within a base class. I will address this in a subsequent patch. Fixes PR5880 and a bunch of assertions when building Boost.Python tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102542 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
emaExpr.cpp
reeTransform.h
|
b539d102e1ea422fd034283578a5bbae9aaccfaa |
28-Apr-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
More of Sema to implement initialization of ivar of c++ object types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102500 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaDeclObjC.cpp
|
e4498c6d66a8f472cba29b6158a2e86dfc60d0ef |
28-Apr-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
More of Sema to implement initialization of ivar of c++ object types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102500 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaDeclObjC.cpp
|
c92132f4ffdc6f539721b79ccb8208798d408a4b |
28-Apr-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Written storage class for declarations inside linkage specifications without braces is none. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102496 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
b21b40532551e946c937bfc2f7584d9195f76c0e |
28-Apr-2010 |
Abramo Bagnara <abramo.bagnara@gmail.com> |
Written storage class for declarations inside linkage specifications without braces is none. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102496 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
ccef51ab5ac0f0649edd899b5370e1b68cd0f3d4 |
28-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When the qualifier of a id-expression is non-dependent but not complete, return an error rather than falling back to building a dependent declaration reference, since we might not be in a dependent context. Fixes a fiendish crash-on-invalid in Boost.FunctionTypes that I wasn't able to reduce to anything useful. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102491 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e6ec5c42047c717014f7490bb9697945ae7a9d5b |
28-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
When the qualifier of a id-expression is non-dependent but not complete, return an error rather than falling back to building a dependent declaration reference, since we might not be in a dependent context. Fixes a fiendish crash-on-invalid in Boost.FunctionTypes that I wasn't able to reduce to anything useful. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102491 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
bd9fb5b9f889494f65ff8d2ac720039a451e4cdc |
28-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When instantiating a function template specialization following template argument deduction, use the lexical declaration context as the owner for friend function templates. Fixes 2 failures in Boost.Graph. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102489 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
d4598a2cc7576c06f69d3cf64d0e2c9783ddf529 |
28-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
When instantiating a function template specialization following template argument deduction, use the lexical declaration context as the owner for friend function templates. Fixes 2 failures in Boost.Graph. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102489 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
6fa98790c2bf163f0f36ad94266784aaade72417 |
27-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
It's okay to refer to non-type template parameters anywhere they are visible. Fixes the remaining two failures in Boost.ScopeExit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102466 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
15dedf067b65151f0fd89dd9f80cea96a0528db1 |
27-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
It's okay to refer to non-type template parameters anywhere they are visible. Fixes the remaining two failures in Boost.ScopeExit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102466 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
de27f52df1dad2ac0d7ff06f5c6642715df76e2c |
27-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When explicitly building a temporary object (CXXTemporaryObjectExpr), keep track of whether we need to zero-initialize storage prior to calling its constructor. Previously, we were only tracking this when implicitly constructing the object (a CXXConstructExpr). Fixes Boost's value-initialization tests, which means that the Boost.Config library now passes all of its tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102461 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
1c63b9c15d48cb8c833a4b2d6fd6c496c0766e88 |
27-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
When explicitly building a temporary object (CXXTemporaryObjectExpr), keep track of whether we need to zero-initialize storage prior to calling its constructor. Previously, we were only tracking this when implicitly constructing the object (a CXXConstructExpr). Fixes Boost's value-initialization tests, which means that the Boost.Config library now passes all of its tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102461 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
d7f5c204840d5f44ba1d1643258bd1a945b10fb1 |
27-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Diagnose the use of abstract types as array element types. Previously, we were relying on checking for abstract class types when an array type was actually used to declare a variable, parameter, etc. However, we need to check when the construct the array for, e.g., SFINAE purposes (see DR337). Fixes problems with Boost's is_abstract type trait. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102452 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
138bb2366baa3856088bae94f36f2d96b2c995b9 |
27-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Diagnose the use of abstract types as array element types. Previously, we were relying on checking for abstract class types when an array type was actually used to declare a variable, parameter, etc. However, we need to check when the construct the array for, e.g., SFINAE purposes (see DR337). Fixes problems with Boost's is_abstract type trait. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102452 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
95c54dfa43c5159d2854910c21cc03374238e94e |
27-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
During template instantiation, set the naming class of UnresolvedLookupExpr and UnresolvedMemberExpr by substituting the naming class we computed when building the expression in the template... ... which we didn't always do correctly. Teach UnresolvedMemberExpr::getNamingClass() all about the new representation of injected-class-names in templates, so that it can return a naming class that is the current instantiation. Also, when decomposing a template-id into its template name and its arguments, be sure to set the naming class on the LookupResult structure. Fixes PR6947 the right way. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102448 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
reeTransform.h
|
c96be1ea33cdf63d07cec48d18fe8e3afea48f8d |
27-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
During template instantiation, set the naming class of UnresolvedLookupExpr and UnresolvedMemberExpr by substituting the naming class we computed when building the expression in the template... ... which we didn't always do correctly. Teach UnresolvedMemberExpr::getNamingClass() all about the new representation of injected-class-names in templates, so that it can return a naming class that is the current instantiation. Also, when decomposing a template-id into its template name and its arguments, be sure to set the naming class on the LookupResult structure. Fixes PR6947 the right way. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102448 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
reeTransform.h
|
67ce775bb0d6b2d8cd67f5d9c91218808d00b736 |
27-Apr-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Move CollectIvarsToConstructOrDestruct to Sema from AST, consider ivar array of objects (per Doug's comment). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102446 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
786cd154f2a48d2b464679d33fcd5df0cd794c06 |
27-Apr-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Move CollectIvarsToConstructOrDestruct to Sema from AST, consider ivar array of objects (per Doug's comment). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102446 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
11148974368f811dd0822885300f3fb39192c2f5 |
27-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When checking the redeclaration context of a typedef that refers to a tag of the same name, compare the lookup contexts rather than the actual contexts. Fixes PR6923. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102437 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
c8fd2dae17a0fc631a07ab7b66c9d3ebe90a0cc6 |
27-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
When checking the redeclaration context of a typedef that refers to a tag of the same name, compare the lookup contexts rather than the actual contexts. Fixes PR6923. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102437 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
e266c95490164f861b62c38eb362f204ce9045ad |
27-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Don't look into incomplete types when trying to warn about unused variables. Fixes PR6948. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102436 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
a6a292b4dc47da42b2fc0662af7fe278c9e9fb33 |
27-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Don't look into incomplete types when trying to warn about unused variables. Fixes PR6948. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102436 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
e126bec6dd146556b90d171bbb6348e52bd7119b |
27-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When instantiating UnresolvedLookupExpr and UnresolvedMemberExpr expressions, be sure to set the naming class of the LookupResult structure. Fixes PR6947. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102434 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
66c45154186b7786d5dca645d548d73c47cf5d87 |
27-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
When instantiating UnresolvedLookupExpr and UnresolvedMemberExpr expressions, be sure to set the naming class of the LookupResult structure. Fixes PR6947. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102434 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
cb9f7afc761b3b704f274204b6009b69146fc4dd |
27-Apr-2010 |
John McCall <rjmccall@apple.com> |
Improve the diagnostic you get when making a qualified member access with a qualifier referencing a different type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102409 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExpr.cpp
|
110acc1ae8d978f9b423394eaf0cace61b1339f0 |
27-Apr-2010 |
John McCall <rjmccall@apple.com> |
Improve the diagnostic you get when making a qualified member access with a qualifier referencing a different type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102409 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExpr.cpp
|
4578a3a1441eb22b68d909fa35d82e6ee7204e38 |
27-Apr-2010 |
John McCall <rjmccall@apple.com> |
Make the InjectedClassNameType the canonical type of the current instantiation of a class template or class template partial specialization. That is to say, in template <class T> class A { ... }; or template <class T> class B<const T*> { ... }; make 'A<T>' and 'B<const T*>' sugar for the corresponding InjectedClassNameType when written inside the appropriate context. This allows us to track the current instantiation appropriately even inside AST routines. It also allows us to compute a DeclContext for a type much more efficiently, at some extra cost every time we write a template specialization (which can be optimized, but I've left it simple in this patch). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102407 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiateDecl.cpp
|
31f17ecbef57b5679c017c375db330546b7b5145 |
27-Apr-2010 |
John McCall <rjmccall@apple.com> |
Make the InjectedClassNameType the canonical type of the current instantiation of a class template or class template partial specialization. That is to say, in template <class T> class A { ... }; or template <class T> class B<const T*> { ... }; make 'A<T>' and 'B<const T*>' sugar for the corresponding InjectedClassNameType when written inside the appropriate context. This allows us to track the current instantiation appropriately even inside AST routines. It also allows us to compute a DeclContext for a type much more efficiently, at some extra cost every time we write a template specialization (which can be optimized, but I've left it simple in this patch). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102407 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiateDecl.cpp
|
f5b3dfc64b7c705cfb60f73767d0f7efc49f20be |
27-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve source-location information in a C++ typeid (type) expression by using TypeSourceInfo, cleaning up the representation somewhat. Teach getTypeOperand() to strip references and cv-qualifiers, providing the semantic view of the type without requiring any extra storage (the unmodified type remains within the TypeSourceInfo). This fixes a bug found by Boost's call_traits test. Finally, clean up semantic analysis, by splitting the ActOnCXXTypeid routine into ActOnCXXTypeId (the parser action) and two BuildCXXTypeId functions, which perform the semantic analysis for typeid(type) and typeid(expression), respectively. We now perform less work at template instantiation time (we don't look for std::type_info again) and can give better diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102393 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
reeTransform.h
|
57fdc8a4382164955c7b30d09f4ce46fc7e67659 |
27-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Improve source-location information in a C++ typeid (type) expression by using TypeSourceInfo, cleaning up the representation somewhat. Teach getTypeOperand() to strip references and cv-qualifiers, providing the semantic view of the type without requiring any extra storage (the unmodified type remains within the TypeSourceInfo). This fixes a bug found by Boost's call_traits test. Finally, clean up semantic analysis, by splitting the ActOnCXXTypeid routine into ActOnCXXTypeId (the parser action) and two BuildCXXTypeId functions, which perform the semantic analysis for typeid(type) and typeid(expression), respectively. We now perform less work at template instantiation time (we don't look for std::type_info again) and can give better diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102393 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
reeTransform.h
|
0a68cb3e09c5aaf560f40bfd794a811a3a46e3d2 |
27-Apr-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Diagnose declaration of reference typed ivars. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102390 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
0b7bc8e937735e2b3608c049752c4aa48a283d2a |
27-Apr-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Diagnose declaration of reference typed ivars. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102390 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
6cb535784c071d1a662aeac8e548e8757dd1a969 |
26-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Introduce Type::isStructureOrClassType(), which does the obvious thing. Audit all uses of Type::isStructure(), changing those calls to isStructureOrClassType() as needed (which is alsmost everywhere). Fixes the remaining failure in Boost.Utility/Swap. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102386 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
fb87b89fc9eb103e19fb8e4b925c23f0bd091b99 |
26-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Introduce Type::isStructureOrClassType(), which does the obvious thing. Audit all uses of Type::isStructure(), changing those calls to isStructureOrClassType() as needed (which is alsmost everywhere). Fixes the remaining failure in Boost.Utility/Swap. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102386 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
6dfe98fad7326c5c22bb83f6135c37eda3aa24f9 |
26-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement template instantiation for implicit property references in Objective-C++. This is the last bit of (non-blocks-related) template instantiation logic for Objective-C++. Yay! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102382 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
9cbfdd212ee0167f2487363d6fac7faaf7c65b64 |
26-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement template instantiation for implicit property references in Objective-C++. This is the last bit of (non-blocks-related) template instantiation logic for Objective-C++. Yay! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102382 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
4a1d3d039af0d74537ecb4ff8f55bb881319b2af |
26-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement template instantiation for ObjCPropertyRefExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102379 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
e330354c6bfbb0d7856432fa9055d5236f1b2fa4 |
26-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement template instantiation for ObjCPropertyRefExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102379 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
0033ad86713a3f6024fbc2111fa3c207d2ce8373 |
26-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement template instantiation for value-dependent Objective-C ivar references and isa expressions. Also, test template instantiation of unresolved member references to Objective-C ivar references and isa expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102374 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
f9b9eab747e911ded499924b2616d8712d65efce |
26-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement template instantiation for value-dependent Objective-C ivar references and isa expressions. Also, test template instantiation of unresolved member references to Objective-C ivar references and isa expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102374 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
aef893de4d9e5f4cded73cc0a018fe76e812d584 |
26-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement template instantiation for Objective-C @catch statements. This is the last of the Objective-C statements. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102356 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
emaTemplateInstantiate.cpp
reeTransform.h
|
be270a0fae647ae3fb4d6a21ba1ea5ab9c40853a |
26-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement template instantiation for Objective-C @catch statements. This is the last of the Objective-C statements. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102356 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
emaTemplateInstantiate.cpp
reeTransform.h
|
8fcbd122a3363d801e4fb4a3cbd69afbc8f004f0 |
26-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Refactor Objective-C @catch parameter checking by detangling it from function-parameter checking and splitting it into the normal ActOn*/Build* pair in Sema. We now use VarDecl to represent the @catch parameter rather than the ill-fitting ParmVarDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102347 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
emaStmt.cpp
|
160b5630aa781ac348303e1ae088d27016637778 |
26-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Refactor Objective-C @catch parameter checking by detangling it from function-parameter checking and splitting it into the normal ActOn*/Build* pair in Sema. We now use VarDecl to represent the @catch parameter rather than the ill-fitting ParmVarDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102347 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
emaStmt.cpp
|
ff0b45f255aedeca5155e50ef2c603c26142f4fc |
26-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Make the static type of the exception variable in an Objective-C @catch a VarDecl. The dynamic type is still a ParmVarDecl, but that will change soon. No effective functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102341 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
c00d8e18ad3d903acfeb5d05163ce90713066a3f |
26-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Make the static type of the exception variable in an Objective-C @catch a VarDecl. The dynamic type is still a ParmVarDecl, but that will change soon. No effective functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102341 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
4c4a9530cb59775e2c70a64176930c5bd9d756b0 |
26-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Ensure that we have completed a type before attempting initialization on that type. Fixes several problems in Boost.Interprocess. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102339 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
087fb7d0b5e08f34b2e28a09c376f66449f30886 |
26-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Ensure that we have completed a type before attempting initialization on that type. Fixes several problems in Boost.Interprocess. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102339 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
16a6d302546aa714175f15ca45b77c820931a383 |
25-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When name lookup finds a single declaration that was imported via a using declaration, look at its underlying declaration to determine the lookup result kind (e.g., overloaded, unresolved). Fixes at least one issue in Boost.Bimap. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102317 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaLookup.cpp
|
2b147f072b118607aafafd2f05843243abfe4488 |
25-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
When name lookup finds a single declaration that was imported via a using declaration, look at its underlying declaration to determine the lookup result kind (e.g., overloaded, unresolved). Fixes at least one issue in Boost.Bimap. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102317 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaLookup.cpp
|
f1c7432582fab04c68d0c438e0468236f2c5b7b6 |
25-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve the diagnostic when we find something we did not expect in a member expression (p-> or x.), by showing the type we looked into and what we did actually find. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102315 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprCXX.cpp
|
b0fd483ad64865cc0233981cfddc36a7c9795e5e |
25-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Improve the diagnostic when we find something we did not expect in a member expression (p-> or x.), by showing the type we looked into and what we did actually find. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102315 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprCXX.cpp
|
1a1e1881ca3be1a70ea019da4805ed38984951f7 |
25-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When performing name lookup for an operator name, be sure to look through using declarations. Fixes ~18 tests in Boost.Fusion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102311 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
6bf356fb8f769575d5e6e54a3bf81436ddec106a |
25-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
When performing name lookup for an operator name, be sure to look through using declarations. Fixes ~18 tests in Boost.Fusion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102311 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
ae9fcbe6912f96e194c4ab77af2a22918c4fdb88 |
25-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When copying a temporary object to initialize an entity for which the temporary needs to be bound, bind the copy object. Otherwise, we won't end up calling the destructor for the copy. Fixes Boost.Optional. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102290 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
emaOverload.cpp
|
b86cf0c11712fa89f14197f3f0ed862e7b2add84 |
25-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
When copying a temporary object to initialize an entity for which the temporary needs to be bound, bind the copy object. Otherwise, we won't end up calling the destructor for the copy. Fixes Boost.Optional. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102290 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
emaOverload.cpp
|
374b04033a49487e97387efd8ba6affde832733f |
25-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Revert enough of my patches to fix self-host again :( git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102289 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
8e142ccf1196c9ae31f10f9caa97670e343971e7 |
25-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Revert enough of my patches to fix self-host again :( git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102289 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
538cf59089081665597f5d29665578011dcb30ca |
25-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When we create a temporary of class type that we don't immediately bind, check accessibility of the destructor and mark the declaration as referenced. Fixes a bunch of Boost.Regex failures. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102287 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
4154e0b1a5d03cbe4836e381c7d6187b7a0a200c |
25-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
When we create a temporary of class type that we don't immediately bind, check accessibility of the destructor and mark the declaration as referenced. Fixes a bunch of Boost.Regex failures. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102287 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
3e93ab1a7228f50b8051c167af25cafcffed2852 |
25-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Add an explicit UsuallyTinyPtrVector that takes a single element. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102283 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
8f2abbc791bad003f5d190e70b01d7eafa2a7be1 |
25-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Add an explicit UsuallyTinyPtrVector that takes a single element. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102283 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
87dbfe766f0a480b02e4473fdfda50f9f287a3df |
25-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
DefineImplicitCopyConstructor now uses SetBaseOrMemberInitializers to create implicit base initializers. (Member initializers are still handled by CodeGenFunction::SynthesizeCXXCopyConstructor for now). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102279 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
e127abe8bbcff7fef0326d68731bc178182a9990 |
25-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
DefineImplicitCopyConstructor now uses SetBaseOrMemberInitializers to create implicit base initializers. (Member initializers are still handled by CodeGenFunction::SynthesizeCXXCopyConstructor for now). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102279 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
8cc985e0bd2ad7d21d4e8076eeaba86f6600bd37 |
25-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
When building implicit base initializers, add a derived-to-base cast that points to the exact base specifier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102277 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
c795750b29c923b3bb08eb8b93a44f1bc7646e98 |
25-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
When building implicit base initializers, add a derived-to-base cast that points to the exact base specifier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102277 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
fa2d7b260177e9d7f9c4a7a900ab69690c520576 |
24-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When we attempt to create a temporary object of class type, be sure that the type we're copying is complete. Boost.Regex now builds, although it's failing its regression tests with our favorite "Sema doesn't consider destructor as used." assertion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102271 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
f86fcb341116e72c5497e6b57695f46eca5f29e9 |
24-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
When we attempt to create a temporary object of class type, be sure that the type we're copying is complete. Boost.Regex now builds, although it's failing its regression tests with our favorite "Sema doesn't consider destructor as used." assertion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102271 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
d7494026b90aa0833b1dd0ef389dbd5f63bd07fc |
24-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When we are performing copy initialization of a class type via its copy constructor, suppress user-defined conversions on the argument. Otherwise, we can end up in a recursion loop where the bind the argument of the copy constructor to another copy constructor call, whose argument is then a copy constructor call... Found by Boost.Regex which, alas, still isn't building. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102269 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
d1a272204cef9304df3930d94f66713b05db27d6 |
24-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
When we are performing copy initialization of a class type via its copy constructor, suppress user-defined conversions on the argument. Otherwise, we can end up in a recursion loop where the bind the argument of the copy constructor to another copy constructor call, whose argument is then a copy constructor call... Found by Boost.Regex which, alas, still isn't building. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102269 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
302137f2ccb3843246d7a3dbb0a045e61e7012db |
24-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Add base paths for CK_BaseToDerived and CK_BaseToDerivedMemberPointer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102261 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXCast.cpp
emaExprCXX.cpp
emaOverload.cpp
|
f9d68e1dd015972318b2448f75115ff4fc3d5008 |
24-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Add base paths for CK_BaseToDerived and CK_BaseToDerivedMemberPointer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102261 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXCast.cpp
emaExprCXX.cpp
emaOverload.cpp
|
edb8f575c58dd3d2b3624d64fc0d5d44f4aa11b8 |
24-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Add base paths to CK_UncheckedDerivedToBase and CK_DerivedToBaseMemberPointer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102260 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaCXXCast.cpp
emaExpr.cpp
|
cee22421929c91b481f4d1bb85cd48c0f6b7510b |
24-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Add base paths to CK_UncheckedDerivedToBase and CK_DerivedToBaseMemberPointer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102260 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaCXXCast.cpp
emaExpr.cpp
|
b12093a3bb6fe8578e3f33318030a13da928de38 |
24-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Actually produce base paths for CastExprs of kind CK_DerivedToBase. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102259 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXCast.cpp
emaChecking.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
|
5cf86ba6b5a724bf91cb52feade1158f1fbeb605 |
24-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Actually produce base paths for CastExprs of kind CK_DerivedToBase. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102259 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXCast.cpp
emaChecking.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
|
a0494768db49126986e425913f6ad77f9e3dfdce |
24-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Add BasePath arguments to all cast expr constructors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102258 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaExpr.cpp
emaExprCXX.cpp
|
41b2dcd465f1e438502c420effc9d0c747f9db8f |
24-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Add BasePath arguments to all cast expr constructors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102258 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaExpr.cpp
emaExprCXX.cpp
|
077c17e9552f7be601cfb790509ae0f39a52469f |
24-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When we take the address of a declaration to bind it to a non-type template parameter, by sure to mark that declaration as "referenced". The Boost.Iterator library now passes all tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102256 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
77c13e07314422c6e76eda1bd1c7d83181b7e526 |
24-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
When we take the address of a declaration to bind it to a non-type template parameter, by sure to mark that declaration as "referenced". The Boost.Iterator library now passes all tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102256 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
95d07b33ba7d066893a897fd3270ed4b36fbefc5 |
24-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Pass the base specifiers through to CheckDerivedToBaseConversion. No functionality change yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102250 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
|
e25a96c0629b6f928d5e8055510789817db827d0 |
24-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Pass the base specifiers through to CheckDerivedToBaseConversion. No functionality change yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102250 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
|
8bf515b1f6e8ecdcbd3ebcc99fe08ea22fc7fd95 |
24-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
CastExpr should not hold a pointer to the base path. More cleanup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102249 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
emaTemplate.cpp
|
f1b48b7014992155286d58bb1676f9f51031d18b |
24-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
CastExpr should not hold a pointer to the base path. More cleanup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102249 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
emaTemplate.cpp
|
fdf43162f6fe27ae92d0e64bd70a59bba40db42d |
24-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Be more careful around dependent nested-name-specifiers, complaining when they are not complete (since we could not match them up to anything) and ensuring that enum parsing can cope with dependent elaborated-type-specifiers. Fixes PR6915 and PR6649. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102247 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
emaDecl.cpp
emaTemplate.cpp
|
48c89f4aa708e28310cb0c94b2d9d044b0ab806c |
24-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Be more careful around dependent nested-name-specifiers, complaining when they are not complete (since we could not match them up to anything) and ensuring that enum parsing can cope with dependent elaborated-type-specifiers. Fixes PR6915 and PR6649. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102247 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
emaDecl.cpp
emaTemplate.cpp
|
71c7b469efc894138796d890db7d5516ef547ff7 |
24-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
isValue is set to false by default. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102246 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
80971bdba20b5b280a00b7b9829026b33d3206f9 |
24-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
isValue is set to false by default. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102246 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
e6867ce8ab3d1ec6c32be66fa145ff1682bd5526 |
24-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Rename InheritancePath to BasePath, rename CastExpr::CXXBaseVector to CXXBaseSpecifierArray. More to come. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102245 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
|
7ab9d574d27ecee1f130e5755aa403e5ab529b6b |
24-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Rename InheritancePath to BasePath, rename CastExpr::CXXBaseVector to CXXBaseSpecifierArray. More to come. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102245 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
|
f05a422bad3cc5dbe20c57b69c8ce3ad74c202e8 |
24-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Keep track of when DependentNameTypes have no associated keyword (e.g., no typename, enum, class, etc.), e.g., because the context is one that is known to refer to a type. Patch from Enea Zaffanella! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102243 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaTemplate.cpp
reeTransform.h
|
107de90451b7f7a7749380a9d017ff1bafb6b407 |
24-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Keep track of when DependentNameTypes have no associated keyword (e.g., no typename, enum, class, etc.), e.g., because the context is one that is known to refer to a type. Patch from Enea Zaffanella! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102243 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaTemplate.cpp
reeTransform.h
|
1a7697cc5fa364c548f50fd8931d22e84cecc74d |
24-Apr-2010 |
John McCall <rjmccall@apple.com> |
Recommit r102215, this time being more careful to only set the "principal declaration" (i.e. the only which will actually be looked up) to have the non-member-operator bit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102231 91177308-0d34-0410-b5e6-96231b3b80d8
ookup.h
emaDecl.cpp
emaLookup.cpp
emaTemplateInstantiateDecl.cpp
|
76d326448d7e4c10b2896edc2ee855d1e68d1b88 |
24-Apr-2010 |
John McCall <rjmccall@apple.com> |
Recommit r102215, this time being more careful to only set the "principal declaration" (i.e. the only which will actually be looked up) to have the non-member-operator bit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102231 91177308-0d34-0410-b5e6-96231b3b80d8
ookup.h
emaDecl.cpp
emaLookup.cpp
emaTemplateInstantiateDecl.cpp
|
6742ed0fae1d786bcc2e6c9b4cca19f35fd13bd6 |
24-Apr-2010 |
Devang Patel <dpatel@apple.com> |
Revert r102215. This causes clang crash while compiling a test case from gdb testsuite. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102224 91177308-0d34-0410-b5e6-96231b3b80d8
ookup.h
emaDecl.cpp
emaLookup.cpp
emaTemplateInstantiateDecl.cpp
|
f0bf4d554f2513cbb4bec952c81ced59279ad91e |
24-Apr-2010 |
Devang Patel <dpatel@apple.com> |
Revert r102215. This causes clang crash while compiling a test case from gdb testsuite. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102224 91177308-0d34-0410-b5e6-96231b3b80d8
ookup.h
emaDecl.cpp
emaLookup.cpp
emaTemplateInstantiateDecl.cpp
|
6e4785e419b650170441901e02795a841eddf59b |
24-Apr-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
With -fno-constant-cfstrrings, class NSConstantString must be there or it is error (Next runtime). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102223 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
8a4377697161c5087e27cc40d6e0682f0cd1fa20 |
24-Apr-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
With -fno-constant-cfstrrings, class NSConstantString must be there or it is error (Next runtime). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102223 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
b8e5c14993759f1507e2713e25dd034a7751707d |
24-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Rework Parser-Sema interface for Objective-C @catch exception object arguments. Rather than having the parser call ActOnParamDeclarator (which is a bit of a hack), call a new ActOnObjCExceptionDecl action. We'll be moving more functionality into this handler to perform earlier checking of @catch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102222 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclObjC.cpp
|
4e6c0d19b7c072758922cf80525a81aeefc6e64b |
24-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Rework Parser-Sema interface for Objective-C @catch exception object arguments. Rather than having the parser call ActOnParamDeclarator (which is a bit of a hack), call a new ActOnObjCExceptionDecl action. We'll be moving more functionality into this handler to perform earlier checking of @catch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102222 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclObjC.cpp
|
1a2c1a806b8322d095e20481a2815bc4275900aa |
24-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve the AST representation of Objective-C @try/@catch/@finally statements. Instead of the @try having a single @catch, where all of the @catch's were chained (using an O(n^2) algorithm nonetheless), @try just holds an array of its @catch blocks. The resulting AST is slightly more compact (not important) and better represents the actual language semantics (good). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102221 91177308-0d34-0410-b5e6-96231b3b80d8
umpDiagnostics.cpp
ema.h
emaStmt.cpp
reeTransform.h
|
8f5e3dd32e443768d9dbbad7191e123e6733750c |
24-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Improve the AST representation of Objective-C @try/@catch/@finally statements. Instead of the @try having a single @catch, where all of the @catch's were chained (using an O(n^2) algorithm nonetheless), @try just holds an array of its @catch blocks. The resulting AST is slightly more compact (not important) and better represents the actual language semantics (good). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102221 91177308-0d34-0410-b5e6-96231b3b80d8
umpDiagnostics.cpp
ema.h
emaStmt.cpp
reeTransform.h
|
301ea81936fb6061341b17d73c34d9fbd2fdb423 |
24-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Add an InheritancePath parameter to the ImplicitCastExpr constructor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102218 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaChecking.cpp
emaDecl.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
emaTemplate.cpp
|
88465d3e996e627bbaa11099b039ddab66d5af2c |
24-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Add an InheritancePath parameter to the ImplicitCastExpr constructor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102218 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaChecking.cpp
emaDecl.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
emaTemplate.cpp
|
e5b8fd3a48d3c993d29d3a262ff21a36b8a6521d |
23-Apr-2010 |
John McCall <rjmccall@apple.com> |
Transition the last acceptable-result filter kind in LookupResult over to use a simple IDNS mask by introducing a namespace for non-member operators. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102215 91177308-0d34-0410-b5e6-96231b3b80d8
ookup.h
emaDecl.cpp
emaLookup.cpp
emaTemplateInstantiateDecl.cpp
|
f88b0d6c99e6473e78331271935986535dc4603c |
23-Apr-2010 |
John McCall <rjmccall@apple.com> |
Transition the last acceptable-result filter kind in LookupResult over to use a simple IDNS mask by introducing a namespace for non-member operators. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102215 91177308-0d34-0410-b5e6-96231b3b80d8
ookup.h
emaDecl.cpp
emaLookup.cpp
emaTemplateInstantiateDecl.cpp
|
b057bb40702a9fb498d623a3be6f110fad650761 |
23-Apr-2010 |
John McCall <rjmccall@apple.com> |
Recommit my change to how C++ does elaborated type lookups, now with two bugfixes which fix selfhost and (hopefully) the nightly tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102198 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
emaDecl.cpp
emaLookup.cpp
|
0d6b1640eb4d1a4a0203235cfdfcdaf3335af36d |
23-Apr-2010 |
John McCall <rjmccall@apple.com> |
Recommit my change to how C++ does elaborated type lookups, now with two bugfixes which fix selfhost and (hopefully) the nightly tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102198 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
emaDecl.cpp
emaLookup.cpp
|
49d10ab2aeef21d10751226aa7a39efa089986a8 |
23-Apr-2010 |
Chris Lattner <sabre@nondot.org> |
Implement PR6845. We allow matching constraints to have different input and output types when the smaller value isn't mentioned in the asm string. Extend this support from integers to also allowing fp values to be mismatched (if not mentioned in the asm string). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102188 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
aab64d0b7f41ed30b15ba9210ed859424cbc7455 |
23-Apr-2010 |
Chris Lattner <sabre@nondot.org> |
Implement PR6845. We allow matching constraints to have different input and output types when the smaller value isn't mentioned in the asm string. Extend this support from integers to also allowing fp values to be mismatched (if not mentioned in the asm string). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102188 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
def0466725dadc67b9f09e723c88d8739e9c5b6c |
23-Apr-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Require a complete type for the lhs of member pointer dereference operations if the type isn't exactly the same as the container class. Fixes PR6783. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102186 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
17e1d35848247cbc5ff31df58f0b67e85b64837c |
23-Apr-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Require a complete type for the lhs of member pointer dereference operations if the type isn't exactly the same as the container class. Fixes PR6783. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102186 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
c2cf9ebd6b9b63135ac0af342a4a12b9c546c420 |
23-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When instantiating a typedef of an anonymous tag type, note in the tag declaration that this typedef gives the tag a name. Fixes a problem uncovered by Boost.GIL (Generic Image Library). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102180 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
d57a38ee02c285d69d05fed6df0d7406b2517888 |
23-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
When instantiating a typedef of an anonymous tag type, note in the tag declaration that this typedef gives the tag a name. Fixes a problem uncovered by Boost.GIL (Generic Image Library). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102180 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
6056edfbe84cb7323ba223871b42aa5d917723d7 |
23-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Cleanup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102179 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
63010a7f0f57a27a9735b5a75211c6d988be2074 |
23-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Cleanup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102179 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
f7e43dc21de0ab5c855ba6f85c7e606043bcb47d |
23-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Handle copy initialization in BuildImplicitMemberInitializer. Not used yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102178 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
f6513edbb783bb465987033934a68af5c1ded25b |
23-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Handle copy initialization in BuildImplicitMemberInitializer. Not used yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102178 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
224f7914a1a4144edf8d45611ecfed9de563121d |
23-Apr-2010 |
Daniel Dunbar <daniel@zuster.org> |
Revert "C++ doesn't really use "namespaces" for different kinds of names the same", which seems to break most C++ nightly test apps. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102174 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
emaDecl.cpp
emaLookup.cpp
|
00b40d3f2fb8b2f9043daf3dd4558bff98346b3c |
23-Apr-2010 |
Daniel Dunbar <daniel@zuster.org> |
Revert "C++ doesn't really use "namespaces" for different kinds of names the same", which seems to break most C++ nightly test apps. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102174 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
emaDecl.cpp
emaLookup.cpp
|
22027ada592fa7f72418cd53934d6000bfcf8c38 |
23-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Add another 'catch all' access diagnostic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102169 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
0e313bd4795c005f23c43f127039fd948c3e0bd9 |
23-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Add another 'catch all' access diagnostic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102169 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
1d257fc4dd25d7eede089890fcd77ea90a479952 |
23-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Add an ImplicitInitializerKind enum and pass it to BuildImplicitBaseInitializer and BuildImplicitMemberInitializer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102166 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
e5ef740266891d8f68f35c8365b3142608f36a5f |
23-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Add an ImplicitInitializerKind enum and pass it to BuildImplicitBaseInitializer and BuildImplicitMemberInitializer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102166 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
43b3559025097ed48b1a847e77f27c2756bc1bf7 |
23-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Fix a think-o that broke self-host. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102165 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
114a297ef02a722b3afcd719210c060811d431e0 |
23-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Fix a think-o that broke self-host. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102165 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
c51fdda5ba5bd2a30276d3084769b76055309f57 |
23-Apr-2010 |
John McCall <rjmccall@apple.com> |
C++ doesn't really use "namespaces" for different kinds of names the same way that C does. Among other differences, elaborated type specifiers are defined to skip "non-types", which, as you might imagine, does not include typedefs. Rework our use of IDNS masks to capture the semantics of different kinds of declarations better, and remove most current lookup filters. Removing the last remaining filter is more complicated and will happen in a separate patch. Fixes PR 6885 as well some spectrum of unfiled bugs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102164 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
emaDecl.cpp
emaLookup.cpp
|
d04efc98d08731e31bd73f430803acc5ffa9040a |
23-Apr-2010 |
John McCall <rjmccall@apple.com> |
C++ doesn't really use "namespaces" for different kinds of names the same way that C does. Among other differences, elaborated type specifiers are defined to skip "non-types", which, as you might imagine, does not include typedefs. Rework our use of IDNS masks to capture the semantics of different kinds of declarations better, and remove most current lookup filters. Removing the last remaining filter is more complicated and will happen in a separate patch. Fixes PR 6885 as well some spectrum of unfiled bugs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102164 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
emaDecl.cpp
emaLookup.cpp
|
4986fbb018d2a1daadc7ac2a9406ed17e384f72d |
23-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Factor code to initialize an implicit member out into a separate function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102162 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
ddfb75f22d89c773ade4fa0df1e3a99d8b125d40 |
23-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Factor code to initialize an implicit member out into a separate function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102162 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
da4dc7e7980f03ffcc39249949c3ff831adbc186 |
23-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Remove calls to isDependentContext, since we handle that case earlier in the code. Make BuildImplicitBaseInitializer return a boolean instead. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102159 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
defefd28a91c03466b1b6dfce84cc0b10e71a1bf |
23-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Remove calls to isDependentContext, since we handle that case earlier in the code. Make BuildImplicitBaseInitializer return a boolean instead. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102159 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
28f5207dd7a69876e7f4a7be0fa5e260a487a640 |
23-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Template instantiation for @try and @finally (but not @catch, yet). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102147 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
4dfdd1b5eb49999e3871f92310f2c53e1739f4f4 |
23-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Template instantiation for @try and @finally (but not @catch, yet). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102147 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
9761a64100c53e687c57a5529f9ca54fef11e1aa |
23-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Kill off IDNS_ObjCImplementation and IDNS_ObjCCategoryName; they aren't and never were used. There's a gap in the bit pattern for IDNS now, but I'm sure *someone* will fill it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102143 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaLookup.cpp
|
bd4187bb6f4a0cfe7d6d2c8e8856b16bca2f0748 |
23-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Kill off IDNS_ObjCImplementation and IDNS_ObjCCategoryName; they aren't and never were used. There's a gap in the bit pattern for IDNS now, but I'm sure *someone* will fill it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102143 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaLookup.cpp
|
854ded30c4dff3845377a9560016776292ab55da |
23-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Template instantiation for the Objective-C "fast enumeration" statement, i.e., for (element in collection) { // do something } git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102138 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
reeTransform.h
|
c3203e7ee1464a096f341c2e2a83a10be2da000a |
23-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Template instantiation for the Objective-C "fast enumeration" statement, i.e., for (element in collection) { // do something } git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102138 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
reeTransform.h
|
09fe9c79742b4080aebda9960afb88c729c4ac4f |
23-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Template instantiation for Objective-C++ @synchronized statements. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102134 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
reeTransform.h
|
8fdc13a78a43f09ac396e682c35d57ca0b48216d |
23-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Template instantiation for Objective-C++ @synchronized statements. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102134 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
reeTransform.h
|
b125cea9accd06d4cfff57ab884722e47984a3d8 |
22-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement template instantiation for Objective-C++ @throw statements. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102133 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaStmt.cpp
reeTransform.h
|
d1377b25a36adfe6604f78cbd3a23a07cf0f29e6 |
22-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement template instantiation for Objective-C++ @throw statements. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102133 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaStmt.cpp
reeTransform.h
|
7da31c178c1982b1fb3c28ae1aa280c05a32601e |
22-Apr-2010 |
John McCall <rjmccall@apple.com> |
Use the naming class from the overloaded lookup when access-checking an address of overloaded function, instead of assuming that a nested name specifier was used. A nested name specifier is not required for static functions. Fixes PR6886. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102107 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
e9ee23edd17c4bb7f271e67f8790792b4de677fc |
22-Apr-2010 |
John McCall <rjmccall@apple.com> |
Use the naming class from the overloaded lookup when access-checking an address of overloaded function, instead of assuming that a nested name specifier was used. A nested name specifier is not required for static functions. Fixes PR6886. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102107 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
da1f66f39d2ac17f81e37d8330a2f33eda88d05b |
22-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Some Objective-C++ types and expressions will never change during template instantiation, since they cannot be dependent or have dependent parts. Handle them the simple way. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102094 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
ef57c61ec3642ba7faaf7b9c0c4a6f23fa39d77c |
22-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Some Objective-C++ types and expressions will never change during template instantiation, since they cannot be dependent or have dependent parts. Handle them the simple way. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102094 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
dc76c16927d7377d5301972685496214f36bbfeb |
22-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When a dependent Objective-C++ message send was able to resolve the method being called at template definition time, retain that method and pass it through to type-checking. We will not perform any lookup for the method during template instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102081 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprObjC.cpp
reeTransform.h
|
f49bb082ebf6413b2d3cb956e9c78dbb8a978c58 |
22-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
When a dependent Objective-C++ message send was able to resolve the method being called at template definition time, retain that method and pass it through to type-checking. We will not perform any lookup for the method during template instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102081 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprObjC.cpp
reeTransform.h
|
0394c9b5e531cd1c1fde0982eec0dd3d207e55f2 |
22-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Remove the SelectorLoc argument to Sema::BuildInstanceMesssage and Sema::BuildClassMessage; we weren't using it, and template instantiation was faking it anyway. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102074 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprObjC.cpp
reeTransform.h
|
39968adc66ab02275d2f561e372a20ae454bd4e7 |
22-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Remove the SelectorLoc argument to Sema::BuildInstanceMesssage and Sema::BuildClassMessage; we weren't using it, and template instantiation was faking it anyway. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102074 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprObjC.cpp
reeTransform.h
|
1276444947e75c7b6e145ca1e37781b08471f28c |
22-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Expand the one use of TransformPointerLikeType and eliminate this macro. No functionality change git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102073 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
db93c4a8f839b2f46bfea66531aa014242f4da2c |
22-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Expand the one use of TransformPointerLikeType and eliminate this macro. No functionality change git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102073 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
abe2354f279c7992c260c29c1d48fd8ed6ce50a2 |
22-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement template instantiation for Objective-C++ message sends. We support dependent receivers for class and instance messages, along with dependent message arguments (of course), and check as much as we can at template definition time. This commit also deals with a subtle aspect of template instantiation in Objective-C++, where the type 'T *' can morph from a dependent PointerType into a non-dependent ObjCObjectPointer type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102071 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprObjC.cpp
emaType.cpp
reeTransform.h
|
92e986e0adb79e8a47f738bd608e6c97c547641d |
22-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement template instantiation for Objective-C++ message sends. We support dependent receivers for class and instance messages, along with dependent message arguments (of course), and check as much as we can at template definition time. This commit also deals with a subtle aspect of template instantiation in Objective-C++, where the type 'T *' can morph from a dependent PointerType into a non-dependent ObjCObjectPointer type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102071 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprObjC.cpp
emaType.cpp
reeTransform.h
|
82416d56cce67f0a891cf0ed570e280f9e5b478b |
22-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When checking whether to diagnose an initialized "extern" variable, look for the const on the base type rather than on the top-level type. Fixes PR6495 properly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102066 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
66dd9394994654b5af2c62ed24f311432bacede5 |
22-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
When checking whether to diagnose an initialized "extern" variable, look for the const on the base type rather than on the top-level type. Fixes PR6495 properly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102066 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f211d2f7c5eae6f322b7a6708a2c9caa3d3968e1 |
22-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Record nested-name-specifiers of when we create elaborated-type-specifiers. Patch by Enea Zaffanella! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102065 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
050b78acf11900cb8c47563376200a1d7bd97f59 |
22-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Record nested-name-specifiers of when we create elaborated-type-specifiers. Patch by Enea Zaffanella! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102065 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
d43994fbedf40dde3a016c3c8991aa2085646cd9 |
22-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Re-land the patch that merges two diagnostics into one now that it passes self-host :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102050 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaAccess.cpp
emaDecl.cpp
emaDeclCXX.cpp
|
3b8c53b619c1c3d77632734d227566071459b9f5 |
22-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Re-land the patch that merges two diagnostics into one now that it passes self-host :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102050 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaAccess.cpp
emaDecl.cpp
emaDeclCXX.cpp
|
0b01765e44e0766a1d3e6d78de2c95d5cb393db8 |
22-Apr-2010 |
Daniel Dunbar <daniel@zuster.org> |
Revert "Unify two diagnostics into one.", it breaks with an assertion failure on bootstrap. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102043 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaAccess.cpp
emaDecl.cpp
|
d4b2853cec72abdaa6821aabc372d538dfbc2429 |
22-Apr-2010 |
Daniel Dunbar <daniel@zuster.org> |
Revert "Unify two diagnostics into one.", it breaks with an assertion failure on bootstrap. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102043 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaAccess.cpp
emaDecl.cpp
|
060da325bbd975c2b7f6a08df297ecbdcc71e71f |
22-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Unify two diagnostics into one. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102040 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaAccess.cpp
emaDecl.cpp
|
792898b58a27ea9034dd95710d388ed30cc693af |
22-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Unify two diagnostics into one. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102040 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaAccess.cpp
emaDecl.cpp
|
54bcfc54cb1dcb0c1b5133972287cff3f78b3360 |
22-Apr-2010 |
John McCall <rjmccall@apple.com> |
Call PerformCopyInitialization to properly initialize the exception temporary in a throw expression. Use EmitAnyExprToMem to emit the throw expression, which magically elides the final copy-constructor call (which raises a new strict-compliance bug, but baby steps). Give __cxa_throw a destructor pointer if the exception type has a non-trivial destructor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102039 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
ac418162692a951ca3796d6830496a85a2d12493 |
22-Apr-2010 |
John McCall <rjmccall@apple.com> |
Call PerformCopyInitialization to properly initialize the exception temporary in a throw expression. Use EmitAnyExprToMem to emit the throw expression, which magically elides the final copy-constructor call (which raises a new strict-compliance bug, but baby steps). Give __cxa_throw a destructor pointer if the exception type has a non-trivial destructor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102039 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
82d10e709325891eaf37609ad9d6178c11fe6b22 |
22-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Whenever we complain about a failed initialization of a function or method parameter, provide a note pointing at the parameter itself so the user does not have to manually look for the function/method being called and match up parameters to arguments. For example, we now get: t.c:4:5: warning: incompatible pointer types passing 'long *' to parameter of type 'int *' [-pedantic] f(long_ptr); ^~~~~~~~ t.c:1:13: note: passing argument to parameter 'x' here void f(int *x); ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102038 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaInit.cpp
emaInit.h
|
a41a8c5972c2632247ae7913cf6ce65d45f7e702 |
22-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Whenever we complain about a failed initialization of a function or method parameter, provide a note pointing at the parameter itself so the user does not have to manually look for the function/method being called and match up parameters to arguments. For example, we now get: t.c:4:5: warning: incompatible pointer types passing 'long *' to parameter of type 'int *' [-pedantic] f(long_ptr); ^~~~~~~~ t.c:1:13: note: passing argument to parameter 'x' here void f(int *x); ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102038 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaInit.cpp
emaInit.h
|
c06d820d5dc84563efc56776564fc5973cc56177 |
22-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Remove an unused declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102037 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
128317e6a0b020966f7392aa850b24cfe43bc163 |
22-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Remove an unused declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102037 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
475cc6916a1e0bb4601e3fb7bed592497fed90c6 |
22-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Switch the initialization of Objective-C message parameters (as occurs during message sends) over to the new initialization code and away from the C-only CheckSingleAssignmentConstraints. The enables the use of C++ types in method parameters and message arguments, as well as unifying more initialiation code overall. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102035 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
emaInit.cpp
emaInit.h
|
688fc9b9b4323a294f5bf4f8a83f7c365edec573 |
22-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Switch the initialization of Objective-C message parameters (as occurs during message sends) over to the new initialization code and away from the C-only CheckSingleAssignmentConstraints. The enables the use of C++ types in method parameters and message arguments, as well as unifying more initialiation code overall. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102035 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
emaInit.cpp
emaInit.h
|
b78dc9814ff816750a3499ab372056eb2673880b |
21-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Migrate the responsibility for turning the receiver name in an Objective-C class message expression into a type from the parser (which was doing so in two places) to Action::getObjCMessageKind() which, in the case of Sema, reduces the number of name lookups we need to perform. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102026 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprObjC.cpp
|
1569f95831a8c99e9f664137bf8f40e47ee3d90f |
21-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Migrate the responsibility for turning the receiver name in an Objective-C class message expression into a type from the parser (which was doing so in two places) to Action::getObjCMessageKind() which, in the case of Sema, reduces the number of name lookups we need to perform. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102026 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprObjC.cpp
|
f36e10ef71ece964bcd7997b170a7cb48c12901f |
21-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Diagnose access to fields with private constructors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102025 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
b99c666a940e93bcfcaeddc01515c94472e28a20 |
21-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Diagnose access to fields with private constructors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102025 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
cda510813e09e43fa6eabc309f605f35d7eaba09 |
21-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Eliminate unused code in Sema::ActOnSuperMessage and use early exits to reduce nesting. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102022 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
f95861a4ab6bbd6a975ed079dd70eb1cc22f4467 |
21-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Eliminate unused code in Sema::ActOnSuperMessage and use early exits to reduce nesting. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102022 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
cc1ec854fa9a150a195bf004926aeb3736b2b218 |
21-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Rework the Parser-Sema interaction for Objective-C message sends. Major changes include: - Expanded the interface from two actions (ActOnInstanceMessage, ActOnClassMessage), where ActOnClassMessage also handled sends to "super" by checking whether the identifier was "super", to three actions (ActOnInstanceMessage, ActOnClassMessage, ActOnSuperMessage). Code completion has the same changes. - The parser now resolves the type to which we are sending a class message, so ActOnClassMessage now accepts a TypeTy* (rather than an IdentifierInfo *). This opens the door to more interesting types (for Objective-C++ support). - Split ActOnInstanceMessage and ActOnClassMessage into parser action functions (with their original names) and semantic functions (BuildInstanceMessage and BuildClassMessage, respectively). At present, this split is onyl used by ActOnSuperMessage, which decides which kind of super message it has and forwards to the appropriate Build*Message. In the future, Build*Message will be used by template instantiation. - Use getObjCMessageKind() within the disambiguation of Objective-C message sends vs. array designators. Two notes about substandard bits in this patch: - There is some redundancy in the code in ParseObjCMessageExpr and ParseInitializerWithPotentialDesignator; this will be addressed shortly by centralizing the mapping from identifiers to type names for the message receiver. - There is some #if 0'd code that won't likely ever be used---it handles the use of 'super' in methods whose class does not have a superclass---but could be used to model GCC's behavior more closely. This code will die in my next check-in, but I want it in Subversion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102021 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
emaExprObjC.cpp
|
2725ca8eb3354975ca77ed4b88ede7b60b216b9a |
21-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Rework the Parser-Sema interaction for Objective-C message sends. Major changes include: - Expanded the interface from two actions (ActOnInstanceMessage, ActOnClassMessage), where ActOnClassMessage also handled sends to "super" by checking whether the identifier was "super", to three actions (ActOnInstanceMessage, ActOnClassMessage, ActOnSuperMessage). Code completion has the same changes. - The parser now resolves the type to which we are sending a class message, so ActOnClassMessage now accepts a TypeTy* (rather than an IdentifierInfo *). This opens the door to more interesting types (for Objective-C++ support). - Split ActOnInstanceMessage and ActOnClassMessage into parser action functions (with their original names) and semantic functions (BuildInstanceMessage and BuildClassMessage, respectively). At present, this split is onyl used by ActOnSuperMessage, which decides which kind of super message it has and forwards to the appropriate Build*Message. In the future, Build*Message will be used by template instantiation. - Use getObjCMessageKind() within the disambiguation of Objective-C message sends vs. array designators. Two notes about substandard bits in this patch: - There is some redundancy in the code in ParseObjCMessageExpr and ParseInitializerWithPotentialDesignator; this will be addressed shortly by centralizing the mapping from identifiers to type names for the message receiver. - There is some #if 0'd code that won't likely ever be used---it handles the use of 'super' in methods whose class does not have a superclass---but could be used to model GCC's behavior more closely. This code will die in my next check-in, but I want it in Subversion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102021 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
emaExprObjC.cpp
|
500acd6be7b449d0982cf0a9e63ee282a2a6376c |
21-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Keep tack of whether a base in an InitializedEntity is an inherited virtual base or not. Use this in CheckConstructorAccess. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102020 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaDeclCXX.cpp
emaInit.cpp
emaInit.h
|
711f34adb886cce8ba86c7b1b6513a1eaaf63bb5 |
21-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Keep tack of whether a base in an InitializedEntity is an inherited virtual base or not. Use this in CheckConstructorAccess. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102020 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaDeclCXX.cpp
emaInit.cpp
emaInit.h
|
1bb742fbc5fcec905fce0fa138babf206eecb9dc |
21-Apr-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Improve on source location of diagnostic when default property synthesis is using a super class ivar. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102011 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
d502a94461b81fd9f5d5c5df37ab3d7415bc72b1 |
21-Apr-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Improve on source location of diagnostic when default property synthesis is using a super class ivar. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102011 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
2b83d227f3071159f3b64e84478336ab0ad5f6a9 |
21-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Pass the InitializedEntity to Sema::CheckConstructorAccess and use it to report different diagnostics depending on which entity is being initialized. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102010 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaAccess.cpp
emaInit.cpp
|
9a68a67c6ae4982001815cc04f69b8781058263a |
21-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Pass the InitializedEntity to Sema::CheckConstructorAccess and use it to report different diagnostics depending on which entity is being initialized. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102010 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaAccess.cpp
emaInit.cpp
|
4a0a0aeb4b8c3906a4c510e1874a6322e02c7a01 |
21-Apr-2010 |
Zhongxing Xu <xuzhongxing@gmail.com> |
CXXNamedCastExpr is actually an abstract expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101994 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
d8383d45e41ba2316610e5d638d2872e37b67cfb |
21-Apr-2010 |
Zhongxing Xu <xuzhongxing@gmail.com> |
CXXNamedCastExpr is actually an abstract expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101994 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
aa598756ea06cb4de58fa775892e02f57e71537b |
21-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Overhaul the AST representation of Objective-C message send expressions, to improve source-location information, clarify the actual receiver of the message, and pave the way for proper C++ support. The ObjCMessageExpr node represents four different kinds of message sends in a single AST node: 1) Send to a object instance described by an expression (e.g., [x method:5]) 2) Send to a class described by the class name (e.g., [NSString method:5]) 3) Send to a superclass class (e.g, [super method:5] in class method) 4) Send to a superclass instance (e.g., [super method:5] in instance method) Previously these four cases where tangled together. Now, they have more distinct representations. Specific changes: 1) Unchanged; the object instance is represented by an Expr*. 2) Previously stored the ObjCInterfaceDecl* referring to the class receiving the message. Now stores a TypeSourceInfo* so that we know how the class was spelled. This both maintains typedef information and opens the door for more complicated C++ types (e.g., dependent types). There was an alternative, unused representation of these sends by naming the class via an IdentifierInfo *. In practice, we either had an ObjCInterfaceDecl *, from which we would get the IdentifierInfo *, or we fell into the case below... 3) Previously represented by a class message whose IdentifierInfo * referred to "super". Sema and CodeGen would use isStr("super") to determine if they had a send to super. Now represented as a "class super" send, where we have both the location of the "super" keyword and the ObjCInterfaceDecl* of the superclass we're targetting (statically). 4) Previously represented by an instance message whose receiver is a an ObjCSuperExpr, which Sema and CodeGen would check for via isa<ObjCSuperExpr>(). Now represented as an "instance super" send, where we have both the location of the "super" keyword and the ObjCInterfaceDecl* of the superclass we're targetting (statically). Note that ObjCSuperExpr only has one remaining use in the AST, which is for "super.prop" references. The new representation of ObjCMessageExpr is 2 pointers smaller than the old one, since it combines more storage. It also eliminates a leak when we loaded message-send expressions from a precompiled header. The representation also feels much cleaner to me; comments welcome! This patch attempts to maintain the same semantics we previously had with Objective-C message sends. In several places, there are massive changes that boil down to simply replacing a nested-if structure such as: if (message has a receiver expression) { // instance message if (isa<ObjCSuperExpr>(...)) { // send to super } else { // send to an object } } else { // class message if (name->isStr("super")) { // class send to super } else { // send to class } } with a switch switch (E->getReceiverKind()) { case ObjCMessageExpr::SuperInstance: ... case ObjCMessageExpr::Instance: ... case ObjCMessageExpr::SuperClass: ... case ObjCMessageExpr::Class:... } There are quite a few places (particularly in the checkers) where send-to-super is effectively ignored. I've placed FIXMEs in most of them, and attempted to address send-to-super in a reasonable way. This could use some review. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101972 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
emaExpr.cpp
emaExprObjC.cpp
|
04badcf84c8d504d8491c7c7e29b58f52cb16640 |
21-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Overhaul the AST representation of Objective-C message send expressions, to improve source-location information, clarify the actual receiver of the message, and pave the way for proper C++ support. The ObjCMessageExpr node represents four different kinds of message sends in a single AST node: 1) Send to a object instance described by an expression (e.g., [x method:5]) 2) Send to a class described by the class name (e.g., [NSString method:5]) 3) Send to a superclass class (e.g, [super method:5] in class method) 4) Send to a superclass instance (e.g., [super method:5] in instance method) Previously these four cases where tangled together. Now, they have more distinct representations. Specific changes: 1) Unchanged; the object instance is represented by an Expr*. 2) Previously stored the ObjCInterfaceDecl* referring to the class receiving the message. Now stores a TypeSourceInfo* so that we know how the class was spelled. This both maintains typedef information and opens the door for more complicated C++ types (e.g., dependent types). There was an alternative, unused representation of these sends by naming the class via an IdentifierInfo *. In practice, we either had an ObjCInterfaceDecl *, from which we would get the IdentifierInfo *, or we fell into the case below... 3) Previously represented by a class message whose IdentifierInfo * referred to "super". Sema and CodeGen would use isStr("super") to determine if they had a send to super. Now represented as a "class super" send, where we have both the location of the "super" keyword and the ObjCInterfaceDecl* of the superclass we're targetting (statically). 4) Previously represented by an instance message whose receiver is a an ObjCSuperExpr, which Sema and CodeGen would check for via isa<ObjCSuperExpr>(). Now represented as an "instance super" send, where we have both the location of the "super" keyword and the ObjCInterfaceDecl* of the superclass we're targetting (statically). Note that ObjCSuperExpr only has one remaining use in the AST, which is for "super.prop" references. The new representation of ObjCMessageExpr is 2 pointers smaller than the old one, since it combines more storage. It also eliminates a leak when we loaded message-send expressions from a precompiled header. The representation also feels much cleaner to me; comments welcome! This patch attempts to maintain the same semantics we previously had with Objective-C message sends. In several places, there are massive changes that boil down to simply replacing a nested-if structure such as: if (message has a receiver expression) { // instance message if (isa<ObjCSuperExpr>(...)) { // send to super } else { // send to an object } } else { // class message if (name->isStr("super")) { // class send to super } else { // send to class } } with a switch switch (E->getReceiverKind()) { case ObjCMessageExpr::SuperInstance: ... case ObjCMessageExpr::Instance: ... case ObjCMessageExpr::SuperClass: ... case ObjCMessageExpr::Class:... } There are quite a few places (particularly in the checkers) where send-to-super is effectively ignored. I've placed FIXMEs in most of them, and attempted to address send-to-super in a reasonable way. This could use some review. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101972 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
emaExpr.cpp
emaExprObjC.cpp
|
eb599b04d8f1d7b71e04caf2b6de3b3360662c0c |
21-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Remove an unused parameter from isImplicitlyDefined. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101962 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
10dc0f8c355c6a726f206aefcb249cb2fafbce17 |
21-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Remove an unused parameter from isImplicitlyDefined. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101962 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
db36bb1d00d3ea3f2af8605ef8cf5d829115ea2a |
21-Apr-2010 |
John Thompson <john.thompson.jtsoftware@gmail.com> |
Fix comment to reflect recent code change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101960 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
f3afbeaa68624178a7a78cc20932351eb1f9f10d |
21-Apr-2010 |
John Thompson <John.Thompson.JTSoftware@gmail.com> |
Fix comment to reflect recent code change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101960 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
9ef84560a407aa606c20ee32eff9633ac92dec1e |
21-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Factor some common code out into a separate function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101952 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
84688f2a21bfde3cfdf1c41a053ef7b774d4cd0c |
21-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Factor some common code out into a separate function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101952 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
d8dc8f7f327f2d7f4517e71b54ddaf38b6e7c3e9 |
20-Apr-2010 |
Chris Lattner <sabre@nondot.org> |
push some source location information down through the compiler, into ContentCache::getBuffer. This allows it to produce diagnostics on the broken #include line instead of without a location. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101939 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
|
e127a0d80155b45dafe77f2b4380e5fa111a3345 |
20-Apr-2010 |
Chris Lattner <sabre@nondot.org> |
push some source location information down through the compiler, into ContentCache::getBuffer. This allows it to produce diagnostics on the broken #include line instead of without a location. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101939 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
|
361de42529412ed9d56e6112026c10d315249ed2 |
20-Apr-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to support transparent_union types on objective-c methods. Fixes radar 7875968. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101935 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
b00ab27f64abd18a68fc41699b86d0bc36189e21 |
20-Apr-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to support transparent_union types on objective-c methods. Fixes radar 7875968. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101935 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
b0f263fae87b522b559f2ad9c83ab25c8e703e43 |
20-Apr-2010 |
Benjamin Kramer <benny.kra@googlemail.com> |
Remove dead code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101920 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaOverload.cpp
|
23402af16608841be8dbcb9ddaf885c267c20489 |
20-Apr-2010 |
Benjamin Kramer <benny.kra@googlemail.com> |
Remove dead code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101920 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaOverload.cpp
|
91330e6d7da91efa05ff0ff63b3f8f47f48fa8c4 |
20-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Keep proper source location information for the type in an Objective-C @encode expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101907 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprObjC.cpp
reeTransform.h
|
81d3466d037dc5844234c7a93dab21a6ad986e7d |
20-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Keep proper source location information for the type in an Objective-C @encode expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101907 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprObjC.cpp
reeTransform.h
|
c693861122503dacd40daf3b2fba092db42513c6 |
20-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Introduce a limit on the depth of the template instantiation backtrace we will print with each error that occurs during template instantiation. When the backtrace is longer than that, we will print N/2 of the innermost backtrace entries and N/2 of the outermost backtrace entries, then skip the middle entries with a note such as: note: suppressed 2 template instantiation contexts; use -ftemplate-backtrace-limit=N to change the number of template instantiation entries shown This should eliminate some excessively long backtraces that aren't providing any value. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101882 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
575cf3791216c33770ba950430493cdd43099f8f |
20-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Introduce a limit on the depth of the template instantiation backtrace we will print with each error that occurs during template instantiation. When the backtrace is longer than that, we will print N/2 of the innermost backtrace entries and N/2 of the outermost backtrace entries, then skip the middle entries with a note such as: note: suppressed 2 template instantiation contexts; use -ftemplate-backtrace-limit=N to change the number of template instantiation entries shown This should eliminate some excessively long backtraces that aren't providing any value. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101882 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
93d000461e67aaa1b25e8f837fc5606c69db5164 |
20-Apr-2010 |
Chris Lattner <sabre@nondot.org> |
reapply john's patch, he broke mainline again by changing the test. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101871 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
e12a779bbecb46b7287a87e0ff441e32147d10bb |
20-Apr-2010 |
Chris Lattner <sabre@nondot.org> |
reapply john's patch, he broke mainline again by changing the test. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101871 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
698d2dcd4de3a0f131b082469c8b42f6bdfe8856 |
20-Apr-2010 |
Chris Lattner <sabre@nondot.org> |
revert r101863, whcih is causing Sema/altivec-init.c to fail on a ton of buildbots with: error: 'error' diagnostics expected but not seen: Line 9: too few elements in vector initialization (expected 8 elements, have 2) 1 warning and 1 error generated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101864 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
56f3cc6a5ffff81f20d89796b9fbd6710aede8c3 |
20-Apr-2010 |
Chris Lattner <sabre@nondot.org> |
revert r101863, whcih is causing Sema/altivec-init.c to fail on a ton of buildbots with: error: 'error' diagnostics expected but not seen: Line 9: too few elements in vector initialization (expected 8 elements, have 2) 1 warning and 1 error generated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101864 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
e2f07e3919898636a8770abcac66a8e22399f402 |
20-Apr-2010 |
John Thompson <john.thompson.jtsoftware@gmail.com> |
Altivec vector literal initializer count mismatch error removed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101863 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
820cbbb668ff6a38a8724dbe6f20242e14f1900a |
20-Apr-2010 |
John Thompson <John.Thompson.JTSoftware@gmail.com> |
Altivec vector literal initializer count mismatch error removed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101863 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
1a3c3aee23bf8b4662de3ee85328211d02e505d6 |
20-Apr-2010 |
John McCall <rjmccall@apple.com> |
Restore r101841 without modification. Also mark 'operator delete' as used for actual delete expressions, not just new expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101861 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
9c82afc7d1f57b427053e6679d87539b0dc63b1a |
20-Apr-2010 |
John McCall <rjmccall@apple.com> |
Restore r101841 without modification. Also mark 'operator delete' as used for actual delete expressions, not just new expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101861 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
8bc9a5b9e8576a60bb9a4a03fcacbe8c30fe99a2 |
20-Apr-2010 |
John McCall <rjmccall@apple.com> |
Revert r101841 and follow-up. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101859 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
3609432178ae63977d575065509238ca2fedf455 |
20-Apr-2010 |
John McCall <rjmccall@apple.com> |
Revert r101841 and follow-up. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101859 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
8860d685ec854cb654f9640a662e9437a2cc4340 |
20-Apr-2010 |
John McCall <rjmccall@apple.com> |
Don't bother looking for (or diagnosing problems with) the 'operator delete' associated with a new expression if -fno-exceptions is set. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101841 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
af5ece5017d59bd43ccd6dbe172a1f5b57132ff9 |
20-Apr-2010 |
John McCall <rjmccall@apple.com> |
Don't bother looking for (or diagnosing problems with) the 'operator delete' associated with a new expression if -fno-exceptions is set. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101841 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
861f831b91d08c0534adbc59f4d7959bb2d4bd2e |
20-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Do not diagnose unused-parameter errors in template instantiations. We will already have done so when the template is declared. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101838 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
|
c077e45fa9395c4fd97d8a43c708ee07f982fe2c |
20-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Do not diagnose unused-parameter errors in template instantiations. We will already have done so when the template is declared. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101838 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
|
944c37abb8acd1e14e73176922ee351db6a0f62f |
20-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Keep track of the actual storage specifier written on a variable or function declaration, since it may end up being changed (e.g., "extern" can become "static" if a prior declaration was static). Patch by Enea Zaffanella and Paolo Bolzoni. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101826 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExprCXX.cpp
emaObjCProperty.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
16573fa9705b546b7597c273b25b85d6321e2b33 |
20-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Keep track of the actual storage specifier written on a variable or function declaration, since it may end up being changed (e.g., "extern" can become "static" if a prior declaration was static). Patch by Enea Zaffanella and Paolo Bolzoni. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101826 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExprCXX.cpp
emaObjCProperty.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
39c91277dec5f457fffb7dd358db7e8662f43bcc |
20-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Only suppress the "extern variable has an initializer" warning when the extern entity being initialized is const. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101821 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
63c323d7584e3d91549fae23fb30b426d3b19042 |
20-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Only suppress the "extern variable has an initializer" warning when the extern entity being initialized is const. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101821 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
925cf4c33a6a5dc4821ca9a03ae2620460bd36fb |
19-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Disable the "'extern' variable has an initializer" warning in C++, since it makes sense there to have const extern variables. Fixes PR6495. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101818 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
41b1d6ba40a5c856f3d0bfed1b825154f87b6127 |
19-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Disable the "'extern' variable has an initializer" warning in C++, since it makes sense there to have const extern variables. Fixes PR6495. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101818 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
ae479745ec18032a3c1210123923c381055166e0 |
19-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When normal name lookup to disambiguiate an Objective-C message send fails to find anything, perform ivar lookup and, if we find one, consider this an instance message. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101810 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
ed46442adea496dfb01dbbe53ace583d5614e79a |
19-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
When normal name lookup to disambiguiate an Objective-C message send fails to find anything, perform ivar lookup and, if we find one, consider this an instance message. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101810 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
056f377b25606c6413732c62543bfbb5faeed997 |
19-Apr-2010 |
Eric Christopher <echristo@apple.com> |
Remove the argument number from the constant integer diagnostic. Update all of the testcases accordingly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101795 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
5e8965525282a48fd34af05183b8c3705a5b00d5 |
19-Apr-2010 |
Eric Christopher <echristo@apple.com> |
Remove the argument number from the constant integer diagnostic. Update all of the testcases accordingly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101795 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
6361ef7373a15cbfae9f75866bf4e9e6a56f0e5a |
19-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When searching for code-completion and typo-correction candidates, look from an Objective-C class or category to its implementation, to pick up synthesized ivars. Fixes a problem reported by David Chisnall. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101792 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
c220a18ecdfa42ebb3ce267974cf24e343e2aa6d |
19-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
When searching for code-completion and typo-correction candidates, look from an Objective-C class or category to its implementation, to pick up synthesized ivars. Fixes a problem reported by David Chisnall. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101792 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
f659b239aa691ee558fd4ba0ef0a68ce396857d3 |
19-Apr-2010 |
Dan Gohman <gohman@apple.com> |
Fix -Wcast-qual warnings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101786 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
cb421fa690da545b58a720abe5f1c49b166dbde7 |
19-Apr-2010 |
Dan Gohman <gohman@apple.com> |
Fix -Wcast-qual warnings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101786 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
d3fde4690cfc3dcfae9e29540f93aab3b391f5cc |
18-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Make sure that we don't visit redeclarations of nested classes while instantiating class members as part of an explicit instantiation. Addresses a compilation problem in Boost.Serialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101725 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
a77eaa9f4562dc611aa121a20ee8f2e2146765ce |
18-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Make sure that we don't visit redeclarations of nested classes while instantiating class members as part of an explicit instantiation. Addresses a compilation problem in Boost.Serialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101725 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
bb6d0a274486e7a090bd88a451299657f9e9bcf6 |
18-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
C++ [namespace.memdef]p3 only applies when the friend is not named via a qualified name. We weren't checking for an empty nested-name-specifier when dealing with friend class templates (although we were checking in the other places where we deal with this paragraph). Fixes a Boost.Serialization showstopper. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101724 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
c1c9df77c098a651b56db3052ed174a47cbde5b6 |
18-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
C++ [namespace.memdef]p3 only applies when the friend is not named via a qualified name. We weren't checking for an empty nested-name-specifier when dealing with friend class templates (although we were checking in the other places where we deal with this paragraph). Fixes a Boost.Serialization showstopper. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101724 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
adaa3a0753b82975d6704bf9bf173590fbb95fb1 |
18-Apr-2010 |
Benjamin Kramer <benny.kra@googlemail.com> |
Bail out early to avoid comparing the internals of two conversion sequences of different kinds (aka garbage). This happens if we're comparing a standard conversion sequence to an ambiguous one which have the same KindRank. Found by valgrind. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101717 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
b6eee077b23fa526e89570f01ec52c6ad335827b |
18-Apr-2010 |
Benjamin Kramer <benny.kra@googlemail.com> |
Bail out early to avoid comparing the internals of two conversion sequences of different kinds (aka garbage). This happens if we're comparing a standard conversion sequence to an ambiguous one which have the same KindRank. Found by valgrind. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101717 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
f9b4ef24edbcc8e90dff77f857ba2f00bac24a4f |
18-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When performing reference initialization for the purposes of overload resolution ([over.ics.ref]), we take some shortcuts required by the standard that effectively permit binding of a const volatile reference to an rvalue. We have to treat lightly here to avoid infinite recursion. Fixes PR6177. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101712 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
66821b5515df8a366579d023e472f843ecfa59b2 |
18-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
When performing reference initialization for the purposes of overload resolution ([over.ics.ref]), we take some shortcuts required by the standard that effectively permit binding of a const volatile reference to an rvalue. We have to treat lightly here to avoid infinite recursion. Fixes PR6177. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101712 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
b35870401eaff0c1310726dcc7f0fa627ff03773 |
18-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Binding a reference to an rvalue is a direct binding in C++0x but not in C++03. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101707 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
9dc58bb414394db3b886c0b6425a2738cb4cd785 |
18-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Binding a reference to an rvalue is a direct binding in C++0x but not in C++03. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101707 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
5e1c75ea9fe64d7377a24c6661f0858065a8b382 |
18-Apr-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Fix the access checking of function and function template argument types, return types, and default arguments. This fixes PR6855 along with several similar cases where we rejected valid code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101706 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
630eb01b2568d0958118eb1a0ded02bebecb2b0f |
18-Apr-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Fix the access checking of function and function template argument types, return types, and default arguments. This fixes PR6855 along with several similar cases where we rejected valid code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101706 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
6b17be75ed2f05af23ff4eb82776fcfed3a0fa34 |
18-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When checking the copy constructor for the optional copy during a reference binding to an rvalue of reference-compatible type, check parameters after the first for complete parameter types and build any required default function arguments. We're effectively simulating the type-checking for a call without building the call itself. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101705 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
2559a7045a74679c80376305397a5953d038e1d0 |
18-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
When checking the copy constructor for the optional copy during a reference binding to an rvalue of reference-compatible type, check parameters after the first for complete parameter types and build any required default function arguments. We're effectively simulating the type-checking for a call without building the call itself. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101705 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
18f11f1068c247d32f6f9e88bbc1fab352512892 |
18-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
In C++98/03, when binding a reference to an rvalue of reference-compatible type, the implementation is permitted to make a copy of the rvalue (or many such copies, even). However, even though we don't make that copy, we are required to check for the presence of a suitable copy constructor. With this change, we do. Note that in C++0x we are not allowed to make these copies, so we test both dialects separately. Also note the FIXME in one of the C++03 tests, where we are not instantiating default function arguments for the copy constructor we pick (but do not call). The fix is obvious; eliminating the infinite recursion it causes is not. Will address that next. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101704 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaInit.cpp
emaInit.h
|
523d46af407f32fc53861e6f068e8076d4fe84a8 |
18-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
In C++98/03, when binding a reference to an rvalue of reference-compatible type, the implementation is permitted to make a copy of the rvalue (or many such copies, even). However, even though we don't make that copy, we are required to check for the presence of a suitable copy constructor. With this change, we do. Note that in C++0x we are not allowed to make these copies, so we test both dialects separately. Also note the FIXME in one of the C++03 tests, where we are not instantiating default function arguments for the copy constructor we pick (but do not call). The fix is obvious; eliminating the infinite recursion it causes is not. Will address that next. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101704 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaInit.cpp
emaInit.h
|
1de0da941b75a09c24b6c2242e3fac6fff6fc10e |
18-Apr-2010 |
Ted Kremenek <kremenek@apple.com> |
Allow the 'ibaction' attribute to be attached to method declarations (and not issue a warning). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101699 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
422bae76c7900101427e05895f315c1d22a237a5 |
18-Apr-2010 |
Ted Kremenek <kremenek@apple.com> |
Allow the 'ibaction' attribute to be attached to method declarations (and not issue a warning). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101699 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
1e8781700be7bb21cd137cad92ee69bb124b9522 |
18-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Do not consider explicit constructors when performing a copy to a temporary object. This is blindingly obvious from reading C++ [over.match.ctor]p1, but somehow I'd missed it and it took DR152 to educate me. Adjust one test that was relying on this non-standard behavior. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101688 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
153b3ba7a61f3228fd3a8c67b9bff94db3e13a2e |
18-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Do not consider explicit constructors when performing a copy to a temporary object. This is blindingly obvious from reading C++ [over.match.ctor]p1, but somehow I'd missed it and it took DR152 to educate me. Adjust one test that was relying on this non-standard behavior. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101688 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
317e07ea35a2b1269d0b9095bdde70f2685f7015 |
18-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve our handling of user-defined conversions as part of overload resolution. There are two sources of problems involving user-defined conversions that this change eliminates, along with providing simpler interfaces for checking implicit conversions: - It eliminates a case of infinite recursion found in Boost. - It eliminates the search for the constructor needed to copy a temporary generated by an implicit conversion from overload resolution. Overload resolution assumes that, if it gets a value of the parameter's class type (or a derived class thereof), there is a way to copy if... even if there isn't. We now model this properly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101680 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaInit.cpp
emaOverload.cpp
emaOverload.h
|
3fbaf3e5d524bfff219d1e3e9ac4801a8411590f |
18-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Improve our handling of user-defined conversions as part of overload resolution. There are two sources of problems involving user-defined conversions that this change eliminates, along with providing simpler interfaces for checking implicit conversions: - It eliminates a case of infinite recursion found in Boost. - It eliminates the search for the constructor needed to copy a temporary generated by an implicit conversion from overload resolution. Overload resolution assumes that, if it gets a value of the parameter's class type (or a derived class thereof), there is a way to copy if... even if there isn't. We now model this properly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101680 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaInit.cpp
emaOverload.cpp
emaOverload.h
|
ac31224820a92c7e38e632c807a8ee55dbfa69a3 |
17-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Vtable -> VTable renames across the board. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101666 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
046c294a43024874ff35656c6e785b64e72f1f36 |
17-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Vtable -> VTable renames across the board. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101666 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
13946c261d641cd1745b59d36ae1420c2aea20ae |
17-Apr-2010 |
Benjamin Kramer <benny.kra@googlemail.com> |
Add raw_ostream operators to NamedDecl for convenience. Switch over all users of getNameAsString on a stream. The next step is to print the name directly into the stream, avoiding a temporary std::string copy. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101632 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaInit.cpp
emaOverload.cpp
|
900fc6388e803868a34b9483510c345e9b49d7eb |
17-Apr-2010 |
Benjamin Kramer <benny.kra@googlemail.com> |
Add raw_ostream operators to NamedDecl for convenience. Switch over all users of getNameAsString on a stream. The next step is to print the name directly into the stream, avoiding a temporary std::string copy. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101632 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaInit.cpp
emaOverload.cpp
|
96d5f0ff7e7486013a97fc56187f65aa19c322f3 |
17-Apr-2010 |
Eric Christopher <echristo@apple.com> |
Consolidate most of the integer constant expression builtin requirement checking into a single function and use that throughout. Remove some now unnecessary diagnostics and update tests with now more accurate diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101610 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
|
691ebc3f3225542e5abd85e107ebdbec907cf510 |
17-Apr-2010 |
Eric Christopher <echristo@apple.com> |
Consolidate most of the integer constant expression builtin requirement checking into a single function and use that throughout. Remove some now unnecessary diagnostics and update tests with now more accurate diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101610 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
|
bd344d9ce594b0bd536c00e31d7c7cbb5b2408c7 |
17-Apr-2010 |
Chris Lattner <sabre@nondot.org> |
make our existing "switch on bool" warning work for C. Since the result of comparisons are 'int' in C, it doesn't work to test just the result type of the expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101576 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
2b334bb3126a67895813e49e6228dad4aec0b4d6 |
17-Apr-2010 |
Chris Lattner <sabre@nondot.org> |
make our existing "switch on bool" warning work for C. Since the result of comparisons are 'int' in C, it doesn't work to test just the result type of the expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101576 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
1b3b3099f37fc9004dadf26010ecdf3af8718f72 |
17-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
If a non-noreturn virtual member function is guaranteed not to return, do *not* suggest that the function could be attribute 'noreturn'; overridden functions may end up returning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101572 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
ca7eaeeed817001dc7cee4852a7e41f0982da1ef |
17-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
If a non-noreturn virtual member function is guaranteed not to return, do *not* suggest that the function could be attribute 'noreturn'; overridden functions may end up returning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101572 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
c677f897781a73e3f35e39e62c7a5959e9288167 |
17-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Switch Sema::FindCompositePointerType() over to InitializationSequence. This is the last of the uses of TryImplicitConversion outside of overload resolution and InitializationSequence itself. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101569 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprCXX.cpp
|
8f00dcf1414dd0aefa18c12eb105428c83fba4f5 |
17-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Switch Sema::FindCompositePointerType() over to InitializationSequence. This is the last of the uses of TryImplicitConversion outside of overload resolution and InitializationSequence itself. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101569 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprCXX.cpp
|
b61d215745bb64c286f415f3096415b190b4f51d |
17-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Move Sema::PerformImplicitConversion over to where Sema::TryImplicitConversion is, for my own sanity. No functionality change git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101554 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaOverload.cpp
|
575c63a83e1ed5439643e10d55c26931ca043993 |
17-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Move Sema::PerformImplicitConversion over to where Sema::TryImplicitConversion is, for my own sanity. No functionality change git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101554 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaOverload.cpp
|
94e428d203b060edbd958fcb1192ae66b5485129 |
17-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Make Sema::BuildCXXCastArgument static, since it now only has one caller. No functionality change git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101550 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
|
ba70ab6e92ab3055acc898738e5f86739b91685e |
17-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Make Sema::BuildCXXCastArgument static, since it now only has one caller. No functionality change git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101550 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
|
fe891e194e27f77ff564c5a19abf09b6e03afdba |
17-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Collapse the three separate initialization paths in TryStaticImplicitCast (for references, class types, and everything else, respectively) into a single invocation of InitializationSequence. One of the paths (for class types) was the only client of Sema::TryInitializationByConstructor, which I have eliminated. This also simplified the interface for much of the cast-checking logic, eliminating yet more code. I've kept the representation of C++ functional casts with <> 1 arguments the same, despite the fact that I hate it. That fix will come soon. To satisfy my paranoia, I've bootstrapped + tested Clang with these changes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101549 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXCast.cpp
emaChecking.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaInit.h
emaStmt.cpp
|
d6e44a3c4193bd422bfa78c8086fb16bb2168e34 |
17-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Collapse the three separate initialization paths in TryStaticImplicitCast (for references, class types, and everything else, respectively) into a single invocation of InitializationSequence. One of the paths (for class types) was the only client of Sema::TryInitializationByConstructor, which I have eliminated. This also simplified the interface for much of the cast-checking logic, eliminating yet more code. I've kept the representation of C++ functional casts with <> 1 arguments the same, despite the fact that I hate it. That fix will come soon. To satisfy my paranoia, I've bootstrapped + tested Clang with these changes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101549 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXCast.cpp
emaChecking.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaInit.h
emaStmt.cpp
|
d32acef90f7e57a23a1de3a15f7794062f51d73c |
16-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Switch the checking of implicit casts for static_cast, C-style, and functional casts over to InitializationSequence, eliminating a caller of Sema::TryImplicitConversion. We also get access and ambiguity checking "for free". More cleanups to come in this routine. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101526 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaInit.cpp
|
f0e43e5c4634870b8ac7bf65d5ffa5f292d4c8a5 |
16-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Switch the checking of implicit casts for static_cast, C-style, and functional casts over to InitializationSequence, eliminating a caller of Sema::TryImplicitConversion. We also get access and ambiguity checking "for free". More cleanups to come in this routine. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101526 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaInit.cpp
|
d44ff5c791f0564516ce62f11ca464b961e678f0 |
16-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Kill ForceRValue once and for all git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101502 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXCast.cpp
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
|
74e386e8ead6654fade7f8661e28e10100dd4005 |
16-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Kill ForceRValue once and for all git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101502 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXCast.cpp
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
|
e53afc33809beb56e36fb9f078ecb5041883f3eb |
16-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Eliminate the ForceRValue parameter from TryCopyInitialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101498 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
b7f9e6a10bf935bd86dcb0a473df3d58f76e3a72 |
16-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Eliminate the ForceRValue parameter from TryCopyInitialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101498 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
09da592387671d601bea17020f6f11a66a7c0fca |
16-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Move Sema::TryCopyInitialization into a static function in SemaOverload.cpp; no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101497 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaOverload.cpp
|
74eb6581973124a0e7e6ffe50bde081379030c34 |
16-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Move Sema::TryCopyInitialization into a static function in SemaOverload.cpp; no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101497 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaOverload.cpp
|
386817050cee935ed2383f556b32eaf7013ddb64 |
16-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Eliminate ForceRValue parameters from reference binding. Did I mention that we aren't using ForceRValue any more? git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101496 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
emaOverload.cpp
|
23ef6c00c2948d49aed3b4c083daa1cc07b2d8d5 |
16-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Eliminate ForceRValue parameters from reference binding. Did I mention that we aren't using ForceRValue any more? git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101496 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
emaOverload.cpp
|
8e318c52707c9f4cbdf259b4a9215c3ad631fa3f |
16-Apr-2010 |
Benjamin Kramer <benny.kra@googlemail.com> |
Silence warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101495 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
1deea66124bafea261b45be2849b02210aadf6b3 |
16-Apr-2010 |
Benjamin Kramer <benny.kra@googlemail.com> |
Silence warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101495 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
f3e1d44a00a0d7a7d9225ab780f63dfeef6905bc |
16-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Eliminate the ForceRValue parameter to Sema::AddOverloadCandidate git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101494 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
emaOverload.cpp
|
c27d6c58b2c1a7fecfb53c4f4016af6773a9d5ba |
16-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Eliminate the ForceRValue parameter to Sema::AddOverloadCandidate git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101494 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
emaOverload.cpp
|
890f18a7faddc345128f3e081f1d08283f3ab58c |
16-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Eliminate the ForceRValue parameter from most of Sema's Add*Candidate functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101492 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaOverload.cpp
|
7ec7752e95bcd0773d9b4682b6a827e195a5cf29 |
16-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Eliminate the ForceRValue parameter from most of Sema's Add*Candidate functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101492 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaOverload.cpp
|
66aba360b69b620be996e81eb370dd6e00c50361 |
16-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Eliminate the ForceRValue parameter from Sema::IsUserDefinedConversion. It's not the way we're going to handle this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101483 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaOverload.cpp
|
5447a8d88f404059d36b077d338f5a4f399e0e82 |
16-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Eliminate the ForceRValue parameter from Sema::IsUserDefinedConversion. It's not the way we're going to handle this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101483 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaOverload.cpp
|
445d00db512fb89bfa1e5069ba61cbf5beda9f18 |
16-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Eliminate the default value for the UserCast parameter of Sema::IsUserDefinedConversion. No functionality change git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101482 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaOverload.cpp
|
471e2ceb7c441d46823a00a499f855afd19c45c3 |
16-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Eliminate the default value for the UserCast parameter of Sema::IsUserDefinedConversion. No functionality change git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101482 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaOverload.cpp
|
d56924a08c670dc79cfdfe920a8d44a5cb347848 |
16-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Eliminate the Elidable parameter to PerformImplicitConversion; we don't need it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101481 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
emaInit.cpp
|
871f439643b297dbb49396f6a3617875390978df |
16-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Eliminate the Elidable parameter to PerformImplicitConversion; we don't need it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101481 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
emaInit.cpp
|
d0b42aa4601a5ecc96c9fce70bb916d9a91f1b7e |
16-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Start working on handling wide bitfields in C++ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101464 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
72468ecb98efa158c5f1e2eb39ad413c8e28ebe0 |
16-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Start working on handling wide bitfields in C++ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101464 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
638c4e2d6299d73b5f7009474d67090726051f78 |
16-Apr-2010 |
Eric Christopher <echristo@apple.com> |
Expand the argument diagnostics for too many arguments and give both number seen and number expected. Finishes fixing PR6501. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101442 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExpr.cpp
emaExprObjC.cpp
|
ccfa9639f8d09733bcf1c2572c5bd3daba5bd632 |
16-Apr-2010 |
Eric Christopher <echristo@apple.com> |
Expand the argument diagnostics for too many arguments and give both number seen and number expected. Finishes fixing PR6501. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101442 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExpr.cpp
emaExprObjC.cpp
|
ed6d04519bf61948802ab0aa504fa9a7c3d0435a |
16-Apr-2010 |
Eric Christopher <echristo@apple.com> |
Expand argument diagnostic for too few arguments to give the number of arguments both seen and expected. Fixes PR6501. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101441 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExpr.cpp
emaExprObjC.cpp
|
d77b9a29651d748f0e30a8dad8969635fc04f725 |
16-Apr-2010 |
Eric Christopher <echristo@apple.com> |
Expand argument diagnostic for too few arguments to give the number of arguments both seen and expected. Fixes PR6501. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101441 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExpr.cpp
emaExprObjC.cpp
|
c703e583b60da915b10e128f795f5598d107a560 |
16-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Audit uses of Sema::LookupSingleName for those lookups that are intended for redeclarations, fixing those that need it. Fixes PR6831. This uncovered an issue where the C++ type-specifier-seq parsing logic would try to perform name lookup on an identifier after it already had a type-specifier, which could also lead to spurious ambiguity errors (as in PR6831, but with a different test case). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101419 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaDeclObjC.cpp
emaTemplate.cpp
|
c0b39640de335809ca7544f802751112619f30cc |
16-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Audit uses of Sema::LookupSingleName for those lookups that are intended for redeclarations, fixing those that need it. Fixes PR6831. This uncovered an issue where the C++ type-specifier-seq parsing logic would try to perform name lookup on an identifier after it already had a type-specifier, which could also lead to spurious ambiguity errors (as in PR6831, but with a different test case). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101419 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaDeclObjC.cpp
emaTemplate.cpp
|
697bbe8c8174b8ad339d9ebab8269b2bec930d87 |
16-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Feed proper source-location information into Sema::LookupSingleResult, in case it ends up doing something that might trigger diagnostics (template instantiation, ambiguity reporting, access reporting). Noticed while working on PR6831. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101412 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExprObjC.cpp
emaLookup.cpp
emaObjCProperty.cpp
emaTemplate.cpp
|
c83c6874e3bf1432d3df5e8d3530f8561ff5441f |
16-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Feed proper source-location information into Sema::LookupSingleResult, in case it ends up doing something that might trigger diagnostics (template instantiation, ambiguity reporting, access reporting). Noticed while working on PR6831. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101412 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExprObjC.cpp
emaLookup.cpp
emaObjCProperty.cpp
emaTemplate.cpp
|
f5e7dbf23d5a94f0b29927e8f86633a0637018a5 |
15-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Improve the bit-field too wide error message. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101384 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
c75d6ccf16170af42d31508a026b42382ab8f118 |
15-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Improve the bit-field too wide error message. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101384 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
912e11a0708e23088cfb85d224d691517296332a |
15-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Diagnose attempts to throw an abstract class type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101381 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
bf422f9d7e2e3454b2296b02202f4d5ae12644f6 |
15-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Diagnose attempts to throw an abstract class type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101381 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
a28955e6272ad5161b82763add89c27bd4e01c01 |
15-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix a few cases where enum constant handling was using ASTContext::getTypeSize() rather than ASTContext::getIntWidth() for the width of an integral type. The former includes padding for bools (to the target's size) while the latter does not, so we woud end up zero-extending bools to the target width when we shouldn't. Fixes a crash-on-valid in the included test. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101372 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
af68d4ed6da11634e2915b3ca31da354369e4bc1 |
15-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Fix a few cases where enum constant handling was using ASTContext::getTypeSize() rather than ASTContext::getIntWidth() for the width of an integral type. The former includes padding for bools (to the target's size) while the latter does not, so we woud end up zero-extending bools to the target width when we shouldn't. Fixes a crash-on-valid in the included test. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101372 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
9ba6661319b4b1fa03b8a7d09597f70effa37a4f |
15-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Warn about non-aggregate classes with no user-declared constructors that have reference or const scalar members, since those members can never be initializer or modified. Fixes <rdar://problem/7804350>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101316 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
325e593a83b20d9bce3628aa78fda983b554814e |
15-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Warn about non-aggregate classes with no user-declared constructors that have reference or const scalar members, since those members can never be initializer or modified. Fixes <rdar://problem/7804350>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101316 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
57b3f7533957905e360e48e5993a9e42f9c5a0c0 |
15-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Always diagnose and complain about problems in ResolveAddressOfOverloadedFunction when asked to complain. Previously, we had some weird handshake where ResolveAddressOfOverloadedFunction expected its caller to handle some of the diagnostics but not others, and yet there was no way for the caller to know which case we were in. Eliminate this madness, fixing <rdar://problem/7765884>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101312 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaOverload.cpp
emaTemplate.cpp
|
1a8cf73a825ef35917eede448817237b5fd47b05 |
15-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Always diagnose and complain about problems in ResolveAddressOfOverloadedFunction when asked to complain. Previously, we had some weird handshake where ResolveAddressOfOverloadedFunction expected its caller to handle some of the diagnostics but not others, and yet there was no way for the caller to know which case we were in. Eliminate this madness, fixing <rdar://problem/7765884>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101312 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaOverload.cpp
emaTemplate.cpp
|
5975907910e6e19da4c1a78a2d3a2d42fef29cee |
14-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Thread a Scope pointer into BuildRecoveryCallExpr to help typo correction find names when a call failed. Fixes <rdar://problem/7853795>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101278 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaOverload.cpp
|
1aae80b173e22fa5d649f114eb6607efac350d79 |
14-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Thread a Scope pointer into BuildRecoveryCallExpr to help typo correction find names when a call failed. Fixes <rdar://problem/7853795>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101278 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaOverload.cpp
|
4a02d77f238bf66023404917dc17e340a3448ea6 |
14-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Teach typo correction about various language keywords. We can't generally recover from typos in keywords (since we would effectively have to mangle the token stream). However, there are still benefits to typo-correcting with keywords: - We don't make stupid suggestions when the user typed something that is similar to a keyword. - We can suggest the keyword in a diagnostic (did you mean "static_cast"?), even if we can't recover and therefore don't have a fix-it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101274 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprObjC.cpp
emaInit.cpp
emaLookup.cpp
emaTemplate.cpp
|
aaf87162c5fbfbf320072da3a8e83392e1bbf041 |
14-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Teach typo correction about various language keywords. We can't generally recover from typos in keywords (since we would effectively have to mangle the token stream). However, there are still benefits to typo-correcting with keywords: - We don't make stupid suggestions when the user typed something that is similar to a keyword. - We can suggest the keyword in a diagnostic (did you mean "static_cast"?), even if we can't recover and therefore don't have a fix-it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101274 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprObjC.cpp
emaInit.cpp
emaLookup.cpp
emaTemplate.cpp
|
e5a880acd333575a4a02517c59528ea52cd0871a |
14-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Return the corrected DeclarationName from Sema::CorrectTypo rather than just a bool indicating that correction occurred. No actual functionality change (it's still always used like a bool), but this refactoring will be used to support typo correction to keywords. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101259 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaLookup.cpp
|
931f98ab919203b8e0f14768b275a7fdf77b392a |
14-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Return the corrected DeclarationName from Sema::CorrectTypo rather than just a bool indicating that correction occurred. No actual functionality change (it's still always used like a bool), but this refactoring will be used to support typo correction to keywords. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101259 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaLookup.cpp
|
c00ec0db7119d3acf22b0933faaa018234406c8a |
14-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When diagnosing suspicious precedence or assignments, move the fix-it that adds parentheses from the main diagnostic down to a new note. This way, when the fix-it represents a choice between two options, each of the options is associted with a note. There is no default option in such cases. For example: /Users/dgregor/t.c:2:9: warning: & has lower precedence than ==; == will be evaluated first [-Wparentheses] if (x & y == 0) { ^~~~~~~~ /Users/dgregor/t.c:2:9: note: place parentheses around the & expression to evaluate it first if (x & y == 0) { ^ ( ) /Users/dgregor/t.c:2:9: note: place parentheses around the == expression to silence this warning if (x & y == 0) { ^ ( ) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101249 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
55b38842d12ffd9f9ff3a0e16fae2cfe61ab0fe6 |
14-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
When diagnosing suspicious precedence or assignments, move the fix-it that adds parentheses from the main diagnostic down to a new note. This way, when the fix-it represents a choice between two options, each of the options is associted with a note. There is no default option in such cases. For example: /Users/dgregor/t.c:2:9: warning: & has lower precedence than ==; == will be evaluated first [-Wparentheses] if (x & y == 0) { ^~~~~~~~ /Users/dgregor/t.c:2:9: note: place parentheses around the & expression to evaluate it first if (x & y == 0) { ^ ( ) /Users/dgregor/t.c:2:9: note: place parentheses around the == expression to silence this warning if (x & y == 0) { ^ ( ) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101249 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
105ec8f4d4b6d7ff08467de8095fb33efad99ced |
14-Apr-2010 |
Chris Lattner <sabre@nondot.org> |
remove some obsolete super-handling code that I forgot to zap. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101212 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
6be3cb835ad85bfae46dc591503f15a0502472ab |
14-Apr-2010 |
Chris Lattner <sabre@nondot.org> |
remove some obsolete super-handling code that I forgot to zap. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101212 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
cf90f4c267b51a6a782d9aebf145198d0b5b9b41 |
14-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement typo correction for Objective-C message sends when the receiver is a mis-typed class name. Previously, we would give a non-specific typo-correction diagnostic from the expression-parsing code, but there was no fix-it because it was too late to recover. Now, we give a nice diagnostic honk.m:6:4: error: unknown receiver 'Hnk'; did you mean 'Honk'? [Hnk method]; ^~~ Honk honk.m:1:1: note: 'Honk' declared here @interface Honk ^ which includes a fix-it. We still need to recover better from mis-typing "super". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101211 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprObjC.cpp
|
47bd54392a4fd0f10e04de6a0420fd4838caaa0e |
14-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement typo correction for Objective-C message sends when the receiver is a mis-typed class name. Previously, we would give a non-specific typo-correction diagnostic from the expression-parsing code, but there was no fix-it because it was too late to recover. Now, we give a nice diagnostic honk.m:6:4: error: unknown receiver 'Hnk'; did you mean 'Honk'? [Hnk method]; ^~~ Honk honk.m:1:1: note: 'Honk' declared here @interface Honk ^ which includes a fix-it. We still need to recover better from mis-typing "super". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101211 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprObjC.cpp
|
32e25bc4f4081218872c2ddae2a9ee3712e05f71 |
14-Apr-2010 |
John McCall <rjmccall@apple.com> |
Mark a function declaration invalid if any of its parameter declarations are invalid. Prevents a crash-on-invalid during template instantiation. I... really don't understand how this wasn't already present. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101203 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f19de1ce44b9c7ffdeb388d6fe2fa8a1d0288f64 |
14-Apr-2010 |
John McCall <rjmccall@apple.com> |
Mark a function declaration invalid if any of its parameter declarations are invalid. Prevents a crash-on-invalid during template instantiation. I... really don't understand how this wasn't already present. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101203 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
6e1f2241cecf3eebbc551d4bc83938136d12ea78 |
14-Apr-2010 |
Ted Kremenek <kremenek@apple.com> |
Use ASTVector instead of std::vector for the Exprs in InitListExpr. Performance measurements of '-fsyntax-only' on combine.c (403.gcc) shows no real performance change, but now the vector isn't leaked. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101195 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaInit.cpp
|
709210feee317b8d6690dd1d15c2b74cfe55e261 |
14-Apr-2010 |
Ted Kremenek <kremenek@apple.com> |
Use ASTVector instead of std::vector for the Exprs in InitListExpr. Performance measurements of '-fsyntax-only' on combine.c (403.gcc) shows no real performance change, but now the vector isn't leaked. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101195 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaInit.cpp
|
dee6eae9ac58c5b2be8a9ca2ecb30c7ec31e758e |
13-Apr-2010 |
John McCall <rjmccall@apple.com> |
Support befriending members of class template specializations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101173 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplate.cpp
|
77e8b11524187f81548450e9e2ad9dd0e7200909 |
13-Apr-2010 |
John McCall <rjmccall@apple.com> |
Support befriending members of class template specializations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101173 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplate.cpp
|
6795a74dfcef7ff9c30f6b350303ca3958337a67 |
13-Apr-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Twik to radar 7839485. Do not attach weak_import attribute to class for non-fragile abi on darwin. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101168 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
c034974f103873bdccc91da99a30ab30295b5226 |
13-Apr-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Twik to radar 7839485. Do not attach weak_import attribute to class for non-fragile abi on darwin. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101168 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
e3172ee43172dda5e6e8aaa699da5953364ca035 |
13-Apr-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Turn off warning about weak_import attribute on objc classes for Darwin. Radar 7839485. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101164 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
a50d75031908759135dd241d7bfb120f3f4c4749 |
13-Apr-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Turn off warning about weak_import attribute on objc classes for Darwin. Radar 7839485. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101164 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
770a7299c5f7aadaf7bcec432bdb7075c82e809a |
13-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Refactor and simplify the computation of implicit conversion sequences for reference binding. The code attempted to handle both the computation of the ICS and the actual conversion, but the latter is an anachronism: we now use InitializationSequence for that. Sema::CheckReferenceInit is now a static function TryReferenceInit that's only use within overload resolution, and has been simplified slightly. It still needs to be updated per C++ [over.ics.ref], by eliminating more of the lvalue/rvalue checks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101136 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaOverload.cpp
|
abe183dd2faa124ac0d1f0e29a4f4216a483748c |
13-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Refactor and simplify the computation of implicit conversion sequences for reference binding. The code attempted to handle both the computation of the ICS and the actual conversion, but the latter is an anachronism: we now use InitializationSequence for that. Sema::CheckReferenceInit is now a static function TryReferenceInit that's only use within overload resolution, and has been simplified slightly. It still needs to be updated per C++ [over.ics.ref], by eliminating more of the lvalue/rvalue checks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101136 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaOverload.cpp
|
cd921bcf15173bbf21a23e351485250f9491969f |
13-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When returning the result of a call to an object of class type, do not return a NULL expression; return either an error or a proper expression. Fixes PR6078. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101133 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
aa0be17ee35e3218b722d90b74789f9e7c602bda |
13-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
When returning the result of a call to an object of class type, do not return a NULL expression; return either an error or a proper expression. Fixes PR6078. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101133 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
85d7e5aeb67d46964cdfd4098a01d68ce8dcdf49 |
13-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
During referencing binding, only consider conversion functions for direct reference binding when the source and target types are not reference-related. Fixes PR6066. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101132 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
d1fed3e8595a15edd7e14cee166ef90634fcf141 |
13-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
During referencing binding, only consider conversion functions for direct reference binding when the source and target types are not reference-related. Fixes PR6066. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101132 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
c5cd3b8da570d7a12ee0066c81ecf42a98e77091 |
13-Apr-2010 |
John McCall <rjmccall@apple.com> |
Allow classes to befriend implicitly-declared members. Fixes PR6207 for members of non-templated classes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101122 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
3d04336baf091b16e9d8f85b48b82dafd2695874 |
13-Apr-2010 |
John McCall <rjmccall@apple.com> |
Allow classes to befriend implicitly-declared members. Fixes PR6207 for members of non-templated classes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101122 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
3ea2c858bbb1919cb31b2711adcaca4265022201 |
13-Apr-2010 |
John McCall <rjmccall@apple.com> |
Parse constructor names in friend declarations. Part of the fix for PR6207. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101119 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
ba9d853bec0d9cc10ac5fdeab807cc4b13d65791 |
13-Apr-2010 |
John McCall <rjmccall@apple.com> |
Parse constructor names in friend declarations. Part of the fix for PR6207. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101119 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
9e4fb7360e1ea3425f87030894feb8440875179f |
13-Apr-2010 |
John McCall <rjmccall@apple.com> |
Don't try to find a scope corresponding to the search DC for an unfound friend declaration; this used to be important but is now just a waste of time plus an unreasonable assertion. Fixes PR6174. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101112 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
9ea6397bf4ff53768ef4bdc0945965103a22e98c |
13-Apr-2010 |
John McCall <rjmccall@apple.com> |
Don't try to find a scope corresponding to the search DC for an unfound friend declaration; this used to be important but is now just a waste of time plus an unreasonable assertion. Fixes PR6174. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101112 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
27565f77ca93d96cdea71cd6d3d129c02f1e8f82 |
13-Apr-2010 |
John McCall <rjmccall@apple.com> |
Diagnose declarations of conversion functions with declarators other than '()'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101098 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
a3f8137d9f7cd1af7a6cbe736b9419f7eb99e86c |
13-Apr-2010 |
John McCall <rjmccall@apple.com> |
Diagnose declarations of conversion functions with declarators other than '()'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101098 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
fed3bdf2ae68f0ceb7412794c6724ba02200e042 |
13-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Remove some dead FIXMEs git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101092 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
c0b53c2e4c954fe59917da5194ba4b9f831fa5bf |
13-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Remove some dead FIXMEs git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101092 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
3b6133ecd2c20761beaa8747be05aeed4376380c |
13-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement C++ [over.ics.user]p3, which restricts the final conversion from a conversion function template specialization to one of exact match rank. We only know how to test this in C++0x with default function template arguments, but it's also in the C++03 spec. Fixes PR6285. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101089 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaOverload.h
|
c520c84f7e9c2d8d4a66ac438e10d815daaeae64 |
13-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement C++ [over.ics.user]p3, which restricts the final conversion from a conversion function template specialization to one of exact match rank. We only know how to test this in C++0x with default function template arguments, but it's also in the C++03 spec. Fixes PR6285. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101089 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaOverload.h
|
9760bebb72f1ee5fde141337d16585cb889f67a1 |
13-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve source-location information for C++ conversion functions, by copying the type location information from the conversion-type-id into the type location information for the function type. Do something similar for constructors and destructors, by giving their "void" return type source-location information. In all of these cases, we previously left this type-source information uninitialized, which led to various unfortunate crashes. We still aren't tracking good source-location information for the actual names. That's PR6357. John, please check my sanity on this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101088 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaType.cpp
|
05baacbfd67017b2724f3e0503fd23609f5d32bc |
13-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Improve source-location information for C++ conversion functions, by copying the type location information from the conversion-type-id into the type location information for the function type. Do something similar for constructors and destructors, by giving their "void" return type source-location information. In all of these cases, we previously left this type-source information uninitialized, which led to various unfortunate crashes. We still aren't tracking good source-location information for the actual names. That's PR6357. John, please check my sanity on this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101088 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaType.cpp
|
f9b81536b54edf58abfd41d751dba98dac0d9730 |
12-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement C++ [temp.local]p4, which specifies how we eliminate name-lookup ambiguities when there are multiple base classes that are all specializations of the same class template. This is part of a general cleanup for ambiguities in template-name lookup. Fixes PR6717. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101065 91177308-0d34-0410-b5e6-96231b3b80d8
ookup.h
emaExpr.cpp
emaTemplate.cpp
|
01e56aecb77a96dcd93fa0e901b919f2e441981d |
12-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement C++ [temp.local]p4, which specifies how we eliminate name-lookup ambiguities when there are multiple base classes that are all specializations of the same class template. This is part of a general cleanup for ambiguities in template-name lookup. Fixes PR6717. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101065 91177308-0d34-0410-b5e6-96231b3b80d8
ookup.h
emaExpr.cpp
emaTemplate.cpp
|
219c8d2463fdf0c685500102f999f85ac1de8f3c |
12-Apr-2010 |
Chris Lattner <sabre@nondot.org> |
fix PR6819 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101050 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
a7a98c97e650545e69f4d868c95f0e3370971b0f |
12-Apr-2010 |
Chris Lattner <sabre@nondot.org> |
fix PR6819 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101050 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
85e7dde63fd2e855308af8e8c28be3402341af23 |
12-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When creating the implicitly-declared special member functions, be sure to introduce them into the current Scope (when we have one) in addition to the DeclContext for the class, so that they can be found by name lookup for inline members of the class. Fixes PR6570. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101047 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaTemplateInstantiate.cpp
|
6275e0cac39b76204644154fd99a449f57c589d4 |
12-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
When creating the implicitly-declared special member functions, be sure to introduce them into the current Scope (when we have one) in addition to the DeclContext for the class, so that they can be found by name lookup for inline members of the class. Fixes PR6570. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101047 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaTemplateInstantiate.cpp
|
98faacadec2937ec206c362a2bacb45bd1c9f530 |
12-Apr-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Issue warning when 'weak_import' attribute is applied on a class only when it is not supported in versions of MacOs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101044 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
3be17941f1edff4843692066f9d33d438a517612 |
12-Apr-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Issue warning when 'weak_import' attribute is applied on a class only when it is not supported in versions of MacOs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101044 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
cb50023b877a154be8a9da8938aa35dedb7e4762 |
12-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix a crash-on-invalid involving name lookup of tag names, where we ended up finding a function template that we didn't expect. Recover more gracefully, and fix a similar issue for class templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101040 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplate.cpp
|
57265e35292897e383d70bbd1d552209fac37b39 |
12-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Fix a crash-on-invalid involving name lookup of tag names, where we ended up finding a function template that we didn't expect. Recover more gracefully, and fix a similar issue for class templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101040 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplate.cpp
|
a56fb28aa48c4e49e1a57d943b3ec7fd39a9d4e9 |
12-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Be sure to instantiate the parameters of a function, even when the function's type is (strictly speaking) non-dependent. This ensures that, e.g., default function arguments get instantiated properly. And, since I couldn't resist, collapse the two implementations of function-parameter instantiation into calls to a single, new function (Sema::SubstParmVarDecl), since the two had nearly identical code (and each had bugs the other didn't!). More importantly, factored out the semantic analysis of a parameter declaration into Sema::CheckParameter, which is called both by Sema::ActOnParamDeclarator (when parameters are parsed) and when a parameter is instantiated. Previously, we were missing some Objective-C and address-space checks on instantiated function parameters. Fixes PR6733. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101029 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
cb27b0f70d2017295776afafe3616e0bcd74ab51 |
12-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Be sure to instantiate the parameters of a function, even when the function's type is (strictly speaking) non-dependent. This ensures that, e.g., default function arguments get instantiated properly. And, since I couldn't resist, collapse the two implementations of function-parameter instantiation into calls to a single, new function (Sema::SubstParmVarDecl), since the two had nearly identical code (and each had bugs the other didn't!). More importantly, factored out the semantic analysis of a parameter declaration into Sema::CheckParameter, which is called both by Sema::ActOnParamDeclarator (when parameters are parsed) and when a parameter is instantiated. Previously, we were missing some Objective-C and address-space checks on instantiated function parameters. Fixes PR6733. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101029 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
93950a22367838ae323d68afd854a03070e9fd85 |
12-Apr-2010 |
Chris Lattner <sabre@nondot.org> |
change Scope::WithinElse to be a normal scope flag, widen the fields to two 16-bit values instead of using bitfields. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101020 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
966c78b79004061c1f64feff96818b9f1d68ea58 |
12-Apr-2010 |
Chris Lattner <sabre@nondot.org> |
change Scope::WithinElse to be a normal scope flag, widen the fields to two 16-bit values instead of using bitfields. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101020 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e1046a5974f7d27850e00f50fc0f00a2c5726c57 |
12-Apr-2010 |
Chris Lattner <sabre@nondot.org> |
Have the parser decide whether a message to super is a variable or type, instead of having sema do it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101016 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
15faee19fdb9017dd6d08a690427b18c3b062c2d |
12-Apr-2010 |
Chris Lattner <sabre@nondot.org> |
Have the parser decide whether a message to super is a variable or type, instead of having sema do it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101016 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
5d648bf2765cacedf12458db72d59250a800e8d1 |
12-Apr-2010 |
Chris Lattner <sabre@nondot.org> |
fix a fixme, stop evaluating getCurMethodDecl() repeatedly in "LookupInObjCMethod". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101014 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
aec43dbfd04dc5709e2aa7e23e6d1dbe0eb85ac0 |
12-Apr-2010 |
Chris Lattner <sabre@nondot.org> |
fix a fixme, stop evaluating getCurMethodDecl() repeatedly in "LookupInObjCMethod". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101014 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
580de3c5ca180bdef2f4e1c0b721fb3bf48a9ef2 |
12-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Have the CXXBaseOrMemberInitializer keep track of whether an initializer initializes a virtual base or not. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101004 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
80638c5e6395344c1e6096542b0ff3b8bfb2139e |
12-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Have the CXXBaseOrMemberInitializer keep track of whether an initializer initializes a virtual base or not. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101004 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
43a925d90e57f8ddc897439c6e788fed5691cbec |
11-Apr-2010 |
Chris Lattner <sabre@nondot.org> |
fix PR6811 by not parsing 'super' as a magic expression in LookupInObjCMethod. Doing so allows all sorts of invalid code to slip through to codegen. This patch does not change the AST representation of super, though that would now be a natural thing to do since it can only be in the receiver position and in the base of a ObjCPropertyRefExpr. There are still several ugly areas handling super in the parser, but this is definitely a step in the right direction. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100959 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprObjC.cpp
|
eb483eb3ee80300f15d6d13573d82493c2194461 |
11-Apr-2010 |
Chris Lattner <sabre@nondot.org> |
fix PR6811 by not parsing 'super' as a magic expression in LookupInObjCMethod. Doing so allows all sorts of invalid code to slip through to codegen. This patch does not change the AST representation of super, though that would now be a natural thing to do since it can only be in the receiver position and in the base of a ObjCPropertyRefExpr. There are still several ugly areas handling super in the parser, but this is definitely a step in the right direction. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100959 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprObjC.cpp
|
c1177602b2470ad00b9175471213ff5c0307df66 |
11-Apr-2010 |
Chris Lattner <sabre@nondot.org> |
actually the interface grossness in the previous patch was due to typo correction. However, now that the code has been factored out of LookupMemberExpr, it can recurse to itself instead of to LookupMemberExpr! Remove grossness. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100958 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprObjC.cpp
|
b9d4fc1f54924a7b242fb763192a40c19fa6103d |
11-Apr-2010 |
Chris Lattner <sabre@nondot.org> |
actually the interface grossness in the previous patch was due to typo correction. However, now that the code has been factored out of LookupMemberExpr, it can recurse to itself instead of to LookupMemberExpr! Remove grossness. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100958 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprObjC.cpp
|
55447952e0ce939593e5441ed616848095e0500a |
11-Apr-2010 |
Chris Lattner <sabre@nondot.org> |
factor the code that handles "expr.field" when expr is a pointer to an objc interface out to a method in SemaExprObjC. This is *much* uglier than it should be due to grossness in LookupMemberExpr :( git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100957 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprObjC.cpp
|
7f81652f97a69ae8b514893a69c0245253687e55 |
11-Apr-2010 |
Chris Lattner <sabre@nondot.org> |
factor the code that handles "expr.field" when expr is a pointer to an objc interface out to a method in SemaExprObjC. This is *much* uglier than it should be due to grossness in LookupMemberExpr :( git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100957 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprObjC.cpp
|
95ea366a5806ca025422bdb698cb3708d4e02004 |
11-Apr-2010 |
Chris Lattner <sabre@nondot.org> |
fix a problem causing us to lose the ''s around objc interface names in a diagnostic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100956 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
0784fcddb4a399e57248704fc202f3f5c1254018 |
11-Apr-2010 |
Chris Lattner <sabre@nondot.org> |
fix a problem causing us to lose the ''s around objc interface names in a diagnostic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100956 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
3a3bcf9e91f43c970ebb7105d589aa9d070558ad |
10-Apr-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
When a member pointer is dereferenced, the class it points into must be complete. Enforce this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100925 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
59fc2690e622e9db7f7a8f5036562b19d3bfb2b5 |
10-Apr-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
When a member pointer is dereferenced, the class it points into must be complete. Enforce this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100925 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
c00d11494ad511cc3b09bdf89442e57a48e35876 |
10-Apr-2010 |
John McCall <rjmccall@apple.com> |
Diagnose more cases of initializing distinct members of an anonymous union member. Use a better diagnostic for this case. Also fix a bug with nested anonymous structs/unions for -Wreorder; this last was PR6575. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100923 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
3c3ccdbe73cb43bdf39a9102f5f7eb842fb71952 |
10-Apr-2010 |
John McCall <rjmccall@apple.com> |
Diagnose more cases of initializing distinct members of an anonymous union member. Use a better diagnostic for this case. Also fix a bug with nested anonymous structs/unions for -Wreorder; this last was PR6575. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100923 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
22afa4bde37ee17753101f3830f5903593938388 |
10-Apr-2010 |
John McCall <rjmccall@apple.com> |
Diagnose misordered initializers in constructor templates immediately instead of when they're instantiated. Merge the note into the -Wreorder warning; it doesn't really contribute much, and it was splitting a thought across diagnostics anyway. Don't crash in the parser when a constructor's initializers end in a comma and there's no body; the recovery here is still terrible, but anything's better than a crash. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100922 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
d6ca8da0f5a4115813055729faaa5128e994806d |
10-Apr-2010 |
John McCall <rjmccall@apple.com> |
Diagnose misordered initializers in constructor templates immediately instead of when they're instantiated. Merge the note into the -Wreorder warning; it doesn't really contribute much, and it was splitting a thought across diagnostics anyway. Don't crash in the parser when a constructor's initializers end in a comma and there's no body; the recovery here is still terrible, but anything's better than a crash. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100922 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
fdc7449f0139414c95f6f6c5f37066c3bf205ab8 |
09-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When upgrading an Objective-C class from a forward declaration to a full-fledged @interface, be sure that the declaration has the right lexical context. <rdar://problem/7827709> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100903 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
78713d86faeaaabb8aeb1683353e791defd3a3bf |
09-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
When upgrading an Objective-C class from a forward declaration to a full-fledged @interface, be sure that the declaration has the right lexical context. <rdar://problem/7827709> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100903 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
bab179ad45018b165132512ddd9bd9845c59d7bc |
09-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Only complain about explicit instantiations following explicit specializations when the explicit instantiation was... explicitly written, i.e., not the product of an explicit instantiation of an enclosing class. Fixes this spurious warning when Clang builds LLVM: /Volumes/Data/dgregor/Projects/llvm/lib/CodeGen/MachineDominators.cpp:22:1: warning: explicit instantiation of 'addRoot' that occurs after an explicit specialization will be ignored (C++0x extension) [-pedantic] git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100900 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateInstantiate.cpp
|
c42b6520b607cda57e850a60143e9f98bf421dbb |
09-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Only complain about explicit instantiations following explicit specializations when the explicit instantiation was... explicitly written, i.e., not the product of an explicit instantiation of an enclosing class. Fixes this spurious warning when Clang builds LLVM: /Volumes/Data/dgregor/Projects/llvm/lib/CodeGen/MachineDominators.cpp:22:1: warning: explicit instantiation of 'addRoot' that occurs after an explicit specialization will be ignored (C++0x extension) [-pedantic] git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100900 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateInstantiate.cpp
|
93c3df2694b2d8b59b9a8e6287ad56f2e752a3b6 |
09-Apr-2010 |
Ted Kremenek <kremenek@apple.com> |
Remove fixit for string literal comparison. Telling the user to use 'strcmp' is bad, and we don't have enough information to tell them how to use 'strncmp'. Instead, change the diagnostic to indicate they should use 'strncmp'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100890 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
03a4bee558b63ead66e942c6b26381df9a8b1754 |
09-Apr-2010 |
Ted Kremenek <kremenek@apple.com> |
Remove fixit for string literal comparison. Telling the user to use 'strcmp' is bad, and we don't have enough information to tell them how to use 'strncmp'. Instead, change the diagnostic to indicate they should use 'strncmp'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100890 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
593febfe7b0cddd2923ac4b7d8e93597e17066ed |
09-Apr-2010 |
John McCall <rjmccall@apple.com> |
Suppress access control diagnostics when looking up a base or member name fails to find a type. There are no cases where it's valid for this to produce an error. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100878 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
fd2254405de977dcc706a4dc7775c44a4218a27b |
09-Apr-2010 |
John McCall <rjmccall@apple.com> |
Suppress access control diagnostics when looking up a base or member name fails to find a type. There are no cases where it's valid for this to produce an error. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100878 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
750c188aff2b274e953d630fe128acfea6b87cfb |
09-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Remove all "used" static functions *after* we have performed all of the implicit template instantiations we need to perform. Otherwise, we end up erroneously diagnosing static functions as used if they were only used within an implicit template instantiation. Fixes a bunch of spurious failures when building Clang with Clang. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100872 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
47268a3f2843a8d64f3a6fef1e9a9dde1feb4a8c |
09-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Remove all "used" static functions *after* we have performed all of the implicit template instantiations we need to perform. Otherwise, we end up erroneously diagnosing static functions as used if they were only used within an implicit template instantiation. Fixes a bunch of spurious failures when building Clang with Clang. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100872 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
5ff145d278d3201f3be6c023490ddb4fc2085df7 |
09-Apr-2010 |
John McCall <rjmccall@apple.com> |
Instantiate default argument expressions even if their associated parameter type isn't dependent. Fixes rdar://problem/7838962. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100871 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
6cd3b9fb8a29bb70fff01719bdde238723d67c10 |
09-Apr-2010 |
John McCall <rjmccall@apple.com> |
Instantiate default argument expressions even if their associated parameter type isn't dependent. Fixes rdar://problem/7838962. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100871 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
662df8d4fbc781c540ba68d781ac4c79a0be7e2d |
09-Apr-2010 |
Chris Lattner <sabre@nondot.org> |
Don't warn about unused static functions if they are marked with attr constructor or destructor. Patch by Jean-Daniel Dupas! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100870 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
1a4221cbe1912421ed7e29d0bbac39e9792af8a2 |
09-Apr-2010 |
Chris Lattner <sabre@nondot.org> |
Don't warn about unused static functions if they are marked with attr constructor or destructor. Patch by Jean-Daniel Dupas! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100870 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
b33ebd3aa2318ef1938cac5f5720f122342ff798 |
09-Apr-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Fixes a regression caused by implementing cstyle methods for objc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100865 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
emaObjCProperty.cpp
|
4ecb25fa94897b2c03510292acace710e5262ba5 |
09-Apr-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Fixes a regression caused by implementing cstyle methods for objc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100865 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
emaObjCProperty.cpp
|
06b452bc5cfcd82a80f49865500c8526fb9b4c15 |
09-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve diagnostics when we fail to convert from a source type to a destination type for initialization, assignment, parameter-passing, etc. The main issue fixed here is that we used rather confusing wording for diagnostics such as t.c:2:9: warning: initializing 'char const [2]' discards qualifiers, expected 'char *' [-pedantic] char *name = __func__; ^ ~~~~~~~~ We're not initializing a 'char const [2]', we're initializing a 'char *' with an expression of type 'char const [2]'. Similar problems existed for other diagnostics in this area, so I've normalized them all with more precise descriptive text to say what we're initializing/converting/assigning/etc. from and to. The warning for the code above is now: t.c:2:9: warning: initializing 'char *' from an expression of type 'char const [2]' discards qualifiers [-pedantic] char *name = __func__; ^ ~~~~~~~~ Fixes <rdar://problem/7447179>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100832 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
d4eea8362605807327735727a9098abe1eb23b19 |
09-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Improve diagnostics when we fail to convert from a source type to a destination type for initialization, assignment, parameter-passing, etc. The main issue fixed here is that we used rather confusing wording for diagnostics such as t.c:2:9: warning: initializing 'char const [2]' discards qualifiers, expected 'char *' [-pedantic] char *name = __func__; ^ ~~~~~~~~ We're not initializing a 'char const [2]', we're initializing a 'char *' with an expression of type 'char const [2]'. Similar problems existed for other diagnostics in this area, so I've normalized them all with more precise descriptive text to say what we're initializing/converting/assigning/etc. from and to. The warning for the code above is now: t.c:2:9: warning: initializing 'char *' from an expression of type 'char const [2]' discards qualifiers [-pedantic] char *name = __func__; ^ ~~~~~~~~ Fixes <rdar://problem/7447179>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100832 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
70215ec6c46b8d5a701be9ce33e5a11d91d82d0e |
08-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Downgrade the "declaration does not declare anything" error to a warning. It's not harmful to have such pointless declarations, and GCC does not diagnose this issue consistently. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100814 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
cb821d045f5e445384f34d05a526955036073c4a |
08-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Downgrade the "declaration does not declare anything" error to a warning. It's not harmful to have such pointless declarations, and GCC does not diagnose this issue consistently. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100814 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
5739fe3c388afdb288db79183b966aeb96dead6e |
08-Apr-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Implement method type encoding in the presense of c-style arguments. Completes radar 7445205. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100813 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
7732cc9c0fdc97a2f8cce4e5933d8103213d1aef |
08-Apr-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Implement method type encoding in the presense of c-style arguments. Completes radar 7445205. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100813 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
7f5a533829fddb51d367047b359ec52a7e13da69 |
08-Apr-2010 |
Jeffrey Yasskin <jyasskin@google.com> |
Explain that a template needs arguments to make it into a type, for variable declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100809 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
c173be2aa78cecc6c35445165e59df99d754a1e0 |
08-Apr-2010 |
Jeffrey Yasskin <jyasskin@google.com> |
Explain that a template needs arguments to make it into a type, for variable declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100809 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
2ef223af811fbd9070a01514ee049e50a072a06b |
08-Apr-2010 |
John McCall <rjmccall@apple.com> |
Set access properly on instantiated friend class template declarations. Fixes PR6752. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100806 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
ea7390c7b384ce607bfc8fc13c01f37cfc3776f0 |
08-Apr-2010 |
John McCall <rjmccall@apple.com> |
Set access properly on instantiated friend class template declarations. Fixes PR6752. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100806 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
e4679a8776f531d05f0ad3469ed18d451ca64358 |
08-Apr-2010 |
Ted Kremenek <kremenek@apple.com> |
Remove micro-optimization for not issueing CFG-based warnings for 'static inline' functions unless they are used. I discussed this with Daniel Dunbar, and we agreed that this provides an inconsistent warnings experience for the user and that there were genuine cases where we wouldn't want to do this optimization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100800 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
nalysisBasedWarnings.h
|
b7e5f145f47b6ec1db1ba6fe9db9c0ed2fe38db3 |
08-Apr-2010 |
Ted Kremenek <kremenek@apple.com> |
Remove micro-optimization for not issueing CFG-based warnings for 'static inline' functions unless they are used. I discussed this with Daniel Dunbar, and we agreed that this provides an inconsistent warnings experience for the user and that there were genuine cases where we wouldn't want to do this optimization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100800 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
nalysisBasedWarnings.h
|
97e7da8885aeaffd78e3c430995441be55d70c79 |
08-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Introduce an egregious hack to work around a bug in libstdc++ 4.2.x's <tr1/hashtable> header, where a friend class template std::tr1::__detail::_Map_base is declared with the wrong template parameters. GCC doesn't catch the problem, so Clang does a little back-flip to avoid diagnosing just this one instance of the problem. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100790 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
c53d0d762010217d02da5aa14be171817d63e3fe |
08-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Introduce an egregious hack to work around a bug in libstdc++ 4.2.x's <tr1/hashtable> header, where a friend class template std::tr1::__detail::_Map_base is declared with the wrong template parameters. GCC doesn't catch the problem, so Clang does a little back-flip to avoid diagnosing just this one instance of the problem. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100790 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
bb65e4697e4cc2e9014b3df33fc0ef721b5ccb94 |
08-Apr-2010 |
Jeffrey Yasskin <jyasskin@google.com> |
Make CXXScopeSpec invalid when incomplete, and propagate that into any Declarator that depends on it. This fixes several redundant errors and bad recoveries. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100779 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaLookup.cpp
emaTemplate.cpp
|
9ab14541716928894821cf5d53d6b4c95ffdf3a3 |
08-Apr-2010 |
Jeffrey Yasskin <jyasskin@google.com> |
Make CXXScopeSpec invalid when incomplete, and propagate that into any Declarator that depends on it. This fixes several redundant errors and bad recoveries. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100779 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaLookup.cpp
emaTemplate.cpp
|
ded708ad2f2931c5974a3254a9705408523d6a51 |
08-Apr-2010 |
John McCall <rjmccall@apple.com> |
Implement dependent friend function template specializations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100753 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
af2094e7cecadf36667deb61a83587ffdd979bd3 |
08-Apr-2010 |
John McCall <rjmccall@apple.com> |
Implement dependent friend function template specializations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100753 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
525d759390a670f1918ec281a476722d4b15601e |
08-Apr-2010 |
Ted Kremenek <kremenek@apple.com> |
Removed unused object. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100750 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
2b60513052e81f66f852b21226ab488f9ed88f1d |
08-Apr-2010 |
Ted Kremenek <kremenek@apple.com> |
Removed unused object. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100750 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
bc9820dd532c8e9fc7d5a6ab51566a640cd52780 |
08-Apr-2010 |
Daniel Dunbar <daniel@zuster.org> |
Fronted: Kill overly specialized RecordLayoutDumper, just make -dump-record-layouts a bit that Sema honors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100747 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
|
b69eca5d2196c06870d3eeb62d689feebaaa8a4d |
08-Apr-2010 |
Daniel Dunbar <daniel@zuster.org> |
Fronted: Kill overly specialized RecordLayoutDumper, just make -dump-record-layouts a bit that Sema honors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100747 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
|
c18207ca266360c49f038ec6a41738d213ad436f |
08-Apr-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to implement gcc's cstyle arguments in objc methods. wip. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100734 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
emaExprObjC.cpp
|
4f4fd92c6c64ecbc65507f63ddd09211f732622c |
08-Apr-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to implement gcc's cstyle arguments in objc methods. wip. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100734 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
emaExprObjC.cpp
|
287fe7cd8f247104da8ad0f564a350770c3f4496 |
08-Apr-2010 |
John McCall <rjmccall@apple.com> |
Fix a (bogus) uninitialized-member-of-local warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100732 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
bb6fb465c718f28b8c1bdddb9c22d7d733a741a7 |
08-Apr-2010 |
John McCall <rjmccall@apple.com> |
Fix a (bogus) uninitialized-member-of-local warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100732 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
c46d55685a93373e133687c8211e65ffb1647376 |
08-Apr-2010 |
Ted Kremenek <kremenek@apple.com> |
Use SmallVector instead of an std::queue. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100730 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
d75fa6e1c034bf8a335fa8ce1eaf4f08065b3331 |
08-Apr-2010 |
Ted Kremenek <kremenek@apple.com> |
Use SmallVector instead of an std::queue. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100730 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
85c95262de036719f872ae38187d751e575df82e |
08-Apr-2010 |
Jeffrey Yasskin <jyasskin@google.com> |
When a template (without arguments) is passed as a template type parameter, explicitly ask the user to give it arguments. We used to complain that it wasn't a type and expect the user to figure it out. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100729 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
db88d8ad74097e2601d81ee863ce46a8a48a7034 |
08-Apr-2010 |
Jeffrey Yasskin <jyasskin@google.com> |
When a template (without arguments) is passed as a template type parameter, explicitly ask the user to give it arguments. We used to complain that it wasn't a type and expect the user to figure it out. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100729 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
06cacd9992a04e6023a78dcf55f1c14146bcf0af |
08-Apr-2010 |
Jeffrey Yasskin <jyasskin@google.com> |
Fix some redundant errors by changing CXXScopeSpec::isSet calls into isNotEmpty calls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100722 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaType.cpp
|
edc287751a4b05e3b4d8ff2b38fa30c5b59a548b |
08-Apr-2010 |
Jeffrey Yasskin <jyasskin@google.com> |
Fix some redundant errors by changing CXXScopeSpec::isSet calls into isNotEmpty calls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100722 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaType.cpp
|
31d35cfae7499b61a65d311c17e36e522e016a30 |
08-Apr-2010 |
Sean Hunt <rideau3@gmail.com> |
Implement checking for template literal operator functions. This code won't actually get used yet because we don't handle non-type parameter packs, but when we do, this code should jump in and work. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100716 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
216c278982ea8dd76d5d7d1ad0dcb39d3c5226e3 |
08-Apr-2010 |
Sean Hunt <rideau3@gmail.com> |
Implement checking for template literal operator functions. This code won't actually get used yet because we don't handle non-type parameter packs, but when we do, this code should jump in and work. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100716 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
0d92b7612c80ae3465a0b30dcbd5419be1cfd56b |
08-Apr-2010 |
Sean Hunt <rideau3@gmail.com> |
Updated comment to reflect changes made in the most recent draft. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100707 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
30019c062178ee9cc564352602436a3fd5bf540e |
08-Apr-2010 |
Sean Hunt <rideau3@gmail.com> |
Updated comment to reflect changes made in the most recent draft. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100707 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
e7eef0d4b290507e0015468240b6ac3d4373701d |
08-Apr-2010 |
Sean Hunt <rideau3@gmail.com> |
Fixed 80-cols violation git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100704 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.h
|
c39f69762494b11759c36abc62d592b5e7f8d426 |
08-Apr-2010 |
Sean Hunt <rideau3@gmail.com> |
Fixed 80-cols violation git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100704 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.h
|
e86dd3e5c6ee1ad0d406d6d3a7fb0782a5eedbf1 |
07-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Return early from Sema::MarkDeclarationReferenced when we know there isn't any extra work to perform. Also, don't check for unused parameters when the warnings will be suppressed anyway. Improves performance of -fsyntax-only on 403.gcc's combine.c by ~2.5%. <rdar://problem/7836787> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100686 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
fc2ca56874e1c8186ac30c0c3af13dc5e806cf74 |
07-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Return early from Sema::MarkDeclarationReferenced when we know there isn't any extra work to perform. Also, don't check for unused parameters when the warnings will be suppressed anyway. Improves performance of -fsyntax-only on 403.gcc's combine.c by ~2.5%. <rdar://problem/7836787> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100686 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
e6c39d3a3e77c17bb9aa97be6e2e1ae2dbd654db |
07-Apr-2010 |
Shih-wei Liao <sliao@google.com> |
libbcc Change-Id: Ieaa3ebd5a38f370752495549f8870b534eeedfc5
MakeLists.txt
XXFieldCollector.h
odeCompleteConsumer.cpp
dentifierResolver.cpp
dentifierResolver.h
umpDiagnostics.cpp
ookup.h
akefile
arseAST.cpp
ema.cpp
ema.h
emaAccess.cpp
emaAttr.cpp
emaCXXCast.cpp
emaCXXScopeSpec.cpp
emaChecking.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExceptionSpec.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaInit.cpp
emaInit.h
emaLookup.cpp
emaOverload.cpp
emaOverload.h
emaStmt.cpp
emaTemplate.cpp
emaTemplate.h
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
argetAttributesSema.cpp
argetAttributesSema.h
reeTransform.h
|
094cff43e20c7ec8017a377fc7730c7bd8b88512 |
07-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve handling of friend types in several ways: - When instantiating a friend type template, perform semantic analysis on the resulting type. - Downgrade the errors concerning friend type declarations that do not refer to classes to ExtWarns in C++98/03. C++0x allows practically any type to be befriended, and ignores the friend declaration if the type is not a class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100635 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
|
06245bfb3ae40bb24a8bfb17eafeb266a4daf5ca |
07-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Improve handling of friend types in several ways: - When instantiating a friend type template, perform semantic analysis on the resulting type. - Downgrade the errors concerning friend type declarations that do not refer to classes to ExtWarns in C++98/03. C++0x allows practically any type to be befriended, and ignores the friend declaration if the type is not a class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100635 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
|
e71e4ca8cb6b42ca37941a49a8ad70720dd4ef7e |
07-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Split Sema::ActOnFriendTypeDecl into Sema::CheckFriendTypeDecl (for semantic analysis) and Sema::ActOnFriendTypeDecl (the action callback). This is a prerequisite for improving template instantiation of friend type declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100633 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
1d8693580133d6c783b9a56808e61f98005e0be1 |
07-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Split Sema::ActOnFriendTypeDecl into Sema::CheckFriendTypeDecl (for semantic analysis) and Sema::ActOnFriendTypeDecl (the action callback). This is a prerequisite for improving template instantiation of friend type declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100633 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
70aed17c75f719d2f3a82df0f42e4e2aef09c8b8 |
07-Apr-2010 |
John McCall <rjmccall@apple.com> |
Teach -Wsign-compare to treat 1 << blah as "idiomatically non-negative". Fixes a spurious warning in LLVM. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100595 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
3aae6093dd8f3aecb66d7ff1f4b44e6a86765db4 |
07-Apr-2010 |
John McCall <rjmccall@apple.com> |
Teach -Wsign-compare to treat 1 << blah as "idiomatically non-negative". Fixes a spurious warning in LLVM. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100595 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
ae9aa4da09e5ffa4a3020851763bcf0d2670346f |
07-Apr-2010 |
John McCall <rjmccall@apple.com> |
Check access for the implicit calls to destructors that occur when we have a temporary object in C++. Also fix a tag mismatch that Doug noticed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100593 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaExprCXX.cpp
|
c91cc66e92b084acd1fdbaa1c3c74242741b3d46 |
07-Apr-2010 |
John McCall <rjmccall@apple.com> |
Check access for the implicit calls to destructors that occur when we have a temporary object in C++. Also fix a tag mismatch that Doug noticed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100593 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaExprCXX.cpp
|
ddd166595956e228bf60dd7b2019065c46cb546b |
07-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement code completion for Objective-C method declarations and definitions, e.g., after - or - (id) we'll find all of the "likely" instance methods that one would want to declare or define at this point. In the latter case, we only produce results whose return types match "id". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100587 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
ema.h
emaCodeComplete.cpp
|
e8f5a1710a7738deff40e10efcd05b1bd6af184f |
07-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement code completion for Objective-C method declarations and definitions, e.g., after - or - (id) we'll find all of the "likely" instance methods that one would want to declare or define at this point. In the latter case, we only produce results whose return types match "id". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100587 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
ema.h
emaCodeComplete.cpp
|
46f669e5b3f49c1d749259e9966c1c5aa1fd7127 |
07-Apr-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Minor clean up. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100583 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaObjCProperty.cpp
|
dba0b0b8761e45c867591a8ed6b683e0d986e27d |
07-Apr-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Minor clean up. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100583 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaObjCProperty.cpp
|
62d3f59f8eba3adf1d6fa53f077b17de1e171779 |
07-Apr-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
default access for synthesize ivar is @protect. Fixes radar 7823675. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100582 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
2846b2b47029c877357438d16c73911c1510be6c |
07-Apr-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
default access for synthesize ivar is @protect. Fixes radar 7823675. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100582 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
6a3ed8b63f8981279ee7b0cacf40504cd5edd89a |
07-Apr-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to not build ivar ASTs when they are ilegally declared in categories. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100577 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
0bd04596e4645ff145a046dfb3475f39674060d9 |
07-Apr-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to not build ivar ASTs when they are ilegally declared in categories. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100577 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
7351ca993afc0c6cd622cf30808d298871ab083f |
07-Apr-2010 |
John McCall <rjmccall@apple.com> |
Devote a special diagnostic to the typo (void*) someFunction(5, 10, 15, 20); where the cast is presumably meant to be to 'void'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100574 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
209acbd6d0c1b4444eb8c1682717753e1cbe38de |
07-Apr-2010 |
John McCall <rjmccall@apple.com> |
Devote a special diagnostic to the typo (void*) someFunction(5, 10, 15, 20); where the cast is presumably meant to be to 'void'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100574 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
e1cd8b0e2681559f4d085ac963606122d1891270 |
06-Apr-2010 |
John McCall <rjmccall@apple.com> |
Implement the protected access restriction ([class.protected]), which requires that protected members be used on objects of types which derive from the naming class of the lookup. My first N attempts at this were poorly-founded, largely because the standard is very badly worded here. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100562 91177308-0d34-0410-b5e6-96231b3b80d8
ookup.h
ema.h
emaAccess.cpp
emaExpr.cpp
emaOverload.cpp
emaType.cpp
|
161755a09898c95d21bfff33707da9ca41cd53c5 |
06-Apr-2010 |
John McCall <rjmccall@apple.com> |
Implement the protected access restriction ([class.protected]), which requires that protected members be used on objects of types which derive from the naming class of the lookup. My first N attempts at this were poorly-founded, largely because the standard is very badly worded here. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100562 91177308-0d34-0410-b5e6-96231b3b80d8
ookup.h
ema.h
emaAccess.cpp
emaExpr.cpp
emaOverload.cpp
emaType.cpp
|
a9b3d994ece8bf666673030fbff0f007fb09cd23 |
06-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When code completion produces an overload set as its results (e.g., while we're completing in the middle of a function call), also produce "ordinary" name results that show what can be typed at that point. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100558 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
2e4c7a5865739709a310d847da34096aa402d183 |
06-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
When code completion produces an overload set as its results (e.g., while we're completing in the middle of a function call), also produce "ordinary" name results that show what can be typed at that point. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100558 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
06a5dbedc02149da18098c8976ed0390b5cd0dd4 |
06-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Do not produce semicolons at the end of code-completion results git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100557 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
fe0bdba44641c5d20e6b7c889545b087ff10179e |
06-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Do not produce semicolons at the end of code-completion results git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100557 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
3c9212874c3c9d09acbd9f36d405cda15fc1edf8 |
06-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Only prove macros as code-completion results when we're in a case statement or for ordinary names. This means that we won't show macros when completing, e.g., member expressions such as "p->". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100555 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
2f880e47ca32d007d7e9e5ff5efa05f5c3432744 |
06-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Only prove macros as code-completion results when we're in a case statement or for ordinary names. This means that we won't show macros when completing, e.g., member expressions such as "p->". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100555 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
52e7a11a39c9a8d98e9ffd9a4bf998408ced8034 |
06-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When sending a message to "id", apply some heuristics to try to narrow down the set of code-completion results based on Objective-C conventions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100548 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
22f569918dd599eb6d810e066eddc4ae74c6b2b0 |
06-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
When sending a message to "id", apply some heuristics to try to narrow down the set of code-completion results based on Objective-C conventions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100548 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
a48848339a02b2830dfd40d5684e3084046d4b79 |
06-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Make code-completion for Objective-C message sends to "id" work in the presence of precompiled headers by forcibly loading all of the methods we know about from the PCH file before constructing our code-completion list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100535 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
719770dcfcb3987e8a2377dcca97955301445eb5 |
06-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Make code-completion for Objective-C message sends to "id" work in the presence of precompiled headers by forcibly loading all of the methods we know about from the PCH file before constructing our code-completion list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100535 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
0512819f1143951117eae3c2b89f1758856a1244 |
06-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement support for code completion of an Objective-C message send to "id" or an expression of type "id". In these cases, we produce a list of all of the (class or instance) methods, respectively, that we know about. Note that this implementation does not yet work well with precompiled headers; that's coming soon. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100528 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
13438f9b9c8fdf08998c843dd307d2a9eda05b32 |
06-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement support for code completion of an Objective-C message send to "id" or an expression of type "id". In these cases, we produce a list of all of the (class or instance) methods, respectively, that we know about. Note that this implementation does not yet work well with precompiled headers; that's coming soon. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100528 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
b1374242411034968dbf51e5c7f8904317145b0f |
06-Apr-2010 |
Ted Kremenek <kremenek@apple.com> |
Use cast<> + OpaquePtr.getAs<Decl> to add extra checking of our assumptions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100496 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
e9686572f17968048a5e097254f85c202ea44aec |
06-Apr-2010 |
Ted Kremenek <kremenek@apple.com> |
Use cast<> + OpaquePtr.getAs<Decl> to add extra checking of our assumptions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100496 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
3aa586c2a03027f6ce22e55069fdde7280409e19 |
06-Apr-2010 |
Ted Kremenek <kremenek@apple.com> |
Fix possible null dereference by bailing out of CheckObjCPropertyAttributes() early if the Decl* is null. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100483 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
5fcd52a6c94c7f93bd80062248353c45330da23a |
06-Apr-2010 |
Ted Kremenek <kremenek@apple.com> |
Fix possible null dereference by bailing out of CheckObjCPropertyAttributes() early if the Decl* is null. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100483 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
efe6c6158b22d5e04dfea48037d7a2f16bd10e3d |
05-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Extend the type printing policy to allow one to turn off the printing of file locations for anonymous tag types (e.g., "enum <anonymous at t.h:15:6>"), which can get rather long. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100470 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
84139d6ef8967cfdb70d37378a7a65cc4827d44d |
05-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Extend the type printing policy to allow one to turn off the printing of file locations for anonymous tag types (e.g., "enum <anonymous at t.h:15:6>"), which can get rather long. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100470 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
a257e9189d86f6202ee75a0d17af0af1e5e37f24 |
05-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Code completion results that refer to macros now get the cursor kind of macro definitions when passed to CIndex. Add test for code completion of macros via CIndex. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100431 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
|
09d9fa1933499cb2808cd97b2db16ee11a990ef9 |
05-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Code completion results that refer to macros now get the cursor kind of macro definitions when passed to CIndex. Add test for code completion of macros via CIndex. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100431 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
|
d75d12a3c9260109eae7e197fe1e543854f34461 |
02-Apr-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
diagnose declaring class extension after its implementation (radar 7822210). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100226 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
24e14089cc509ff48cf7f1e6f4f9070803dd739b |
02-Apr-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
diagnose declaring class extension after its implementation (radar 7822210). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100226 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
f8a7c38f5081b23551a0ae61d0225c9aab689c04 |
02-Apr-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Diagnose invalid code with -fobjc-nonfragile-abi2 when property is being accessed without the dot-syntax notation. (radar 7822344). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100212 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
6aae87d3839fad00b46159b5b67ef1da5f6c19e9 |
02-Apr-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Diagnose invalid code with -fobjc-nonfragile-abi2 when property is being accessed without the dot-syntax notation. (radar 7822344). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100212 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
c2ab6b64c36a246d6f8ef35573e4761ebaa9a685 |
02-Apr-2010 |
Daniel Dunbar <daniel@zuster.org> |
Sema/Obj-C: Narrow type, and simplify. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100210 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
29fa69addf8b19871e7866c32c92b5d142c4bfbc |
02-Apr-2010 |
Daniel Dunbar <daniel@zuster.org> |
Sema/Obj-C: Narrow type, and simplify. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100210 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
126d2cd1664fb16d0221f66bf77f8919a1d055f3 |
02-Apr-2010 |
Daniel Dunbar <daniel@zuster.org> |
Sema/Obj-C: Simplify -- eliminate dead casts & provable asserts, and narrow type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100197 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
a19331f1562c3b09865243ffcd2734c34f417470 |
02-Apr-2010 |
Daniel Dunbar <daniel@zuster.org> |
Sema/Obj-C: Simplify -- eliminate dead casts & provable asserts, and narrow type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100197 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
0fedc2fc0a4dc1cf55ece57b339ca0e20d342ff0 |
02-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Rework our handling of copy construction of temporaries, which was a poor (and wrong) approximation of the actual rules governing when to build a copy and when it can be elided. The correct implementation is actually simpler than the approximation. When we only enumerate constructors as part of initialization (e.g., for direct initialization or when we're copying from a class type or one of its derived classes), we don't create a copy. When we enumerate all conversion functions, we do create a copy. Before, we created some extra copies and missed some others. The new test copy-initialization.cpp shows a case where we missed creating a (required, non-elidable) copy as part of a user-defined conversion, which resulted in a miscompile. This commit also fixes PR6757, where the missing copy made us reject well-formed code in the ternary operator. This commit also cleans up our handling of copy elision in the case where we create an extra copy of a temporary object, which became necessary now that we produce the right copies. The code that seeks to find the temporary object being copied has moved into Expr::getTemporaryObject(); it used to have two different not-quite-the-same implementations, one in Sema and one in CodeGen. Note that we still do not attempt to perform the named return value optimization, so we miss copy elisions for return values and throw expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100196 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaInit.cpp
|
2f59979a7cc7929f53c9984423b0abeb83113442 |
02-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Rework our handling of copy construction of temporaries, which was a poor (and wrong) approximation of the actual rules governing when to build a copy and when it can be elided. The correct implementation is actually simpler than the approximation. When we only enumerate constructors as part of initialization (e.g., for direct initialization or when we're copying from a class type or one of its derived classes), we don't create a copy. When we enumerate all conversion functions, we do create a copy. Before, we created some extra copies and missed some others. The new test copy-initialization.cpp shows a case where we missed creating a (required, non-elidable) copy as part of a user-defined conversion, which resulted in a miscompile. This commit also fixes PR6757, where the missing copy made us reject well-formed code in the ternary operator. This commit also cleans up our handling of copy elision in the case where we create an extra copy of a temporary object, which became necessary now that we produce the right copies. The code that seeks to find the temporary object being copied has moved into Expr::getTemporaryObject(); it used to have two different not-quite-the-same implementations, one in Sema and one in CodeGen. Note that we still do not attempt to perform the named return value optimization, so we miss copy elisions for return values and throw expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100196 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaInit.cpp
|
965bb710410b94a6f07cb3dc90eec37b48a887f7 |
02-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
If a constructor is a dependent context, just set the base and member initializers as they are written. Fixes a bug where we wouldn't show initialization order warnings when instantiating. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100180 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
bcc12fdaa7b3276b46c8e1349d5c99fd42d6a0a1 |
02-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
If a constructor is a dependent context, just set the base and member initializers as they are written. Fixes a bug where we wouldn't show initialization order warnings when instantiating. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100180 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
c8514b424c6d536d81aa2b0323eaf9cd45e404a3 |
02-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Diagnose multiple base and member initializers in class templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100179 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
ea356fb65cc844abeab1176f6333a86b69644735 |
02-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Diagnose multiple base and member initializers in class templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100179 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
5ae999a9e008f69a57b07b71af06558e4fe710cf |
02-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
More cleanup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100175 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
ec3332bcae6466dc69227742d2c4145fbe88e975 |
02-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
More cleanup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100175 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
c3fc84de310ca8f412abda63234f04825fa0124c |
02-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Constify. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100174 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
071d61043ab85112e65f336ae35692eba834810c |
02-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Constify. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100174 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
dc99e16478341492f688b1cd84c5850409b2ee41 |
02-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Minor cleanup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100173 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
58cfbdef4dfcc82e98b935d8848411b84d7d6167 |
02-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Minor cleanup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100173 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
db63bb46c37aeb2386e38eafa278b1bcecb8b21c |
02-Apr-2010 |
John McCall <rjmccall@apple.com> |
Correct the calculation of access to more closely model the wording in the standard. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100155 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
db73c684ba61fed4087af488e8610657ec638c17 |
02-Apr-2010 |
John McCall <rjmccall@apple.com> |
Correct the calculation of access to more closely model the wording in the standard. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100155 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
cf55da21e5dfda9fa270cbad1ef65b12e8592657 |
02-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Minor cleanup with the ternary operator git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100144 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
1927b1f1d3194c1b9e7c3fa622542dd244f1a963 |
02-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Minor cleanup with the ternary operator git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100144 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
d6fca263d64854e60e33f3850ef421e25c18a526 |
01-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Overhaul checking of non-type template arguments that should refer to an object or function. Our previous checking was too lax, and ended up allowing missing or extraneous address-of operators, among other evils. The new checking provides better diagnostics and adheres more closely to the standard. Fixes PR6563 and PR6749. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100125 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaOverload.cpp
emaTemplate.cpp
|
b7a09260204f2079e0f998bf7ee52b95122a4c5d |
01-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Overhaul checking of non-type template arguments that should refer to an object or function. Our previous checking was too lax, and ended up allowing missing or extraneous address-of operators, among other evils. The new checking provides better diagnostics and adheres more closely to the standard. Fixes PR6563 and PR6749. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100125 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaOverload.cpp
emaTemplate.cpp
|
9996ae3774eeffe8d7109180dbd73dead61eab0a |
01-Apr-2010 |
Daniel Dunbar <daniel@zuster.org> |
Fix -Asserts warning, and protect against missing case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100115 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
12c0ade49d0063fb651af56e8dda5597c5d780a8 |
01-Apr-2010 |
Daniel Dunbar <daniel@zuster.org> |
Fix -Asserts warning, and protect against missing case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100115 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
9feb1a3680892a470ae5744ad95be2f61ad9a1be |
01-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve diagnostics when an elaborated-type-specifer containing a nested-name-specifier (e.g., "class T::foo") fails to find a tag member in the scope nominated by the nested-name-specifier. Previously, we gave a bland error: 'Nested' does not name a tag member in the specified scope which didn't actually say where we were looking, which was rather horrible when the nested-name-specifier was instantiated. Now, we give something a bit better: error: no class named 'Nested' in 'NoDepBase<T>' git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100060 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
1eabb7d0c30f6a876b0fd03ad4656c096c26b8d0 |
01-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Improve diagnostics when an elaborated-type-specifer containing a nested-name-specifier (e.g., "class T::foo") fails to find a tag member in the scope nominated by the nested-name-specifier. Previously, we gave a bland error: 'Nested' does not name a tag member in the specified scope which didn't actually say where we were looking, which was rather horrible when the nested-name-specifier was instantiated. Now, we give something a bit better: error: no class named 'Nested' in 'NoDepBase<T>' git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100060 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
ec6d392c816684e9679a3d04f742fa3991f5fe1e |
01-Apr-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Change the representation of dependent elaborated-type-specifiers (such as "class T::foo") from an ElaboratedType of a TypenameType to a DependentNameType, which more accurately models the underlying concept. Improve template instantiation for DependentNameType nodes that represent nested-name-specifiers, by performing tag name lookup and checking the resulting tag appropriately. Fixes PR5681. There is still much testing and cleanup to do in this area. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100054 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplate.cpp
reeTransform.h
|
4033642464e8ba0982f88f34cffad808d247b393 |
01-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Change the representation of dependent elaborated-type-specifiers (such as "class T::foo") from an ElaboratedType of a TypenameType to a DependentNameType, which more accurately models the underlying concept. Improve template instantiation for DependentNameType nodes that represent nested-name-specifiers, by performing tag name lookup and checking the resulting tag appropriately. Fixes PR5681. There is still much testing and cleanup to do in this area. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100054 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplate.cpp
reeTransform.h
|
ca7a15360ebda535be0f3281baf6bd4310b9b6d4 |
31-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Extend DependentNameType with a keyword enum that specifies whether this was parsed as a typename-specifier, elaborated-type-specifier (including the kind), or just a dependent qualified type name. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100039 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplate.cpp
emaType.cpp
reeTransform.h
|
4a2023f5014e82389d5980d307b89c545dbbac81 |
31-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Extend DependentNameType with a keyword enum that specifies whether this was parsed as a typename-specifier, elaborated-type-specifier (including the kind), or just a dependent qualified type name. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100039 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplate.cpp
emaType.cpp
reeTransform.h
|
5e9bf906135b0bb164567d049121e070520695bd |
31-Mar-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Re-bind non-dependent CXXTemporaryObjectExpr nodes as temporaries when instantiating a template, which ensures the destructor is called. This fixes PR6671. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100029 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
a3ce8ae36144991fa125dafc5345a03cc875e503 |
31-Mar-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Re-bind non-dependent CXXTemporaryObjectExpr nodes as temporaries when instantiating a template, which ensures the destructor is called. This fixes PR6671. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100029 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
0d2aaec3c0c7e5b992f1c4fc083a673ec48da495 |
31-Mar-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch implements gcc's -Wno-protocol option to suppress warning on unimplemented methods in protocols adopted by a class. (radar 7056600). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100028 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
521468391c0abbbfcf6b257442630c70314b8576 |
31-Mar-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch implements gcc's -Wno-protocol option to suppress warning on unimplemented methods in protocols adopted by a class. (radar 7056600). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100028 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
b88ea9f1d1a402b0c9479c1c71a10cf65a5d4157 |
31-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Reinstate my CodeModificationHint -> FixItHint renaming patch, without the C-only "optimization". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100022 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExceptionSpec.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaStmt.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaType.cpp
|
849b243d4065f56742a4677d6dc8277609a151f8 |
31-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Reinstate my CodeModificationHint -> FixItHint renaming patch, without the C-only "optimization". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100022 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExceptionSpec.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaStmt.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaType.cpp
|
725b41e4eefc6d19b6215f24489acbc2e1641765 |
31-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Rename TypenameType to DependentNameType in anticipation of some refactoring work in this area. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100019 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaType.cpp
reeTransform.h
|
4714c12a1ab759156b78be8f109ea4c12213af57 |
31-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Rename TypenameType to DependentNameType in anticipation of some refactoring work in this area. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100019 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaType.cpp
reeTransform.h
|
100fdef5f9490615be95cc921c88cdba11c36d85 |
31-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Revert r100008, which inexplicably breaks the clang-i686-darwin10 builder git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100018 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExceptionSpec.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaStmt.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaType.cpp
|
275313cbb0847f1f117f60d144d113804d4fa42d |
31-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Revert r100008, which inexplicably breaks the clang-i686-darwin10 builder git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100018 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExceptionSpec.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaStmt.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaType.cpp
|
e885f84e7a6e363a54b9100afd1c63364808d959 |
31-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Rename CodeModificationHint to FixItHint, since we've been using the term "fix-it" everywhere and even *I* get tired of long names sometimes. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100008 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExceptionSpec.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaStmt.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaType.cpp
|
d0ebe080eee7c37e73754068b47fd90cc506e128 |
31-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Rename CodeModificationHint to FixItHint, since we've been using the term "fix-it" everywhere and even *I* get tired of long names sometimes. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100008 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExceptionSpec.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaStmt.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaType.cpp
|
7ddb2dbe53a1be25f7827f5df2d5221158374d24 |
31-Mar-2010 |
John McCall <rjmccall@apple.com> |
Support __attribute__((unused)) on types. This suddenly started firing a lot for me on selfhosts, I dunno why. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99981 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
|
aec586056d8670c99ba7c4833be13e4eb123cddb |
31-Mar-2010 |
John McCall <rjmccall@apple.com> |
Support __attribute__((unused)) on types. This suddenly started firing a lot for me on selfhosts, I dunno why. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99981 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
|
526f9e13bed9243e18ad16e19d5b0cc6a149bdec |
31-Mar-2010 |
John McCall <rjmccall@apple.com> |
Fix PR6327: restore invariants when there's a parse error in an initializer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99980 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
7727acf243ee61c0757d86c95b69dbee56a3d898 |
31-Mar-2010 |
John McCall <rjmccall@apple.com> |
Fix PR6327: restore invariants when there's a parse error in an initializer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99980 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
504813dc37b3b584f722ac1acdb3d2e64c78998f |
31-Mar-2010 |
John McCall <rjmccall@apple.com> |
Regularize support for naming conversion functions in using decls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99979 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
|
32daa4223ccb2c0afe5fbe151c6eb1ab64816957 |
31-Mar-2010 |
John McCall <rjmccall@apple.com> |
Regularize support for naming conversion functions in using decls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99979 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
|
b28e006e904273e8215c3d51612fbbd5dfc14f92 |
31-Mar-2010 |
John McCall <rjmccall@apple.com> |
Remove silly temporary comment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99964 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
bd63e02a0deb0fdaec708c7a4b4c7073937fd67d |
31-Mar-2010 |
John McCall <rjmccall@apple.com> |
Remove silly temporary comment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99964 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
27160d35e436d2611ade7eb76d31da99b38a32ac |
31-Mar-2010 |
John McCall <rjmccall@apple.com> |
Introduce a new kind of derived-to-base cast which bypasses the need for null checks, and make sure we elide null checks when accessing base class members. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99963 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
23cba801e11b03929c44f8cf54578305963a3476 |
31-Mar-2010 |
John McCall <rjmccall@apple.com> |
Introduce a new kind of derived-to-base cast which bypasses the need for null checks, and make sure we elide null checks when accessing base class members. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99963 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
71a485241b128a1dde3e1826184b354fc5121d89 |
31-Mar-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Recognize __attribute__((NSObject)) directly applied on retain properties. (radar 7809468). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99951 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaObjCProperty.cpp
|
842f07b065ac481fce9d82d55cb62e36bac6c921 |
31-Mar-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Recognize __attribute__((NSObject)) directly applied on retain properties. (radar 7809468). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99951 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaObjCProperty.cpp
|
643e3c96e62d4c8c8ff37f8cc13fd9494f478766 |
31-Mar-2010 |
John McCall <rjmccall@apple.com> |
Fix an oversight with access control for address-of-function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99942 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
e2f5ba9d80cfadbb3e1dafb9f375eb526f669b85 |
31-Mar-2010 |
John McCall <rjmccall@apple.com> |
Fix an oversight with access control for address-of-function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99942 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
2ffdc0f8242c22c4bca8bbc2390be61a8a80e4b8 |
31-Mar-2010 |
Rafael Espindola <rafael.espindola@gmail.com> |
Remember the regparm attribute in FunctionType::ExtInfo. Fixes PR3782. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99940 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaType.cpp
|
425ef72306d4ff6b3698b744353e5f0e56b4b884 |
31-Mar-2010 |
Rafael Espindola <rafael.espindola@gmail.com> |
Remember the regparm attribute in FunctionType::ExtInfo. Fixes PR3782. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99940 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaType.cpp
|
0c525edf14d4cf5aaf8f6954433c0476d0bc6a65 |
30-Mar-2010 |
John McCall <rjmccall@apple.com> |
Propagate the "found declaration" (i.e. the using declaration instead of the underlying/instantiated decl) through a lot of API, including "intermediate" MemberExprs required for (e.g.) template instantiation. This is necessary because of the access semantics of member accesses to using declarations: only the base class *containing the using decl* need be accessible from the naming class. This allows us to complete an access-controlled selfhost, if there are no recent regressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99936 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaAccess.cpp
emaCXXCast.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaInit.h
emaOverload.cpp
emaStmt.cpp
emaTemplate.cpp
emaType.cpp
reeTransform.h
|
6bb8017bb9e828d118e15e59d71c66bba323c364 |
30-Mar-2010 |
John McCall <rjmccall@apple.com> |
Propagate the "found declaration" (i.e. the using declaration instead of the underlying/instantiated decl) through a lot of API, including "intermediate" MemberExprs required for (e.g.) template instantiation. This is necessary because of the access semantics of member accesses to using declarations: only the base class *containing the using decl* need be accessible from the naming class. This allows us to complete an access-controlled selfhost, if there are no recent regressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99936 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaAccess.cpp
emaCXXCast.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaInit.h
emaOverload.cpp
emaStmt.cpp
emaTemplate.cpp
emaType.cpp
reeTransform.h
|
1fcc6d593c85584900a084a3c584237f1b123ab1 |
30-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve diagnostics when printing a template instantiation backtrace involving substitution of deduced template arguments into a class template partial specialization or function template, or when substituting explicitly-specific template arguments into a function template. We now print the actual deduced argument bindings so the user can see what got deduced. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99923 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
5e40291d13ed2d7711235df947a2a18a925c7536 |
30-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Improve diagnostics when printing a template instantiation backtrace involving substitution of deduced template arguments into a class template partial specialization or function template, or when substituting explicitly-specific template arguments into a function template. We now print the actual deduced argument bindings so the user can see what got deduced. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99923 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
433d7d2c70b9be3f9edd40579f512ecab8755049 |
30-Mar-2010 |
Rafael Espindola <rafael.espindola@gmail.com> |
the big refactoring bits of PR3782. This introduces FunctionType::ExtInfo to hold the calling convention and the noreturn attribute. The next patch will extend it to include the regparm attribute and fix the bug. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99920 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExceptionSpec.cpp
emaExpr.cpp
emaExprCXX.cpp
emaLookup.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
|
264ba48dc98f3f843935a485d5b086f7e0fdc4f1 |
30-Mar-2010 |
Rafael Espindola <rafael.espindola@gmail.com> |
the big refactoring bits of PR3782. This introduces FunctionType::ExtInfo to hold the calling convention and the noreturn attribute. The next patch will extend it to include the regparm attribute and fix the bug. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99920 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExceptionSpec.cpp
emaExpr.cpp
emaExprCXX.cpp
emaLookup.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
|
8b4dd8d60bb7f244c084c62d42b2ad3f0d46f9fd |
30-Mar-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Add Support for 'warn_unused_result" attribute on objective-c methods. (radar 7418262). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99903 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaStmt.cpp
|
f031774aa2638b4d3f487e7e44180c1f89b867ef |
30-Mar-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Add Support for 'warn_unused_result" attribute on objective-c methods. (radar 7418262). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99903 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaStmt.cpp
|
2fadf2bdba7ab64df236ccb2f7c8216c3f6e41e8 |
30-Mar-2010 |
Anders Carlsson <andersca@mac.com> |
Fix a bug where we would incorrectly report an error about initializing two fields in an anonymous struct. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99891 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
ee11b2dd530f3fb873e108f21341626168758a45 |
30-Mar-2010 |
Anders Carlsson <andersca@mac.com> |
Fix a bug where we would incorrectly report an error about initializing two fields in an anonymous struct. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99891 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
08d0d00531ec4f3bf09c07df3485861b71282541 |
30-Mar-2010 |
Anders Carlsson <andersca@mac.com> |
Reduce nesting. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99889 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
8f1a24071faabf5796eb7dc1b19be52dc1a2d324 |
30-Mar-2010 |
Anders Carlsson <andersca@mac.com> |
Reduce nesting. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99889 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
8072597e1d95bcd34bf81697f2eeff70c1a54909 |
30-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Optimize PartialDiagnostic's memory-allocation behavior by placing a cache of PartialDiagnostic::Storage objects into an allocator within the ASTContext. This eliminates a significant amount of malloc traffic, for a 10% performance improvement in -fsyntax-only wall-clock time with 403.gcc's combine.c. Also, eliminate the RequireNonAbstractType hack I put in earlier, which was but a symptom of this larger problem. Fixes <rdar://problem/7806091>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99849 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaAccess.cpp
emaCXXCast.cpp
emaDeclCXX.cpp
emaExceptionSpec.cpp
emaExpr.cpp
emaOverload.cpp
emaStmt.cpp
emaTemplate.cpp
emaType.cpp
|
fe6b2d481d91140923f4541f273b253291884214 |
30-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Optimize PartialDiagnostic's memory-allocation behavior by placing a cache of PartialDiagnostic::Storage objects into an allocator within the ASTContext. This eliminates a significant amount of malloc traffic, for a 10% performance improvement in -fsyntax-only wall-clock time with 403.gcc's combine.c. Also, eliminate the RequireNonAbstractType hack I put in earlier, which was but a symptom of this larger problem. Fixes <rdar://problem/7806091>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99849 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaAccess.cpp
emaCXXCast.cpp
emaDeclCXX.cpp
emaExceptionSpec.cpp
emaExpr.cpp
emaOverload.cpp
emaStmt.cpp
emaTemplate.cpp
emaType.cpp
|
8034ffc731b6302cc24f2d60b89ad4833b99e465 |
29-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Exit early from the simple form of Sema::RequireNonAbstractType(), for a 2.47% speedup in 403.gcc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99830 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
cb9bafeb9bcd8c92ab9647a4a3f074180ce6dedb |
29-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Exit early from the simple form of Sema::RequireNonAbstractType(), for a 2.47% speedup in 403.gcc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99830 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
4a47dbe2988978fb5f6316fe82a34174ffee61a5 |
29-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Support __attribute__((packed)) (along with other attributes) at the end of a struct/class/union in C++, from Justin Bogner! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99811 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
0b4c9b5834a0a5520d2cd32227a53cf7f73fedca |
29-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Support __attribute__((packed)) (along with other attributes) at the end of a struct/class/union in C++, from Justin Bogner! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99811 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
fdee3fd78798a34a1b2215f48199196c1fb0ad3a |
29-Mar-2010 |
Rafael Espindola <rafael.espindola@gmail.com> |
Be a bit more consistent in using operator-> This patch moves some methods from QualType to Type and changes the users to use -> instead of . git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99805 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
802c66edc5073991f2315ea84ecace1867c6027f |
29-Mar-2010 |
Rafael Espindola <rafael.espindola@gmail.com> |
Be a bit more consistent in using operator-> This patch moves some methods from QualType to Type and changes the users to use -> instead of . git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99805 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
0672dde9c095c3e894519ed66aed2bfff9fbf250 |
28-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
After performing template argument deduction for a function template, check deduced non-type template arguments and template template arguments against the template parameters for which they were deduced, performing conversions as appropriate so that deduced template arguments get the same treatment as explicitly-specified template arguments. This is the bulk of PR6723. Also keep track of whether deduction of a non-type template argument came from an array bound (vs. anywhere else). With this information, we enforce C++ [temp.deduct.type]p17, which requires exact type matches when deduction deduces a non-type template argument from something that is not an array bound. Finally, when in a SFINAE context, translate the "zero sized arrays are an extension" extension diagnostic into a hard error (for better standard conformance), which was a minor part of PR6723. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99734 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaTemplate.h
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaType.cpp
|
02024a9f0d8e6c898de276193af604c42ee41269 |
28-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
After performing template argument deduction for a function template, check deduced non-type template arguments and template template arguments against the template parameters for which they were deduced, performing conversions as appropriate so that deduced template arguments get the same treatment as explicitly-specified template arguments. This is the bulk of PR6723. Also keep track of whether deduction of a non-type template argument came from an array bound (vs. anywhere else). With this information, we enforce C++ [temp.deduct.type]p17, which requires exact type matches when deduction deduces a non-type template argument from something that is not an array bound. Finally, when in a SFINAE context, translate the "zero sized arrays are an extension" extension diagnostic into a hard error (for better standard conformance), which was a minor part of PR6723. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99734 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaTemplate.h
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaType.cpp
|
06cf8c47e850e25a32f49e0a7f7ef075d1ec8b6b |
27-Mar-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Further improvement to point to category whose protocolls methods needs implementation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99730 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
f28385991fa724ac0bd6017d709f17b1838cfea3 |
27-Mar-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Further improvement to point to category whose protocolls methods needs implementation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99730 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
5aaa6056a54d4c14f54e8292c90955e08c19076f |
27-Mar-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Improve diagnostics on incomplete implementation of objc classes; including which methods need be implemented and where they come from. WIP. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99724 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
8822f7cda557ffa755c16b5c978dada23c37d6be |
27-Mar-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Improve diagnostics on incomplete implementation of objc classes; including which methods need be implemented and where they come from. WIP. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99724 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
617075109ba76eeca54d955f7128481a26868b89 |
27-Mar-2010 |
John McCall <rjmccall@apple.com> |
Accumulate all functions and classes that the effective context is nested within, and suddenly local classes start working. Wouldn't be necessary if I hadn't used local classes in Clang in the first place. Or, well, wouldn't be necessary yet. :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99709 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
2cc2675d426af23476a9722c08c1b6c5266bd653 |
27-Mar-2010 |
John McCall <rjmccall@apple.com> |
Accumulate all functions and classes that the effective context is nested within, and suddenly local classes start working. Wouldn't be necessary if I hadn't used local classes in Clang in the first place. Or, well, wouldn't be necessary yet. :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99709 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
8b8e3a0b7b60524a996f116ff60a2915f92e12db |
27-Mar-2010 |
John McCall <rjmccall@apple.com> |
Implement method friends in class templates and fix a few related problems. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99708 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplateInstantiateDecl.cpp
|
b0cb022daec8671406ab25f4b5d5a6d48d823bc4 |
27-Mar-2010 |
John McCall <rjmccall@apple.com> |
Implement method friends in class templates and fix a few related problems. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99708 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplateInstantiateDecl.cpp
|
217251739e8d8a46c4116920101bfefe587560d8 |
27-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Remove unused static function git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99666 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
dec4c248f4c13c99d25e07f9e4e3f9f75c0772cb |
27-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Remove unused static function git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99666 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
141073cbdbea3042a751a45cef3e9e5c5d1ffe96 |
27-Mar-2010 |
John McCall <rjmccall@apple.com> |
Put function templates instantiated from friend declarations in the correct lexical context. This is required for ADL to work properly; fixes PR6716. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99665 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
b1a56e767cfb645fcb25027ab728dd5824d92615 |
27-Mar-2010 |
John McCall <rjmccall@apple.com> |
Put function templates instantiated from friend declarations in the correct lexical context. This is required for ADL to work properly; fixes PR6716. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99665 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
3250b69871854e93f636d13d658be8b44afdd79a |
26-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Compare namespaces properly when looking for redeclarations of namespace aliases. Fixes PR6341. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99664 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
c67b03260dbf4127e09b03302ff844a24e41394f |
26-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Compare namespaces properly when looking for redeclarations of namespace aliases. Fixes PR6341. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99664 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
ef47ea346afa3e8e7df66476f91f901b9d350681 |
26-Mar-2010 |
Ted Kremenek <kremenek@apple.com> |
Add comment indicating that we intentionally don't add the noreturn attribute to a FunctionDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99662 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
79f5e512d5f930d7ed30c76d3354accd832edd8a |
26-Mar-2010 |
Ted Kremenek <kremenek@apple.com> |
Add comment indicating that we intentionally don't add the noreturn attribute to a FunctionDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99662 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
65fd9d2a9ef6e8bbcf7586a3c2793ae276d1a0bf |
26-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When adding initializers to a constructor, be sure that we are looking through the bases and fields of the definition of the class in which the constructor is declared, rather than some other declaration of that class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99661 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
d6068482648a366ac9fc297a84780e922ab63a7a |
26-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
When adding initializers to a constructor, be sure that we are looking through the bases and fields of the definition of the class in which the constructor is declared, rather than some other declaration of that class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99661 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
a0c135feb0abe5ae7c2464085a6545d95a2f8d6c |
26-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When trying to determine whether one operand of a conditional expression can be converted to the type of another, only apply the lvalue-to-rvalue conversion to the type of the expression we're converting, *not* the array-to-pointer or function-to-pointer conversions. Fixes PR6595. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99652 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
0fd8ff73630adab9a33123f23ef62fcf5c3cf326 |
26-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
When trying to determine whether one operand of a conditional expression can be converted to the type of another, only apply the lvalue-to-rvalue conversion to the type of the expression we're converting, *not* the array-to-pointer or function-to-pointer conversions. Fixes PR6595. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99652 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
1967e89849e5441a0a07c6caa0e245f4360a8686 |
26-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Eliminate the non-InitializedEntity PerformCopyInitialization() and re-route its only caller to the newer PerformCopyInitialization(). We're down to one remaining caller of Sema::CheckReferenceInit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99650 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
emaOverload.cpp
|
29ecaba4ebe8c9a2627cf405e36473b764cc5cfd |
26-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Eliminate the non-InitializedEntity PerformCopyInitialization() and re-route its only caller to the newer PerformCopyInitialization(). We're down to one remaining caller of Sema::CheckReferenceInit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99650 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
emaOverload.cpp
|
bebe8c9e574bf64101182480ce5d503862c49bda |
26-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Switch semantic analysis of the conditional operator from using CheckReferenceInit to using the new initialization sequence code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99647 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaInit.cpp
emaInit.h
|
b70cf44bf1b1956e0c6b98373c4f69b23afa0052 |
26-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Switch semantic analysis of the conditional operator from using CheckReferenceInit to using the new initialization sequence code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99647 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaInit.cpp
emaInit.h
|
3c4dfaf099f7045097f3d6108ebb6e2c2864bb92 |
26-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Do not mark the destructor of a function parameter's type. Fixes PR6709. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99615 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
9c127392efe91dadacbe28ca16b8a9a5fa7990b3 |
26-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Do not mark the destructor of a function parameter's type. Fixes PR6709. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99615 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
182988eb864b4e074000fcad862cc9570e7bc263 |
26-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When deducing an integral template argument for a non-type template parameter, keep the integral value exactly as it was in the source code rather than trying to convert it to the type of the non-type template parameter (which may still be dependent!). The value will then be converted to the appropriate type once we check the resulting template arguments. Fixes PR6707. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99611 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
9d0e441036de0faa59d8039ce0c9967bda112c7f |
26-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
When deducing an integral template argument for a non-type template parameter, keep the integral value exactly as it was in the source code rather than trying to convert it to the type of the non-type template parameter (which may still be dependent!). The value will then be converted to the appropriate type once we check the resulting template arguments. Fixes PR6707. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99611 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
cc8144959148fe728db387c634efb7a03b9f22cb |
26-Mar-2010 |
John McCall <rjmccall@apple.com> |
Reapply r99596 with a fix: link an instantiated friend function to its pattern if it has a body. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99610 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaTemplateInstantiateDecl.cpp
|
d325daa506338ab86f9dd468b48fd010673f49a6 |
26-Mar-2010 |
John McCall <rjmccall@apple.com> |
Reapply r99596 with a fix: link an instantiated friend function to its pattern if it has a body. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99610 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaTemplateInstantiateDecl.cpp
|
1213266e99bd23dc6a2380dbd9e7f1c7a38c495b |
26-Mar-2010 |
John McCall <rjmccall@apple.com> |
Apparently that didn't work. Reverting for now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99601 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaTemplateInstantiateDecl.cpp
|
a7bc8559b40a78d664d6c7faf4b42ff21184c146 |
26-Mar-2010 |
John McCall <rjmccall@apple.com> |
Apparently that didn't work. Reverting for now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99601 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaTemplateInstantiateDecl.cpp
|
0b78b4be04aa2e9776faae391694b7dd147d7409 |
26-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Reinstate change to non-type template arguments of integral type, so that we extend/truncate then correct the sign to convert the non-type template argument to the template parameter's type. Previously, we reported an error when the non-type template argument was out of range; now we just warn. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99600 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
1a6e03457ebafd6ac523cdcf5d6b6f411ea08772 |
26-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Reinstate change to non-type template arguments of integral type, so that we extend/truncate then correct the sign to convert the non-type template argument to the template parameter's type. Previously, we reported an error when the non-type template argument was out of range; now we just warn. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99600 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
f3f8da247e0938cf3aa90eb7d39113506c976987 |
26-Mar-2010 |
John McCall <rjmccall@apple.com> |
Properly instantiate and link in friend function templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99596 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaTemplateInstantiateDecl.cpp
|
d7e29e114d20da5b83e0cb7bc29ec717a7458cb1 |
26-Mar-2010 |
John McCall <rjmccall@apple.com> |
Properly instantiate and link in friend function templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99596 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaTemplateInstantiateDecl.cpp
|
53e3c53565d28d6de1129cad9d936693d84ac699 |
26-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Revert attempted fix for integral template arguments. It seems to have broken tramp3d-v4. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99583 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
0d4fd8ef35ecd73ce6388cb5a6fdcfb15171f5aa |
26-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Revert attempted fix for integral template arguments. It seems to have broken tramp3d-v4. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99583 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
b205bcd02b9fc20ebb709a9033ad419555b0a23a |
26-Mar-2010 |
Rafael Espindola <rafael.espindola@gmail.com> |
Mark virtual methods that are used in tables included in VTTs as used. Fixes PR6706. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99582 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
3e1ae9381b11ed565df6c4f2cbd22a6479af742e |
26-Mar-2010 |
Rafael Espindola <rafael.espindola@gmail.com> |
Mark virtual methods that are used in tables included in VTTs as used. Fixes PR6706. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99582 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
64ac3debd659a8afb761bd926474a27b7344ff5e |
25-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Warn when the conversion of an integral non-type template argument to the type of its corresponding non-type template parameter changes the value. Previously, we were diagnosing this as an error, which was wrong. We give reasonably nice warnings like: test/SemaTemplate/temp_arg_nontype.cpp:100:10: warning: non-type template argument value '256' truncated to '0' for template parameter of type 'unsigned char' Overflow<256> *overflow3; // expected-warning{{non-type template ... ^~~ test/SemaTemplate/temp_arg_nontype.cpp:96:24: note: template parameter is declared here template<unsigned char C> struct Overflow; ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99561 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
684d096c204c5eef29c10777bce890400d235d8c |
25-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Warn when the conversion of an integral non-type template argument to the type of its corresponding non-type template parameter changes the value. Previously, we were diagnosing this as an error, which was wrong. We give reasonably nice warnings like: test/SemaTemplate/temp_arg_nontype.cpp:100:10: warning: non-type template argument value '256' truncated to '0' for template parameter of type 'unsigned char' Overflow<256> *overflow3; // expected-warning{{non-type template ... ^~~ test/SemaTemplate/temp_arg_nontype.cpp:96:24: note: template parameter is declared here template<unsigned char C> struct Overflow; ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99561 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
78dc67e0d8836ec6de51c3091fd5bd0314b076f1 |
25-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Teach the diagnostic engine to provide more detailed information about how to handle a diagnostic during template argument deduction, which may be "substitution failure", "suppress", or "report". This keeps us from, e.g., emitting warnings while performing template argument deduction. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99560 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
|
eab5d1eaaa662c849f1f9920dc8c6a31d7c32d47 |
25-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Teach the diagnostic engine to provide more detailed information about how to handle a diagnostic during template argument deduction, which may be "substitution failure", "suppress", or "report". This keeps us from, e.g., emitting warnings while performing template argument deduction. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99560 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
|
cd62ff3b5e6cdb764229a8971654fea6f7593406 |
25-Mar-2010 |
John McCall <rjmccall@apple.com> |
When finishing a function definition, leave the function definition *after* doing all the cleanup tasks and checks. This gives us the proper context for checking access to base and member destructors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99559 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
90f97892eb8b2ecfcf633c9df01e2504686d4d96 |
25-Mar-2010 |
John McCall <rjmccall@apple.com> |
When finishing a function definition, leave the function definition *after* doing all the cleanup tasks and checks. This gives us the proper context for checking access to base and member destructors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99559 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
50058225226bb6f259021046147eed5af7690dc4 |
25-Mar-2010 |
John McCall <rjmccall@apple.com> |
Fix a very minor oversight in privileges-elevation: we were only considering friendship for a derived class if the base class specifier was non-public, and thus not considering friendship for non-public members of public bases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99554 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
e06c1a13172bd6ef38fe927d72198ab3f97c0b4a |
25-Mar-2010 |
John McCall <rjmccall@apple.com> |
Fix a very minor oversight in privileges-elevation: we were only considering friendship for a derived class if the base class specifier was non-public, and thus not considering friendship for non-public members of public bases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99554 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
ee5a098418edb1dcd63a7a7543bce045464b5702 |
25-Mar-2010 |
John McCall <rjmccall@apple.com> |
Handle simple friend-class decls in class templates better by ensuring that we look for shadow friend decls in the appropriate scope before injecting a new declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99552 91177308-0d34-0410-b5e6-96231b3b80d8
ookup.h
emaDecl.cpp
|
9c86b513cb42ea6d9e3f98cb2b7eda39a2eb526b |
25-Mar-2010 |
John McCall <rjmccall@apple.com> |
Handle simple friend-class decls in class templates better by ensuring that we look for shadow friend decls in the appropriate scope before injecting a new declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99552 91177308-0d34-0410-b5e6-96231b3b80d8
ookup.h
emaDecl.cpp
|
65996191d65b20494b4015b62642b0eff5675617 |
25-Mar-2010 |
John McCall <rjmccall@apple.com> |
Preserve type-source information in friend declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99525 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaDeclCXX.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
32f2fb53d9d7c28c94d8569fd0fcf06cccee0c3d |
25-Mar-2010 |
John McCall <rjmccall@apple.com> |
Preserve type-source information in friend declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99525 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaDeclCXX.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
d39a5e7bb75d659025762c035dade1bfc2dddd2a |
25-Mar-2010 |
Daniel Dunbar <daniel@zuster.org> |
Remove support for nand atomic builtins. They are inconsistently implemented in gcc, and the common expectation seems to be that they are unused. If and when someone cares we can add them back with well documented demantics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99522 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
7eff7c4153faf45b19b5919ef409ee5f6794eb25 |
25-Mar-2010 |
Daniel Dunbar <daniel@zuster.org> |
Remove support for nand atomic builtins. They are inconsistently implemented in gcc, and the common expectation seems to be that they are unused. If and when someone cares we can add them back with well documented demantics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99522 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
443c72eee72b317222989aa04739e3d63c8224e5 |
25-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve our handling of local instantiation scopes in two related ways: - When substituting template arguments as part of template argument deduction, introduce a new local instantiation scope. - When substituting into a function prototype type, introduce a new "temporary" local instantiation scope that merges with its outer scope but also keeps track of any additions it makes, removing them when we exit that scope. Fixes PR6700, where we were getting too much mixing of local instantiation scopes due to template argument deduction that substituted results into function types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99509 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
|
2b0749a4f8965d0205bf77322db150c13c39e3be |
25-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Improve our handling of local instantiation scopes in two related ways: - When substituting template arguments as part of template argument deduction, introduce a new local instantiation scope. - When substituting into a function prototype type, introduce a new "temporary" local instantiation scope that merges with its outer scope but also keeps track of any additions it makes, removing them when we exit that scope. Fixes PR6700, where we were getting too much mixing of local instantiation scopes due to template argument deduction that substituted results into function types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99509 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
|
1b3f55480416daef004224857db283e01658289f |
25-Mar-2010 |
John McCall <rjmccall@apple.com> |
Properly instantiate friend class template declarations and link them into the redeclaration chain. Recommitted from r99477 with a fix: we need to merge in default template arguments from previous declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99496 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaTemplateInstantiateDecl.cpp
|
93ba8579c341d5329175f1413cdc3b35a36592d2 |
25-Mar-2010 |
John McCall <rjmccall@apple.com> |
Properly instantiate friend class template declarations and link them into the redeclaration chain. Recommitted from r99477 with a fix: we need to merge in default template arguments from previous declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99496 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaTemplateInstantiateDecl.cpp
|
faf59c9d3b36b732f421e23c1dab53068d7c200a |
25-Mar-2010 |
Bob Wilson <bob.wilson@apple.com> |
Revert 99477 since it appears to be breaking the clang-x86_64-darwin10-fnt buildbot. The tramp3d test fails. --- Reverse-merging r99477 into '.': U test/SemaTemplate/friend-template.cpp U test/CXX/temp/temp.decls/temp.friend/p1.cpp U lib/Sema/SemaTemplateInstantiateDecl.cpp U lib/Sema/SemaAccess.cpp git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99481 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaTemplateInstantiateDecl.cpp
|
e131c574c7baa28eb0759181478d710a2aa60cb6 |
25-Mar-2010 |
Bob Wilson <bob.wilson@apple.com> |
Revert 99477 since it appears to be breaking the clang-x86_64-darwin10-fnt buildbot. The tramp3d test fails. --- Reverse-merging r99477 into '.': U test/SemaTemplate/friend-template.cpp U test/CXX/temp/temp.decls/temp.friend/p1.cpp U lib/Sema/SemaTemplateInstantiateDecl.cpp U lib/Sema/SemaAccess.cpp git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99481 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaTemplateInstantiateDecl.cpp
|
dcebee4d43840bfac05064f12906f659b0eeb79d |
25-Mar-2010 |
Ted Kremenek <kremenek@apple.com> |
Fix two bugs in format-string checking: (1) Do not assume the data arguments start after the format string (2) Do not use the fact that a function is variadic to treat it like a va_list printf function Fixes PR 6697. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99480 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
6ee765348b2855c702fa593fb030ef6abe0d01f6 |
25-Mar-2010 |
Ted Kremenek <kremenek@apple.com> |
Fix two bugs in format-string checking: (1) Do not assume the data arguments start after the format string (2) Do not use the fact that a function is variadic to treat it like a va_list printf function Fixes PR 6697. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99480 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
46e4f0bea0b0373b99735606cdae116395e435e5 |
25-Mar-2010 |
John McCall <rjmccall@apple.com> |
Properly instantiate and link in friend-class-template declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99477 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaTemplateInstantiateDecl.cpp
|
a56623b01ed9f28f10416432d147c7a1729d5f1d |
25-Mar-2010 |
John McCall <rjmccall@apple.com> |
Properly instantiate and link in friend-class-template declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99477 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaTemplateInstantiateDecl.cpp
|
254934f2e7c6c8bcf9800b5403906fd554920f44 |
25-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Kill off two more uses of Sema::CheckReferenceInit in favor of the new initialization code. Exposed a bug where we were not marking an implicit conversion as an lvalue when we were forming a call to a conversion function whose return type is a reference. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99459 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaExprCXX.cpp
emaInit.cpp
|
f0e0b17d0504d25b4673de015cf7401e2296323c |
25-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Kill off two more uses of Sema::CheckReferenceInit in favor of the new initialization code. Exposed a bug where we were not marking an implicit conversion as an lvalue when we were forming a call to a conversion function whose return type is a reference. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99459 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaExprCXX.cpp
emaInit.cpp
|
1edf16100052a7355c8fc70f0ef67378666850c7 |
25-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Switch static_cast from the old reference-initialization code (via CheckReferenceInit) over to the new initialization code (InitializationSequence), which is better-tested and doesn't require us to compute the entire conversion sequence twice. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99452 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
c6e378e7d4e14b451f50158968d012dace6646d2 |
25-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Switch static_cast from the old reference-initialization code (via CheckReferenceInit) over to the new initialization code (InitializationSequence), which is better-tested and doesn't require us to compute the entire conversion sequence twice. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99452 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
2187bd5e166890241f1611afca7eb7f7e3e7a0fe |
24-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When pulling apart an initializer that involves a CXXConstructExpr, do not pick apart a CXXTemporaryObjectExpr because such an object construction was explicitly written in the source code. Fixes PR6657. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99427 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
28329e511854fdd3b31561b2690f91f9e6a6402e |
24-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
When pulling apart an initializer that involves a CXXConstructExpr, do not pick apart a CXXTemporaryObjectExpr because such an object construction was explicitly written in the source code. Fixes PR6657. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99427 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
7f7b289493b5f10ce5f7d7060334c1f4911a6a1a |
24-Mar-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Allow conversion of qualified Class type to unqualified Class type to match gcc's. Fixes radar 7789113. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99425 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
528adb129faa6e8ca17be561539c7eede1fc024d |
24-Mar-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Allow conversion of qualified Class type to unqualified Class type to match gcc's. Fixes radar 7789113. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99425 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
8d0e4cc4025742275594c78744bfc7ce7b267419 |
24-Mar-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Improve diagnostics when ivar added to class extension (radar 6812436). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99408 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f3c0bd58400b5a84d16376436e40af79e2d7b105 |
24-Mar-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Improve diagnostics when ivar added to class extension (radar 6812436). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99408 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
a1accc202df2b7f822d4aca445c9ed4f872eb56b |
24-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Silently drop dependent friend function template specializations, since we have absolutely no way to match them when they are declared nor do we have a way to represent these parsed-but-not-checked friend declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99407 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
036ada215d2c53e6a286b42d7cbd2386b0007516 |
24-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Silently drop dependent friend function template specializations, since we have absolutely no way to match them when they are declared nor do we have a way to represent these parsed-but-not-checked friend declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99407 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
81ca35c303f5ea9d08d64a09330ab3f83ecc4e3b |
24-Mar-2010 |
John McCall <rjmccall@apple.com> |
Walk out of enums when determining effective context. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99391 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
c1b621daf98d83075a466c6f4ad9904dc845dd09 |
24-Mar-2010 |
John McCall <rjmccall@apple.com> |
Walk out of enums when determining effective context. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99391 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
51963c2ede80ea75e3734ffb37d1cb4c9a804b51 |
24-Mar-2010 |
John McCall <rjmccall@apple.com> |
Correct that last fixit: if the user wrote template <> friend void foo(int); we need to change it to friend void foo<>(int); or else the user won't get the template specialization they obviously want. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99390 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
5fd378bd9bf1340cd1d1b1d63a5d41cbbc5a1a5e |
24-Mar-2010 |
John McCall <rjmccall@apple.com> |
Correct that last fixit: if the user wrote template <> friend void foo(int); we need to change it to friend void foo<>(int); or else the user won't get the template specialization they obviously want. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99390 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
98a1dadea132c8f5ba6c90f8ba8d262d11e04b39 |
24-Mar-2010 |
John McCall <rjmccall@apple.com> |
Support friend function specializations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99389 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaDecl.cpp
emaTemplate.cpp
|
7ad650f88ecbbe659f10f9f6b34a1f29ea9cf8f9 |
24-Mar-2010 |
John McCall <rjmccall@apple.com> |
Support friend function specializations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99389 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaDecl.cpp
emaTemplate.cpp
|
490a4b524bc8ec4bf23fa20e4b7173135fda7e91 |
24-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When a declaration of a function is missing an exception specification that was present in a prior declaration, emit a warning rather than a hard error (which we did before, and still do with mismatched exception specifications). Moreover, provide a fix-it hint with the throw() clause that should be added, e.g., t.C:10:7: warning: 'operator new' is missing exception specification 'throw(std::bad_alloc)' void *operator new(unsigned long sz) ^ throw(std::bad_alloc) As part of this, disable the warning when we're missing an exception specification on operator new, operator new[], operator delete, or operator delete[] when exceptions are turned off (-fno-exceptions). Fixes PR5957. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99388 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExceptionSpec.cpp
|
2eef829b19bdc59976a827fa39b409440e352bff |
24-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
When a declaration of a function is missing an exception specification that was present in a prior declaration, emit a warning rather than a hard error (which we did before, and still do with mismatched exception specifications). Moreover, provide a fix-it hint with the throw() clause that should be added, e.g., t.C:10:7: warning: 'operator new' is missing exception specification 'throw(std::bad_alloc)' void *operator new(unsigned long sz) ^ throw(std::bad_alloc) As part of this, disable the warning when we're missing an exception specification on operator new, operator new[], operator delete, or operator delete[] when exceptions are turned off (-fno-exceptions). Fixes PR5957. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99388 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExceptionSpec.cpp
|
ce381cff11e5dc61e24621bb26d4f9f3c07444ea |
24-Mar-2010 |
John McCall <rjmccall@apple.com> |
Implement a framework for the delay of arbitrary diagnostics within templates. So delay access-control diagnostics when (for example) the target of a friend declaration is a specific specialization of a template. I was surprised to find that this was required for an access-controlled selfhost. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99383 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaAccess.cpp
emaTemplateInstantiateDecl.cpp
|
0c01d18094100db92d38daa923c95661512db203 |
24-Mar-2010 |
John McCall <rjmccall@apple.com> |
Implement a framework for the delay of arbitrary diagnostics within templates. So delay access-control diagnostics when (for example) the target of a friend declaration is a specific specialization of a template. I was surprised to find that this was required for an access-controlled selfhost. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99383 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaAccess.cpp
emaTemplateInstantiateDecl.cpp
|
aae44266c55a9998d5918d4d8b510b178e8935d0 |
24-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When performing name lookup for the allocation or deallocation operators, make sure that the implicitly-declared global new and delete operators are always available. Fixes PR5904. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99382 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
b5b2ccbbb69f49146d937e1dc6d7dc11d631908c |
24-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
When performing name lookup for the allocation or deallocation operators, make sure that the implicitly-declared global new and delete operators are always available. Fixes PR5904. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99382 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
c7e6fde0411680a8aac9abaab7a3c444929ecd3e |
24-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Each non-local class instantiation is its own local instantiation scope. Fixes PR6619. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99377 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
05030bb6790b259a169b25665656db2aee30ccda |
24-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Each non-local class instantiation is its own local instantiation scope. Fixes PR6619. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99377 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
fec20e6dbd3c93a232a8f1e85f8aa5752e69f8bb |
24-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Make sure to properly track the anonymous namespace that lives inside each namespace, even when the outer namespace has multiple definitions. As part of this, collapsed two pointers worth of storage (original namespace and inner anonymous namespace) into a single pointer with a distinguishing bit, since the two are mutually exclusive, saving a pointer per NamespaceDecl. Fixes PR6620. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99368 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
a418147c61a14cd21d4cce8f9c7a8750d2a59803 |
24-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Make sure to properly track the anonymous namespace that lives inside each namespace, even when the outer namespace has multiple definitions. As part of this, collapsed two pointers worth of storage (original namespace and inner anonymous namespace) into a single pointer with a distinguishing bit, since the two are mutually exclusive, saving a pointer per NamespaceDecl. Fixes PR6620. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99368 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
cd2f20c3de88eeb5a53346e876123e47e1a37e66 |
24-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement computation of the final overriders for each virtual function within a class hierarchy (C++ [class.virtual]p2). We use the final-overrider computation to determine when a particular class is ill-formed because it has multiple final overriders for a given virtual function (e.g., because two virtual functions override the same virtual function in the same virtual base class). Fixes PR5973. We also use the final-overrider computation to determine which virtual member functions are pure when determining whether a class is abstract or diagnosing the improper use of an abstract class. The prior approach to determining whether there were any pure virtual functions in a class didn't cope with virtual base class subobjects properly, and could not easily be fixed to deal with the oddities of subobject hiding. Fixes PR6631. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99351 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
7b2fc9d3c97f2526528a8b686af1589054025ca0 |
24-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement computation of the final overriders for each virtual function within a class hierarchy (C++ [class.virtual]p2). We use the final-overrider computation to determine when a particular class is ill-formed because it has multiple final overriders for a given virtual function (e.g., because two virtual functions override the same virtual function in the same virtual base class). Fixes PR5973. We also use the final-overrider computation to determine which virtual member functions are pure when determining whether a class is abstract or diagnosing the improper use of an abstract class. The prior approach to determining whether there were any pure virtual functions in a class didn't cope with virtual base class subobjects properly, and could not easily be fixed to deal with the oddities of subobject hiding. Fixes PR6631. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99351 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
6c00ff82c690638b3069d0617389b258587c9165 |
23-Mar-2010 |
Rafael Espindola <rafael.espindola@gmail.com> |
revert 99311. Looks like it broke darwin bootstrap. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99317 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
f075b229643aa07389a6055352ade7446241c3ca |
23-Mar-2010 |
Rafael Espindola <rafael.espindola@gmail.com> |
revert 99311. Looks like it broke darwin bootstrap. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99317 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
95f50922434fe2bec3cd70dcad90aa77a6edb7be |
23-Mar-2010 |
Ted Kremenek <kremenek@apple.com> |
Improve diagnostic for @property/ivar type mismatch by including the types of the ivar and @property respectively. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99312 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
f921a4868cf1876636f6684e7f68697b18c0cb47 |
23-Mar-2010 |
Ted Kremenek <kremenek@apple.com> |
Improve diagnostic for @property/ivar type mismatch by including the types of the ivar and @property respectively. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99312 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
42f35be726fb70c8900da3bbd67e17ff5caa56ac |
23-Mar-2010 |
Rafael Espindola <rafael.espindola@gmail.com> |
Avoid producing implicit methods when we have a explicit template instantiation declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99311 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
5fb12c6c8f64d4b69f65faefb7d0800d7e4bca66 |
23-Mar-2010 |
Rafael Espindola <rafael.espindola@gmail.com> |
Avoid producing implicit methods when we have a explicit template instantiation declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99311 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
fa1860d406123e4e12cbcc9c68a9c6153b757367 |
23-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When recovering from a qualified typedef name, don't clear out the DeclContext because we don't want a NULL DeclContext. Instead, use the current context. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99281 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
9de672f6eb4a1f076163fd826418ca179e1341ec |
23-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
When recovering from a qualified typedef name, don't clear out the DeclContext because we don't want a NULL DeclContext. Instead, use the current context. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99281 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
08b93742b77c33f09760a2149d7da5f35c6f3ae9 |
23-Mar-2010 |
Duncan Sands <baldrick@free.fr> |
Ignore a more comprehensive set of gcc-special format attributes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99277 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
bc52595e01323ca22d65c68aafd53a1acb8c1fb6 |
23-Mar-2010 |
Duncan Sands <baldrick@free.fr> |
Ignore a more comprehensive set of gcc-special format attributes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99277 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
758dd6cab9ed8a0da060224fff1cb4ecfec341bb |
23-Mar-2010 |
Ted Kremenek <kremenek@apple.com> |
For forward-declared static inline functions, delay CFG-based warnings until we encounter a definition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99243 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
nalysisBasedWarnings.h
|
c263704cb007eb95b79f37b12a8092c47146d452 |
23-Mar-2010 |
Ted Kremenek <kremenek@apple.com> |
For forward-declared static inline functions, delay CFG-based warnings until we encounter a definition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99243 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
nalysisBasedWarnings.h
|
839bff1203adf923e1a75ed2695b8fd824810920 |
23-Mar-2010 |
Ted Kremenek <kremenek@apple.com> |
Only perform CFG-based warnings on 'static inline' functions that are called (transitively) by regular functions/blocks within a translation untion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99233 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
nalysisBasedWarnings.h
ema.cpp
ema.h
emaDecl.cpp
emaExpr.cpp
|
d064fdc4b7b64ca55b40b70490c79d6f569df78e |
23-Mar-2010 |
Ted Kremenek <kremenek@apple.com> |
Only perform CFG-based warnings on 'static inline' functions that are called (transitively) by regular functions/blocks within a translation untion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99233 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
nalysisBasedWarnings.h
ema.cpp
ema.h
emaDecl.cpp
emaExpr.cpp
|
28d397014712495b8f77175344fff8b282183b79 |
23-Mar-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Set the relevent attributes declared in class extension and fix a missing diagnostics on assigning to a read-only property. Fixes radar 7766184. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99230 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
22f757b38da3fc9f17ea9e99524064fdfbca3456 |
23-Mar-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Set the relevent attributes declared in class extension and fix a missing diagnostics on assigning to a read-only property. Fixes radar 7766184. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99230 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
f634e59130ddc0e11584ba6051a2acb0c5241eaf |
23-Mar-2010 |
Rafael Espindola <rafael.espindola@gmail.com> |
A fixed version of r99174 which also includes a test that we emit vtables when we see an specialization definition ever if we then see a extern template declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99226 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplate.cpp
|
b0f65ca9853d1148211a38736141c8ccf2aa4a1d |
23-Mar-2010 |
Rafael Espindola <rafael.espindola@gmail.com> |
A fixed version of r99174 which also includes a test that we emit vtables when we see an specialization definition ever if we then see a extern template declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99226 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplate.cpp
|
396e2ee033a3fcccbc8f582cd522f6cd5ccada96 |
22-Mar-2010 |
Chris Lattner <sabre@nondot.org> |
(re)implement PR6542, accepting and discarding the __gcc_tdiag__ format attribute specifier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99213 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
3c989027f68e2d9dfd57c018ccc550bd9fb79920 |
22-Mar-2010 |
Chris Lattner <sabre@nondot.org> |
(re)implement PR6542, accepting and discarding the __gcc_tdiag__ format attribute specifier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99213 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
70cc35dc26270a23f17de6e1f08f3b9ca4fa88b2 |
22-Mar-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Diagnose miuse of property dot-syntax instead of crashing. (radar 7634653). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99210 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
8149a5786def747af783a9e3c22714bb7ab42b9c |
22-Mar-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Diagnose miuse of property dot-syntax instead of crashing. (radar 7634653). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99210 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
bd7f8bd1770382eb4698989acc0c3af94cb89553 |
22-Mar-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Fixes access rues for ivars declared in class implementations (radar 7547942). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99198 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
01f1bfc3284d5817517d35217885ea9ecb252817 |
22-Mar-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Fixes access rues for ivars declared in class implementations (radar 7547942). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99198 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
fef934ce363c8d971921485bcf2b030a3aee2ab2 |
22-Mar-2010 |
Rafael Espindola <rafael.espindola@gmail.com> |
revert r99174. It caused PR6677. Will try to debug why tonight. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99188 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplate.cpp
|
89db1455a28af887f64bf56ffc8aaf3b7acadda5 |
22-Mar-2010 |
Rafael Espindola <rafael.espindola@gmail.com> |
revert r99174. It caused PR6677. Will try to debug why tonight. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99188 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplate.cpp
|
173feeb2f406361aeb4246af87c5e6f0bc8f48f8 |
22-Mar-2010 |
Rafael Espindola <rafael.espindola@gmail.com> |
When handling a TSK_ExplicitInstantiationDefinition after a TSK_ExplicitInstantiationDeclaration make sure we call MaybeMarkVirtualMembersReferenced with a method attached to the definition. Remove the hack that forced vtable emition with declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99174 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplate.cpp
|
c24d72154e95545dcd6d74c893082d11fd51053d |
22-Mar-2010 |
Rafael Espindola <rafael.espindola@gmail.com> |
When handling a TSK_ExplicitInstantiationDefinition after a TSK_ExplicitInstantiationDeclaration make sure we call MaybeMarkVirtualMembersReferenced with a method attached to the definition. Remove the hack that forced vtable emition with declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99174 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplate.cpp
|
e20f22b7b09964a9defed4367dd4d3baa9ed4041 |
22-Mar-2010 |
John McCall <rjmccall@apple.com> |
-Wshadow should only warn about parameter declarations when we're entering a function or block definition, not on every single declaration. Unfortunately we don't have previous-lookup results around when it's time to make this decision, so we have to redo the lookup. The alternative is to use delayed diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99172 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaExpr.cpp
|
053f4bddcb10bd3b17cd6a66fe52e265498603ed |
22-Mar-2010 |
John McCall <rjmccall@apple.com> |
-Wshadow should only warn about parameter declarations when we're entering a function or block definition, not on every single declaration. Unfortunately we don't have previous-lookup results around when it's time to make this decision, so we have to redo the lookup. The alternative is to use delayed diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99172 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaExpr.cpp
|
9b5ac3159a7d36924e93f7847eecc455700d6018 |
21-Mar-2010 |
Rafael Espindola <rafael.espindola@gmail.com> |
Fix PR6618. If a struct has an invalid field, mark it as invalid. Also avoid producing errors about incomplete types that are invalid. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99150 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaType.cpp
|
01620704304f819b82ecef769ec114e541a364d7 |
21-Mar-2010 |
Rafael Espindola <rafael.espindola@gmail.com> |
Fix PR6618. If a struct has an invalid field, mark it as invalid. Also avoid producing errors about incomplete types that are invalid. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99150 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaType.cpp
|
37409ab15ffde31828a1f474a01292803bc5264c |
20-Mar-2010 |
Ted Kremenek <kremenek@apple.com> |
Don't bother running the analysis for CFG-based warnings if the declaration is in a system header. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99087 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
d068aabc484c4009282122c6ef26e66e68cfa044 |
20-Mar-2010 |
Ted Kremenek <kremenek@apple.com> |
Don't bother running the analysis for CFG-based warnings if the declaration is in a system header. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99087 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
|
5db003430e515389d59c95137f0efdd0644cab76 |
20-Mar-2010 |
Ted Kremenek <kremenek@apple.com> |
Refactor CFG-based warnings in Sema to be run by a worked object called AnalysisBasedWarnings. This object controls when the warnings are executed, allowing the client code in Sema to selectively disable warnings as needed. Centralizing the logic for analysis-based warnings allows us to optimize when and how they are run. Along the way, remove the redundant logic for the 'check fall-through' warning for blocks; now the same logic is used for both blocks and functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99085 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
nalysisBasedWarnings.h
MakeLists.txt
ema.h
emaChecking.cpp
emaDecl.cpp
emaExpr.cpp
|
dbdbaaf34f798fa5cabec273c4b9397b3fd6a98c |
20-Mar-2010 |
Ted Kremenek <kremenek@apple.com> |
Refactor CFG-based warnings in Sema to be run by a worked object called AnalysisBasedWarnings. This object controls when the warnings are executed, allowing the client code in Sema to selectively disable warnings as needed. Centralizing the logic for analysis-based warnings allows us to optimize when and how they are run. Along the way, remove the redundant logic for the 'check fall-through' warning for blocks; now the same logic is used for both blocks and functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99085 91177308-0d34-0410-b5e6-96231b3b80d8
nalysisBasedWarnings.cpp
nalysisBasedWarnings.h
MakeLists.txt
ema.h
emaChecking.cpp
emaDecl.cpp
emaExpr.cpp
|
4f6ca3423ddfeb60333d25b3b09151d4245771cb |
20-Mar-2010 |
John McCall <rjmccall@apple.com> |
Implement -Wshadow for parameter declarations as well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99037 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
a369a95f756b6190b5611ff4118b4cabfc704dc0 |
20-Mar-2010 |
John McCall <rjmccall@apple.com> |
Implement -Wshadow for parameter declarations as well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99037 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
effc786f47716410eb470ac4ed0294abe4deb3b6 |
19-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Remove the capture, serialization, and deserialization of comment ranges as part of the ASTContext. This code is not and was never used, but contributes ~250k to the size of the Cocoa.h precompiled header. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99007 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
|
c6fbbedb3e90ff2f04828c36fd839e01468679f5 |
19-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Remove the capture, serialization, and deserialization of comment ranges as part of the ASTContext. This code is not and was never used, but contributes ~250k to the size of the Cocoa.h precompiled header. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99007 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
|
ee40579c3e66ff71853ac05252509aeeaa013b12 |
19-Mar-2010 |
John McCall <rjmccall@apple.com> |
Promote enum types during -Wsign-compare. Fixes some spurious warnings, mostly during conditional expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98975 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
a2936be04fb800d93a0a8d3358f35c7b3b2ded16 |
19-Mar-2010 |
John McCall <rjmccall@apple.com> |
Promote enum types during -Wsign-compare. Fixes some spurious warnings, mostly during conditional expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98975 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
e72bf358fdc53552d6d9c2f1e6f8ef37fec0d441 |
19-Mar-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Diagnose conversion of 'Class' to/from objective-c object pointer types. Fixes radar 7634850. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98970 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
d4c60909ae7ad1ab603feedf04d457d72e85fbc4 |
19-Mar-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Diagnose conversion of 'Class' to/from objective-c object pointer types. Fixes radar 7634850. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98970 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
69969963d321e2001ed1ebfc6d17107604d75b12 |
19-Mar-2010 |
John McCall <rjmccall@apple.com> |
Remember the "found declaration" for an overload candidate, which is the entity (if applicable) which was actually looked up. If a candidate was found via a using declaration, this is the UsingShadowDecl; otherwise, if the candidate is template specialization, this is the template; otherwise, this is the function. The point of this exercise is that "found declarations" are the entities we do access control for, not their underlying declarations. Broadly speaking, this patch fixes access control for using declarations. There is a *lot* of redundant code calling into the overload-resolution APIs; we really ought to clean that up. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98945 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaAccess.cpp
emaCodeComplete.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaInit.cpp
emaInit.h
emaOverload.cpp
emaOverload.h
|
9aa472c45d2bd81b7b52c225e8acc560d716db97 |
19-Mar-2010 |
John McCall <rjmccall@apple.com> |
Remember the "found declaration" for an overload candidate, which is the entity (if applicable) which was actually looked up. If a candidate was found via a using declaration, this is the UsingShadowDecl; otherwise, if the candidate is template specialization, this is the template; otherwise, this is the function. The point of this exercise is that "found declarations" are the entities we do access control for, not their underlying declarations. Broadly speaking, this patch fixes access control for using declarations. There is a *lot* of redundant code calling into the overload-resolution APIs; we really ought to clean that up. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98945 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaAccess.cpp
emaCodeComplete.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaInit.cpp
emaInit.h
emaOverload.cpp
emaOverload.h
|
00b11d324000c61b8c783663f6d6399514f8a487 |
19-Mar-2010 |
John McCall <rjmccall@apple.com> |
When elevating access along an inheritance path, initialize the computed access to the (elevated) access of the accessed declaration, if applicable, rather than plunking that access onto the end after we've calculated the inheritance access. Also, being a friend of a derived class gives you public access to its members (subject to later modification by further inheritance); it does not simply ignore a single location of restricted inheritance. Also, when computing the best unprivileged path to a subobject, preserve the information that the worst path might be AS_none (forbidden) rather than a minimum of AS_private. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98899 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaLookup.cpp
|
7aceaf8cee77c98478e8934dc283910292711a7e |
19-Mar-2010 |
John McCall <rjmccall@apple.com> |
When elevating access along an inheritance path, initialize the computed access to the (elevated) access of the accessed declaration, if applicable, rather than plunking that access onto the end after we've calculated the inheritance access. Also, being a friend of a derived class gives you public access to its members (subject to later modification by further inheritance); it does not simply ignore a single location of restricted inheritance. Also, when computing the best unprivileged path to a subobject, preserve the information that the worst path might be AS_none (forbidden) rather than a minimum of AS_private. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98899 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaLookup.cpp
|
42bd56c8c7545a3e1b6d510712139551e0da43f7 |
18-Mar-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Some cleanup, change diagnostic when assigning to a property which is not lvalue. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98848 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
90c71268f04369328e8f579007b8b4f1da9feea0 |
18-Mar-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Some cleanup, change diagnostic when assigning to a property which is not lvalue. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98848 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
517199286c0d7e200b1a58a0a1d43594b14c26b4 |
18-Mar-2010 |
John McCall <rjmccall@apple.com> |
from code inspection, we were treating placement news with one argument as non-placement news when selecting the corresponding operator delete; this is fixed. Access and ambiguity control for calls to operator new and delete. Also AFAICT git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98818 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaAccess.cpp
emaExprCXX.cpp
|
90c8c57bcd84083df85f76aac2aa62acb85eb077 |
18-Mar-2010 |
John McCall <rjmccall@apple.com> |
from code inspection, we were treating placement news with one argument as non-placement news when selecting the corresponding operator delete; this is fixed. Access and ambiguity control for calls to operator new and delete. Also AFAICT git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98818 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaAccess.cpp
emaExprCXX.cpp
|
c8f8206f40f6738206988944bdd73c38c04ae7e7 |
18-Mar-2010 |
John McCall <rjmccall@apple.com> |
Redeclaration lookups for parameter names should be flagged as redeclaration lookups so they don't trigger diagnostics like (say) access control. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98806 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
10f2873c0df7f662bfdb9a3e8bc834b68c1ead48 |
18-Mar-2010 |
John McCall <rjmccall@apple.com> |
Redeclaration lookups for parameter names should be flagged as redeclaration lookups so they don't trigger diagnostics like (say) access control. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98806 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
e98b617170caf9b536e1edc05a5dffae5b63aecd |
18-Mar-2010 |
Ted Kremenek <kremenek@apple.com> |
Simplify code (and remove 'dyn_cast') by using ObjCProperyDecl::findPropertyDecl(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98794 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
9944c769b69b1904a7b16d3ce10fbdc9c67c764f |
18-Mar-2010 |
Ted Kremenek <kremenek@apple.com> |
Simplify code (and remove 'dyn_cast') by using ObjCProperyDecl::findPropertyDecl(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98794 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
8a28bdae74f6af98052b05eb7a81d1df0b83ffcc |
17-Mar-2010 |
John McCall <rjmccall@apple.com> |
Implement non-dependent friend functions and classes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98764 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
a742db0032d8f458fe229600d2082981a1fb1481 |
17-Mar-2010 |
John McCall <rjmccall@apple.com> |
Implement non-dependent friend functions and classes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98764 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
3883f2feb35de2e37535ac0a014c5344388bd72f |
17-Mar-2010 |
John McCall <rjmccall@apple.com> |
ActOnTagDefinitionError is supposed to 'unwind' ActOnTagStartDefinition, not ActOnStartCXXMemberDeclaration. We haven't started the field collector on this class yet, so don't stop it. Fixes a crash in the VS buildbot and a memory error on all the others. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98760 91177308-0d34-0410-b5e6-96231b3b80d8
XXFieldCollector.h
emaDecl.cpp
|
a8cab015e5f2750cb6f15e71016569739c2ad1e3 |
17-Mar-2010 |
John McCall <rjmccall@apple.com> |
ActOnTagDefinitionError is supposed to 'unwind' ActOnTagStartDefinition, not ActOnStartCXXMemberDeclaration. We haven't started the field collector on this class yet, so don't stop it. Fixes a crash in the VS buildbot and a memory error on all the others. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98760 91177308-0d34-0410-b5e6-96231b3b80d8
XXFieldCollector.h
emaDecl.cpp
|
e796ee8892936888e36a6dc9e6daea0aaf392597 |
17-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Remove warning about shadowing a built-in; built-ins aren't actually considered to be a part of the translation unit unless they're named in a way that brings them into existence. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98729 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
c48c916b8cebba954429715f15bd5b5e8e4d4574 |
17-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Remove warning about shadowing a built-in; built-ins aren't actually considered to be a part of the translation unit unless they're named in a way that brings them into existence. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98729 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
7be95146135fbf8399324f631f0115f74c62ae19 |
17-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Entering the main source file in the preprocessor can fail if the source file has been changed. Handle that failure more gracefully. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98727 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
|
dbf8ee630e4c86e5150492eaf8dbceea3c718ee1 |
17-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Entering the main source file in the preprocessor can fail if the source file has been changed. Handle that failure more gracefully. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98727 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
|
9c03f6311169091269138da2058fb25fcfbc1425 |
17-Mar-2010 |
John McCall <rjmccall@apple.com> |
Grant nested classes the access privileges of their enclosing classes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98710 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
88b6c71e3f0e68d094efcf880910caf424b46cbf |
17-Mar-2010 |
John McCall <rjmccall@apple.com> |
Grant nested classes the access privileges of their enclosing classes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98710 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
d3a26c7179128a12ed30f34ebeb15fec36e39815 |
17-Mar-2010 |
John McCall <rjmccall@apple.com> |
Clean up after ourselves when there's an error parsing the base clause. Fixes the crash-on-invalid in PR6629. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98698 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
db7bb4a4e7d9744cbc994c90932e6f056228e1ff |
17-Mar-2010 |
John McCall <rjmccall@apple.com> |
Clean up after ourselves when there's an error parsing the base clause. Fixes the crash-on-invalid in PR6629. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98698 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
9bec00f10ef63d6483eeffdfd6174d94bec0231e |
17-Mar-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c patch to provide type safty when blocks are passing or returning objc objects. There will be a corresponding objective-c++ patch soon. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98696 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
132f2a2da34f378fc675b9e174564b0f52c31d98 |
17-Mar-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c patch to provide type safty when blocks are passing or returning objc objects. There will be a corresponding objective-c++ patch soon. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98696 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b5cf05d42a91fef786f98254b3771a69da8ad44a |
17-Mar-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Issue error when a byref array is accessed in a block literal. Fixes radar 7760213. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98693 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
8596bbe00e3cd670652ddaf0c22d14aa84bb6fb8 |
17-Mar-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Issue error when a byref array is accessed in a block literal. Fixes radar 7760213. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98693 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
7cb16d6974286975d4b79f8f8dbeaa2783f08d43 |
16-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Audit all Preprocessor::getSpelling() callers, improving failure recovery for those that need it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98689 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
453091cc2082e207ea2c2dda645a9bc01b37fb0c |
16-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Audit all Preprocessor::getSpelling() callers, improving failure recovery for those that need it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98689 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
2c9c4584acb6ca7ef35bde8b96f81acc9e66ee75 |
16-Mar-2010 |
John McCall <rjmccall@apple.com> |
Implement -Wshadow. Based on a patch by Mike M.! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98684 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
8472af4df9292e02fb25c952d25a81f3ca296252 |
16-Mar-2010 |
John McCall <rjmccall@apple.com> |
Implement -Wshadow. Based on a patch by Mike M.! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98684 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
2b2c842e1d7391ddce8b069adb2ff9ec6fde42aa |
16-Mar-2010 |
John McCall <rjmccall@apple.com> |
Perform access control for the implicit calls to base and member destructors that occur in constructors (on the unwind path). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98681 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
ef027fe748894522653558d9475a220482395094 |
16-Mar-2010 |
John McCall <rjmccall@apple.com> |
Perform access control for the implicit calls to base and member destructors that occur in constructors (on the unwind path). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98681 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
5fb9b355e182d1ec046cdc061855d3ffb691e967 |
16-Mar-2010 |
Benjamin Kramer <benny.kra@googlemail.com> |
Let SourceManager::getBufferData return StringRef instead of a pair of two const char*. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98630 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
f6ac97b101c8840efa92bf29166077ce4049e293 |
16-Mar-2010 |
Benjamin Kramer <benny.kra@googlemail.com> |
Let SourceManager::getBufferData return StringRef instead of a pair of two const char*. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98630 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
5d9aa7f89bf11d9b37bc429199f960e3205e91e5 |
16-Mar-2010 |
John McCall <rjmccall@apple.com> |
Access control for implicit calls to copy assignment operators and copy constructors from implicitly-defined members. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98614 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaAccess.cpp
emaDeclCXX.cpp
|
b020748a9954c995f2e616f50bb9ed4fe2df1f72 |
16-Mar-2010 |
John McCall <rjmccall@apple.com> |
Access control for implicit calls to copy assignment operators and copy constructors from implicitly-defined members. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98614 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaAccess.cpp
emaDeclCXX.cpp
|
ce2bc7ec5f6946884588f8adc194e52b30a2554a |
16-Mar-2010 |
John McCall <rjmccall@apple.com> |
Perform access control even for the implicit destructor calls from implicit destructor definitions. Remove some code duplication. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98611 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
6c790eac94101407acfd2c664400924cab45c0b1 |
16-Mar-2010 |
John McCall <rjmccall@apple.com> |
Perform access control even for the implicit destructor calls from implicit destructor definitions. Remove some code duplication. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98611 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
a90c7d6d992ced031c4a790733142a89a90f9d04 |
16-Mar-2010 |
John McCall <rjmccall@apple.com> |
Perform access control for the implicit base and member destructor calls required when emitting a destructor definition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98609 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaAccess.cpp
emaCXXCast.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaExceptionSpec.cpp
emaInit.cpp
emaOverload.cpp
|
58e6f34e4d2c668562e1c391162ee9de7b05fbb2 |
16-Mar-2010 |
John McCall <rjmccall@apple.com> |
Perform access control for the implicit base and member destructor calls required when emitting a destructor definition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98609 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaAccess.cpp
emaCXXCast.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaExceptionSpec.cpp
emaInit.cpp
emaOverload.cpp
|
40e0148c249727d064c9aef48aca7c896c8d21c1 |
16-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Give SourceManager a Diagnostic object with which to report errors, and start simplifying the interfaces in SourceManager that can fail. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98594 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
f715ca12bfc9fddfde75f98a197424434428b821 |
16-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Give SourceManager a Diagnostic object with which to report errors, and start simplifying the interfaces in SourceManager that can fail. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98594 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
72898076bbfe83ff42f2c478fb10e5391948123b |
15-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Introduce a new BufferResult class to act as the return type of SourceManager's getBuffer() (and similar) operations. This abstract can be used to force callers to cope with errors in getBuffer(), such as missing files and changed files. Fix a bunch of callers to use the new interface. Add some very basic checks for file consistency (file size, modification time) into ContentCache::getBuffer(), although these checks don't help much until we've updated the main callers (e.g., SourceManager::getSpelling()). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98585 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
aea67dbd653a2dd6dd5cc2159279e81e855b2482 |
15-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Introduce a new BufferResult class to act as the return type of SourceManager's getBuffer() (and similar) operations. This abstract can be used to force callers to cope with errors in getBuffer(), such as missing files and changed files. Fix a bunch of callers to use the new interface. Add some very basic checks for file consistency (file size, modification time) into ContentCache::getBuffer(), although these checks don't help much until we've updated the main callers (e.g., SourceManager::getSpelling()). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98585 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
0ce756b8d20f6ceea8e810d8ced84fe150314b1a |
15-Mar-2010 |
Ted Kremenek <kremenek@apple.com> |
Make 'findPropertyDecl()' a static method of ObjCPropertyDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98570 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
9f550ff05d496e6b9480e5619a21d9da0c9e27c1 |
15-Mar-2010 |
Ted Kremenek <kremenek@apple.com> |
Make 'findPropertyDecl()' a static method of ObjCPropertyDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98570 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
a77dc5b1a0d891a5b81095690b54873c912fba0b |
15-Mar-2010 |
Ted Kremenek <kremenek@apple.com> |
Correctly determine if the @property has been previously declared. If a property has the same name as the ivar it wraps then the old logic wouldn't find the previous property declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98559 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
894ae6ad081465a3b168db7e60ab3f94e3730b57 |
15-Mar-2010 |
Ted Kremenek <kremenek@apple.com> |
Correctly determine if the @property has been previously declared. If a property has the same name as the ivar it wraps then the old logic wouldn't find the previous property declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98559 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
461fc7687871b19b3d39bd35095ed4bbd52f6229 |
15-Mar-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c++ must take into account qualifiers when considering valid objc pointer converions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98557 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
ee9ca6966d63419e4da1ea54151864a4ed8daeed |
15-Mar-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
objective-c++ must take into account qualifiers when considering valid objc pointer converions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98557 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
479f3d4f292c4bbaf42cd9bb1539df16d105975a |
15-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
During C++ name lookup, use DeclContext::Equals() rather than comparing DeclContext pointers, to avoid having to remember to call getPrimaryContext() everywhere. This is the last part PR6594. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98546 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
dbdf5e7d0b6f1f8d8c496c1a0ada6f706cddf100 |
15-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
During C++ name lookup, use DeclContext::Equals() rather than comparing DeclContext pointers, to avoid having to remember to call getPrimaryContext() everywhere. This is the last part PR6594. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98546 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
9e43d8f7dcb845a7b9698b65f1b78f4915a4769e |
15-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement C++ [temp.local]p8, which specifies that a template parameter hides a namespace-scope declararion with the same name in an out-of-line definition of a template. The lookup requires a strange interleaving of lexical and semantic scopes (go C++), which I have not yet handled in the typo correction/code completion path. Fixes PR6594. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98544 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
711be1e89a56cdf679143ad18afaa58ed59f0584 |
15-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement C++ [temp.local]p8, which specifies that a template parameter hides a namespace-scope declararion with the same name in an out-of-line definition of a template. The lookup requires a strange interleaving of lexical and semantic scopes (go C++), which I have not yet handled in the typo correction/code completion path. Fixes PR6594. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98544 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
3dace0b21f73ddaca879ac59890b33a12cfa509e |
15-Mar-2010 |
John McCall <rjmccall@apple.com> |
Add support for -Wwrite-strings. Patch by Mike M! Fixes PR 4804. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98541 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprObjC.cpp
|
4b7a834e0fecddd9eaf1f4567867c718e4eebf50 |
15-Mar-2010 |
John McCall <rjmccall@apple.com> |
Add support for -Wwrite-strings. Patch by Mike M! Fixes PR 4804. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98541 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprObjC.cpp
|
e88b6e3c31125b4bb55d60aa3b982735d308c792 |
15-Mar-2010 |
John McCall <rjmccall@apple.com> |
Remember declaration scope qualifiers in the AST. Imposes no memory overhead on unqualified declarations. Patch by Enea Zaffanella! Minimal adjustments: allocate the ExtInfo nodes with the ASTContext and delete them during Destroy(). I audited a bunch of Destroy methods at the same time, to ensure that the correct teardown was being done. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98540 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
b6217665c6a987f2d6c8665fd70365d7719ac4df |
15-Mar-2010 |
John McCall <rjmccall@apple.com> |
Remember declaration scope qualifiers in the AST. Imposes no memory overhead on unqualified declarations. Patch by Enea Zaffanella! Minimal adjustments: allocate the ExtInfo nodes with the ASTContext and delete them during Destroy(). I audited a bunch of Destroy methods at the same time, to ensure that the correct teardown was being done. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98540 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
fd631881b0ee84847272170b761ea95b66caf145 |
13-Mar-2010 |
Rafael Espindola <rafael.espindola@gmail.com> |
Fix PR6562. If a type is dependent, we don't know if it will have implicit destructors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98440 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
961b167bcea8fe37465b2770c90bf9bf6b349470 |
13-Mar-2010 |
Rafael Espindola <rafael.espindola@gmail.com> |
Fix PR6562. If a type is dependent, we don't know if it will have implicit destructors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98440 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
6dbd14d0949144ebc64cd964b74c1b872e62b019 |
13-Mar-2010 |
Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> |
Use SmallString instead of SmallVector git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98436 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
193575455e00eca03fd7177f60e3f2e6263cb661 |
13-Mar-2010 |
Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> |
Use SmallString instead of SmallVector git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98436 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
27c4182d9c44e33a144944a4123b5bc6d6d7a854 |
12-Mar-2010 |
Jeffrey Yasskin <jyasskin@google.com> |
Allow users to set CPPFLAGS and CXXFLAGS on the make command line. Tested: make CPPFLAGS=-m64 CXXFLAGS=-m64 -j8 && (cd tools/clang;make test) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98399 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
|
3352406820d133c78161e8d710f95b8ac152a1e7 |
12-Mar-2010 |
Jeffrey Yasskin <jyasskin@google.com> |
Allow users to set CPPFLAGS and CXXFLAGS on the make command line. Tested: make CPPFLAGS=-m64 CXXFLAGS=-m64 -j8 && (cd tools/clang;make test) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98399 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
|
327b0748038353191fc26634b8fbd1bfa779482e |
12-Mar-2010 |
Ted Kremenek <kremenek@apple.com> |
Use llvm::SmallVector instead of std::vector. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98397 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
4c9f709fc9ea7a7d8c8a85e29730c2365c2cad18 |
12-Mar-2010 |
Ted Kremenek <kremenek@apple.com> |
Use llvm::SmallVector instead of std::vector. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98397 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
e038202e17ed6fb414007073cb098420e21bb3c8 |
12-Mar-2010 |
John McCall <rjmccall@apple.com> |
Preserve the inherited-default-argument bit through instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98375 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
cffbc78c4c01ab9e4d3988a98ced2d9b8338217e |
12-Mar-2010 |
John McCall <rjmccall@apple.com> |
Preserve the inherited-default-argument bit through instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98375 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
5570021146ec9ed50c891a0af626fec316db896f |
12-Mar-2010 |
John McCall <rjmccall@apple.com> |
Remember whether a ParmVarDecl was spelled with a default argument or whether it inherited one from a previous declaration. Patch by Enea Zaffanella! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98362 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
bf73b352acb7a2d041ce8b50171dd7f8e2b2c1bb |
12-Mar-2010 |
John McCall <rjmccall@apple.com> |
Remember whether a ParmVarDecl was spelled with a default argument or whether it inherited one from a previous declaration. Patch by Enea Zaffanella! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98362 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
faab297caf346330bb3bc96b3b68eb0cc6395a8b |
12-Mar-2010 |
John McCall <rjmccall@apple.com> |
Improve the unused-value check to look into comma expressions and filter out voids in sub-expressions. Patch by Mike M! Fixes PR4806. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98335 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
0faede6f31b07bcec7b776f2b420c3ea9bb3e58c |
12-Mar-2010 |
John McCall <rjmccall@apple.com> |
Improve the unused-value check to look into comma expressions and filter out voids in sub-expressions. Patch by Mike M! Fixes PR4806. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98335 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
2c4e8617732a5e545d4042f4ff359af464a1d377 |
12-Mar-2010 |
Ted Kremenek <kremenek@apple.com> |
Split Sema::ActOnProperty() into two recursive functions to clearly separate the handling of class extensions from other cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98326 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaObjCProperty.cpp
|
e3d67bcc7b89b335dbcd097a299658057ea31097 |
12-Mar-2010 |
Ted Kremenek <kremenek@apple.com> |
Split Sema::ActOnProperty() into two recursive functions to clearly separate the handling of class extensions from other cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98326 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaObjCProperty.cpp
|
e67d87863563c575c611fe2d45cc0aac5ad3330c |
12-Mar-2010 |
John McCall <rjmccall@apple.com> |
Implement basic support for friend types and functions in non-dependent contexts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98321 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
d60e22e601852ae1345f01514318a0951dc09f89 |
12-Mar-2010 |
John McCall <rjmccall@apple.com> |
Implement basic support for friend types and functions in non-dependent contexts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98321 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
e6de637d1815eb0081b8bbf5aeab025fc4469a55 |
12-Mar-2010 |
Ted Kremenek <kremenek@apple.com> |
Fix 80 col violations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98320 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
2d2f9368d35b3628c7e3b4563f74849a0f901a00 |
12-Mar-2010 |
Ted Kremenek <kremenek@apple.com> |
Fix 80 col violations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98320 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
13f2ebba6ae640fdfa4af4b5a803e431193561f0 |
12-Mar-2010 |
Ted Kremenek <kremenek@apple.com> |
Move 'ActOn' methods to the beginning of the file so we can clearly see the parser entry points. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98319 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
28685ab2ddeea146841bf2e277e25c7b32dfc9f6 |
12-Mar-2010 |
Ted Kremenek <kremenek@apple.com> |
Move 'ActOn' methods to the beginning of the file so we can clearly see the parser entry points. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98319 91177308-0d34-0410-b5e6-96231b3b80d8
emaObjCProperty.cpp
|
a688b1a43f4db86c4c6285a86a9a1bad966fc4f7 |
12-Mar-2010 |
Ted Kremenek <kremenek@apple.com> |
Update CMake build. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98318 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
|
34836f28b4f055a51d282a371c2a6e1b21a36449 |
12-Mar-2010 |
Ted Kremenek <kremenek@apple.com> |
Update CMake build. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98318 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
|
4e60bac843342293369d5ac8812e760e6723e736 |
12-Mar-2010 |
Ted Kremenek <kremenek@apple.com> |
Split Sema logic for ObjC @property and @synthesize into a separate file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98317 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
emaObjCProperty.cpp
|
9d64c15223497f31899cc47fbe1531873dc06f2e |
12-Mar-2010 |
Ted Kremenek <kremenek@apple.com> |
Split Sema logic for ObjC @property and @synthesize into a separate file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98317 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
emaObjCProperty.cpp
|
755efc993c384007d8eb0c97a54288b3aaaa1dbc |
11-Mar-2010 |
Ted Kremenek <kremenek@apple.com> |
For ivars created using @synthesize, set their DeclContext to be the @implementation (instead of the @interface) and actually add the ivar to the DeclContext (which we weren't doing before). This allows us to simplify ASTContext::CollectNonClassIvars() by removing ASTContext::CollectProtocolSynthesizedIvars(). Now all ivars can be found by either inspecting the ObjCInterfaceDecl and its companion ObjCImplementationDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98280 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
7d2aa11c5c3b85a9d727ff868de666ba3bff5b59 |
11-Mar-2010 |
Ted Kremenek <kremenek@apple.com> |
For ivars created using @synthesize, set their DeclContext to be the @implementation (instead of the @interface) and actually add the ivar to the DeclContext (which we weren't doing before). This allows us to simplify ASTContext::CollectNonClassIvars() by removing ASTContext::CollectProtocolSynthesizedIvars(). Now all ivars can be found by either inspecting the ObjCInterfaceDecl and its companion ObjCImplementationDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98280 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
bdf5263c109e7147dad6d27e372280f1614072a6 |
11-Mar-2010 |
John McCall <rjmccall@apple.com> |
Warn about comparing an unsigned expression with 0 in tautological ways. Patch by mikem! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98279 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
emaExpr.cpp
emaExprCXX.cpp
|
d1b47bf17fde73fac67d8664bd65273742c00ecd |
11-Mar-2010 |
John McCall <rjmccall@apple.com> |
Warn about comparing an unsigned expression with 0 in tautological ways. Patch by mikem! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98279 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
emaExpr.cpp
emaExprCXX.cpp
|
652f18e702323dd3dd9179b11b46196760bce9bd |
11-Mar-2010 |
John McCall <rjmccall@apple.com> |
Implement -Wmissing-field-initializers. Patch by mikem! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98275 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
80639debfb2d90b2f1ffdbcd9a391f744cb0a393 |
11-Mar-2010 |
John McCall <rjmccall@apple.com> |
Implement -Wmissing-field-initializers. Patch by mikem! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98275 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
47ed16f8dde8900eed59d037f75ca4011dd6239e |
11-Mar-2010 |
John McCall <rjmccall@apple.com> |
Fix a self-host problem caused by this over-eager assertion. I'm not sure there's a good equivalent that's actually true, unfortunately. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98253 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
069ace5adc444a159003c29e85e166cee491ad39 |
11-Mar-2010 |
John McCall <rjmccall@apple.com> |
Fix a self-host problem caused by this over-eager assertion. I'm not sure there's a good equivalent that's actually true, unfortunately. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98253 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
6e769988ffd4b543a8bf1e7aba5e83f770838363 |
11-Mar-2010 |
John McCall <rjmccall@apple.com> |
Maintain type source information for functions through template instantiation. Based on a patch by Enea Zaffanella! I found a way to reduce some of the redundancy between TreeTransform's "standard" FunctionProtoType transformation and TemplateInstantiator's override, and I killed off the old SubstFunctionType by adding type source info for the last cases where we were creating FunctionDecls without TSI (at least that get passed through template instantiation). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98252 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
21ef0fa27b0783ec0bc6aa5b524feb2ec840f952 |
11-Mar-2010 |
John McCall <rjmccall@apple.com> |
Maintain type source information for functions through template instantiation. Based on a patch by Enea Zaffanella! I found a way to reduce some of the redundancy between TreeTransform's "standard" FunctionProtoType transformation and TemplateInstantiator's override, and I killed off the old SubstFunctionType by adding type source info for the last cases where we were creating FunctionDecls without TSI (at least that get passed through template instantiation). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98252 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
e62539e7e553de6a944f5662e9ad4d3b6efc73a7 |
11-Mar-2010 |
John McCall <rjmccall@apple.com> |
Split C++ friend declarations into their own header/implementation file. I'm expecting this portion of the AST to grow and change, and I'd like to be able to do that with minimal recompilation. If this proves unnecessary when access control is fully-implemented, I'll fold the classes back into DeclCXX.h. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98249 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
emaTemplate.cpp
|
92b7f70c924cbf4514e9e434cea7def51ab49860 |
11-Mar-2010 |
John McCall <rjmccall@apple.com> |
Split C++ friend declarations into their own header/implementation file. I'm expecting this portion of the AST to grow and change, and I'd like to be able to do that with minimal recompilation. If this proves unnecessary when access control is fully-implemented, I'll fold the classes back into DeclCXX.h. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98249 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
emaTemplate.cpp
|
a3241db8b613e558ef5e6e43896aa104e0a9266a |
10-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Statement expressions can be used in global- or namespace-scoped blocks git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98135 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
dd8f569f84a73c0b0e1449475f333d101e6c9401 |
10-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Statement expressions can be used in global- or namespace-scoped blocks git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98135 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
55851d6d117e79db3a891bcb821acd19592b2178 |
10-Mar-2010 |
John McCall <rjmccall@apple.com> |
Create a new InjectedClassNameType to represent bare-word references to the injected class name of a class template or class template partial specialization. This is a non-canonical type; the canonical type is still a template specialization type. This becomes the TypeForDecl of the pattern declaration, which cleans up some amount of code (and complicates some other parts, but whatever). Fixes PR6326 and probably a few others, primarily by re-establishing a few invariants about TypeLoc sizes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98134 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
3cb0ebd5f76abcb776f7cb4062bd79e3268c0dc4 |
10-Mar-2010 |
John McCall <rjmccall@apple.com> |
Create a new InjectedClassNameType to represent bare-word references to the injected class name of a class template or class template partial specialization. This is a non-canonical type; the canonical type is still a template specialization type. This becomes the TypeForDecl of the pattern declaration, which cleans up some amount of code (and complicates some other parts, but whatever). Fixes PR6326 and probably a few others, primarily by re-establishing a few invariants about TypeLoc sizes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98134 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
1431b77a7b8cee2d15a326f01f95804fc850ce29 |
10-Mar-2010 |
Rafael Espindola <rafael.espindola@gmail.com> |
Delay codegen of vtables when handling implicit instantiations. This fixes PR6474. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98123 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
bbf58bb1b8dd8c5e0f07547a6c20ffd55385fcf6 |
10-Mar-2010 |
Rafael Espindola <rafael.espindola@gmail.com> |
Delay codegen of vtables when handling implicit instantiations. This fixes PR6474. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98123 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
f03f5f6c50378476d7fd10edfa0ed8f4c01e38da |
08-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Extend ObjCMessageExpr for class method sends with the source location of the class name. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97943 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
c2350e553b853ad00914faf23fa731e5fc4a8a5c |
08-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Extend ObjCMessageExpr for class method sends with the source location of the class name. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97943 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
44032ab343048030bd4332b3e5ccb59974908918 |
08-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Keep track of type source information in the return type of an Objective-C method declaration, e.g., for - (Foo *)myMethod; we now have TypeSourceInfo for the Foo*. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97942 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
4bc1cb6aa635a5bf8fae99bf69c56c724c1e786c |
08-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Keep track of type source information in the return type of an Objective-C method declaration, e.g., for - (Foo *)myMethod; we now have TypeSourceInfo for the Foo*. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97942 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
da0f948c44604e6cf5f73985bd7293b0b15d67a7 |
08-Mar-2010 |
Duncan Sands <baldrick@free.fr> |
Remove unused headers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97941 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
|
a48b2846153dc1f6c35f9e8812975a661ab1bc79 |
08-Mar-2010 |
Duncan Sands <baldrick@free.fr> |
Remove unused headers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97941 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
|
7a2e48fd74522b631a004ebd89554b064ff10259 |
08-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Make a note for the C++0x future, when we'll have to revisit the jump-diagnostics handling for variables without initializers git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97929 91177308-0d34-0410-b5e6-96231b3b80d8
umpDiagnostics.cpp
|
5abbd606200d53f68b57b770ac338c2e9a696abc |
08-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Make a note for the C++0x future, when we'll have to revisit the jump-diagnostics handling for variables without initializers git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97929 91177308-0d34-0410-b5e6-96231b3b80d8
umpDiagnostics.cpp
|
f80772ef0b9d13a9ea1d0be8bf34c10ae114b326 |
08-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
In C++98/03, an uninitialized variable that has POD class type will be uninitialized. This seems not to be the case in C++0x, where we still call the (trivial) default constructor for a POD class (!). Previously, we had implemented only the C++0x rules; now we implement both. Fixes PR6536. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97928 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
516a6bc399f1f4595423e80c9d4bc687f870acd1 |
08-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
In C++98/03, an uninitialized variable that has POD class type will be uninitialized. This seems not to be the case in C++0x, where we still call the (trivial) default constructor for a POD class (!). Previously, we had implemented only the C++0x rules; now we implement both. Fixes PR6536. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97928 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
a6e3243b91839273ab7e8645d35f8a80b240615c |
08-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Downgrade errors when trying to catch a pointer or reference to incomplete type to warnings; GCC (and EDG in GCC compatibility mode) permit such handles. Fixes PR6527. (For real this time) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97927 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
a2762918ecc636c9af207ce2a9ce705edad2a444 |
08-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Downgrade errors when trying to catch a pointer or reference to incomplete type to warnings; GCC (and EDG in GCC compatibility mode) permit such handles. Fixes PR6527. (For real this time) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97927 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
6e85db0341b02d67b452bbce2c60ed141793a762 |
08-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Robustify callers that rebuild typename type nodes again NULL return types. Fixes PR6463. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97924 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplate.cpp
|
a50ce325b1ddd2bcbbfc1082ac93f3861d0a3a3d |
08-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Robustify callers that rebuild typename type nodes again NULL return types. Fixes PR6463. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97924 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplate.cpp
|
c92b06b42ed3610f21a74e60c8efaf7a98c910b1 |
08-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Perform overload resolution when static_cast'ing from a pointer-to-member-to-derived to a pointer-to-member-to-base. Fixes PR6072. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97923 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
4ce46c2db2b17ef52b34dbeeec01e448025c8edc |
08-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Perform overload resolution when static_cast'ing from a pointer-to-member-to-derived to a pointer-to-member-to-base. Fixes PR6072. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97923 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
4921e56c5e2fcaf9633cc36e1526b8dbe6e3c4e7 |
08-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Reference binding via user-defined conversion can compute a binding that is not reference-related (because it requires another implicit conversion to which we can find). Fixes PR6483. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97922 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaInit.cpp
|
a1a9f035852e35ed88f4902a855eb952cf08bebb |
08-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Reference binding via user-defined conversion can compute a binding that is not reference-related (because it requires another implicit conversion to which we can find). Fixes PR6483. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97922 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaInit.cpp
|
040675bfe6e9cb6727056d68005e56c94bb00f15 |
07-Mar-2010 |
Eli Friedman <eli.friedman@gmail.com> |
Fix for PR6294: we should only delay recording nested dynamic classes if they are lexically nested. Othewise, we never end up recording semantically nested classes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97900 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d6a9324e9b0f77917a6f56781aba80f0d39ded55 |
07-Mar-2010 |
Eli Friedman <eli.friedman@gmail.com> |
Fix for PR6294: we should only delay recording nested dynamic classes if they are lexically nested. Othewise, we never end up recording semantically nested classes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97900 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
6f4bcb5eb38d0de9400ab8259f2a5d0a0a76023b |
07-Mar-2010 |
Tanya Lattner <tonic@nondot.org> |
Fix 80 col violation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97898 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
1dcd061f7209f227d785043bd4a75e427d851abe |
07-Mar-2010 |
Tanya Lattner <tonic@nondot.org> |
Fix 80 col violation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97898 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
fd7823bb8885d6a34bf6d68ec6ed8e4f5b2168c5 |
07-Mar-2010 |
Tanya Lattner <tonic@nondot.org> |
Fix indentation, use string directly instead of StringRef. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97896 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
47f164e15b9358b51ae65f8249d56842f8750767 |
07-Mar-2010 |
Tanya Lattner <tonic@nondot.org> |
Fix indentation, use string directly instead of StringRef. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97896 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
2b727bc60aa5922867945a36853eedd8b28d6350 |
07-Mar-2010 |
Tanya Lattner <tonic@nondot.org> |
Fix some weird patch issue. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97894 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
20df6683f1e4834c42d1c37509900d1fecddef4a |
07-Mar-2010 |
Tanya Lattner <tonic@nondot.org> |
Fix some weird patch issue. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97894 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
d0f1f3f71e8712cd32ebcf013519620f31d3e81a |
07-Mar-2010 |
Tanya Lattner <tonic@nondot.org> |
Implement missing-braces warning and add a test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97893 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
1e1d396dc55002a2a6355048db542a38b5137002 |
07-Mar-2010 |
Tanya Lattner <tonic@nondot.org> |
Implement missing-braces warning and add a test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97893 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
44ac4688ac20add5eb908f346567ed9dbad0d385 |
06-Mar-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Allow use of byref (__block attributed) arrays inside the block. Fixes radar 7671883. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97863 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
dbf217af72acefe7702c65dad2d5e534b3de9674 |
06-Mar-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Allow use of byref (__block attributed) arrays inside the block. Fixes radar 7671883. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97863 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
82bfb660631a90d4ffac195d8d306c4fb9c4c508 |
06-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When declaring a catch block in C++, make sure that the type being caught can be copy-initialized and destructed. Fixes PR6518. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97853 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
6d1828949df82e2f2bb2606ea7a3b40029a7f9e2 |
06-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
When declaring a catch block in C++, make sure that the type being caught can be copy-initialized and destructed. Fixes PR6518. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97853 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
704334111420dc14e5787355626a903b34298bd2 |
05-Mar-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to build qualifier on objective-c pointer types. Fixes radar 7626768. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97847 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
a42286486c85402c65f9d30df17e6b1b037a6ade |
05-Mar-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to build qualifier on objective-c pointer types. Fixes radar 7626768. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97847 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
7ae18b0ca436a4bf7ebb9cc54bfa690bb542cc60 |
04-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Reinstate r97674 with a fix for the assertion that was firing in <list> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97686 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
reeTransform.h
|
5fccd36204f11c8491325038e6ffcc784399098e |
04-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Reinstate r97674 with a fix for the assertion that was firing in <list> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97686 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
reeTransform.h
|
4fdb5e7e2f3c6ef6f7005e74c5efb2f74fce8d37 |
04-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Revert r97674; it's causing failures git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97677 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
reeTransform.h
|
a7cb22d27f4440d264f2a1407c43b8d7259d23b0 |
04-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Revert r97674; it's causing failures git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97677 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
reeTransform.h
|
d2590c785fe1ce8eb64108d36ef746e8a4e11b30 |
03-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement disambiguation of base class members via a nested-name-specifier. For example, this allows member access in diamond-shaped hierarchies like: struct Base { void Foo(); int Member; }; struct D1 : public Base {}; struct D2 : public Base {}; struct Derived : public D1, public D2 { } void Test(Derived d) { d.Member = 17; // error: ambiguous cast from Derived to Base d.D1::Member = 17; // error: okay, modify D1's Base's Member } Fixes PR5820 and <rdar://problem/7535045>. Also, eliminate some redundancy between Sema::PerformObjectMemberConversion() and Sema::PerformObjectArgumentInitialization() -- the latter now calls the former. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97674 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
reeTransform.h
|
b29b37d7e5bba50acc3a6642a2c90db080c22b90 |
03-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement disambiguation of base class members via a nested-name-specifier. For example, this allows member access in diamond-shaped hierarchies like: struct Base { void Foo(); int Member; }; struct D1 : public Base {}; struct D2 : public Base {}; struct Derived : public D1, public D2 { } void Test(Derived d) { d.Member = 17; // error: ambiguous cast from Derived to Base d.D1::Member = 17; // error: okay, modify D1's Base's Member } Fixes PR5820 and <rdar://problem/7535045>. Also, eliminate some redundancy between Sema::PerformObjectMemberConversion() and Sema::PerformObjectArgumentInitialization() -- the latter now calls the former. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97674 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
reeTransform.h
|
5195b184852ccddb9364db8aa9eb84cf758a68c4 |
03-Mar-2010 |
John McCall <rjmccall@apple.com> |
Suppress implicit member redeclarations arising from explicit instantiation declarations after the member has been explicitly specialized. We already did this after explicit instantiation definitions; not doing it for declarations meant that subsequent definitions would see a previous member declaration with specialization kind "explicit instantiation decl", which would then happily get overridden. Fixes PR 6458. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97605 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
e97c32f9578861d575ca96bbbae426c76cbc9024 |
03-Mar-2010 |
John McCall <rjmccall@apple.com> |
Suppress implicit member redeclarations arising from explicit instantiation declarations after the member has been explicitly specialized. We already did this after explicit instantiation definitions; not doing it for declarations meant that subsequent definitions would see a previous member declaration with specialization kind "explicit instantiation decl", which would then happily get overridden. Fixes PR 6458. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97605 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
a2435baa80a5beea29f291219f788b1f4908f5d6 |
02-Mar-2010 |
Rafael Espindola <rafael.espindola@gmail.com> |
During codegen assert that any copy assignment, destructor or constructor that we need to synthesize has been marked as used by Sema. Change Sema to avoid these asserts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97589 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExprCXX.cpp
|
7b9a5aa7c0d76f577699d25ce6afe21ecccb60b7 |
02-Mar-2010 |
Rafael Espindola <rafael.espindola@gmail.com> |
During codegen assert that any copy assignment, destructor or constructor that we need to synthesize has been marked as used by Sema. Change Sema to avoid these asserts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97589 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExprCXX.cpp
|
befd3eac9dd217a76f139bddc714f35e26688467 |
02-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Diagnose the declaration of enum templates. Also, be a bit more careful about value-dependent enumerators. Fixes PR5786. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97570 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
9b9edd619a7e616d3287435cb5a3f9b1aea648e8 |
02-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Diagnose the declaration of enum templates. Also, be a bit more careful about value-dependent enumerators. Fixes PR5786. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97570 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
48653821d007565e47edf112a7e0548f5b56f4a5 |
02-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Use CXXTemporaryObjectExpr for explicitly-constructed temporaries. We used to do this, but it got lost when we switched functional-style cast syntax over to using the new initialization code. Fixes PR6457. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97568 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
reeTransform.h
|
91be6f5ccbde073e592bed9a3e3bc363957714fb |
02-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Use CXXTemporaryObjectExpr for explicitly-constructed temporaries. We used to do this, but it got lost when we switched functional-style cast syntax over to using the new initialization code. Fixes PR6457. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97568 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
reeTransform.h
|
11a67a897bcdef4298a977f1d1a3551206c85197 |
02-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Unify initializer-instantiation code for variable declarations and base/member initializers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97560 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
6b98b2e5f33ce2dcdb7fa385f7e21672d49f1a69 |
02-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Unify initializer-instantiation code for variable declarations and base/member initializers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97560 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
0d432abff06e87a821e4b337339857ff8ea713a4 |
02-Mar-2010 |
John McCall <rjmccall@apple.com> |
Split out types that are non-canonical unless dependent as their own category. Use this in a few places to eliminate unnecessary TST cases and do some future-proofing. Provide terrible manglings for typeof. Mangle decltype with some hope of accuracy. Our manglings for some of the cases covered in the testcase are different from gcc's, which I've raised as an issue with the ABI list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97523 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
ad5e73887052193afda72db8efcb812bd083a4a8 |
02-Mar-2010 |
John McCall <rjmccall@apple.com> |
Split out types that are non-canonical unless dependent as their own category. Use this in a few places to eliminate unnecessary TST cases and do some future-proofing. Provide terrible manglings for typeof. Mangle decltype with some hope of accuracy. Our manglings for some of the cases covered in the testcase are different from gcc's, which I've raised as an issue with the ABI list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97523 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
d7f8107698d90ee34b13606ffcb2c1b217e0d69f |
02-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Keep an explicit stack of function and block scopes, each element of which has the label map, switch statement stack, etc. Previously, we had a single set of maps in Sema (for the function) along with a stack of block scopes. However, this lead to funky behavior with nested functions, e.g., in the member functions of local classes. The explicit-stack approach is far cleaner, and we retain a 1-element cache so that we're not malloc/free'ing every time we enter a function. Fixes PR6382. Also, tweaked the unused-variable warning suppression logic to look at errors within a given Scope rather than within a given function. The prior code wasn't looking at the right number-of-errors count when dealing with blocks, since the block's count would be deallocated before we got to ActOnPopScope. This approach works with nested blocks/functions, and gives tighter error recovery. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97518 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaChecking.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaStmt.cpp
|
9ea9bdbc14374f7bacdb50d3e52c664ff12150ff |
02-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Keep an explicit stack of function and block scopes, each element of which has the label map, switch statement stack, etc. Previously, we had a single set of maps in Sema (for the function) along with a stack of block scopes. However, this lead to funky behavior with nested functions, e.g., in the member functions of local classes. The explicit-stack approach is far cleaner, and we retain a 1-element cache so that we're not malloc/free'ing every time we enter a function. Fixes PR6382. Also, tweaked the unused-variable warning suppression logic to look at errors within a given Scope rather than within a given function. The prior code wasn't looking at the right number-of-errors count when dealing with blocks, since the block's count would be deallocated before we got to ActOnPopScope. This approach works with nested blocks/functions, and gives tighter error recovery. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97518 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaChecking.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaStmt.cpp
|
3fab96f19d570b36be262f9f2e9ec204bef8d722 |
01-Mar-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Fix the lookup of names used in a friend declaration to not attempt to re-declare them. This fixes PR6317. Also add the beginnings of an interesting test case for p1 of [class.friend] which also covers PR6317. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97499 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
7bf3600f56342dc434dad994d0c71068e5d3b5c7 |
01-Mar-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Fix the lookup of names used in a friend declaration to not attempt to re-declare them. This fixes PR6317. Also add the beginnings of an interesting test case for p1 of [class.friend] which also covers PR6317. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97499 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
1165a0755002585b6cbb937bd0fa541aa4d817fd |
01-Mar-2010 |
Chris Lattner <sabre@nondot.org> |
fix PR5933: don't warn about unused variables if a function has other errors in it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97498 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
e6794974b706ddd51e65dcea411a6378a0f16a2e |
01-Mar-2010 |
Chris Lattner <sabre@nondot.org> |
fix PR5933: don't warn about unused variables if a function has other errors in it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97498 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
3cf7ccad96dc226ba1629be8545cddbbc000806d |
01-Mar-2010 |
Chris Lattner <sabre@nondot.org> |
Implement jump checking for initialized c++ variables, implementing a fixme and PR6451. Only perform jump checking if the containing function has no errors, and add the infrastructure needed to do this. On the testcase in the PR, we produce: t.cc:6:3: error: illegal goto into protected scope goto later; ^ t.cc:7:5: note: jump bypasses variable initialization X x; ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97497 91177308-0d34-0410-b5e6-96231b3b80d8
umpDiagnostics.cpp
ema.cpp
ema.h
emaDecl.cpp
emaDeclObjC.cpp
emaExpr.cpp
|
6d97e5e4b7abdae710c2548b51f4ed0298e86d80 |
01-Mar-2010 |
Chris Lattner <sabre@nondot.org> |
Implement jump checking for initialized c++ variables, implementing a fixme and PR6451. Only perform jump checking if the containing function has no errors, and add the infrastructure needed to do this. On the testcase in the PR, we produce: t.cc:6:3: error: illegal goto into protected scope goto later; ^ t.cc:7:5: note: jump bypasses variable initialization X x; ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97497 91177308-0d34-0410-b5e6-96231b3b80d8
umpDiagnostics.cpp
ema.cpp
ema.h
emaDecl.cpp
emaDeclObjC.cpp
emaExpr.cpp
|
5b5a5f5bf8854b865079856b738033aeae200d40 |
01-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Start detangling the BlockSemaInfo/Sema mess. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97494 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
076ceb093e5e4c1d6e8f6fcd27a816277a1041e2 |
01-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Start detangling the BlockSemaInfo/Sema mess. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97494 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
6328dfd8c453c3b28b6c7cf8b549f5c56c4e1982 |
01-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When looking for a redeclaration of a static variable, only look for redeclarations. Fixes PR6449 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97478 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
449d0a829007ea654912098e6a73134a2c529d61 |
01-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
When looking for a redeclaration of a static variable, only look for redeclarations. Fixes PR6449 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97478 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
be4eab0c12a4467e0f84c6efc3fb75d5a7eba91e |
01-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When instantiating a function-scoped enum, make sure that it and its enumeration constants get placed into the local instantiation hash table. Fixes PR6375. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97471 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateInstantiateDecl.cpp
|
96084f171f4824397dc48453146f0a9719cb9247 |
01-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
When instantiating a function-scoped enum, make sure that it and its enumeration constants get placed into the local instantiation hash table. Fixes PR6375. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97471 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateInstantiateDecl.cpp
|
bbba89cb63b719b3295ee0955c6e8806e8012a13 |
01-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Robustify instantiation of templates when there are errors in the template definition. Do this both by being more tolerant of errors in our asserts and by not dropping a variable declaration completely when its initializer is ill-formed. Fixes the crash-on-invalid in PR6375, but not the original issue. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97463 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateInstantiateDecl.cpp
|
00225547b51b42f7400eed36475b6672418a1151 |
01-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Robustify instantiation of templates when there are errors in the template definition. Do this both by being more tolerant of errors in our asserts and by not dropping a variable declaration completely when its initializer is ill-formed. Fixes the crash-on-invalid in PR6375, but not the original issue. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97463 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateInstantiateDecl.cpp
|
83d483e0c97703eb7bf516e69bf89abe693da38c |
01-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Finish pushing source-location information though TreeTransform's TransformDefinition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97445 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
reeTransform.h
|
aac571c68de0a7c58d92fba0057e308f0e6d115c |
01-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Finish pushing source-location information though TreeTransform's TransformDefinition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97445 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
reeTransform.h
|
4d11decf65a50cde9780eb46f92e7f7c90117856 |
01-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When looking for the instantiated declaration that corresponds to a given declaration in a template, make sure that the context we're searching through is complete. Fixes PR6376. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97444 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
7c1e98f1cb37b40e619a0c8aee8b337f037b432b |
01-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
When looking for the instantiated declaration that corresponds to a given declaration in a template, make sure that the context we're searching through is complete. Fixes PR6376. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97444 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
f9f0dc5518a220b5a58136faf2a6be5418ba5972 |
01-Mar-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Don't warn about case-value conversions from a negative value to a larger unsigned value, since this is implementation-defined behavior. (We previously suppressed this warning when converting from a signed value to an unsigned value of the same size). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97430 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
f9f627dbbc62fbf51b906c24c783b4249dc7e9bb |
01-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
Don't warn about case-value conversions from a negative value to a larger unsigned value, since this is implementation-defined behavior. (We previously suppressed this warning when converting from a signed value to an unsigned value of the same size). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97430 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
97d35a2f4f6cb1cc51e48cfd1841c7fd5a5f5377 |
28-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Warn about the deprecated string literal -> char* conversion. Fixes PR6428. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97404 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaOverload.cpp
emaOverload.h
|
a9bff30776888977f580c9cac212fd1583ee963e |
28-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Warn about the deprecated string literal -> char* conversion. Fixes PR6428. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97404 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaOverload.cpp
emaOverload.h
|
62755a5da7e2f51f0d1794024f58bd3797457dd6 |
27-Feb-2010 |
Benjamin Kramer <benny.kra@googlemail.com> |
Add an overload of Preprocessor::getSpelling which takes a SmallVector and returns a StringRef. Use it to simplify some repetitive code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97322 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ddeea5644367c9c153c9fee9e51bdea85ce43cbd |
27-Feb-2010 |
Benjamin Kramer <benny.kra@googlemail.com> |
Add an overload of Preprocessor::getSpelling which takes a SmallVector and returns a StringRef. Use it to simplify some repetitive code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97322 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
2b4bc45a966ba182875bc697d6daceea6086ac8f |
27-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Fix crasher caused by setting a bit in a possibly empty bitvector while doing printf format string checking. This is a recent regression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97318 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
e3fc54790250076e33ad25b14e5be293514fe5ea |
27-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Fix crasher caused by setting a bit in a possibly empty bitvector while doing printf format string checking. This is a recent regression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97318 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
62f46195bb61f91f9b3b476f4dcfa10126c18ff2 |
27-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
For printf format string checking, add support for positional format strings. Along the way, coelesce some of the diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97297 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
efaff195ba1fa55b6fe0b0b2435b81451387d241 |
27-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
For printf format string checking, add support for positional format strings. Along the way, coelesce some of the diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97297 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
a8916e256e298e07e0d0f5fbee4bc7f8ee354d67 |
27-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Skip dependent virtual base classes; fixes PR6413. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97291 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
5fe8c04009eff540ebaa0cceb2e75c3908322e11 |
27-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Skip dependent virtual base classes; fixes PR6413. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97291 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
590e10016ca12b2a462099ae29801cc412fa8edd |
27-Feb-2010 |
John McCall <rjmccall@apple.com> |
At sabre's request, drop the FP bounds diagnostics down to warnings and file them under -Wbad-literal. They're still on by default. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97284 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
2a0d7574acaa3a8d516e9ae4b720755460ebe8a8 |
27-Feb-2010 |
John McCall <rjmccall@apple.com> |
At sabre's request, drop the FP bounds diagnostics down to warnings and file them under -Wbad-literal. They're still on by default. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97284 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
42f1adfc93e40ec0d8d4e7ceaac2dd664b1cb727 |
26-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
For printf format string checking, move the tracking of the data argument index out of Sema and into analyze_printf::ParseFormatString(). Also use a bitvector to determine what arguments have been covered (instead of just checking to see if the last argument consumed is the max argument). This is prep. for support positional arguments (an IEEE extension). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97248 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
7f70dc85d5055c19c8003f43a59135de211ad1b9 |
26-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
For printf format string checking, move the tracking of the data argument index out of Sema and into analyze_printf::ParseFormatString(). Also use a bitvector to determine what arguments have been covered (instead of just checking to see if the last argument consumed is the max argument). This is prep. for support positional arguments (an IEEE extension). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97248 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
6c99218ad680cc937fc7213755af165c0be2245e |
26-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
An explicit specialization is allowed following an explicit instantiation so long as that explicit specialization was declared previously. Fixes PR6160. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97210 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
dc0a11cf52cf34ffae941255df60a086e44d1a71 |
26-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
An explicit specialization is allowed following an explicit instantiation so long as that explicit specialization was declared previously. Fixes PR6160. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97210 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
d56fc0f9970dd972e6e0109a0d8d86cc7f91b59d |
26-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement semantic analysis for C++ [expr.new]p18-20, which describe how we find the operator delete that matches withe operator new we found in a C++ new-expression. This will also need CodeGen support. On a happy note, we're now a "nans" away from building tramp3d-v4. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97209 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
6d90870fe821a9b1a7822d3e28032042d03e5680 |
26-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement semantic analysis for C++ [expr.new]p18-20, which describe how we find the operator delete that matches withe operator new we found in a C++ new-expression. This will also need CodeGen support. On a happy note, we're now a "nans" away from building tramp3d-v4. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97209 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
4205f62ff8807b431e6528db0b3289da4f6965df |
26-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Commit Eli's fix for implicit conversions to array type. Fixes PR6264. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97202 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
692f85c1d217c8c3cdc06d884ad61b101c75c856 |
26-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Commit Eli's fix for implicit conversions to array type. Fixes PR6264. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97202 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
14a6c3ef4d4779efc4b538b02fb84854657d8227 |
26-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Make sure to mark constructors, operator new, and operator delete as used when we instantiate C++ new expressions, delete expressions, and object-construction expressions. Fixes PR6424, although we can't test all of it until we finish implementing lookup of "operator delete" for new expressions (!). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97195 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
1af745143eb3066660d8855c17ccec6b38f5d789 |
26-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Make sure to mark constructors, operator new, and operator delete as used when we instantiate C++ new expressions, delete expressions, and object-construction expressions. Fixes PR6424, although we can't test all of it until we finish implementing lookup of "operator delete" for new expressions (!). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97195 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
0635b0560f1e8e93b579e8a3b1156e70cce2e6a9 |
26-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When we decide to re-use an existing CXXConstructExpr node, make sure to mark the constructor as referenced. Fixes the narrow issue reported in PR6424, but there are a few other places that I'll fix before closing out that PR. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97185 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
c845aad6f7d012ab0cd0a040515ab512d1a93566 |
26-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
When we decide to re-use an existing CXXConstructExpr node, make sure to mark the constructor as referenced. Fixes the narrow issue reported in PR6424, but there are a few other places that I'll fix before closing out that PR. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97185 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
5dfd9b7757839cadd1228e609ac9e098c4a3e279 |
25-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When computing the composite pointer type for relational comparisons, equality comparisons, and conditional operators, produce a composite pointer type with the appropriate additional "const" qualifiers if the pointer types would otherwise be incompatible. This is a small extension (also present in GCC and EDG in a slightly different form) that permits code like: void** i; void const** j; i == j; with the following extwarn: t.cpp:5:5: warning: comparison of distinct pointer types ('void **' and 'void const **') uses non-standard composite pointer type 'void const *const *' [-pedantic] i == j; ~ ^ ~ Fixes PR6346, and I'll be filing a core issue about this with the C++ committee. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97177 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprCXX.cpp
|
b2cb1cbd727469e1567a6f2535895e6b64e12c35 |
25-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
When computing the composite pointer type for relational comparisons, equality comparisons, and conditional operators, produce a composite pointer type with the appropriate additional "const" qualifiers if the pointer types would otherwise be incompatible. This is a small extension (also present in GCC and EDG in a slightly different form) that permits code like: void** i; void const** j; i == j; with the following extwarn: t.cpp:5:5: warning: comparison of distinct pointer types ('void **' and 'void const **') uses non-standard composite pointer type 'void const *const *' [-pedantic] i == j; ~ ^ ~ Fixes PR6346, and I'll be filing a core issue about this with the C++ committee. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97177 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprCXX.cpp
|
ea1d01cdd5c4f6fe94d3c3f79ee0bf9deede4922 |
25-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Allow us to compare derived-to-base conversions between a reference binding and a copy-construction. Fixes an overloading problem in the Clang-on-Clang build. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97161 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
9e23932aca7997315a78ea50e9415631a1880fa0 |
25-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Allow us to compare derived-to-base conversions between a reference binding and a copy-construction. Fixes an overloading problem in the Clang-on-Clang build. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97161 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
2f1000d79435253e9d0b2498c141b8551df42c78 |
25-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Don't try to finalize an ill-formed variable or one whose class type is ill-formed. Fixes PR6421 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97152 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
333de066a0c018170142150d563f3acdb2ad80f2 |
25-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Don't try to finalize an ill-formed variable or one whose class type is ill-formed. Fixes PR6421 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97152 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
e0d3ff119a773f104c5f9828de77e6ab1d941dd7 |
25-Feb-2010 |
Gabor Greif <ggreif@gmail.com> |
Add "template" keyword at strategic position to fix compilation using g++ v3.4. I'll watch the buildbots and back out if necessary. Feel free to do the same if something breaks. Without this patch I get (on g++ 3.4.6) following error: In file included from clang/lib/Sema/SemaTemplate.cpp:14: clang/lib/Sema/TreeTransform.h: In member function `clang::ASTOwningResult<&clang::ActionBase::DeleteExpr> clang::TreeTransform<Derived>::RebuildCXXPseudoDestructorExpr(clang::ASTOwningResult<&clang::ActionBase::DeleteExpr>, clang::SourceLocation, bool, clang::NestedNameSpecifier*, clang::SourceRange, clang::TypeSourceInfo*, clang::SourceLocation, clang::SourceLocation, clang::PseudoDestructorTypeStorage)': clang/lib/Sema/TreeTransform.h:5784: error: expected primary-expression before '>' token clang/lib/Sema/TreeTransform.h:5784: error: expected primary-expression before ')' token make[4]: *** [clang/lib/Sema/Release/SemaTemplate.o] Error 1 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97136 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
bf2ca2f87ff0b33b839b1b51d233a79bb56e5bac |
25-Feb-2010 |
Gabor Greif <ggreif@gmail.com> |
Add "template" keyword at strategic position to fix compilation using g++ v3.4. I'll watch the buildbots and back out if necessary. Feel free to do the same if something breaks. Without this patch I get (on g++ 3.4.6) following error: In file included from clang/lib/Sema/SemaTemplate.cpp:14: clang/lib/Sema/TreeTransform.h: In member function `clang::ASTOwningResult<&clang::ActionBase::DeleteExpr> clang::TreeTransform<Derived>::RebuildCXXPseudoDestructorExpr(clang::ASTOwningResult<&clang::ActionBase::DeleteExpr>, clang::SourceLocation, bool, clang::NestedNameSpecifier*, clang::SourceRange, clang::TypeSourceInfo*, clang::SourceLocation, clang::SourceLocation, clang::PseudoDestructorTypeStorage)': clang/lib/Sema/TreeTransform.h:5784: error: expected primary-expression before '>' token clang/lib/Sema/TreeTransform.h:5784: error: expected primary-expression before ')' token make[4]: *** [clang/lib/Sema/Release/SemaTemplate.o] Error 1 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97136 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
a0cf0d82ef49955e39c8358dd50695a503bdddff |
25-Feb-2010 |
John McCall <rjmccall@apple.com> |
When comparing two method overload candidates during overload diagnostics, skip the object argument conversion if either of the candidates didn't initialize it. Fixes PR6421, which is such a very straightforward extension of PR6398 that I should have worked it into the last test case (and therefore caught it then). Ah well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97135 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
3a8133727659077d0c918226e5dad6c16c8274f6 |
25-Feb-2010 |
John McCall <rjmccall@apple.com> |
When comparing two method overload candidates during overload diagnostics, skip the object argument conversion if either of the candidates didn't initialize it. Fixes PR6421, which is such a very straightforward extension of PR6398 that I should have worked it into the last test case (and therefore caught it then). Ah well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97135 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
e092dec5ea2419f4f614b4a4136ffc85ff8dafc0 |
25-Feb-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Fix a really trivial crasher and begin fleshing out one of the namespace test cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97134 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
78bd771b27d696d156899471303622fa51f52438 |
25-Feb-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Fix a really trivial crasher and begin fleshing out one of the namespace test cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97134 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
fb012dc6bd88ee0bdac271fb91cde4c2fc9f625c |
25-Feb-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Add a new conversion rank to classify conversions between complex and scalar types. Rank these conversions below other conversions. This allows overload resolution when the only distinction is between a complex and scalar type. It also brings the complex overload resolutin in line with GCC's. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97128 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaOverload.h
|
23a370f9455698e5501101aea7ad8a884a8d4556 |
25-Feb-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Add a new conversion rank to classify conversions between complex and scalar types. Rank these conversions below other conversions. This allows overload resolution when the only distinction is between a complex and scalar type. It also brings the complex overload resolutin in line with GCC's. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97128 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaOverload.h
|
d8fa1bf0cf60f7c0dd5a35288284215288264851 |
25-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Restore the invariant that a nested-name-specifier can only contain class types, dependent types, and namespaces. I had previously weakened this invariant while working on parsing pseudo-destructor expressions, but recent work in that area has made these changes unnecessary. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97112 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaExprCXX.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
reeTransform.h
|
edc90500b1d2587bf0b698fada14537d6741fddf |
25-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Restore the invariant that a nested-name-specifier can only contain class types, dependent types, and namespaces. I had previously weakened this invariant while working on parsing pseudo-destructor expressions, but recent work in that area has made these changes unnecessary. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97112 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaExprCXX.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
reeTransform.h
|
036c880a4b494c72d36140eb6eed429e484141a5 |
25-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Allow __attribute__((unused)) to be applied to ObjC ivars. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97103 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
2ec93a8ec874088f7c410da46546ebdac94f258c |
25-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Allow __attribute__((unused)) to be applied to ObjC ivars. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97103 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
cba74c14f903b06b46c2120028e55f3ee0e194fa |
25-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Remove some oogly code made dead by the pseudo-destructor instantiation changes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97095 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
f316a1d40bf224f16576b9b1727003d2259399f9 |
25-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Remove some oogly code made dead by the pseudo-destructor instantiation changes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97095 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
7245a51b0677dec904fff139ee23b375c238a78d |
25-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Use CXXPseudoDestructorExpr as the stored representation for dependent expressions that look like pseudo-destructors, e.g., p->T::~T() where p has dependent type. At template instantiate time, we determine whether we actually have a pseudo-destructor or a member access, and funnel down to the appropriate routine in Sema. Fixes PR6380. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97092 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
reeTransform.h
|
a2e7dd2f4a50d835351153aee568d35ccc986310 |
25-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Use CXXPseudoDestructorExpr as the stored representation for dependent expressions that look like pseudo-destructors, e.g., p->T::~T() where p has dependent type. At template instantiate time, we determine whether we actually have a pseudo-destructor or a member access, and funnel down to the appropriate routine in Sema. Fixes PR6380. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97092 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
reeTransform.h
|
f8f530262a9f1eeec6a7dfa37cd199d42b6613bd |
25-Feb-2010 |
John McCall <rjmccall@apple.com> |
Catch more uses of uninitialized implicit conversion sequences. When diagnosing bad conversions, skip the conversion for ignored object arguments. Fixes PR 6398. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97090 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExprCXX.cpp
emaOverload.cpp
emaOverload.h
|
b1bdc6232d7b4d8574b5436982435ad57f429a91 |
25-Feb-2010 |
John McCall <rjmccall@apple.com> |
Catch more uses of uninitialized implicit conversion sequences. When diagnosing bad conversions, skip the conversion for ignored object arguments. Fixes PR 6398. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97090 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExprCXX.cpp
emaOverload.cpp
emaOverload.h
|
4f557fe5b848b1cdeafc57b615db27966cf328e6 |
25-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Keep track of the location of the '~' in a pseudo-destructor expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97080 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprCXX.cpp
reeTransform.h
|
fce46ee68f779e239826e69e45d01d4c8e5323ca |
25-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Keep track of the location of the '~' in a pseudo-destructor expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97080 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprCXX.cpp
reeTransform.h
|
73ec616e0974b9bcc911323653706a853589fc71 |
25-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Retain complete source information for the type after the '~' in a CXXPseudoDestructorExpr. Update template instantiation for pseudo-destructor expressions to use this source information and to make use of Sema::BuildPseudoDestructorExpr when the base expression is dependent or refers to a scalar type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97079 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprCXX.cpp
reeTransform.h
|
26d4ac97fb514bb60c2536eae6f203dc569159d9 |
25-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Retain complete source information for the type after the '~' in a CXXPseudoDestructorExpr. Update template instantiation for pseudo-destructor expressions to use this source information and to make use of Sema::BuildPseudoDestructorExpr when the base expression is dependent or refers to a scalar type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97079 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprCXX.cpp
reeTransform.h
|
f485064a58e04a1246c7a549eb8829f8d408c531 |
25-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Make sure that we have type source information for the scope type of a pseudo-destructor expression. Attempt #1 at fixing the MSVC buildbot. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97076 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
b4a418fd23b6b66dff5379fecc50c09abe368edd |
25-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Make sure that we have type source information for the scope type of a pseudo-destructor expression. Attempt #1 at fixing the MSVC buildbot. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97076 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
72883c1829da5e61da622dfee792a5acf3befcdf |
24-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Split ActOnPseudoDestructorExpr into the part that interprets the parser's data structures and the part that performs semantic analysis and AST building, in preparation for improved template instantiation of pseudo-destructor expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97070 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
|
b57fb49b6569db9716877de6857e4de572edfb75 |
24-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Split ActOnPseudoDestructorExpr into the part that interprets the parser's data structures and the part that performs semantic analysis and AST building, in preparation for improved template instantiation of pseudo-destructor expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97070 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
|
0bd6205193f5c0865b47202d1da8fd9c7ddfa569 |
24-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Retain source information for the "type-name ::" in a pseudo-destructor expression such as p->T::~T() git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97060 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprCXX.cpp
|
e0601ea1220348957dacec5f3dd0707837365290 |
24-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Retain source information for the "type-name ::" in a pseudo-destructor expression such as p->T::~T() git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97060 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprCXX.cpp
|
32c627e217b55256110f5d7adfd6bff6dd33169a |
24-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
ActOnPseudoDestructorExpr now performs all semantic analysis for pseudo-destructor expressions, and builds the CXXPseudoDestructorExpr node directly. Currently, this only affects pseudo-destructor expressions when they are parsed, but not after template instantiation. That's coming next... Improve parsing of pseudo-destructor-names. When parsing the nested-name-specifier and we hit the sequence of tokens X :: ~, query the actual module to determine whether X is a type-name (in which case the X :: is part of the pseudo-destructor-name but not the nested-name-specifier) or not (in which case the X :: is part of the nested-name-specifier). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97058 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaExpr.cpp
emaExprCXX.cpp
|
77549080fb7b9af31606b3c1b4830a94429fb1fd |
24-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
ActOnPseudoDestructorExpr now performs all semantic analysis for pseudo-destructor expressions, and builds the CXXPseudoDestructorExpr node directly. Currently, this only affects pseudo-destructor expressions when they are parsed, but not after template instantiation. That's coming next... Improve parsing of pseudo-destructor-names. When parsing the nested-name-specifier and we hit the sequence of tokens X :: ~, query the actual module to determine whether X is a type-name (in which case the X :: is part of the pseudo-destructor-name but not the nested-name-specifier) or not (in which case the X :: is part of the nested-name-specifier). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97058 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaExpr.cpp
emaExprCXX.cpp
|
fe7abb31d96e05180de719014c6a6d3a90d36e92 |
24-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Rework parsing of pseudo-destructor expressions and explicit destructor calls, e.g., p->T::~T We now detect when the member access that we've parsed, e.g., p-> or x. may be a pseudo-destructor expression, either because the type of p or x is a scalar or because it is dependent (and, therefore, may become a scalar at template instantiation time). We then parse the pseudo-destructor grammar specifically: ::[opt] nested-name-specifier[opt] type-name :: ∼ type-name and hand those results to a new action, ActOnPseudoDestructorExpr, which will cope with both dependent member accesses of destructors and with pseudo-destructor expressions. This commit affects the parsing of pseudo-destructors, only; the semantic actions still go through the semantic actions for member access expressions. That will change soon. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97045 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
reeTransform.h
|
d4dca08d6b7ed2e3e3718caa6fd735960b135e9a |
24-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Rework parsing of pseudo-destructor expressions and explicit destructor calls, e.g., p->T::~T We now detect when the member access that we've parsed, e.g., p-> or x. may be a pseudo-destructor expression, either because the type of p or x is a scalar or because it is dependent (and, therefore, may become a scalar at template instantiation time). We then parse the pseudo-destructor grammar specifically: ::[opt] nested-name-specifier[opt] type-name :: ∼ type-name and hand those results to a new action, ActOnPseudoDestructorExpr, which will cope with both dependent member accesses of destructors and with pseudo-destructor expressions. This commit affects the parsing of pseudo-destructors, only; the semantic actions still go through the semantic actions for member access expressions. That will change soon. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97045 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
reeTransform.h
|
c030d6bf6779cb68995b7ece3948f87ddce045c8 |
24-Feb-2010 |
Charles Davis <cdavis@mines.edu> |
When we encounter a function-specific attribute in a declaration specifier, apply it only to the function itself, and never to the return type. Fixes part of PR6408. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97015 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
328ce34c7d0c4e8696d352853b48b385dec1fef4 |
24-Feb-2010 |
Charles Davis <cdavis@mines.edu> |
When we encounter a function-specific attribute in a declaration specifier, apply it only to the function itself, and never to the return type. Fixes part of PR6408. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97015 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
03ad03dec93e25c2b1b808a39b8d6d4d85f1eaf4 |
24-Feb-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
More Sema check for ivars in class continuation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97002 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclObjC.cpp
|
f914b9782a6091a7c7dfd41b0a273ee724351b84 |
24-Feb-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
More Sema check for ivars in class continuation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97002 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclObjC.cpp
|
76741ab2cc358fa7b9287607d06b171ae9691d6b |
23-Feb-2010 |
Rafael Espindola <rafael.espindola@gmail.com> |
Add support for the weakref attribute. We still produce "alias weak" as llvm-gcc does, but are more strict on what uses of weakref we accept. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96992 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
11e8ce7380856abee188b237c2600272df2ed09d |
23-Feb-2010 |
Rafael Espindola <rafael.espindola@gmail.com> |
Add support for the weakref attribute. We still produce "alias weak" as llvm-gcc does, but are more strict on what uses of weakref we accept. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96992 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
8d605db7ef4edd4d8129f4607bdb210a3edca395 |
23-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Fix another crash on invalid code. In this case, handle ObjC categories (with no names) that refer to an undefined class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96976 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
09b6897d967c50db36ad83b910060ea7d68a21bc |
23-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Fix another crash on invalid code. In this case, handle ObjC categories (with no names) that refer to an undefined class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96976 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
fb6e2a10519f6c413ef33a76dd0b7c6dd524f025 |
23-Feb-2010 |
John McCall <rjmccall@apple.com> |
Don't assert on compound assignment operators that operate in FP types when the result is integral. Fixes <rdar://problem/7676608>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96970 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
c0cd21d2a3301a7a88e0052aebdd09c2441f826d |
23-Feb-2010 |
John McCall <rjmccall@apple.com> |
Don't assert on compound assignment operators that operate in FP types when the result is integral. Fixes <rdar://problem/7676608>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96970 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
4b8c2fa35cd6dbd41a58e30fd5ba631030318f13 |
23-Feb-2010 |
Charles Davis <cdavis@mines.edu> |
When comparing two calling conventions after redeclaring a function, compare the canonical calling conventions instead of comparing the raw calling conventions directly. Fixes PR6361. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96895 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
064f7db69def9299f5f4d9a32114afc10b6a6420 |
23-Feb-2010 |
Charles Davis <cdavis@mines.edu> |
When comparing two calling conventions after redeclaring a function, compare the canonical calling conventions instead of comparing the raw calling conventions directly. Fixes PR6361. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96895 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
c6c8c8187e9210f5ad3e24f21da12ef1e455471c |
23-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Move the rest of the unreachable code analysis from libSema to libAnalysis (with only the error reporting in libSema). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96893 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
72919a334752bc87001a7e3a0b6e5892768fac20 |
23-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Move the rest of the unreachable code analysis from libSema to libAnalysis (with only the error reporting in libSema). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96893 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
4a460ced8627a8f8f584f1d1c9e56bc13b125fa9 |
23-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Simplify check for basic block with a CXXTryStmt terminator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96892 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
8de3cc6827afb70f4a6ce278d30549ff92a2fe49 |
23-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Simplify check for basic block with a CXXTryStmt terminator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96892 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
5e55d2171743df526c2d916cc69c8d7f744e9ebd |
23-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Start moving some of the logic for the unreachable code analysis out of libSema and into libAnalysis. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96872 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
3d2eed823d534ee370cfd7742c1e96ab3ee9a80b |
23-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Start moving some of the logic for the unreachable code analysis out of libSema and into libAnalysis. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96872 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
d2eca9d4fc86d3ec576a9e7f2d47ff8fe6bf27ed |
23-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Convert use of std::queue to llvm::SmallVector and fix buildbot. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96855 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
f067d8eecfd56a56b4192882bf86d0857c92dcc5 |
23-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Convert use of std::queue to llvm::SmallVector and fix buildbot. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96855 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
278a77e1278a5ec9574254e51da33a3b803690d4 |
23-Feb-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
More support for ivars in class extension. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96850 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
0e5ad255729ee86b8ed57e659029008984517cde |
23-Feb-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
More support for ivars in class extension. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96850 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
fc91b9720c2137740a7ce5471c647b45acac5b1a |
23-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Use SmallVectorImpl::iterator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96848 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
133a6aab12ae3706e83da7c1f2fb15316efc12c2 |
23-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Use SmallVectorImpl::iterator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96848 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
a8bda18e6f6bea95ac8bbbaad158a5b045fb2d02 |
23-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Simplify logic for determining values of 'ReturnsVoid' and 'HasNoReturn' flags. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96847 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
1e025f2e559a884a3be5db2c784cdd865352e17b |
23-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Simplify logic for determining values of 'ReturnsVoid' and 'HasNoReturn' flags. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96847 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
e8cc27e13c3019f642b9f525f57c9e43067225ef |
23-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement crazy destructor name lookup semantics differently in C++98/03 and C++0x, since the '0x semantics break valid C++98/03 code. This new mess is tracked by core issue 399, which is still unresolved. Fixes PR6358 and PR6359. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96836 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
93649fdc5e0c46e26bcba06ad39aa80196d3df27 |
23-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement crazy destructor name lookup semantics differently in C++98/03 and C++0x, since the '0x semantics break valid C++98/03 code. This new mess is tracked by core issue 399, which is still unresolved. Fixes PR6358 and PR6359. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96836 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
2ec53ace49e57fb85ba50676c71ec2f98f3096cc |
23-Feb-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Early support for declaring ivars in class extensions. wip. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96819 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
83c481ade785a919ba21a33f9a8b1b21c1212fb3 |
23-Feb-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Early support for declaring ivars in class extensions. wip. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96819 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d539afa6630f5e6c6394180ffe18eb13198b21eb |
22-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Do not require a complete type when checking for a pointer conversion between cv1 T* and cv2 T*. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96787 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
bf1764cf59e3158ad47dc1720a74490750923575 |
22-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Do not require a complete type when checking for a pointer conversion between cv1 T* and cv2 T*. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96787 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
9bc588ad899057f6f3c1b66533a7555eb33253ef |
22-Feb-2010 |
Chris Lattner <sabre@nondot.org> |
Add 'previous declaration is here' note for param redefinition errors, e.g.: t.c:1:21: error: redefinition of parameter 'x' int test(int x, int x); ^ t.c:1:14: note: previous declaration is here int test(int x, int x); ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96769 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d84aac17180075e0ede53d7762b73d3bd079b52f |
22-Feb-2010 |
Chris Lattner <sabre@nondot.org> |
Add 'previous declaration is here' note for param redefinition errors, e.g.: t.c:1:21: error: redefinition of parameter 'x' int test(int x, int x); ^ t.c:1:14: note: previous declaration is here int test(int x, int x); ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96769 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
e08f580e7d5f1a9f88448d269395f7a51971d729 |
21-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Eliminate the default arguments to ASTContext::getFunctionType(), fixing up a few callers that thought they were propagating NoReturn information but were in fact saying something about exception specifications. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96766 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaLookup.cpp
emaType.cpp
|
ce056bcaa1c97b89a4b2de2112c62d060863be2b |
21-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Eliminate the default arguments to ASTContext::getFunctionType(), fixing up a few callers that thought they were propagating NoReturn information but were in fact saying something about exception specifications. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96766 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaLookup.cpp
emaType.cpp
|
b574aa7ed9e7df5cc09e4e6298aa7d83589625a8 |
21-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement support for parsing pseudo-destructor expression with a nested-name-specifier, e.g., typedef int Int; int *p; p->Int::~Int(); This weakens the invariant that the only types in nested-name-specifiers are tag types (restricted to class types in C++98/03). However, we weaken this invariant as little as possible, accepting arbitrary types in nested-name-specifiers only when we're in a member access expression that looks like a pseudo-destructor expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96743 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaExprCXX.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
reeTransform.h
|
b10cd04880672103660e5844e51ee91af7361a20 |
21-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement support for parsing pseudo-destructor expression with a nested-name-specifier, e.g., typedef int Int; int *p; p->Int::~Int(); This weakens the invariant that the only types in nested-name-specifiers are tag types (restricted to class types in C++98/03). However, we weaken this invariant as little as possible, accepting arbitrary types in nested-name-specifiers only when we're in a member access expression that looks like a pseudo-destructor expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96743 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaExprCXX.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
reeTransform.h
|
eebf9313ef92fffe87784b53a745fe24eda18fa3 |
21-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
A constructor template cannot be used to copy to an object of the same class type (per C++ [class.copy]p3). Make sure that includes copies that involve a derived-to-base conversion. Fixes PR6141. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96742 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
12116062c8243c6f88d79dac9663a359b77741c6 |
21-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
A constructor template cannot be used to copy to an object of the same class type (per C++ [class.copy]p3). Make sure that includes copies that involve a derived-to-base conversion. Fixes PR6141. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96742 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
2c0b2a3becd6c62a444e557bb75ed2099a4113b5 |
21-Feb-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Commiting a revert from dgregor of a bit of destructor logic until we can figure out how not to break lots of code using this. See PR6358 and PR6359 for motivating examples. FIXME's left in the code and the test. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96733 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
5e895a87d001ea2e97f5201d22cc5241992ca5a2 |
21-Feb-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Commiting a revert from dgregor of a bit of destructor logic until we can figure out how not to break lots of code using this. See PR6358 and PR6359 for motivating examples. FIXME's left in the code and the test. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96733 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
b30152fd8308b0351e7f377a5dbed95aa8ff5cee |
21-Feb-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Make Decl::isOutOfLine() virtual, and use that to determine when definitions are for out of line declarations more easily. This simplifies the logic and handles the case of out-of-line class definitions correctly. Fixes PR6107. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96729 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
8761d680eaa7386e03f51286f4b84a1ffe575e2e |
21-Feb-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Make Decl::isOutOfLine() virtual, and use that to determine when definitions are for out of line declarations more easily. This simplifies the logic and handles the case of out-of-line class definitions correctly. Fixes PR6107. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96729 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
a88572e461c6bb45b49bd52a24e64eb2a2d09603 |
21-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Clang really intends to reject attribute 'warn_unused_result' on Objective-C methods, but instead it crashes on them. We might extend this attribute to work on methods, but for now fix the crasher. Addresses <rdar://problem/7670939>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96723 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
48108fdb9c3bcffe5bccd88a1a91353a4df71629 |
21-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Clang really intends to reject attribute 'warn_unused_result' on Objective-C methods, but instead it crashes on them. We might extend this attribute to work on methods, but for now fix the crasher. Addresses <rdar://problem/7670939>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96723 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
a9d1bb02c11596d7bed7ecdfc6badcb201e5fe96 |
21-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Don't emit a warning about a dllimport attribute being used in a typedef when -fms-extensions is specified. Fixes <rdar://problem/7653870>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96722 91177308-0d34-0410-b5e6-96231b3b80d8
argetAttributesSema.cpp
|
240670c8f88a0062a76c2f15431341dd0406692f |
21-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Don't emit a warning about a dllimport attribute being used in a typedef when -fms-extensions is specified. Fixes <rdar://problem/7653870>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96722 91177308-0d34-0410-b5e6-96231b3b80d8
argetAttributesSema.cpp
|
3877439ded7e6c883d496bd3af859d8fc901024d |
21-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Don't warn about functions redeclared without the dllimport attribute when -fms-extensions is enabled. Fixes <rdar://problem/7669559>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96721 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
12911a85b2e4c60822281675be133081109dcd32 |
21-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Don't warn about functions redeclared without the dllimport attribute when -fms-extensions is enabled. Fixes <rdar://problem/7669559>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96721 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
c88e462ec769f8dbdb1eff519d59986c175eeafe |
19-Feb-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Start supporting declaration of ivars in @implementation blocks. WIP. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96696 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
bd94d442f6801a4d2a25d53c1843690533180a6d |
19-Feb-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Start supporting declaration of ivars in @implementation blocks. WIP. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96696 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
2d7436407181d647d5816f39b1fc5d37c49c1c6a |
19-Feb-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Issue extended diagnostic when property dot-syntax is used and there is a setter but no getter (part of radar 7664555). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96687 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
354095c29ef10d4763ec079fde4d6f73841152f6 |
19-Feb-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Issue extended diagnostic when property dot-syntax is used and there is a setter but no getter (part of radar 7664555). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96687 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
21463c34cde5e62964da012580bf5b579d1d7fd6 |
19-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement C++ name lookup for instance variables of Objective-C classes from an instance method. Previously, we were following the Objective-C name lookup rules for ivars, which are of course completely different from and incompatible with the Objective-C++ rules. For the record, the Objective-C++ rules are the sane ones. This is another part of <rdar://problem/7660386>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96677 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
36262b81559cfce4f67256d052e4fed343a02861 |
19-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement C++ name lookup for instance variables of Objective-C classes from an instance method. Previously, we were following the Objective-C name lookup rules for ivars, which are of course completely different from and incompatible with the Objective-C++ rules. For the record, the Objective-C++ rules are the sane ones. This is another part of <rdar://problem/7660386>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96677 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
f4daf6aee0cedb3aebec4df5f5aa2a4c4ecbaefc |
19-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Make Sema::ActOnClassMessage robust when name lookup for the receiver name finds something other than a TypedefDecl or an ObjCInterfaceDecl. This is a small part of <rdar://problem/7660386>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96676 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
c5e77d5a97b495c41cb65c25b6f0ba2b62a14345 |
19-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Make Sema::ActOnClassMessage robust when name lookup for the receiver name finds something other than a TypedefDecl or an ObjCInterfaceDecl. This is a small part of <rdar://problem/7660386>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96676 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
38e9420d42304844bf68550a9270d00408b976f8 |
19-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Revert: "Change InitListExpr to allocate the array for holding references" This was causing buildbot breakage. This reverts commit d46e952cc8cb8d9eed8657d9a0b267910a0f745a. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96652 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaInit.cpp
|
ba7bc5584b8d46f4e8deb3a9d363256908fa86ea |
19-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Revert: "Change InitListExpr to allocate the array for holding references" This was causing buildbot breakage. This reverts commit d46e952cc8cb8d9eed8657d9a0b267910a0f745a. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96652 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaInit.cpp
|
b17fe9006135d1e6b6d7b545a772b9042c671c0b |
19-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Change InitListExpr to allocate the array for holding references to initializer expressions in an array allocated using ASTContext. This plugs a memory leak when ASTContext uses a BumpPtrAllocator to allocate memory for AST nodes. In my mind this isn't an ideal solution; it would be nice to have a general "vector"-like class that allocates memory using ASTContext, but whose guts could be separated from the methods of InitListExpr itself. I haven't gone and taken this approach yet because it isn't clear yet if we'll eventually want an alternate solution for recylcing memory using by InitListExprs as we are constructing the ASTs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96642 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaInit.cpp
|
9f9269e810bfe9aea0a57b09250be215808fc1a2 |
19-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Change InitListExpr to allocate the array for holding references to initializer expressions in an array allocated using ASTContext. This plugs a memory leak when ASTContext uses a BumpPtrAllocator to allocate memory for AST nodes. In my mind this isn't an ideal solution; it would be nice to have a general "vector"-like class that allocates memory using ASTContext, but whose guts could be separated from the methods of InitListExpr itself. I haven't gone and taken this approach yet because it isn't clear yet if we'll eventually want an alternate solution for recylcing memory using by InitListExprs as we are constructing the ASTs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96642 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaInit.cpp
|
292f520b74b449be401d37c8da567d631dbb8b96 |
19-Feb-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch removes IVars list from ObjCInterfaceDecl and instead relies on their DeclContext for iteration, etc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96638 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclObjC.cpp
|
11062e11236b7bc689dad150e8b490fd6b063ec3 |
19-Feb-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch removes IVars list from ObjCInterfaceDecl and instead relies on their DeclContext for iteration, etc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96638 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclObjC.cpp
|
a1a58ae2a0456e66b3bf1fdf4866d9268c366997 |
18-Feb-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Fixed a crash specific to blocks in c++ uncovered by an internal test suite. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96608 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
b372b0ff1f1a0c6814163e0fe2f22f343bac87a8 |
18-Feb-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Fixed a crash specific to blocks in c++ uncovered by an internal test suite. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96608 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
1184f3d624793029eac4cb85ddf60b89f76b09f5 |
18-Feb-2010 |
Charles Davis <cdavis@mines.edu> |
Also don't warn about force_align_arg_pointer on function typedefs. (This will break if you declare an actual function using that typedef. Come to think of it, maybe I should make this part of the type.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96570 91177308-0d34-0410-b5e6-96231b3b80d8
argetAttributesSema.cpp
|
e01c063874fa762abfba03b920bca16e1a1f10b4 |
18-Feb-2010 |
Charles Davis <cdavis@mines.edu> |
Also don't warn about force_align_arg_pointer on function typedefs. (This will break if you declare an actual function using that typedef. Come to think of it, maybe I should make this part of the type.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96570 91177308-0d34-0410-b5e6-96231b3b80d8
argetAttributesSema.cpp
|
3ca83346b34304bb98a034c48fb3e99aa912a562 |
18-Feb-2010 |
Charles Davis <cdavis@mines.edu> |
Two fixes related to force_align_arg_pointer: - Also recognize __force_align_arg_pointer__. - Don't warn if it's used on a function pointer typedef. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96568 91177308-0d34-0410-b5e6-96231b3b80d8
argetAttributesSema.cpp
|
beaf5edfb22dd36b3d0e526291fd3a074404dd3e |
18-Feb-2010 |
Charles Davis <cdavis@mines.edu> |
Two fixes related to force_align_arg_pointer: - Also recognize __force_align_arg_pointer__. - Don't warn if it's used on a function pointer typedef. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96568 91177308-0d34-0410-b5e6-96231b3b80d8
argetAttributesSema.cpp
|
7eae4971ecff09c9c177cda13398c7c61efc1e42 |
18-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Add some spacing in the code-completion results for a return statement git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96567 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
9329800d6f4c4ea8778aabd64cde1b712b290b00 |
18-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Add some spacing in the code-completion results for a return statement git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96567 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
de7b6a7cdd15d9c5cc511262a86a725e43f91fe7 |
18-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Change the behavior of ibaction attributes to be attached to methods, not ivars. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96562 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
63e5d7c85299134f088033614afd9eb213c50b48 |
18-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Change the behavior of ibaction attributes to be attached to methods, not ivars. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96562 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
cf17f290a4f5a1208d48d2855110b29f2b382f11 |
18-Feb-2010 |
Charles Davis <cdavis@mines.edu> |
Allow redefinitions of extern inline functions in GNU89 mode, just as GCC does. Fixes PR5253. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96553 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f3f8d2a52ebc0acbe6269a0302f90c21668e2404 |
18-Feb-2010 |
Charles Davis <cdavis@mines.edu> |
Allow redefinitions of extern inline functions in GNU89 mode, just as GCC does. Fixes PR5253. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96553 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
fb9feb18fb1bd2359b3975e2a605bdb02674b0c6 |
18-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Don't diagnose overflow in case statements when the conversion is a signed<->unsigned conversion with the same bit width. Fixes <rdar://problem/7658121>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96545 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
2853eac24e2e70a74d7da817653b0528b976039f |
18-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Don't diagnose overflow in case statements when the conversion is a signed<->unsigned conversion with the same bit width. Fixes <rdar://problem/7658121>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96545 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
121f3eb1c120089a920ba7e7c0188a07fad59022 |
18-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Add 'ns_returns_not_retained' and 'cf_returns_not_retained' attributes to match 'ns_returns_retained' and 'cf_returns_retained' respectively. These are not yet hooked up to the static analyzer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96535 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
31c780d95a830f0187cfcbb1016ce88f50a7dfe1 |
18-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Add 'ns_returns_not_retained' and 'cf_returns_not_retained' attributes to match 'ns_returns_retained' and 'cf_returns_retained' respectively. These are not yet hooked up to the static analyzer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96535 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
c5dab81fc70b32382d64b3811284126411466733 |
18-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
For -Wswitch-enum warnings, be sure to look through typedefs of enum types. Fixes <rdar://problem/7643909>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96531 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
30ab37122300a5f6664b8ae2d0b43b4396eb6bcb |
18-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
For -Wswitch-enum warnings, be sure to look through typedefs of enum types. Fixes <rdar://problem/7643909>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96531 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
c42a2c67081e23106d2a1f908b6ccb4c3f17139e |
17-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When diagnosing enumerator values outside of the range of 'int', be sure that we get the "too large" vs. "too small" part of the diagnostic correct. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96524 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
19c152581a46dd162c0cfacad05ad88646d527c5 |
17-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
When diagnosing enumerator values outside of the range of 'int', be sure that we get the "too large" vs. "too small" part of the diagnostic correct. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96524 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f29f9cddd965d4a78164fa569ea49a7d2ce71f70 |
17-Feb-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Use proper lexcial context for newly added ivars. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96484 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
2f14c4d18fcba4b4577dbe43016d6d42ef9973cf |
17-Feb-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Use proper lexcial context for newly added ivars. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96484 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
8edac1474e4aa4aafbf30b5a33a427681aa1fd26 |
17-Feb-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Allow for declaration and use of ivars in a stand-alone implementation (toward radar 7547942). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96479 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
3a21cd92f425680fcbfbab9552c0787b09ae9ca7 |
17-Feb-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Allow for declaration and use of ivars in a stand-alone implementation (toward radar 7547942). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96479 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
e0b26b626f91e9fac83d47f17a2f0e44116e6fd7 |
17-Feb-2010 |
Tanya Lattner <tonic@nondot.org> |
Do not add functions marked with the unused attribute to the list of unused functions to warn about. Update test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96452 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
c777221d22e2687938c061de6698ddcccbe00fdc |
17-Feb-2010 |
Tanya Lattner <tonic@nondot.org> |
Do not add functions marked with the unused attribute to the list of unused functions to warn about. Update test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96452 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
3cf68a9d706d41b069a57d75b0995562df4565c8 |
17-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Add IBAction attribute to keep the IBOutlet attribute company. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96447 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
efbddd23173ea5633cc8a004f1014c68c3ac6593 |
17-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Add IBAction attribute to keep the IBOutlet attribute company. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96447 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
c24ed1edd2698b4f3b5b64d5dff4ae13518bc19f |
17-Feb-2010 |
Charles Davis <cdavis@mines.edu> |
Revert r95939, as suggested by Alexandre Julliard from the Wine project (and our own Chris Lattner). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96431 91177308-0d34-0410-b5e6-96231b3b80d8
argetAttributesSema.cpp
|
ab44216009dbdaa9a3b26f541ead13e85f6e39b3 |
17-Feb-2010 |
Charles Davis <cdavis@mines.edu> |
Revert r95939, as suggested by Alexandre Julliard from the Wine project (and our own Chris Lattner). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96431 91177308-0d34-0410-b5e6-96231b3b80d8
argetAttributesSema.cpp
|
56c054e27cc00e53824a40e83297f3e4382ca324 |
16-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Introduce a new kind of failed result for isLvalue/isModifiableLvalue which describes temporary objects of class type in C++. Use this to provide a more-specific, remappable diagnostic when takin the address of such a temporary. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96396 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e873fb74219f48407ae0b8fa083aa7f0b6ff1427 |
16-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Introduce a new kind of failed result for isLvalue/isModifiableLvalue which describes temporary objects of class type in C++. Use this to provide a more-specific, remappable diagnostic when takin the address of such a temporary. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96396 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
3ad17e6241454cd9bec5ec0490cf65da897698f2 |
16-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Do not try to instantiate invalid declarations. It's a recipe for disaster. Fixes PR6161. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96371 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
2fa98001f832836e3f652c211a9d2f80501d659a |
16-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Do not try to instantiate invalid declarations. It's a recipe for disaster. Fixes PR6161. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96371 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
13df44a5d2692a6ea880042452de26a92931e08d |
16-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve parsing and instantiation of destructor names, so that we can now cope with the destruction of types named as dependent templates, e.g., y->template Y<T>::~Y() Nominally, we implement C++0x [basic.lookup.qual]p6. However, we don't follow the letter of the standard here because that would fail to parse template<typename T, typename U> X0<T, U>::~X0() { } properly. The problem is captured in core issue 339, which gives some (but not enough!) guidance. I expect to revisit this code when the resolution of 339 is clear, and/or we start capturing better source information for DeclarationNames. Fixes PR6152. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96367 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
reeTransform.h
|
124b878dba5007df0a268ea128a6ad8dc5dd2c5e |
16-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Improve parsing and instantiation of destructor names, so that we can now cope with the destruction of types named as dependent templates, e.g., y->template Y<T>::~Y() Nominally, we implement C++0x [basic.lookup.qual]p6. However, we don't follow the letter of the standard here because that would fail to parse template<typename T, typename U> X0<T, U>::~X0() { } properly. The problem is captured in core issue 339, which gives some (but not enough!) guidance. I expect to revisit this code when the resolution of 339 is clear, and/or we start capturing better source information for DeclarationNames. Fixes PR6152. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96367 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
reeTransform.h
|
b377da8a8d006b891ff6c7a6d2a0d5447ea11971 |
16-Feb-2010 |
Charles Davis <cdavis@mines.edu> |
dllimport and dllexport are declspec attributes, too. They're also Win32-specific. Also, fix a test to use FileCheck instead of grepping LLVM IR. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96364 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
argetAttributesSema.cpp
|
f0122fe49329cb439d55a6712bfcaad9a6570428 |
16-Feb-2010 |
Charles Davis <cdavis@mines.edu> |
dllimport and dllexport are declspec attributes, too. They're also Win32-specific. Also, fix a test to use FileCheck instead of grepping LLVM IR. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96364 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
argetAttributesSema.cpp
|
0f3888eabdc50957b5d92de10903f48c4d0f3133 |
16-Feb-2010 |
Benjamin Kramer <benny.kra@googlemail.com> |
Rename argument so the name reflects what it's doing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96342 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
|
3b1e26b708e8d00d4ba10ff857201bae2aff6bae |
16-Feb-2010 |
Benjamin Kramer <benny.kra@googlemail.com> |
Rename argument so the name reflects what it's doing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96342 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
|
f0533bcf6543bbb5d1b0338c01510eeacea44a76 |
16-Feb-2010 |
John McCall <rjmccall@apple.com> |
Support local namespace aliases and permit them to be instantiated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96335 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
|
3dbd3d5c04cd5abd7dfd83b15f51d7c610a3c512 |
16-Feb-2010 |
John McCall <rjmccall@apple.com> |
Support local namespace aliases and permit them to be instantiated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96335 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
|
5c8a08c5da6439047a8521f1b4ea6a61438917b4 |
16-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Refactor the logic for printf argument type-checking into analyze_printf::ArgTypeResult. Implement printf argument type checking for '%s'. Fixes <rdar://problem/3065808>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96310 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
4e4b30ec62d78b24e6556fea2624855c193d0e3e |
16-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Refactor the logic for printf argument type-checking into analyze_printf::ArgTypeResult. Implement printf argument type checking for '%s'. Fixes <rdar://problem/3065808>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96310 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
206030727647906a20e22bef9ef66189a85d5734 |
15-Feb-2010 |
Benjamin Kramer <benny.kra@googlemail.com> |
Add Sema support for __builtin_fpclassify by extending the existing check for __builtin_isinf and friends. Part of PR6083. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96291 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
|
e771a7ac11fb27f0e734e5de4d858f2c268895e5 |
15-Feb-2010 |
Benjamin Kramer <benny.kra@googlemail.com> |
Add Sema support for __builtin_fpclassify by extending the existing check for __builtin_isinf and friends. Part of PR6083. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96291 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
|
98f7e6919a345a0c492d5443d85dd0fa94061d7f |
15-Feb-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Fix instantiation of template functions with local classes that contain virtual methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96283 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
17e0f407d56748da21050db13ff3a093b1ffdcb7 |
15-Feb-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Fix instantiation of template functions with local classes that contain virtual methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96283 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
76a5c369ed6ab5f15886a6258371994eaea96c0c |
15-Feb-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Class continuation now has its own property ast for those declared in it. This is to allow duplicate property diagnostics for properties declared in class extensions multiple times (radar 7629420) and for future use. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96276 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
25760611365be23556b32332f8a66ae21ea93ecf |
15-Feb-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Class continuation now has its own property ast for those declared in it. This is to allow duplicate property diagnostics for properties declared in class extensions multiple times (radar 7629420) and for future use. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96276 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
14b6e87f306b3382c90a003729af114831fce5cb |
15-Feb-2010 |
John McCall <rjmccall@apple.com> |
Optimize the implementation of IdDeclInfo pooling in the IdentifierResolver. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96253 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
|
eeb1cb49244a67327fce088c1f720da1f8c021a9 |
15-Feb-2010 |
John McCall <rjmccall@apple.com> |
Optimize the implementation of IdDeclInfo pooling in the IdentifierResolver. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96253 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
|
5daf9945f234a4b04cdee99dc05824ef6481b15c |
15-Feb-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Defer covariance checks for dependent types. Add test cases that also ensure they are re-checked on instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96217 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
7385779796f48e234b4fbea27ff205d7dfb34ce8 |
15-Feb-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Defer covariance checks for dependent types. Add test cases that also ensure they are re-checked on instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96217 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
c01767755b1d878c035e1d2776394712e8952978 |
13-Feb-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Skip implicit instantiation of templated variables where a more recent redeclaration provides an explicit instantiation or is invalid. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96097 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
291b441a095b289c30d9f311fe37a2cf5ed6fd45 |
13-Feb-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Skip implicit instantiation of templated variables where a more recent redeclaration provides an explicit instantiation or is invalid. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96097 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
0f072bd564d73a8289f2a9fa73fc965aff08c08a |
13-Feb-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Silence a GCC warning about a possibly uninitialized variable. It's data flow only flows so far it seems. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96085 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
b571924f32590f026889f227f03570e59e5c29b7 |
13-Feb-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Silence a GCC warning about a possibly uninitialized variable. It's data flow only flows so far it seems. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96085 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
275bdd0fba534548e1762b15d71e10b5dfc48bef |
13-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix a fiendinshly fun little type-canonicalization bug, where we were rebuilding a typename type terminating in a template-id (with dependent template name, naturally) as a TypenameType when, because its context could be fully resolved, we should have been building it as a QualifiedNameType. Fixes PR6268. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96084 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
ae6288981b77d6230bf62055d3bb6380580aa1e8 |
13-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Fix a fiendinshly fun little type-canonicalization bug, where we were rebuilding a typename type terminating in a template-id (with dependent template name, naturally) as a TypenameType when, because its context could be fully resolved, we should have been building it as a QualifiedNameType. Fixes PR6268. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96084 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
f0ba68a76a53360cfaa41d1edc0fa528a758c745 |
13-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Permit the use of typedefs of class template specializations in qualified declarator-ids. This patch is actually due to Cornelius; fixes PR6179. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96082 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
fe3310697028d8d3d35a11b0877bb2bc47e55b8d |
13-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Permit the use of typedefs of class template specializations in qualified declarator-ids. This patch is actually due to Cornelius; fixes PR6179. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96082 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
a9a776640d9161750ac52dce8ba022ad3943ee5b |
12-Feb-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Complain if block-literal expression's parameter name is missing (in c/objc mode). Fixes radar 7528255. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96017 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
|
9a66c303c7024967a48877106384bf315c84e80e |
12-Feb-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Complain if block-literal expression's parameter name is missing (in c/objc mode). Fixes radar 7528255. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96017 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
|
95e20014f3cf65a7e7717849772e52c105fb7da3 |
12-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve representation of tag declarations first declared or defined within the declarator of another declaration, from Enea Zaffanella! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95991 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
b37b648b3f2bba4c557a1604ced19b526b25a372 |
12-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Improve representation of tag declarations first declared or defined within the declarator of another declaration, from Enea Zaffanella! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95991 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
b6c20d380f1df73a9be29363aa088a9bd448e3e5 |
12-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Work around an annoying, non-standard optimization in the glibc headers, where malloc (and many other libc functions) are declared with empty throw specifications, e.g., extern void *malloc (__SIZE_TYPE__ __size) throw () __attribute__ ((__malloc__)) ; The C++ standard doesn't seem to allow this, and redeclaring malloc as the standard permits (as follows) resulted in Clang (rightfully!) complaining about mis-matched exception specifications. void *malloc(size_t size); We work around this by silently propagating an empty throw specification "throw()" from a function with C linkage declared in a system header to a redeclaration that has no throw specifier. Ick. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95969 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExceptionSpec.cpp
|
e13ad837709cd7730e18d8af1cf6b7d35a56d6b7 |
12-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Work around an annoying, non-standard optimization in the glibc headers, where malloc (and many other libc functions) are declared with empty throw specifications, e.g., extern void *malloc (__SIZE_TYPE__ __size) throw () __attribute__ ((__malloc__)) ; The C++ standard doesn't seem to allow this, and redeclaring malloc as the standard permits (as follows) resulted in Clang (rightfully!) complaining about mis-matched exception specifications. void *malloc(size_t size); We work around this by silently propagating an empty throw specification "throw()" from a function with C linkage declared in a system header to a redeclaration that has no throw specifier. Ick. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95969 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExceptionSpec.cpp
|
fe3aa4e6138bf458ee228830cd360cbf6d83b228 |
12-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
In C++, allow builtins to be referred to via qualified name lookup, e.g., ::__builtin_va_copy Fixes one of the Firefox issues in PR5511. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95966 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaLookup.cpp
|
85910986c4ab01927c192aea86b2234fec568259 |
12-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
In C++, allow builtins to be referred to via qualified name lookup, e.g., ::__builtin_va_copy Fixes one of the Firefox issues in PR5511. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95966 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaLookup.cpp
|
d665afdb7e5fdcb4a295c91863cc13c90c3bf4c4 |
12-Feb-2010 |
John McCall <rjmccall@apple.com> |
Waste two bits in every clang::Type so that the type class can be read in a single byte-load rather than some crazy bitmunging operation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95964 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
|
27935ee59c30b0d8b610ab676aab8e65350af932 |
12-Feb-2010 |
John McCall <rjmccall@apple.com> |
Waste two bits in every clang::Type so that the type class can be read in a single byte-load rather than some crazy bitmunging operation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95964 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
|
522a9fadbbb012a147c5a9977af9a895e270fe36 |
12-Feb-2010 |
Tanya Lattner <tonic@nondot.org> |
Implementing unused function warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95940 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
emaExpr.cpp
|
e6bbc01d1c4ec5241df36042e0a4a12a6711934b |
12-Feb-2010 |
Tanya Lattner <tonic@nondot.org> |
Implementing unused function warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95940 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
emaExpr.cpp
|
4379c49f2c5bc634193521ab80f493f8cd2b23ed |
12-Feb-2010 |
Charles Davis <cdavis@mines.edu> |
Warn about using the new force_align_arg_pointer attribute on a function pointer. If you don't like the new warning, you can turn it off with -Wno-force-align-arg-pointer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95939 91177308-0d34-0410-b5e6-96231b3b80d8
argetAttributesSema.cpp
|
b84412f587bc9f2f90930cc1c63ba10cb833bd4e |
12-Feb-2010 |
Charles Davis <cdavis@mines.edu> |
Warn about using the new force_align_arg_pointer attribute on a function pointer. If you don't like the new warning, you can turn it off with -Wno-force-align-arg-pointer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95939 91177308-0d34-0410-b5e6-96231b3b80d8
argetAttributesSema.cpp
|
3dca4c77081eb1e34805cb91ca2319b214590803 |
11-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When we have a dependent direct initializer but not a dependent variable type, we can (and should) still check for completeness of the variable's type. Do so, to work around an assertion that shows up in Boost's shared_ptr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95934 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaStmt.cpp
|
4dffad64c5c7106dc5ac506be94944299c8f7bc3 |
11-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
When we have a dependent direct initializer but not a dependent variable type, we can (and should) still check for completeness of the variable's type. Do so, to work around an assertion that shows up in Boost's shared_ptr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95934 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaStmt.cpp
|
4fc71f8b92264f2d119bb2d28b1d42649aaf20f8 |
11-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Fix leak in CXXNewExpr where the SubExprs array would get allocated directly using 'new[]' instead of the allocator associated with ASTContext. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95933 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
ad7fe864862305c2f71e047cdf6706ef43aebdc0 |
11-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Fix leak in CXXNewExpr where the SubExprs array would get allocated directly using 'new[]' instead of the allocator associated with ASTContext. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95933 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
e6d8816efc582dc04cf793e78dc9be2d4b81cf3d |
11-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Allocate the SubExprs array in ObjCMessageExpr using the allocator associated with ASTContext. This fixes yet another leak (<rdar://problem/7639260>). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95930 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprObjC.cpp
|
eb3b324800598cc3d5385fbad95ae5cff2c79113 |
11-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Allocate the SubExprs array in ObjCMessageExpr using the allocator associated with ASTContext. This fixes yet another leak (<rdar://problem/7639260>). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95930 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprObjC.cpp
|
3161fe4dc2ec83654cd26ce9536d142e5d28b17b |
11-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Uncomment lines I never meant to have left commented in a commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95906 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
1497bffe829d082dd1d1927dc80ea08dcf1fcb49 |
11-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Uncomment lines I never meant to have left commented in a commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95906 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
c0c30b203cd1e17a8688d3719e3ac7400f758709 |
11-Feb-2010 |
Anders Carlsson <andersca@mac.com> |
More vtable layout dumper improvements. Handle destructors, dump the complete function type of the member functions (using PredefinedExpr::ComputeName. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95887 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaTemplateInstantiate.cpp
|
848fa64143fbe5ae62a601ad61277f741e54dfab |
11-Feb-2010 |
Anders Carlsson <andersca@mac.com> |
More vtable layout dumper improvements. Handle destructors, dump the complete function type of the member functions (using PredefinedExpr::ComputeName. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95887 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaTemplateInstantiate.cpp
|
5b82fe851c5fa52e23bd4be6dcf628fe79daa5a4 |
11-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Patch by Cristian Draghici: Enhance the printf format string checking when using the format specifier flags ' ', '0', '+' with the 'p' or 's' conversions (since they are nonsensical and undefined). This is similar to GCC's checking. Also warning when a precision is used with the 'p' conversin specifier, since it has no meaning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95869 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
5c41ee8c49995fb4fd76d686b239c15cbab261ea |
11-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Patch by Cristian Draghici: Enhance the printf format string checking when using the format specifier flags ' ', '0', '+' with the 'p' or 's' conversions (since they are nonsensical and undefined). This is similar to GCC's checking. Also warning when a precision is used with the 'p' conversin specifier, since it has no meaning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95869 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
64474f20248057f0c7cd6e2332811ce32e502d5a |
11-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Use the allocator associated with ASTContext to allocate the args array associated with NonNullAttr. This fixes yet another leak when ASTContext uses a BumpPtrAllocator. Fixes: <rdar://problem/7637150> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95863 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
5961611172f1c210fbbaa55b3c692e13b1fc7be4 |
11-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Use the allocator associated with ASTContext to allocate the args array associated with NonNullAttr. This fixes yet another leak when ASTContext uses a BumpPtrAllocator. Fixes: <rdar://problem/7637150> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95863 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
222ea5b36692d59f7feab62ea52b4c698514a27f |
11-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Remove use of 'std::string' from Attr objects, using instead a byte array allocated using the allocator in ASTContext. This addresses these strings getting leaked when using a BumpPtrAllocator (in ASTContext). Fixes: <rdar://problem/7636765> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95853 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
|
3d2c43e9a7ca55f5ddc1f0c77d8f5e5ea7c1b573 |
11-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Remove use of 'std::string' from Attr objects, using instead a byte array allocated using the allocator in ASTContext. This addresses these strings getting leaked when using a BumpPtrAllocator (in ASTContext). Fixes: <rdar://problem/7636765> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95853 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
|
60ee1d60024c757bcc2f5a822c0bbb6b78a72948 |
11-Feb-2010 |
John McCall <rjmccall@apple.com> |
Strip attributes and 'inline' off the "previous declaration" of a template explicit specialization. Complete an apparently stalled refactor towards using CheckSpecializationInstantiationRedecl(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95845 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
75042398c34413594a9f5f56f5f3761ea37fd2d0 |
11-Feb-2010 |
John McCall <rjmccall@apple.com> |
Strip attributes and 'inline' off the "previous declaration" of a template explicit specialization. Complete an apparently stalled refactor towards using CheckSpecializationInstantiationRedecl(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95845 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
cb88a1522340ce77e45991250b8599bbc9f92dbf |
11-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Remove another redundant ASTContext parameter git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95843 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
2d5b70386d6f5553b667b6e407ca781b4ca2009e |
11-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Remove another redundant ASTContext parameter git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95843 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
47bedd03ccebfcf7f6156aed64ef45a9e6318145 |
11-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Eliminate a bunch of unnecessary ASTContexts from members functions of Decl subclasses. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95841 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
838db383b69b9fb55f55c8e9546477df198a4faa |
11-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Eliminate a bunch of unnecessary ASTContexts from members functions of Decl subclasses. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95841 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
d00b532ca61c8efe030a58d5fa57e47446154223 |
11-Feb-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Diagnose when user provided getter is being used as lvalue using property dot-syntax. Fixes radar 7628953. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95838 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e9ff443040cb571ae2c5c2626c4dc9a9a812d84a |
11-Feb-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Diagnose when user provided getter is being used as lvalue using property dot-syntax. Fixes radar 7628953. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95838 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
0953831bd17a3ec879d4ddbbf33cbb2c67560fb0 |
11-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Eliminate the ASTContext parameter from RecordDecl::getDefinition() and CXXRecordDecl::getDefinition(); it's totally unnecessary. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95836 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
|
952b017601f9c82b51119c3a1600f1312a833db9 |
11-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Eliminate the ASTContext parameter from RecordDecl::getDefinition() and CXXRecordDecl::getDefinition(); it's totally unnecessary. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95836 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
|
3a87420aac27d9355f33469edd2116c9ecfc8a50 |
11-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Allocate 'ObjCMethodList' objects (owned by Sema) using Sema's BumpPtrAllocator. Previously they were not getting freed. Fixes <rdar://problem/7635663>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95834 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
298ed870c7d8edf243edf14d624e577d4a3a8800 |
11-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Allocate 'ObjCMethodList' objects (owned by Sema) using Sema's BumpPtrAllocator. Previously they were not getting freed. Fixes <rdar://problem/7635663>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95834 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
ad002a5029c3894240710beb86b8783138692251 |
11-Feb-2010 |
Charles Davis <cdavis@mines.edu> |
Fix a potential null-pointer use, and fix the style of my new function. Thanks, Anton! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95821 91177308-0d34-0410-b5e6-96231b3b80d8
argetAttributesSema.cpp
|
9c00be5527d83dd9dc2073652ffe6ded8f408402 |
11-Feb-2010 |
Charles Davis <cdavis@mines.edu> |
Fix a potential null-pointer use, and fix the style of my new function. Thanks, Anton! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95821 91177308-0d34-0410-b5e6-96231b3b80d8
argetAttributesSema.cpp
|
0e99a69f84925542bb6620d4c196bcec6e2f1467 |
11-Feb-2010 |
Charles Davis <cdavis@mines.edu> |
Add support for the force_align_arg_pointer attribute. This is an x86-specific attribute, so it uses Anton's new target-specific attribute support. It's supposed to ensure that the stack is 16-byte aligned, but since necessary support is lacking from LLVM, this is a no-op for now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95820 91177308-0d34-0410-b5e6-96231b3b80d8
argetAttributesSema.cpp
|
5a0164d6ab843ca61437ec59a504365cb1c98f43 |
11-Feb-2010 |
Charles Davis <cdavis@mines.edu> |
Add support for the force_align_arg_pointer attribute. This is an x86-specific attribute, so it uses Anton's new target-specific attribute support. It's supposed to ensure that the stack is 16-byte aligned, but since necessary support is lacking from LLVM, this is a no-op for now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95820 91177308-0d34-0410-b5e6-96231b3b80d8
argetAttributesSema.cpp
|
f8fd82ba49827db0f6a6ba00c55a7b56b12a19fa |
10-Feb-2010 |
Shih-wei Liao <sliao@google.com> |
Check in LLVM r95781.
MakeLists.txt
XXFieldCollector.h
odeCompleteConsumer.cpp
dentifierResolver.cpp
dentifierResolver.h
umpDiagnostics.cpp
ookup.h
akefile
arseAST.cpp
ema.cpp
ema.h
emaAccess.cpp
emaAttr.cpp
emaCXXCast.cpp
emaCXXScopeSpec.cpp
emaChecking.cpp
emaCodeComplete.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExceptionSpec.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaInit.cpp
emaInit.h
emaLookup.cpp
emaOverload.cpp
emaOverload.h
emaStmt.cpp
emaTemplate.cpp
emaTemplate.h
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
argetAttributesSema.cpp
argetAttributesSema.h
reeTransform.h
|
c5d12db8396180a6a84e82caac1e11709f29da03 |
10-Feb-2010 |
John McCall <rjmccall@apple.com> |
Improve access control diagnostics. Perform access control on member-pointer conversions. Fix an access-control bug where privileges were not considered at intermediate points along the inheritance path. Prepare for friends. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95775 91177308-0d34-0410-b5e6-96231b3b80d8
ookup.h
ema.h
emaAccess.cpp
emaCXXCast.cpp
emaDeclCXX.cpp
emaExceptionSpec.cpp
emaLookup.cpp
emaOverload.cpp
|
6b2accb4793e16b2e93a8c2589f5df702231f17a |
10-Feb-2010 |
John McCall <rjmccall@apple.com> |
Improve access control diagnostics. Perform access control on member-pointer conversions. Fix an access-control bug where privileges were not considered at intermediate points along the inheritance path. Prepare for friends. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95775 91177308-0d34-0410-b5e6-96231b3b80d8
ookup.h
ema.h
emaAccess.cpp
emaCXXCast.cpp
emaDeclCXX.cpp
emaExceptionSpec.cpp
emaLookup.cpp
emaOverload.cpp
|
1ea73b2cd166edbbfa32913954eee03e2b6f1a04 |
10-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Convert tabs to spaces. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95756 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
0e5675de2b67eeca754754ae8d3dacba425a38e8 |
10-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Convert tabs to spaces. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95756 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
545667c28edd700756332a08bb59b8b7cbd385c1 |
09-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Move the diagnostic argument formatting function out of Sema and make it available within the AST library, of which Sema is one client. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95701 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
79a9a3417929e340e84dcbc06ed9c3a277cad959 |
09-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Move the diagnostic argument formatting function out of Sema and make it available within the AST library, of which Sema is one client. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95701 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
485c863ee03d5fe8d57359d4a96baac63f164090 |
09-Feb-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Finish implementing property synthesis by default. (radar 7381956). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95695 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
emaExpr.cpp
|
77e2dde750c271155f35949a6d3c22f8e7d287f8 |
09-Feb-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Finish implementing property synthesis by default. (radar 7381956). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95695 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
emaExpr.cpp
|
d9fd7f081668e0f457eb4e9182eec0ddd7cecf9a |
09-Feb-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Implement synthesizing properties by default. This is a non-fragile-abi feature only. Since it breaks existing code, it is currently placed under -fobjc-nonfragile-abi2 option for test purposes only until further notice. WIP. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95685 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
emaExpr.cpp
|
412e798941ca64e2e6b084323915fa9aa5f6bdf3 |
09-Feb-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Implement synthesizing properties by default. This is a non-fragile-abi feature only. Since it breaks existing code, it is currently placed under -fobjc-nonfragile-abi2 option for test purposes only until further notice. WIP. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95685 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
emaExpr.cpp
|
a3225a9866e19869bfa0d7aec179d57d986209d3 |
09-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Migrate the mish-mash of declaration checks in Sema::ActOnUninitializedDecl over to InitializationSequence (with default initialization), eliminating redundancy. More importantly, we now check that a const definition in C++ has an initilizer, which was an #if 0'd code for many, many months. A few other tweaks were needed to get everything working again: - Fix all of the places in the testsuite where we defined const objects without initializers (now that we diagnose this issue) - Teach instantiation of static data members to find the previous declaration, so that we build proper redeclaration chains. Previously, we had the redeclaration chain but built it too late to be useful, because... - Teach instantiation of static data member definitions not to try to check an initializer if a previous declaration already had an initializer. This makes sure that we don't complain about static const data members with in-class initializers and out-of-line definitions. - Move all of the incomplete-type checking logic out of Sema::FinalizeDeclaratorGroup; it makes more sense in ActOnUnitializedDecl. There may still be a few places where we can improve these diagnostics. I'll address that as a separate commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95657 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaInit.cpp
emaTemplateInstantiateDecl.cpp
|
60c93c9981c467738369702e7aa23fd58c2b6aac |
09-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Migrate the mish-mash of declaration checks in Sema::ActOnUninitializedDecl over to InitializationSequence (with default initialization), eliminating redundancy. More importantly, we now check that a const definition in C++ has an initilizer, which was an #if 0'd code for many, many months. A few other tweaks were needed to get everything working again: - Fix all of the places in the testsuite where we defined const objects without initializers (now that we diagnose this issue) - Teach instantiation of static data members to find the previous declaration, so that we build proper redeclaration chains. Previously, we had the redeclaration chain but built it too late to be useful, because... - Teach instantiation of static data member definitions not to try to check an initializer if a previous declaration already had an initializer. This makes sure that we don't complain about static const data members with in-class initializers and out-of-line definitions. - Move all of the incomplete-type checking logic out of Sema::FinalizeDeclaratorGroup; it makes more sense in ActOnUnitializedDecl. There may still be a few places where we can improve these diagnostics. I'll address that as a separate commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95657 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaInit.cpp
emaTemplateInstantiateDecl.cpp
|
22d573f04ffde61d1cfe8278b56a43824b2044af |
09-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Be more careful when checking initializer lists that involve reference types; we don't want to give an expression reference type. Fixes PR6177. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95635 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
2c79281ef66cb5001f0ebadf6b317250c21a1c01 |
09-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Be more careful when checking initializer lists that involve reference types; we don't want to give an expression reference type. Fixes PR6177. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95635 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
d8120f709086b16b9948c63f9020111cc403f131 |
09-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement a specific diagnostic when a class template partial specialization does not use any of its template parameters, then recover far more gracefully. Fixes PR6181. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95629 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
de09096a9ee7f670dc74c6a5b7771953ffaf5c62 |
09-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement a specific diagnostic when a class template partial specialization does not use any of its template parameters, then recover far more gracefully. Fixes PR6181. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95629 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
0f4a577f4522b4707006250ba832301c375807cb |
09-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When substituting a declaration non-type template argument for a non-type template parameter that has reference type, augment the qualifiers of the non-type template argument with those of the referenced type. Fixes PR6250. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95607 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
dcee98048d5147502da2b224f01d08f24aec2293 |
09-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
When substituting a declaration non-type template argument for a non-type template parameter that has reference type, augment the qualifiers of the non-type template argument with those of the referenced type. Fixes PR6250. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95607 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
a4be78a1958286e80599206d29c93b0c4dc9282e |
09-Feb-2010 |
John McCall <rjmccall@apple.com> |
Thread a source location into the template-argument deduction routines. There may be some other places that could take advantage of this new information, but I haven't really looked yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95600 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaInit.cpp
emaLookup.cpp
emaOverload.cpp
emaOverload.h
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
|
5769d6195087229770d7ac90449443e026c47103 |
09-Feb-2010 |
John McCall <rjmccall@apple.com> |
Thread a source location into the template-argument deduction routines. There may be some other places that could take advantage of this new information, but I haven't really looked yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95600 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaInit.cpp
emaLookup.cpp
emaOverload.cpp
emaOverload.h
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
|
9360f32703a244acc38d068d7d2c0b8ae2237981 |
08-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Warn when cases are missing from a switch on a value of enumeration type (-Wswitch), from Michal! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95592 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
ba915af51ced751c46e7c2b9c6f3b59d2e668825 |
08-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Warn when cases are missing from a switch on a value of enumeration type (-Wswitch), from Michal! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95592 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
6d24cd5aba5ccff206cfd191fea8b2553c7dee56 |
08-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Keep track of whether a tag was defined in a declarator vs. being defined by itself, from Enea Zaffanella! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95586 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
591bd3cb605f1f0229b4b1d8a4b8183377064ec5 |
08-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Keep track of whether a tag was defined in a declarator vs. being defined by itself, from Enea Zaffanella! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95586 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
8aeaffc68bb0ba9fde2e795e963ed6c57a9a2cfc |
08-Feb-2010 |
John McCall <rjmccall@apple.com> |
Fix the crash-on-invalid from PR6259. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95554 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
4c72d3ec68b88868a75b3e6bbe5520dcefe86a95 |
08-Feb-2010 |
John McCall <rjmccall@apple.com> |
Fix the crash-on-invalid from PR6259. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95554 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
9c75f3d1069fbee040c5c9fb4cab552d28991104 |
08-Feb-2010 |
Chandler Carruth <chandlerc@gmail.com> |
This doesn't seem to be used code as it didn't break any tests, but fix the glaring logic bug anyways. =D git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95533 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
53cb6f82c41397917b14fb8cdcb32e6c9bd07655 |
08-Feb-2010 |
Chandler Carruth <chandlerc@gmail.com> |
This doesn't seem to be used code as it didn't break any tests, but fix the glaring logic bug anyways. =D git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95533 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
63a6e4180e7da9f6f8fa847d97f0bc6f00d76455 |
07-Feb-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Require a complete type before examining base classes during template argument deduction. This requires refactoring the deduction to have access to the Sema object instead of merely the ASTContext. Still leaves something to be desired due to poor source location. Fixes PR6257 and half of PR6259. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95528 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
a7ef13024e4cc3dfb75e3bc1695371b39d9a5240 |
07-Feb-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Require a complete type before examining base classes during template argument deduction. This requires refactoring the deduction to have access to the Sema object instead of merely the ASTContext. Still leaves something to be desired due to poor source location. Fixes PR6257 and half of PR6259. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95528 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
e836faa9c5fe7061b6d36d7e0b0b3321defdd025 |
07-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Workaround for friend template instantiation crash in PR5848, from Keir Mierle! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95517 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
63644fae3970d4146200e4cb25dd9aace34a3398 |
07-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Workaround for friend template instantiation crash in PR5848, from Keir Mierle! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95517 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
c6ad9b5808bc6d716a3a26f61c2e23e49a29ebfa |
07-Feb-2010 |
Anders Carlsson <andersca@mac.com> |
Add attributes to namespace decls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95510 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
2a3503d85374ecc2b8e862a8ed9cec8f10f72e84 |
07-Feb-2010 |
Anders Carlsson <andersca@mac.com> |
Add attributes to namespace decls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95510 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
05326029789a06dbdbf8b3feaada84a7556e8ff7 |
07-Feb-2010 |
Anders Carlsson <andersca@mac.com> |
Add support for threadsafe statics, and make them the default (matching gcc). Daniel, I'd appreciate a review of the driver/cc1 parts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95508 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
a508b7de6c5246ab04ed69d0ab4e9977ec1fb4d4 |
07-Feb-2010 |
Anders Carlsson <andersca@mac.com> |
Add support for threadsafe statics, and make them the default (matching gcc). Daniel, I'd appreciate a review of the driver/cc1 parts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95508 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
bdc1dcb94c247c6b6ab604d5c69dc49a4a17914b |
06-Feb-2010 |
John McCall <rjmccall@apple.com> |
Use a substituted type when determining how to substitute in non-type template params. Don't insert addrof operations when matching against a pointer; array/function conversions should take care of this for us, assuming the argument type-checked in the first place. Add a fixme where we seem to be using a less-restrictive reference type than we should. Fixes PR 6249. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95495 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
645cf44cc34371c808743e5e7c19bb41ff593ca0 |
06-Feb-2010 |
John McCall <rjmccall@apple.com> |
Use a substituted type when determining how to substitute in non-type template params. Don't insert addrof operations when matching against a pointer; array/function conversions should take care of this for us, assuming the argument type-checked in the first place. Add a fixme where we seem to be using a less-restrictive reference type than we should. Fixes PR 6249. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95495 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
0c0fad940207f5a73f2b4213eb07500a5358247b |
06-Feb-2010 |
Benjamin Kramer <benny.kra@googlemail.com> |
Silence GCC warning and stay in 80 cols. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95494 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
b372f51166bdf7e2951ef4820941ec3523086865 |
06-Feb-2010 |
Benjamin Kramer <benny.kra@googlemail.com> |
Silence GCC warning and stay in 80 cols. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95494 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
55834cf06d9756f4dfc492d3f85f39f8b56e2a19 |
06-Feb-2010 |
John McCall <rjmccall@apple.com> |
Extract a function to instantiate references to value template parameters. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95491 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
b8fc053a4c31783f3eed002e3d4e5107676267c0 |
06-Feb-2010 |
John McCall <rjmccall@apple.com> |
Extract a function to instantiate references to value template parameters. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95491 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
a41b7181d33a50095a3d51080fce243aeff258ed |
06-Feb-2010 |
Anders Carlsson <andersca@mac.com> |
Don't diagnose missing noreturns for uninstantiated templates. Fixes PR6247. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95487 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
4855a52d2a4598883deafefea9029f454a4343ee |
06-Feb-2010 |
Anders Carlsson <andersca@mac.com> |
Don't diagnose missing noreturns for uninstantiated templates. Fixes PR6247. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95487 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
12534a9b7c5cbf6b8c8b3bb62ec13cd38a4a33f0 |
06-Feb-2010 |
Anders Carlsson <andersca@mac.com> |
Implement a warning diagnostic for weak vtables. Fixes PR6116. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95472 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
1610b8198e31eb6d77d4d6904d6af88ef5cc6d3b |
06-Feb-2010 |
Anders Carlsson <andersca@mac.com> |
Implement a warning diagnostic for weak vtables. Fixes PR6116. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95472 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
c7da5165e6976a8202b4bcaaf2139adb230a7e6e |
06-Feb-2010 |
John McCall <rjmccall@apple.com> |
Teach Sema how to instantiate a local function declaration properly. Fixes PR 5517. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95470 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
68b6b87b6beb7922fc2c8ab923ba2ce125490363 |
06-Feb-2010 |
John McCall <rjmccall@apple.com> |
Teach Sema how to instantiate a local function declaration properly. Fixes PR 5517. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95470 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
5dd78a235da14aca9d04be3a2756016c87dc79c3 |
05-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix a bogus assertion after adjusting the type of a substituted non-type template argument for a non-type template parameter of pointer type. Fixes PR6244. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95447 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
e41ac7b007d64b504f8e79b97839d060a3669171 |
05-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Fix a bogus assertion after adjusting the type of a substituted non-type template argument for a non-type template parameter of pointer type. Fixes PR6244. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95447 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
bd32802ea64f269410a57495976d36421a86f965 |
05-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Cope with finding the "instantiated" declaration when we are type-checking within a template definition. In this case, the "instantiated" declaration is just the declaration itself, found within the current instantiation. Fixes PR6239. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95442 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
8b013bdbf6474ed25d4017635cac851e51163c25 |
05-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Cope with finding the "instantiated" declaration when we are type-checking within a template definition. In this case, the "instantiated" declaration is just the declaration itself, found within the current instantiation. Fixes PR6239. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95442 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
ad760b38613b3f7f1024b011f6109bed1487b32e |
05-Feb-2010 |
John McCall <rjmccall@apple.com> |
Standardize the parsing of function type attributes in a way that follows (as conservatively as possible) gcc's current behavior: attributes written on return types that don't apply there are applied to the function instead, etc. Only parse CC attributes as type attributes, not as decl attributes; don't accepet noreturn as a decl attribute on ValueDecls, either (it still needs to apply to other decls, like blocks). Consistently consume CC/noreturn information throughout codegen; enforce this by removing their default values in CodeGenTypes::getFunctionInfo(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95436 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaStmt.cpp
emaType.cpp
|
04a67a6aa3dfdc92d57f7f8d93ba397348c868a4 |
05-Feb-2010 |
John McCall <rjmccall@apple.com> |
Standardize the parsing of function type attributes in a way that follows (as conservatively as possible) gcc's current behavior: attributes written on return types that don't apply there are applied to the function instead, etc. Only parse CC attributes as type attributes, not as decl attributes; don't accepet noreturn as a decl attribute on ValueDecls, either (it still needs to apply to other decls, like blocks). Consistently consume CC/noreturn information throughout codegen; enforce this by removing their default values in CodeGenTypes::getFunctionInfo(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95436 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaStmt.cpp
emaType.cpp
|
73ad818becb8f8473cfc562ad556e9802cd786be |
05-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix two issues with the substitution of template template parameters when instantiating the declaration of a member template: - Only check if the have a template template argument at a specific position when we already know that we have template arguments at that level; otherwise, we're substituting for a level-reduced template template parameter. - When trying to find an instantiated declaration for a template template parameter, look into the instantiated scope. This was a typo, where we had two checks for TemplateTypeParmDecl, one of which should have been a TemplateTemplateParmDecl. With these changes, tramp3d-v4 passes -fsyntax-only. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95421 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
6d3e627dacdb2f749195635ab587fd067ef813e1 |
05-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Fix two issues with the substitution of template template parameters when instantiating the declaration of a member template: - Only check if the have a template template argument at a specific position when we already know that we have template arguments at that level; otherwise, we're substituting for a level-reduced template template parameter. - When trying to find an instantiated declaration for a template template parameter, look into the instantiated scope. This was a typo, where we had two checks for TemplateTypeParmDecl, one of which should have been a TemplateTemplateParmDecl. With these changes, tramp3d-v4 passes -fsyntax-only. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95421 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
aa15bc5c0cb7b70a8865d0276f08fec4b4a2eadd |
05-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When we're parsing an expression that may have looked like a declaration, we can end up with template-id annotation tokens for types that have not been converted into type annotation tokens. When this is the case, translate the template-id into a type and parse as an expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95404 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
ae4c77dc8a77ee89e5b2de8003283249e38075c3 |
05-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
When we're parsing an expression that may have looked like a declaration, we can end up with template-id annotation tokens for types that have not been converted into type annotation tokens. When this is the case, translate the template-id into a type and parse as an expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95404 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
4396746af53f512c0dc82a1ca9c5ec791565d51d |
05-Feb-2010 |
Charles Davis <cdavis@mines.edu> |
Testing, 1, 2, 3... Also make the comments I added in r95291 consistent. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95394 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
f1e57ada1f48d70b9bb9b2585be1644baf534907 |
05-Feb-2010 |
Charles Davis <cdavis@mines.edu> |
Testing, 1, 2, 3... Also make the comments I added in r95291 consistent. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95394 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
8d733d5c22bf9aa706a61e368d30af6873081b82 |
05-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
A dependent initializer with zero arguments should return a NULL initializer (for no initialization) rather than a ParenListExpr with zero arguments in it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95382 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaInit.cpp
|
67fa05b9ed29923b7b905a09cfb95c2ac91b5835 |
05-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
A dependent initializer with zero arguments should return a NULL initializer (for no initialization) rather than a ParenListExpr with zero arguments in it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95382 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaInit.cpp
|
309acd8a9af020fa7bef8e7d9f8793fd9d30a08c |
05-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Default function arguments for function template specializations always come from the primary template, so gather the instantiation template arguments from the primary template. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95380 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaTemplateInstantiate.cpp
|
525f96c0ef39f91abd26b1b4584ba1814e7ebc28 |
05-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Default function arguments for function template specializations always come from the primary template, so gather the instantiation template arguments from the primary template. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95380 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaTemplateInstantiate.cpp
|
0a586ccd37dfaa98e4709a6d38b7dafb443950d9 |
05-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Teach C++ name lookup that it's okay to look in a scope without a context. This happens fairly rarely (which is why we got away with this bug). Fixes PR6184, where we skipped over the template parameter scope while tentatively parsing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95376 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
1df0ee91a9d55b5c2eb0d96e7590f1c8b8fe8734 |
05-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Teach C++ name lookup that it's okay to look in a scope without a context. This happens fairly rarely (which is why we got away with this bug). Fixes PR6184, where we skipped over the template parameter scope while tentatively parsing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95376 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
22174a3aa6037de296b37cc086b127685d9f0eb2 |
05-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
A function declarator with a non-identifier name in an anonymous class is a constructor for that class, right? Fixes PR6238. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95367 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
6f7a17b718385464966251ee421b314570d32731 |
05-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
A function declarator with a non-identifier name in an anonymous class is a constructor for that class, right? Fixes PR6238. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95367 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
664fb024283f83b559ba405fbe0078d497625fae |
05-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When adding ADL candidates for overloaded post-increment/post-decrement operators, be sure to consider both arguments. Fixes PR6237. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95361 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
dc81c880cad01f01888632d28345077336ca06a4 |
05-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
When adding ADL candidates for overloaded post-increment/post-decrement operators, be sure to consider both arguments. Fixes PR6237. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95361 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
e460e4e83772a40de628eb2b2d48893f4957a2f2 |
05-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When determining whether a scope specifier is complete, consider a dependent DeclContext to be "complete". Fixes PR6236. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95359 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
|
a4e8c2a65a985782344a818d356c40d117fc4f12 |
05-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
When determining whether a scope specifier is complete, consider a dependent DeclContext to be "complete". Fixes PR6236. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95359 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
|
438d00a23413bb5e63afa12a975fd2f2e6216293 |
05-Feb-2010 |
John Thompson <john.thompson.jtsoftware@gmail.com> |
First stage of adding AltiVec support git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95335 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
reeTransform.h
|
82287d19ded35248c4ce6a425ce74116a13ce44e |
05-Feb-2010 |
John Thompson <John.Thompson.JTSoftware@gmail.com> |
First stage of adding AltiVec support git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95335 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
reeTransform.h
|
b96d3f04ffecc32591a6b50ab55c024024c3537e |
05-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix a crash with ill-formed code within a method in an ill-formed category implementation, which showed up during (attempted) typo correction. Fixes <rdar://problem/7605289>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95334 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
6202119003aba91e5ff4e579cb9c26a8d1b9514f |
05-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Fix a crash with ill-formed code within a method in an ill-formed category implementation, which showed up during (attempted) typo correction. Fixes <rdar://problem/7605289>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95334 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
ff48492bf0bafea3cc3f549bad578259ccc67a81 |
04-Feb-2010 |
John McCall <rjmccall@apple.com> |
Extract a common structure for holding information about the definition of a C++ record. Exposed a lot of problems where various routines were silently doing The Wrong Thing (or The Acceptable Thing in The Wrong Order) when presented with a non-definition. Also cuts down on memory usage. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95330 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaLookup.cpp
emaOverload.cpp
|
86ff308724171494395a840fd2efbe25e62f352e |
04-Feb-2010 |
John McCall <rjmccall@apple.com> |
Extract a common structure for holding information about the definition of a C++ record. Exposed a lot of problems where various routines were silently doing The Wrong Thing (or The Acceptable Thing in The Wrong Order) when presented with a non-definition. Also cuts down on memory usage. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95330 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaLookup.cpp
emaOverload.cpp
|
41c4e6c50f5fa693f4144e028c2e01ea95d865b9 |
04-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Move ParseFormatString() and FormatStringHandler back into the analyze_printf namespace. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95324 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
74d56a168966ff015824279a24aaf566180ed97d |
04-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Move ParseFormatString() and FormatStringHandler back into the analyze_printf namespace. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95324 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
beb9e4f17fcaca29313fc7a56de977c5dd449c46 |
04-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When substituting the template argument for a pointer non-type template parameter, perform array/function decay (if needed), take the address of the argument (if needed), perform qualification conversions (if needed), and remove any top-level cv-qualifiers from the resulting expression. Fixes PR6226. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95309 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
86a7625062abbd40fffa186f2f5d305cc89615b8 |
04-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
When substituting the template argument for a pointer non-type template parameter, perform array/function decay (if needed), take the address of the argument (if needed), perform qualification conversions (if needed), and remove any top-level cv-qualifiers from the resulting expression. Fixes PR6226. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95309 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
db5993538c7f29ea7331dcb7292c083e1bab798c |
04-Feb-2010 |
John McCall <rjmccall@apple.com> |
Allow calling convention attributes to apply to types. Patch by Chip Davis! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95291 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclAttr.cpp
emaType.cpp
|
f82b4e85b1219295cad4b5851b035575bc293010 |
04-Feb-2010 |
John McCall <rjmccall@apple.com> |
Allow calling convention attributes to apply to types. Patch by Chip Davis! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95291 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclAttr.cpp
emaType.cpp
|
fb71f66cb3b8c489605177592741270ccc7796da |
03-Feb-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to allow reinterpret_cast on objective-c pointers. (partial fix for radar 7591784). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95245 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
72a8659e9c4bdf28459cf1463e97896468f99cb9 |
03-Feb-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to allow reinterpret_cast on objective-c pointers. (partial fix for radar 7591784). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95245 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
a3af6913e8d3eef8e1fb5c42534a97702fb3bf98 |
03-Feb-2010 |
Daniel Dunbar <daniel@zuster.org> |
Revert "Numerous changes to selector handling:", this breaks a whole bunch of working code, for no apparent reason. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95244 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
6d5a1c28593443f3973ef38f8fa042d59182412d |
03-Feb-2010 |
Daniel Dunbar <daniel@zuster.org> |
Revert "Numerous changes to selector handling:", this breaks a whole bunch of working code, for no apparent reason. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95244 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
2d620e798f1ae144b5c2b7cfea71f4e0b7e2ca26 |
03-Feb-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Top-level const changes do not make a qualification conversion. Fixes PR6089. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95239 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
22c92406f4b043bd872b53761f6a157fcc105594 |
03-Feb-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Top-level const changes do not make a qualification conversion. Fixes PR6089. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95239 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
75eb67174b6c9ecf5f586e54025b76a1ce36b0e4 |
03-Feb-2010 |
Eli Friedman <eli.friedman@gmail.com> |
Fix for PR6220: compute the correct type for multicharacter literals. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95228 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
136b0cd75c37895ed0e00dee5b06c55c5b1d8199 |
03-Feb-2010 |
Eli Friedman <eli.friedman@gmail.com> |
Fix for PR6220: compute the correct type for multicharacter literals. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95228 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
21cdb9d52625532b43f0db3effd869080b7434a5 |
03-Feb-2010 |
Anders Carlsson <andersca@mac.com> |
Revert the new reference binding code; I came up with a way simpler solution for the reference binding bug that is preventing self-hosting. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95223 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
a64a869312066ff6119d1d7ae03f88ce499e3f82 |
03-Feb-2010 |
Anders Carlsson <andersca@mac.com> |
Revert the new reference binding code; I came up with a way simpler solution for the reference binding bug that is preventing self-hosting. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95223 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
286135cff9efb432695bfc5a86822214843e254f |
03-Feb-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Teach the allocation function overload handling to deal with templates, and prevent a crash on templates when looking for an existing declaration of the predefined global operators. This fixes PR5918. Added an easy test case for the overload handling, but testing the crash is a bit trickier. Created a new test that can use multiple runs with a define to trigger which test case is used so we can test this type of issue. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95220 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
4a73ea9c4e87aa111901f3c27b08f0571b58a4cf |
03-Feb-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Teach the allocation function overload handling to deal with templates, and prevent a crash on templates when looking for an existing declaration of the predefined global operators. This fixes PR5918. Added an easy test case for the overload handling, but testing the crash is a bit trickier. Created a new test that can use multiple runs with a define to trigger which test case is used so we can test this type of issue. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95220 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
eedf3e99c711b120b82b12a5a087e4a1e5c52222 |
03-Feb-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Fix PR6149 by looking at the qualifiers on the referred to type for non-type reference template arguments. Adds test cases for the cv-quals of reference arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95217 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
5147fa6d580e4c123d0a90fa737f40824f50aa50 |
03-Feb-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Fix PR6149 by looking at the qualifiers on the referred to type for non-type reference template arguments. Adds test cases for the cv-quals of reference arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95217 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
b93a009003f19418ef0ef0d8a42a3895562c7391 |
03-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When a function or variable somehow depends on a type or declaration that is in an anonymous namespace, give that function or variable internal linkage. This change models an oddity of the C++ standard, where names declared in an anonymous namespace have external linkage but, because anonymous namespace are really "uniquely-named" namespaces, the names cannot be referenced from other translation units. That means that they have external linkage for semantic analysis, but the only sensible implementation for code generation is to give them internal linkage. We now model this notion via the UniqueExternalLinkage linkage type. There are several changes here: - Extended NamedDecl::getLinkage() to produce UniqueExternalLinkage when the declaration is in an anonymous namespace. - Added Type::getLinkage() to determine the linkage of a type, which is defined as the minimum linkage of the types (when we're dealing with a compound type that is not a struct/class/union). - Extended NamedDecl::getLinkage() to consider the linkage of the template arguments and template parameters of function template specializations and class template specializations. - Taught code generation to rely on NamedDecl::getLinkage() when determining the linkage of variables and functions, also considering the linkage of the types of those variables and functions (C++ only). Map UniqueExternalLinkage to internal linkage, taking out the explicit checks for isInAnonymousNamespace(). This fixes much of PR5792, which, as discovered by Anders Carlsson, is actually the reason behind the pass-manager assertion that causes the majority of clang-on-clang regression test failures. With this fix, Clang-built-Clang+LLVM passes 88% of its regression tests (up from 67%). The specific numbers are: LLVM: Expected Passes : 4006 Expected Failures : 32 Unsupported Tests : 40 Unexpected Failures: 736 Clang: Expected Passes : 1903 Expected Failures : 14 Unexpected Failures: 75 Overall: Expected Passes : 5909 Expected Failures : 46 Unsupported Tests : 40 Unexpected Failures: 811 Still to do: - Improve testing - Check whether we should allow the presence of types with InternalLinkage (in addition to UniqueExternalLinkage) given variables/functions internal linkage in C++, as mentioned in PR5792. - Determine how expensive the getLinkage() calls are in practice; consider caching the result in NamedDecl. - Assess the feasibility of Chris's idea in comment #1 of PR5792. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95216 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
0b6bc8bd7a1d2a7d7478d13d78cff94cacad61fc |
03-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
When a function or variable somehow depends on a type or declaration that is in an anonymous namespace, give that function or variable internal linkage. This change models an oddity of the C++ standard, where names declared in an anonymous namespace have external linkage but, because anonymous namespace are really "uniquely-named" namespaces, the names cannot be referenced from other translation units. That means that they have external linkage for semantic analysis, but the only sensible implementation for code generation is to give them internal linkage. We now model this notion via the UniqueExternalLinkage linkage type. There are several changes here: - Extended NamedDecl::getLinkage() to produce UniqueExternalLinkage when the declaration is in an anonymous namespace. - Added Type::getLinkage() to determine the linkage of a type, which is defined as the minimum linkage of the types (when we're dealing with a compound type that is not a struct/class/union). - Extended NamedDecl::getLinkage() to consider the linkage of the template arguments and template parameters of function template specializations and class template specializations. - Taught code generation to rely on NamedDecl::getLinkage() when determining the linkage of variables and functions, also considering the linkage of the types of those variables and functions (C++ only). Map UniqueExternalLinkage to internal linkage, taking out the explicit checks for isInAnonymousNamespace(). This fixes much of PR5792, which, as discovered by Anders Carlsson, is actually the reason behind the pass-manager assertion that causes the majority of clang-on-clang regression test failures. With this fix, Clang-built-Clang+LLVM passes 88% of its regression tests (up from 67%). The specific numbers are: LLVM: Expected Passes : 4006 Expected Failures : 32 Unsupported Tests : 40 Unexpected Failures: 736 Clang: Expected Passes : 1903 Expected Failures : 14 Unexpected Failures: 75 Overall: Expected Passes : 5909 Expected Failures : 46 Unsupported Tests : 40 Unexpected Failures: 811 Still to do: - Improve testing - Check whether we should allow the presence of types with InternalLinkage (in addition to UniqueExternalLinkage) given variables/functions internal linkage in C++, as mentioned in PR5792. - Determine how expensive the getLinkage() calls are in practice; consider caching the result in NamedDecl. - Assess the feasibility of Chris's idea in comment #1 of PR5792. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95216 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
6ca6ba74e2f84c2834c23f6e57a03bca3b53f1d6 |
03-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Look through CXXExprWithTemporaries when digging out the original initializer. Grrr.... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95211 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
a89ebea6bd68d8333f2d020106a3640831aa6507 |
03-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Look through CXXExprWithTemporaries when digging out the original initializer. Grrr.... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95211 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
bc7aeabe736622530eabe68e1dfac51fd3e5f9dd |
03-Feb-2010 |
Sam Weinig <sam.weinig@gmail.com> |
Implement Doug's suggestion. Eliminate the Stmts pointer from CXXTryStmt and instead allocate the statements after the object. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95199 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
a1a396df16c02b22983b5c9592022fd9237d4866 |
03-Feb-2010 |
Sam Weinig <sam.weinig@gmail.com> |
Implement Doug's suggestion. Eliminate the Stmts pointer from CXXTryStmt and instead allocate the statements after the object. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95199 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
49f0449d08c97becf449345297d206dd8e9e7d1a |
03-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Provide a real fix for PR6199, reverting the old workaround. Here, we realize that CXXConstructExpr is always implicit, so we should just return its argument (if there is only one) rather than directly invoking the constructor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95192 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
321725d95d331d1612ac386d7d4235eca94b0021 |
03-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Provide a real fix for PR6199, reverting the old workaround. Here, we realize that CXXConstructExpr is always implicit, so we should just return its argument (if there is only one) rather than directly invoking the constructor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95192 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
f7752965429bab3b29c855b74b1f50f8b4e5b737 |
03-Feb-2010 |
Sam Weinig <sam.weinig@gmail.com> |
Remove the SmallVector from CXXTryStmt. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95190 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
b0e4cb6a88a4b4bd2ecdcc622e852fa3e20290c9 |
03-Feb-2010 |
Sam Weinig <sam.weinig@gmail.com> |
Remove the SmallVector from CXXTryStmt. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95190 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
f1f1590dc4c3ddec947ce5b0c6d7c03c057fbea7 |
03-Feb-2010 |
David Chisnall <csdavec@swan.ac.uk> |
Numerous changes to selector handling: - Don't use GlobalAliases with non-0 GEPs (GNU runtime) - this was unsupported and LLVM will be generating errors if you do it soon. This also simplifies the code generated by the GNU runtime a bit. - Make GetSelector() return a constant (GNU runtime), not a load of a store of a constant. - Recognise @selector() expressions as valid static initialisers (as GCC does). - Add methods to GCObjCRuntime to emit selectors as constants (needed for using @selector() expressions as constants. These need implementing for the Mac runtimes - I couldn't figure out how to do this, they seem to require a load. - Store an ObjCMethodDecl in an ObjCSelectorExpr so that we can get at the type information for the selector. This is needed for generating typed selectors from @selector() expressions (as GCC does). Ideally, this information should be stored in the Selector, but that would be an invasive change. We should eventually add checks for common uses of @selector() expressions. Possibly adding an attribute that can be applied to method args providing the types of a selector so, for example, you'd do something like this: - (id)performSelector: __attribute__((selector_types(id, SEL, id)))(SEL) withObject: (id)object; Then, any @selector() expressions passed to the method will be check to ensure that it conforms to this signature. We do this at run time on the GNU runtime already, but it would be nice to do it at compile time on all runtimes. - Made @selector() expressions emit type info if available and the runtime supports it. Someone more familiar with the Mac runtime needs to implement the GetConstantSelector() function in CGObjCMac. This currently just assert()s. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95189 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
a8fa96e366ab36145a5500dd4fbea717c217f131 |
03-Feb-2010 |
David Chisnall <csdavec@swan.ac.uk> |
Numerous changes to selector handling: - Don't use GlobalAliases with non-0 GEPs (GNU runtime) - this was unsupported and LLVM will be generating errors if you do it soon. This also simplifies the code generated by the GNU runtime a bit. - Make GetSelector() return a constant (GNU runtime), not a load of a store of a constant. - Recognise @selector() expressions as valid static initialisers (as GCC does). - Add methods to GCObjCRuntime to emit selectors as constants (needed for using @selector() expressions as constants. These need implementing for the Mac runtimes - I couldn't figure out how to do this, they seem to require a load. - Store an ObjCMethodDecl in an ObjCSelectorExpr so that we can get at the type information for the selector. This is needed for generating typed selectors from @selector() expressions (as GCC does). Ideally, this information should be stored in the Selector, but that would be an invasive change. We should eventually add checks for common uses of @selector() expressions. Possibly adding an attribute that can be applied to method args providing the types of a selector so, for example, you'd do something like this: - (id)performSelector: __attribute__((selector_types(id, SEL, id)))(SEL) withObject: (id)object; Then, any @selector() expressions passed to the method will be check to ensure that it conforms to this signature. We do this at run time on the GNU runtime already, but it would be nice to do it at compile time on all runtimes. - Made @selector() expressions emit type info if available and the runtime supports it. Someone more familiar with the Mac runtime needs to implement the GetConstantSelector() function in CGObjCMac. This currently just assert()s. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95189 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
4e6d2bc15ff7971dbd8940930352cdf8c0edda41 |
03-Feb-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Don't do an expensive definition check where a cheap 'is this C?' check suffices. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95188 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
6c048a916f6bf526c12217f4a2bc3aa1a62bd62e |
03-Feb-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Don't do an expensive definition check where a cheap 'is this C?' check suffices. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95188 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
19f36e292e6a6dabde1156d1aaa342cfa805ea8a |
03-Feb-2010 |
John McCall <rjmccall@apple.com> |
Remove abstract expression kinds from the StmtClass enum. Update a few users appropriately. Call out a few missing cases in the expression mangler. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95176 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
09cc141c89a5e9f305c17d7a88298647df16cedd |
03-Feb-2010 |
John McCall <rjmccall@apple.com> |
Remove abstract expression kinds from the StmtClass enum. Update a few users appropriately. Call out a few missing cases in the expression mangler. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95176 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
abf70c34d65cb2ff24a8cdaf1aa9df6b41cd07ae |
03-Feb-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Simplify setting of DeclContext for @catch variable (per Doug's comment). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95169 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d219a3a462c31fc9aa0c0bcfb749e9e8e56b5e35 |
03-Feb-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Simplify setting of DeclContext for @catch variable (per Doug's comment). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95169 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
1ca966fdbf8a0a04826d05a76aefbfcbd24cf418 |
03-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement the lvalue-to-rvalue conversion where needed. The lvalue-to-rvalue conversion adjusts lvalues of qualified, non-class type to rvalue expressions of the unqualified variant of that type. For example, given: const int i; (void)(i + 17); the lvalue-to-rvalue conversion for the subexpression "i" will turn it from an lvalue expression (a DeclRefExpr) with type 'const int' into an rvalue expression with type 'int'. Both C and C++ mandate this conversion, and somehow we've slid through without implementing it. We now have both DefaultFunctionArrayConversion and DefaultFunctionArrayLvalueConversion, and which gets used depends on whether we do the lvalue-to-rvalue conversion or not. Generally, we do the lvalue-to-rvalue conversion, but there are a few notable exceptions: - the left-hand side of a '.' operator - the left-hand side of an assignment - a C++ throw expression - a subscript expression that's subscripting a vector Making this change exposed two issues with blocks: - we were deducing const-qualified return types of non-class type from a block return, which doesn't fit well - we weren't always setting the known return type of a block when it was provided with the ^return-type syntax Fixes the current Clang-on-Clang compile failure and PR6076. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95167 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXCast.cpp
emaCodeComplete.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaStmt.cpp
|
a873dfc9e7314681bb37efd9ab185045de121e43 |
03-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement the lvalue-to-rvalue conversion where needed. The lvalue-to-rvalue conversion adjusts lvalues of qualified, non-class type to rvalue expressions of the unqualified variant of that type. For example, given: const int i; (void)(i + 17); the lvalue-to-rvalue conversion for the subexpression "i" will turn it from an lvalue expression (a DeclRefExpr) with type 'const int' into an rvalue expression with type 'int'. Both C and C++ mandate this conversion, and somehow we've slid through without implementing it. We now have both DefaultFunctionArrayConversion and DefaultFunctionArrayLvalueConversion, and which gets used depends on whether we do the lvalue-to-rvalue conversion or not. Generally, we do the lvalue-to-rvalue conversion, but there are a few notable exceptions: - the left-hand side of a '.' operator - the left-hand side of an assignment - a C++ throw expression - a subscript expression that's subscripting a vector Making this change exposed two issues with blocks: - we were deducing const-qualified return types of non-class type from a block return, which doesn't fit well - we weren't always setting the known return type of a block when it was provided with the ^return-type syntax Fixes the current Clang-on-Clang compile failure and PR6076. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95167 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXCast.cpp
emaCodeComplete.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaStmt.cpp
|
e7dcec91374a863a92a299d99f5cb5fbc3c6298b |
03-Feb-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Fix DeclContext of an objective-c @catch variable declaration. Fixes radar 7590273. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95164 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
2f764f11f513c7b51c716fffa5d02e5de816836f |
03-Feb-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Fix DeclContext of an objective-c @catch variable declaration. Fixes radar 7590273. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95164 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
43ec96da71b94f064ed6a3031025208d23acd592 |
02-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement promotion for enumeration types. WHAT!?! It turns out that Type::isPromotableIntegerType() was not considering enumeration types to be promotable, so we would never do the promotion despite having properly computed the promotion type when the enum was defined. Various operations on values of enum type just "worked" because we could still compute the integer rank of an enum type; the oddity, however, is that operations such as "add an enum and an unsigned" would often have an enum result type (!). The bug actually showed up as a spurious -Wformat diagnostic (<rdar://problem/7595366>), but in theory it could cause miscompiles. In this commit: - Enum types with a promotion type of "int" or "unsigned int" are promotable. - Tweaked the computation of promotable types for enums - For all of the ABIs, treat enum types the same way as their underlying types (*not* their promotion types) for argument passing and return values - Extend the ABI tester with support for enumeration types git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95117 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaOverload.cpp
|
aa74a1e49f7c4b89539830290f76fe2c3e97187f |
02-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement promotion for enumeration types. WHAT!?! It turns out that Type::isPromotableIntegerType() was not considering enumeration types to be promotable, so we would never do the promotion despite having properly computed the promotion type when the enum was defined. Various operations on values of enum type just "worked" because we could still compute the integer rank of an enum type; the oddity, however, is that operations such as "add an enum and an unsigned" would often have an enum result type (!). The bug actually showed up as a spurious -Wformat diagnostic (<rdar://problem/7595366>), but in theory it could cause miscompiles. In this commit: - Enum types with a promotion type of "int" or "unsigned int" are promotable. - Tweaked the computation of promotable types for enums - For all of the ABIs, treat enum types the same way as their underlying types (*not* their promotion types) for argument passing and return values - Extend the ABI tester with support for enumeration types git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95117 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaOverload.cpp
|
31ff6d7bdc4b9b0da1686094bdaacafc0c26fbd3 |
02-Feb-2010 |
John McCall <rjmccall@apple.com> |
Fix this comment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95104 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
41593e3b7da967b52bc3c7f488b8752dee63f38e |
02-Feb-2010 |
John McCall <rjmccall@apple.com> |
Fix this comment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95104 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
c2dbe09c19e3f695c4ed5119571e3b16e6645d15 |
02-Feb-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Check for redefinitions in MergeVarDecl. This finds redefinitions of globals without an initializer in C++ and thus fixes PR5451. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95098 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
4cae1b343c7c588856df17d6a11af1614ac41308 |
02-Feb-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Check for redefinitions in MergeVarDecl. This finds redefinitions of globals without an initializer in C++ and thus fixes PR5451. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95098 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
eb0b821426061a6fa5806bf31236d1ba4aaca69c |
02-Feb-2010 |
John McCall <rjmccall@apple.com> |
Mark dtors for parameter variables and eliminate some redundant type munging. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95079 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaAccess.cpp
emaChecking.cpp
emaDecl.cpp
emaDeclCXX.cpp
|
68c6c9a21e2d9d587477e07522fe55769d3aa26a |
02-Feb-2010 |
John McCall <rjmccall@apple.com> |
Mark dtors for parameter variables and eliminate some redundant type munging. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95079 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaAccess.cpp
emaChecking.cpp
emaDecl.cpp
emaDeclCXX.cpp
|
67af030b07c327e5b11457f5b0a78599fab741db |
02-Feb-2010 |
John McCall <rjmccall@apple.com> |
Access control for implicit destructor calls. Diagnostic could be orders of magnitude clearer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95078 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaAccess.cpp
emaChecking.cpp
emaDeclCXX.cpp
|
4f9506a27cb6b865bf38beea48eadfa9dc93f510 |
02-Feb-2010 |
John McCall <rjmccall@apple.com> |
Access control for implicit destructor calls. Diagnostic could be orders of magnitude clearer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95078 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaAccess.cpp
emaChecking.cpp
emaDeclCXX.cpp
|
573aed17ff75e0d159aa9623d556aa32c8d54c54 |
02-Feb-2010 |
John McCall <rjmccall@apple.com> |
Extract a common base class between UnresolvedLookupExpr and UnresolvedMemberExpr and employ it in a few places where it's useful. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95072 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaOverload.cpp
emaTemplateDeduction.cpp
|
7bb12da2b0749eeebb21854c77877736969e59f2 |
02-Feb-2010 |
John McCall <rjmccall@apple.com> |
Extract a common base class between UnresolvedLookupExpr and UnresolvedMemberExpr and employ it in a few places where it's useful. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95072 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaOverload.cpp
emaTemplateDeduction.cpp
|
4999cb0d4c499b59ac341cdaacdf3922d85d6a7d |
02-Feb-2010 |
John McCall <rjmccall@apple.com> |
Improve the diagnostic used when an incompatible overload set is passed as an argument during overload resolution. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95057 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
5920dbba965a2f2a963313d94be3ff3d2b67ece7 |
02-Feb-2010 |
John McCall <rjmccall@apple.com> |
Improve the diagnostic used when an incompatible overload set is passed as an argument during overload resolution. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95057 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
48e39b1777453131d961b2229b9f1d13fb7b948b |
02-Feb-2010 |
John McCall <rjmccall@apple.com> |
Implement C++ [temp.deduct.call]p6, template argument deduction for overloaded arguments. Fix a bug where incomplete explicit specializations were being passed through as legitimate. Fix a bug where the absence of an explicit specialization in an overload set was causing overall deduction to fail. Fixes PR6191. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95052 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
eff92135d32039c9874dc356f3e93143af6069c1 |
02-Feb-2010 |
John McCall <rjmccall@apple.com> |
Implement C++ [temp.deduct.call]p6, template argument deduction for overloaded arguments. Fix a bug where incomplete explicit specializations were being passed through as legitimate. Fix a bug where the absence of an explicit specialization in an overload set was causing overall deduction to fail. Fixes PR6191. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95052 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
af8e5a6c4c8e119590c60f50a47e1e785466ff7d |
02-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Add a stop gap to Sema::CorrectTypo() to correct only up to 20 typos. This is to address a serious performance problem observed when running 'clang -fsyntax-only' on really broken source files. In one case, repeatedly calling CorrectTypo() caused one source file to be rejected after 2 minutes instead of 1 second. This patch causes typo correction to take neglible time on that file while still providing correction results for the first 20 cases. I felt this was a reasonable number for moderately broken source files. I don't claim this is the best solution. Comments welcome. It is necessary for us to address this issue because it is a serious performance problem. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95049 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaLookup.cpp
|
d0ed44812057f1adf0ebe38f3fab55973c4efaeb |
02-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Add a stop gap to Sema::CorrectTypo() to correct only up to 20 typos. This is to address a serious performance problem observed when running 'clang -fsyntax-only' on really broken source files. In one case, repeatedly calling CorrectTypo() caused one source file to be rejected after 2 minutes instead of 1 second. This patch causes typo correction to take neglible time on that file while still providing correction results for the first 20 cases. I felt this was a reasonable number for moderately broken source files. I don't claim this is the best solution. Comments welcome. It is necessary for us to address this issue because it is a serious performance problem. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95049 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaLookup.cpp
|
96063113bc5227ec0cabab27525a5877c589b3c4 |
02-Feb-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve handling of enumerator values for C and C++, including: - In C++, prior to the closing '}', set the type of enumerators based on the type of their initializer. Don't perform unary conversions on the enumerator values. - In C++, handle overflow when an enumerator has no initializer and its value cannot be represented in the type of the previous enumerator. - In C, handle overflow more gracefully, by complaining and then falling back to the C++ rules. - In C, if the enumerator value is representable in an int, convert the expression to the type 'int'. Fixes PR5854 and PR4515. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95031 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
677e4feebe4b3485504860d991d700cc3b933961 |
02-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Improve handling of enumerator values for C and C++, including: - In C++, prior to the closing '}', set the type of enumerators based on the type of their initializer. Don't perform unary conversions on the enumerator values. - In C++, handle overflow when an enumerator has no initializer and its value cannot be represented in the type of the previous enumerator. - In C, handle overflow more gracefully, by complaining and then falling back to the C++ rules. - In C, if the enumerator value is representable in an int, convert the expression to the type 'int'. Fixes PR5854 and PR4515. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95031 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
8cb23faaa8f07087e40d95432b575a810a4e1417 |
01-Feb-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
In C++, an initializer on a variable doesn't necessarily mean it's the definition. With that in mind, rename getDefinition to getAnyInitializer (to distinguish it from getInit) and reimplement it in terms of isThisDeclarationADefinition. Update all code to use this new function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94999 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDecl.cpp
emaDeclCXX.cpp
|
31310a21fb2a9f13950f864f681c86080b05d5b2 |
01-Feb-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
In C++, an initializer on a variable doesn't necessarily mean it's the definition. With that in mind, rename getDefinition to getAnyInitializer (to distinguish it from getInit) and reimplement it in terms of isThisDeclarationADefinition. Update all code to use this new function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94999 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDecl.cpp
emaDeclCXX.cpp
|
f63cc8ce8982e439915d914e4ebeca1178c1e9e7 |
01-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Use early return as suggested by Cristian Draghici. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94994 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
105d41c0a4bf4dc4b210647ac704e245749a981d |
01-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Use early return as suggested by Cristian Draghici. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94994 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
fdcf4647eef111e7c4a2fd6fd9f572bd3e10ff55 |
01-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Format string checking: selectively ignore implicit casts to 'int' when checking if the format specifier matches the type of the data argument and the length modifier indicates the data type is 'char' or 'short'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94992 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
180f2840d1d8bcb2139bfb53e2d88eda280e939e |
01-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Format string checking: selectively ignore implicit casts to 'int' when checking if the format specifier matches the type of the data argument and the length modifier indicates the data type is 'char' or 'short'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94992 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
011323d90dd2c1ff2db6e1871154831885f2d7cb |
01-Feb-2010 |
John McCall <rjmccall@apple.com> |
Note that an overload candidate was non-viable because template argument deduction failed. Right now there's a very vague diagnostic for most cases and a good diagnostic for incomplete deduction. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94988 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaOverload.h
|
342fec43c515184a3c0d0600323dfec2b059e74e |
01-Feb-2010 |
John McCall <rjmccall@apple.com> |
Note that an overload candidate was non-viable because template argument deduction failed. Right now there's a very vague diagnostic for most cases and a good diagnostic for incomplete deduction. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94988 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaOverload.h
|
810cdd31057e67b7efaab3ef99778bdfbc068808 |
01-Feb-2010 |
Sam Weinig <sam.weinig@gmail.com> |
Fix for PR5185. C99 [*] VLA notation should be disallowed in function definitions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94972 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
d17e340e2d516139931768697bf080f60920ba9d |
01-Feb-2010 |
Sam Weinig <sam.weinig@gmail.com> |
Fix for PR5185. C99 [*] VLA notation should be disallowed in function definitions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94972 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
5c0e897ed39db3443ca9695471a87d77f1ac9768 |
01-Feb-2010 |
John McCall <rjmccall@apple.com> |
Access checking for implicit user-defined conversions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94971 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaAccess.cpp
emaInit.cpp
emaInit.h
|
b13b737a2450167c82e148590e8019b839ce6b98 |
01-Feb-2010 |
John McCall <rjmccall@apple.com> |
Access checking for implicit user-defined conversions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94971 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaAccess.cpp
emaInit.cpp
emaInit.h
|
08fbf08fc4fc3816971556bad895d9c9d88966b7 |
31-Jan-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Add VarDecl::isThisDeclarationADefinition(), which properly encapsulates the logic for when a variable declaration is a (possibly tentativ) definition. Add a few functions building on this, and shift C tentative definition handling over to this new functionality. This shift also kills the Sema::TentativeDefinitions map and instead simply stores all declarations in the renamed list. The correct handling for multiple tentative definitions is instead shifted to the final walk of the list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94968 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
|
e9d12b6c50c1e9b05443db099e21026c5991a93b |
31-Jan-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Add VarDecl::isThisDeclarationADefinition(), which properly encapsulates the logic for when a variable declaration is a (possibly tentativ) definition. Add a few functions building on this, and shift C tentative definition handling over to this new functionality. This shift also kills the Sema::TentativeDefinitions map and instead simply stores all declarations in the renamed list. The correct handling for multiple tentative definitions is instead shifted to the final walk of the list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94968 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
|
4e1d873d4b43555067bed1ce199ca0c4cb85273b |
31-Jan-2010 |
Eli Friedman <eli.friedman@gmail.com> |
Switch expressions like T() and T(1,2) over to new-style initialization. I'm not quite sure what we want to do about the AST representation; comments welcome. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94967 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExprCXX.cpp
|
6997aae42800d95a1189a6186af438feb19ecc54 |
31-Jan-2010 |
Eli Friedman <eli.friedman@gmail.com> |
Switch expressions like T() and T(1,2) over to new-style initialization. I'm not quite sure what we want to do about the AST representation; comments welcome. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94967 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExprCXX.cpp
|
b24ba0bb90d86be896e4c683b11ac4d0175f20e3 |
31-Jan-2010 |
Anders Carlsson <andersca@mac.com> |
Start creating CXXBindReferenceExpr nodes when binding complex types to references. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94964 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
3aba09376c5f49c4c8d176109ea4835bc2c528ee |
31-Jan-2010 |
Anders Carlsson <andersca@mac.com> |
Start creating CXXBindReferenceExpr nodes when binding complex types to references. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94964 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
bbe7ff8e44e5a1dbf5e26c93afeb8eef479a2a54 |
31-Jan-2010 |
Anders Carlsson <andersca@mac.com> |
Diagnose binding a non-const reference to a vector element. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94963 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaInit.cpp
|
093802675b1548f2a5f44c29938d65cce00d58bb |
31-Jan-2010 |
Anders Carlsson <andersca@mac.com> |
Diagnose binding a non-const reference to a vector element. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94963 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaInit.cpp
|
e77dce286d4ad171e2eba021aa2bc9666a90124f |
31-Jan-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Return early, reduce indentation, and simplify line breaks. No functionality change. PS: I'm under the impression formatting-only patches don't need pre-commit review, but feel free to yell at me if I should post these first! =D git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94956 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
aaa1a895725f3977c005304be9ca36747d9e3c97 |
31-Jan-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Return early, reduce indentation, and simplify line breaks. No functionality change. PS: I'm under the impression formatting-only patches don't need pre-commit review, but feel free to yell at me if I should post these first! =D git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94956 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
1009950c911a063b0573b87942d9c1e0234a9f07 |
31-Jan-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Really trivial patch to accept pointer to const void in indirect goto. Despite the lack of documentation, this matches the behavior of GCC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94954 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
2877998bd8db2fac1c56430a4edcfa0ce138aff9 |
31-Jan-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Really trivial patch to accept pointer to const void in indirect goto. Despite the lack of documentation, this matches the behavior of GCC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94954 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
0076ce20ef0ac992c4bac7777f345851802aefdc |
31-Jan-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Fix PR6159 and several other problems with value-dependent non-type template arguments. This both prevents meaningless checks on these arguments and ensures that they are represented as an expression by the instantiation. Cleaned up and added standard text to the relevant test case. Also started adding tests for *rejected* cases. At least one FIXME here where (I think) we allow something we shouldn't. More to come in the area of rejecting crazy arguments with decent diagnostics. Suggestions welcome for still better diagnostics on these errors! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94953 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
038cc399940deefc0f55aad8be97312a7390e2ad |
31-Jan-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Fix PR6159 and several other problems with value-dependent non-type template arguments. This both prevents meaningless checks on these arguments and ensures that they are represented as an expression by the instantiation. Cleaned up and added standard text to the relevant test case. Also started adding tests for *rejected* cases. At least one FIXME here where (I think) we allow something we shouldn't. More to come in the area of rejecting crazy arguments with decent diagnostics. Suggestions welcome for still better diagnostics on these errors! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94953 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
e3129df6079a8e0028250d71a10b71dcf728d78a |
31-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Rework base and member initialization in constructors, with several (necessarily simultaneous) changes: - CXXBaseOrMemberInitializer now contains only a single initializer rather than a set of initialiation arguments + a constructor. The single initializer covers all aspects of initialization, including constructor calls as necessary but also cleanup of temporaries created by the initializer (which we never handled before!). - Rework + simplify code generation for CXXBaseOrMemberInitializers, since we can now just emit the initializer as an initializer. - Switched base and member initialization over to the new initialization code (InitializationSequence), so that it - Improved diagnostics for the new initialization code when initializing bases and members, to match the diagnostics produced by the previous (special-purpose) code. - Simplify the representation of type-checked constructor initializers in templates; instead of keeping the fully-type-checked AST, which is rather hard to undo at template instantiation time, throw away the type-checked AST and store the raw expressions in the AST. This simplifies instantiation, but loses a little but of information in the AST. - When type-checking implicit base or member initializers within a dependent context, don't add the generated initializers into the AST, because they'll look like they were explicit. - Record in CXXConstructExpr when the constructor call is to initialize a base class, so that CodeGen does not have to infer it from context. This ensures that we call the right kind of constructor. There are also a few "opportunity" fixes here that were needed to not regress, for example: - Diagnose default-initialization of a const-qualified class that does not have a user-declared default constructor. We had this diagnostic specifically for bases and members, but missed it for variables. That's fixed now. - When defining the implicit constructors, destructor, and copy-assignment operator, set the CurContext to that constructor when we're defining the body. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94952 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaInit.cpp
emaInit.h
emaTemplateInstantiateDecl.cpp
|
9db7dbb918ca49f4ee6c181e4917e7b6ec547353 |
31-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Rework base and member initialization in constructors, with several (necessarily simultaneous) changes: - CXXBaseOrMemberInitializer now contains only a single initializer rather than a set of initialiation arguments + a constructor. The single initializer covers all aspects of initialization, including constructor calls as necessary but also cleanup of temporaries created by the initializer (which we never handled before!). - Rework + simplify code generation for CXXBaseOrMemberInitializers, since we can now just emit the initializer as an initializer. - Switched base and member initialization over to the new initialization code (InitializationSequence), so that it - Improved diagnostics for the new initialization code when initializing bases and members, to match the diagnostics produced by the previous (special-purpose) code. - Simplify the representation of type-checked constructor initializers in templates; instead of keeping the fully-type-checked AST, which is rather hard to undo at template instantiation time, throw away the type-checked AST and store the raw expressions in the AST. This simplifies instantiation, but loses a little but of information in the AST. - When type-checking implicit base or member initializers within a dependent context, don't add the generated initializers into the AST, because they'll look like they were explicit. - Record in CXXConstructExpr when the constructor call is to initialize a base class, so that CodeGen does not have to infer it from context. This ensures that we call the right kind of constructor. There are also a few "opportunity" fixes here that were needed to not regress, for example: - Diagnose default-initialization of a const-qualified class that does not have a user-declared default constructor. We had this diagnostic specifically for bases and members, but missed it for variables. That's fixed now. - When defining the implicit constructors, destructor, and copy-assignment operator, set the CurContext to that constructor when we're defining the body. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94952 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaInit.cpp
emaInit.h
emaTemplateInstantiateDecl.cpp
|
1d0c5cd14bd2aa70e65f13e72b49f446c540733d |
31-Jan-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Handle instantiation of templates with non-type arguments expressed with an explicit '&' by introducing an address-of operator prior to checking the argument's type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94947 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
548028b3ca15926c6883357e111b47bbc56a4761 |
31-Jan-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Handle instantiation of templates with non-type arguments expressed with an explicit '&' by introducing an address-of operator prior to checking the argument's type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94947 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
e5a62222721fc93c69bf152c728e2a0a72094671 |
31-Jan-2010 |
Anders Carlsson <andersca@mac.com> |
Remove the SmallVectors from AsmStmt. Fixes PR6105. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94926 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
966146e89141804ff6492739a2a6e6592ca671c7 |
31-Jan-2010 |
Anders Carlsson <andersca@mac.com> |
Remove the SmallVectors from AsmStmt. Fixes PR6105. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94926 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
5f72946a2b22f3f6bb161381089af01377e811bd |
30-Jan-2010 |
Anders Carlsson <andersca@mac.com> |
Use IdentifierInfo * instead of std::string for the AsmStmt names. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94925 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaStmt.cpp
reeTransform.h
|
ff93dbd887e40588ed55d135037bb9287488b285 |
30-Jan-2010 |
Anders Carlsson <andersca@mac.com> |
Use IdentifierInfo * instead of std::string for the AsmStmt names. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94925 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaStmt.cpp
reeTransform.h
|
22b9be9e2cf26a261e4aeb9de19ea2c3a27a1e43 |
30-Jan-2010 |
Anders Carlsson <andersca@mac.com> |
More asm cleanup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94920 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
a5a79f7d16b48d3be8bcc8c7650e31aefd92b657 |
30-Jan-2010 |
Anders Carlsson <andersca@mac.com> |
More asm cleanup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94920 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
3c0139ea8b51400424c97b36cd0413f0808eb2ad |
30-Jan-2010 |
Anders Carlsson <andersca@mac.com> |
Combine AsmStmt::setOutputsAndInputs and AsmStmt::setClobbers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94918 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
fdba9c069023f686e2608affde02c82131ee1cf8 |
30-Jan-2010 |
Anders Carlsson <andersca@mac.com> |
Combine AsmStmt::setOutputsAndInputs and AsmStmt::setClobbers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94918 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
41f80b5a55bdd4d008bd293b77efc8224182ed35 |
30-Jan-2010 |
Anders Carlsson <andersca@mac.com> |
StringRef-ize the TargetInfo::ConstraintInfo constructor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94916 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
f959fb5fb82ae2cbdf8635d734613a01818fb7bf |
30-Jan-2010 |
Anders Carlsson <andersca@mac.com> |
StringRef-ize the TargetInfo::ConstraintInfo constructor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94916 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
91de88be2f812dcc697f51586c2a8bc8177a2a45 |
30-Jan-2010 |
Anders Carlsson <andersca@mac.com> |
Eliminate yet another old-school PerformCopyInitialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94874 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
ca755fe38f00d63363b3a3ac2a1ae6c1eb2957f9 |
30-Jan-2010 |
Anders Carlsson <andersca@mac.com> |
Eliminate yet another old-school PerformCopyInitialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94874 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
fef905c27e50bcddeed6e008b5bbf83f9d12db86 |
30-Jan-2010 |
Ted Kremenek <kremenek@apple.com> |
Add basic type checking of format string conversion specifiers and their arguments. Thanks to Cristian Draghici for his help with this patch! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94864 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
d635c5fcc45c952b75743dd2f4c86d6950e4954e |
30-Jan-2010 |
Ted Kremenek <kremenek@apple.com> |
Add basic type checking of format string conversion specifiers and their arguments. Thanks to Cristian Draghici for his help with this patch! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94864 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
1af33d5c01a612e37408db8318e5537d5e038547 |
30-Jan-2010 |
Ted Kremenek <kremenek@apple.com> |
Be a little more permissive than C99: allow 'unsigned' to be used for the field width and precision of a format specifier instead of just 'int'. This matches GCC, and fixes <rdar://problem/6079850>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94856 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
31f8e32788adb299acad455363eb7fd244642c82 |
30-Jan-2010 |
Ted Kremenek <kremenek@apple.com> |
Be a little more permissive than C99: allow 'unsigned' to be used for the field width and precision of a format specifier instead of just 'int'. This matches GCC, and fixes <rdar://problem/6079850>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94856 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
4f611fa1eb5b57ae66465cfeb73f14b18b4d4446 |
29-Jan-2010 |
Ted Kremenek <kremenek@apple.com> |
Switch Sema over to using the new implementation of format string checking. It passes all existing tests, and the diagnostics have been refined to provide better range information (we now highlight individual format specifiers) and more precise wording in the diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94837 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
|
f88c8e02da48afea6a04091f675af5c4facd99f1 |
29-Jan-2010 |
Ted Kremenek <kremenek@apple.com> |
Switch Sema over to using the new implementation of format string checking. It passes all existing tests, and the diagnostics have been refined to provide better range information (we now highlight individual format specifiers) and more precise wording in the diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94837 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
|
cc845d86b09df95440626e0f5c9c4ce361fc8fff |
29-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix reference-binding when we have a reference to const volatile type; previously, we were allowing this to bind to a temporary. Now, we don't; add test-cases and improve diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94831 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaInit.cpp
|
ef06e2451c3069569ba543e7b1c5e0de7a257005 |
29-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Fix reference-binding when we have a reference to const volatile type; previously, we were allowing this to bind to a temporary. Now, we don't; add test-cases and improve diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94831 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaInit.cpp
|
8e97a38c31a2587f9cdcca5ec240883adb1c0888 |
29-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix reference binding of const lvalue references to bit-fields, which requires a temporary. Previously, we were building an initialization sequence that bound to the bit-field as if it were a real lvalue. Note that we previously (and still) diagnose binding of non-const references to bit-fields, as we should. There's no real way to test that this code is correct, since reference binding does not *currently* have any representation in the AST. This fix should make it easier for that to happen, so I've verified this fix with... Added InitializationSequence::dump(), to print an initialization sequence for debugging purposes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94826 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
emaInit.h
|
de4b1d86bf48bc2a84bddf6b188f6da53eaea845 |
29-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Fix reference binding of const lvalue references to bit-fields, which requires a temporary. Previously, we were building an initialization sequence that bound to the bit-field as if it were a real lvalue. Note that we previously (and still) diagnose binding of non-const references to bit-fields, as we should. There's no real way to test that this code is correct, since reference binding does not *currently* have any representation in the AST. This fix should make it easier for that to happen, so I've verified this fix with... Added InitializationSequence::dump(), to print an initialization sequence for debugging purposes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94826 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
emaInit.h
|
a94c52154a8adfde763bd98b4e101792aeb7bcb1 |
29-Jan-2010 |
Anders Carlsson <andersca@mac.com> |
And yet another call. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94824 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
3faa486935d4c57e89edf2f1883c4ba715a1b2ec |
29-Jan-2010 |
Anders Carlsson <andersca@mac.com> |
And yet another call. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94824 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
f62b32f504aedcda7ad4e3ba4a4e8a6007520a53 |
29-Jan-2010 |
Anders Carlsson <andersca@mac.com> |
Another PerformCopyInitialization call bites the dust. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94823 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
38f88abead110a514ae626818c7d09a1ec763058 |
29-Jan-2010 |
Anders Carlsson <andersca@mac.com> |
Another PerformCopyInitialization call bites the dust. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94823 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
e5a2254ecf0308e15fd6cb479f7ff7a462da636e |
29-Jan-2010 |
Anders Carlsson <andersca@mac.com> |
Get rid of another old PerformCopyInitialization call. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94819 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
c6acbc58a7aef0a3382775424c80e9534b54b2ed |
29-Jan-2010 |
Anders Carlsson <andersca@mac.com> |
Get rid of another old PerformCopyInitialization call. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94819 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
a06279e6530196687ed1efa53f6bffaf354e605e |
29-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When naming a function template via a qualified-id (or any other way that ADL is suppressed), we need to build an UnresolvedLookupExpr. Fixes PR6063, which was hitting Boost headers pretty hard. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94814 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
86b8e0949869bb9a7af3a703e8756bad8621c9c5 |
29-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
When naming a function template via a qualified-id (or any other way that ADL is suppressed), we need to build an UnresolvedLookupExpr. Fixes PR6063, which was hitting Boost headers pretty hard. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94814 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
bf5afe56417379aba6372d5c416e4d320d6a01d4 |
29-Jan-2010 |
Ted Kremenek <kremenek@apple.com> |
Alternate format string checking: issue warnings for incomplete format specifiers. In addition, move ParseFormatString() and FormatStringHandler() from the clang::analyze_printf to the clang namespace. Hopefully this will resolve some link errors on Linux. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94794 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
808015a18bd97781ce437831a95a92fdfc8d5136 |
29-Jan-2010 |
Ted Kremenek <kremenek@apple.com> |
Alternate format string checking: issue warnings for incomplete format specifiers. In addition, move ParseFormatString() and FormatStringHandler() from the clang::analyze_printf to the clang namespace. Hopefully this will resolve some link errors on Linux. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94794 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
d2dcbc6c37b799b46cf8858919484300a3230ffa |
29-Jan-2010 |
Anders Carlsson <andersca@mac.com> |
Simplify InitListChecker::CheckReferenceType git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94793 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
a6fe0bf89db4372c9e8e8a5c2a50593c2977df29 |
29-Jan-2010 |
Anders Carlsson <andersca@mac.com> |
Simplify InitListChecker::CheckReferenceType git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94793 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
76d8ee48b6f8591391f75ed175e49b385a85fc02 |
29-Jan-2010 |
Ted Kremenek <kremenek@apple.com> |
Alternate format string checking: issue a warning for invalid conversion specifiers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94792 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
26ac2e07b46bfb4d4f00752c96481c0a98c79c69 |
29-Jan-2010 |
Ted Kremenek <kremenek@apple.com> |
Alternate format string checking: issue a warning for invalid conversion specifiers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94792 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
9d995ff111efce46ec3b76316b1d97268e7fe2dc |
29-Jan-2010 |
Anders Carlsson <andersca@mac.com> |
Add an CXXBindReferenceExpr (not used just yet). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94791 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
eb60edffa147e061278c436e513b0df9b4c4e7f6 |
29-Jan-2010 |
Anders Carlsson <andersca@mac.com> |
Add an CXXBindReferenceExpr (not used just yet). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94791 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
5ba8fe572fa3aea37791f1e4f410382cb10bc15e |
29-Jan-2010 |
Ted Kremenek <kremenek@apple.com> |
Alternate format string checking: check for excess data arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94787 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
07d161f38e708a91486bf1c031d525faebbb249d |
29-Jan-2010 |
Ted Kremenek <kremenek@apple.com> |
Alternate format string checking: check for excess data arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94787 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
f06f14f55133d66c9ee0d7304a2cb427a94da405 |
29-Jan-2010 |
Ted Kremenek <kremenek@apple.com> |
Alternate format string checking: check if the number of format specifiers exceeds the number of arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94785 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
da51f0d136df131a0137c0ec1069fb586d8a296a |
29-Jan-2010 |
Ted Kremenek <kremenek@apple.com> |
Alternate format string checking: check if the number of format specifiers exceeds the number of arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94785 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
cf731975a4be023d8ea83fb90349a0e6ed62b66c |
29-Jan-2010 |
Ted Kremenek <kremenek@apple.com> |
Alternate format string checking: warn of '%n' as being potentially insecure. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94782 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
e82d804ee761006250543d6fe6e98ee7896cd756 |
29-Jan-2010 |
Ted Kremenek <kremenek@apple.com> |
Alternate format string checking: warn of '%n' as being potentially insecure. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94782 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
920439c0ec59e26196ce0defcda765c76c8b7778 |
29-Jan-2010 |
Ted Kremenek <kremenek@apple.com> |
Add precision/field width checking to AlternateCheckPrintfString(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94774 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
0d27735c51f5bd392e673cf39a675e14e9442387 |
29-Jan-2010 |
Ted Kremenek <kremenek@apple.com> |
Add precision/field width checking to AlternateCheckPrintfString(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94774 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
8776bef327e52ebf318c68f376c1e63b52b844ff |
29-Jan-2010 |
Ted Kremenek <kremenek@apple.com> |
Start fleshing out Sema::AlternateCheckPrintfString(): - Add an anonymous class 'CheckPrintfHandler' which will do the checking of specific format specifiers - Add checking for using the '@' conversion specifier outside an ObjC string literal - Add checking for null characters within the string git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94761 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
|
e0e5313c25f3870d0d18fc67e1b3a3a0e1ef8e07 |
29-Jan-2010 |
Ted Kremenek <kremenek@apple.com> |
Start fleshing out Sema::AlternateCheckPrintfString(): - Add an anonymous class 'CheckPrintfHandler' which will do the checking of specific format specifiers - Add checking for using the '@' conversion specifier outside an ObjC string literal - Add checking for null characters within the string git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94761 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
|
a3c199b287733dbe42fc28b144e24bb0a09f1da9 |
28-Jan-2010 |
John McCall <rjmccall@apple.com> |
Access control for surrogate function calls. Required a moderately gross hack to get the access bits set properly in conversion sets. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94744 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaOverload.cpp
|
233a6419097ed97b67ff8efcacef9af613262ca3 |
28-Jan-2010 |
John McCall <rjmccall@apple.com> |
Access control for surrogate function calls. Required a moderately gross hack to get the access bits set properly in conversion sets. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94744 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaOverload.cpp
|
4219a22a3ac94359126adf7d9b6d92d83cd2734e |
28-Jan-2010 |
John McCall <rjmccall@apple.com> |
Access control for overloaded call operators. Not for surrogates yet, mostly because we're going to want a better diagnostic for conversions. Also this API needs to go back to sanity. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94730 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
41d8903731782ee85ee2b19734008b006e01c76f |
28-Jan-2010 |
John McCall <rjmccall@apple.com> |
Access control for overloaded call operators. Not for surrogates yet, mostly because we're going to want a better diagnostic for conversions. Also this API needs to go back to sanity. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94730 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
45572f4548ea1a56879f2fbf1ec542bfe774156f |
28-Jan-2010 |
John McCall <rjmccall@apple.com> |
Access checking for overloaded operators. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94725 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaAccess.cpp
emaOverload.cpp
|
5357b615364c17ea024c757354c58ae2a520d216 |
28-Jan-2010 |
John McCall <rjmccall@apple.com> |
Access checking for overloaded operators. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94725 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaAccess.cpp
emaOverload.cpp
|
21c6f6593288eba632705fca3e8ff472cb0418e1 |
28-Jan-2010 |
Ted Kremenek <kremenek@apple.com> |
Add placeholder function in Sema for new format string checking logic. This function will use the format string parsing logic in libAnalysis, and once it is shown to be better than the current implementation it will replace AlternateCheckPrintfString() entirely. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94721 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
|
ce7024e8a3793b05861a4904ecdb1272924ada14 |
28-Jan-2010 |
Ted Kremenek <kremenek@apple.com> |
Add placeholder function in Sema for new format string checking logic. This function will use the format string parsing logic in libAnalysis, and once it is shown to be better than the current implementation it will replace AlternateCheckPrintfString() entirely. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94721 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
|
a84c1c2f1e31d471b455c5b66d654f5d9566fd29 |
28-Jan-2010 |
Ted Kremenek <kremenek@apple.com> |
Fix 80 col violation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94717 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
8acc9f6370865e200f1bf63dee5c48d8c28e2b06 |
28-Jan-2010 |
Ted Kremenek <kremenek@apple.com> |
Fix 80 col violation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94717 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
6a096f28201041bd84053b1e8a003f94aadf35e8 |
28-Jan-2010 |
Ted Kremenek <kremenek@apple.com> |
Remove invalid conversion specifiers from format string checking. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94707 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
f291976ecf537dc4f2d5537b1664d47ff4b94865 |
28-Jan-2010 |
Ted Kremenek <kremenek@apple.com> |
Remove invalid conversion specifiers from format string checking. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94707 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
a24732aaa56352ed7073e74f0b50fd48cf6037c8 |
27-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix a major oversight in the comparison of standard conversion sequences, where we would occasionally determine (incorrectly) that one standard conversion sequence was a proper subset of another when, in fact, they contained completely incomparable conversions. This change records the types in each step within a standard conversion sequence, so that we can check the specific comparison types to determine when one sequence is a proper subset of the other. Fixes this testcase (thanks, Anders!), which was distilled from PR6095 (also thanks to Anders). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94660 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExprCXX.cpp
emaOverload.cpp
emaOverload.h
|
ad323a856c0bf759e07d37d749510ddf4f8c6b96 |
27-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Fix a major oversight in the comparison of standard conversion sequences, where we would occasionally determine (incorrectly) that one standard conversion sequence was a proper subset of another when, in fact, they contained completely incomparable conversions. This change records the types in each step within a standard conversion sequence, so that we can check the specific comparison types to determine when one sequence is a proper subset of the other. Fixes this testcase (thanks, Anders!), which was distilled from PR6095 (also thanks to Anders). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94660 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExprCXX.cpp
emaOverload.cpp
emaOverload.h
|
4b7751947057624f8c63a021a49dea6aa20628a1 |
27-Jan-2010 |
John McCall <rjmccall@apple.com> |
Implement access-check delays for out-of-line member definitions using the same framework we use for deprecation warnings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94659 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaAccess.cpp
emaDeclAttr.cpp
|
2f514480c448708ec382a684cf5e035d3a827ec8 |
27-Jan-2010 |
John McCall <rjmccall@apple.com> |
Implement access-check delays for out-of-line member definitions using the same framework we use for deprecation warnings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94659 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaAccess.cpp
emaDeclAttr.cpp
|
6994e1a96ebc69f63b92df433d30f578f3d92f1d |
27-Jan-2010 |
John McCall <rjmccall@apple.com> |
Implement access control for overloaded functions. Suppress access control diagnostics in "early" lookups, such as during typename checks and when building unresolved lookup expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94647 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaAccess.cpp
emaDecl.cpp
emaExpr.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
|
c373d48502ca7683ab55385f5bd624d778eb288d |
27-Jan-2010 |
John McCall <rjmccall@apple.com> |
Implement access control for overloaded functions. Suppress access control diagnostics in "early" lookups, such as during typename checks and when building unresolved lookup expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94647 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaAccess.cpp
emaDecl.cpp
emaExpr.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
|
a12cfc33df90a89eb078feb7150df53745397aa7 |
26-Jan-2010 |
John McCall <rjmccall@apple.com> |
Avoid some unnecessary copying of unresolved lookup results. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94531 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
75345163535eb1765ba8fb971974be895645cb45 |
26-Jan-2010 |
John McCall <rjmccall@apple.com> |
Avoid some unnecessary copying of unresolved lookup results. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94531 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
39ccec4c2edd336c7d37dbdeda5817b5cd6425b1 |
26-Jan-2010 |
John McCall <rjmccall@apple.com> |
Handle redeclarations found by ADL deterministically and reasonably. This solution relies on an O(n) scan of redeclarations, which means it might scale poorly in crazy cases with tons of redeclarations brought in by a ton of distinct associated namespaces. I believe that avoiding this is not worth the common-case cost. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94530 91177308-0d34-0410-b5e6-96231b3b80d8
ookup.h
ema.h
emaLookup.cpp
emaOverload.cpp
|
7edb5fdf9703e1abd780417db691b77d5fcbc610 |
26-Jan-2010 |
John McCall <rjmccall@apple.com> |
Handle redeclarations found by ADL deterministically and reasonably. This solution relies on an O(n) scan of redeclarations, which means it might scale poorly in crazy cases with tons of redeclarations brought in by a ton of distinct associated namespaces. I believe that avoiding this is not worth the common-case cost. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94530 91177308-0d34-0410-b5e6-96231b3b80d8
ookup.h
ema.h
emaLookup.cpp
emaOverload.cpp
|
42d0dda4cf63089f9536378412100c3f6e5afb50 |
26-Jan-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Correctly treat 64 bit integers specified via the mode attribute as the 'long' type when that type is 64 bits wide, and the 'long long' type when 'long' is only 32 bits wide. This fixes PR6108. Also adds a bunch of test cases to ensure proper conversion between equally sized standard types and mode-specified types on both 32 and 64 bit targets. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94527 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
aec7caa3c40891727164167ece11d552422803d2 |
26-Jan-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Correctly treat 64 bit integers specified via the mode attribute as the 'long' type when that type is 64 bits wide, and the 'long long' type when 'long' is only 32 bits wide. This fixes PR6108. Also adds a bunch of test cases to ensure proper conversion between equally sized standard types and mode-specified types on both 32 and 64 bit targets. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94527 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
8c7fb52207a27ef8c96d8912d8becee5b5031f43 |
26-Jan-2010 |
John McCall <rjmccall@apple.com> |
Allow ADL to find functions imported by using decls. Leave wordy comment about interaction between ADL and default arguments. Shrug shoulders, commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94524 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
emaOverload.cpp
|
a113e7263c5337731c65fada9de7ff72af25423b |
26-Jan-2010 |
John McCall <rjmccall@apple.com> |
Allow ADL to find functions imported by using decls. Leave wordy comment about interaction between ADL and default arguments. Shrug shoulders, commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94524 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
emaOverload.cpp
|
61b29a1dd02abc71d991daabf566b02a38fea9f9 |
26-Jan-2010 |
John McCall <rjmccall@apple.com> |
Preserve access bits through overload resolution much better. Some general refactoring in operator resolution. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94498 91177308-0d34-0410-b5e6-96231b3b80d8
ookup.h
ema.h
emaExpr.cpp
emaLookup.cpp
emaOverload.cpp
reeTransform.h
|
6e26689f5d513e24ad7783a4493201930fdeccc0 |
26-Jan-2010 |
John McCall <rjmccall@apple.com> |
Preserve access bits through overload resolution much better. Some general refactoring in operator resolution. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94498 91177308-0d34-0410-b5e6-96231b3b80d8
ookup.h
ema.h
emaExpr.cpp
emaLookup.cpp
emaOverload.cpp
reeTransform.h
|
d9a6e30e38c55f4892e1e9b9675c163894b4ac2d |
26-Jan-2010 |
John McCall <rjmccall@apple.com> |
Pass access specifiers around in overload resolution. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94485 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
emaOverload.h
|
86820f58e077bfd8fdf7309129b6ff2c5c4eb0e4 |
26-Jan-2010 |
John McCall <rjmccall@apple.com> |
Pass access specifiers around in overload resolution. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94485 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
emaOverload.h
|
f08a9364f9a031b9da9856d70a116dfcf6674d42 |
25-Jan-2010 |
Eli Friedman <eli.friedman@gmail.com> |
Code simplification; this should have no visible effects. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94427 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
a1635d9b468709d47b6c533cc82bdabf34f560b8 |
25-Jan-2010 |
Eli Friedman <eli.friedman@gmail.com> |
Code simplification; this should have no visible effects. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94427 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
e6d261e31fcc2204d4117ca753e843bc2c1164f4 |
25-Jan-2010 |
Ted Kremenek <kremenek@apple.com> |
Split libAnalysis into two libraries: libAnalysis and libChecker. (1) libAnalysis is a generic analysis library that can be used by Sema. It defines the CFG, basic dataflow analysis primitives, and inexpensive flow-sensitive analyses (e.g. LiveVariables). (2) libChecker contains the guts of the static analyzer, incuding the path-sensitive analysis engine and domain-specific checks. Now any clients that want to use the frontend to build their own tools don't need to link in the entire static analyzer. This change exposes various obvious cleanups that can be made to the layout of files and headers in libChecker. More changes pending. :) This change also exposed a layering violation between AnalysisContext and MemRegion. BlockInvocationContext shouldn't explicitly know about BlockDataRegions. For now I've removed the BlockDataRegion* from BlockInvocationContext (removing context-sensitivity; although this wasn't used yet). We need to have a better way to extend BlockInvocationContext (and any LocationContext) to add context-sensitivty. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94406 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDecl.cpp
emaExpr.cpp
|
1309f9a3b225ea846e5822691c39a77423125505 |
25-Jan-2010 |
Ted Kremenek <kremenek@apple.com> |
Split libAnalysis into two libraries: libAnalysis and libChecker. (1) libAnalysis is a generic analysis library that can be used by Sema. It defines the CFG, basic dataflow analysis primitives, and inexpensive flow-sensitive analyses (e.g. LiveVariables). (2) libChecker contains the guts of the static analyzer, incuding the path-sensitive analysis engine and domain-specific checks. Now any clients that want to use the frontend to build their own tools don't need to link in the entire static analyzer. This change exposes various obvious cleanups that can be made to the layout of files and headers in libChecker. More changes pending. :) This change also exposed a layering violation between AnalysisContext and MemRegion. BlockInvocationContext shouldn't explicitly know about BlockDataRegions. For now I've removed the BlockDataRegion* from BlockInvocationContext (removing context-sensitivity; although this wasn't used yet). We need to have a better way to extend BlockInvocationContext (and any LocationContext) to add context-sensitivty. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94406 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDecl.cpp
emaExpr.cpp
|
f4b34a030729fff07d8a6501bfabbbd097c15045 |
24-Jan-2010 |
Chris Lattner <sabre@nondot.org> |
-fno-rtti is now the default. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94379 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
|
0bb46d285cb2bb0f582d0935f58f57a9be8bf2cd |
24-Jan-2010 |
Chris Lattner <sabre@nondot.org> |
-fno-rtti is now the default. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94379 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
|
25214fa032c02d7170f2dc21918764e34455b1d1 |
24-Jan-2010 |
Anders Carlsson <andersca@mac.com> |
Implement [dcl.fct.spec]p6. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94365 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
0757c8ccb79210ce1f22142851cdcbf6e42a71d6 |
24-Jan-2010 |
Anders Carlsson <andersca@mac.com> |
Implement [dcl.fct.spec]p6. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94365 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
de344bdcfd849680f534721f8029e6afc58f869c |
24-Jan-2010 |
Anders Carlsson <andersca@mac.com> |
Implement instantiation of AsmStmts (Crazy, I know) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94361 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaStmt.cpp
reeTransform.h
|
703e39486689d6660e75f6b6de0068db031a51c7 |
24-Jan-2010 |
Anders Carlsson <andersca@mac.com> |
Implement instantiation of AsmStmts (Crazy, I know) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94361 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaStmt.cpp
reeTransform.h
|
bf84be462c28e7d669ca799cc1654e2e08b0150b |
24-Jan-2010 |
Chris Lattner <sabre@nondot.org> |
fix PR6034, a crash on invalid where the switch stack would get unbalanced. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94347 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaStmt.cpp
|
7e52de4b45286d057b367bb1f9283a1e32d79252 |
24-Jan-2010 |
Chris Lattner <sabre@nondot.org> |
fix PR6034, a crash on invalid where the switch stack would get unbalanced. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94347 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaStmt.cpp
|
2d7c0498ba1ac80586da070c01a033e206141591 |
24-Jan-2010 |
Anders Carlsson <andersca@mac.com> |
Use new initialization code when dealing with [dcl.init.aggr]p12. This fixes the bug where array elements and member initializers weren't copied correctly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94340 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
1b36a2fcb2cea310c01fc2a80a9da915e5d2ceb0 |
24-Jan-2010 |
Anders Carlsson <andersca@mac.com> |
Use new initialization code when dealing with [dcl.init.aggr]p12. This fixes the bug where array elements and member initializers weren't copied correctly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94340 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
9740a692d898d881b63b0e4f30a2bc32d58d1273 |
24-Jan-2010 |
Anders Carlsson <andersca@mac.com> |
Change all InitializedEntity pointers over to be references. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94335 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
8ff9e86c492c784b3ce2abe5b5d870cd6db365a8 |
24-Jan-2010 |
Anders Carlsson <andersca@mac.com> |
Change all InitializedEntity pointers over to be references. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94335 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
67b00311bddf349995b03f20d1c690bcf2eba579 |
23-Jan-2010 |
Anders Carlsson <andersca@mac.com> |
Start passing InitializedEntity to CheckDesignatedInitializer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94334 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
9a8a70ef79f68db5b17d505eb9681bf161384fe8 |
23-Jan-2010 |
Anders Carlsson <andersca@mac.com> |
Start passing InitializedEntity to CheckDesignatedInitializer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94334 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
eb38d28162d34f15cc48f6046b967bb3daaf33d9 |
23-Jan-2010 |
John McCall <rjmccall@apple.com> |
Preserve access for enum constants during template instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94333 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
3b85ecf2049c8670eba30d0c06f28f64168af9b8 |
23-Jan-2010 |
John McCall <rjmccall@apple.com> |
Preserve access for enum constants during template instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94333 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
defc8ba11756feee61d2793f0493d23d1bf2da2d |
23-Jan-2010 |
Anders Carlsson <andersca@mac.com> |
More init work, adding more entity parameters. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94332 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
987dc6a3fa0917de269c9d60b7d4f21c68b8b09f |
23-Jan-2010 |
Anders Carlsson <andersca@mac.com> |
More init work, adding more entity parameters. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94332 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
bf6e0c5d894015e7edcab288bedd38bb59c9a223 |
23-Jan-2010 |
Anders Carlsson <andersca@mac.com> |
Use the new init code for member subobjects. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94329 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
2bbae5de98f486d03e10c039668182075b5569dd |
23-Jan-2010 |
Anders Carlsson <andersca@mac.com> |
Use the new init code for member subobjects. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94329 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
54c0e07685c868dc35df3987f4343ac712fe8d77 |
23-Jan-2010 |
Anders Carlsson <andersca@mac.com> |
Switch some array initialization over to the new init code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94327 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
784f69940755dd66cf244dd84f57a57d358e5c43 |
23-Jan-2010 |
Anders Carlsson <andersca@mac.com> |
Switch some array initialization over to the new init code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94327 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
cc044dda8db5b6a3755ea41472de143b33e8add9 |
23-Jan-2010 |
Anders Carlsson <andersca@mac.com> |
Baby steps towards migrating the InitListChecker over to the new initialization code. Pass an InitializedEntity pointer through to most init checker functions. Right now, it's ignored everywhere except when initializing vectors in C++. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94325 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
46f4659f9d012ca2e2050c1fc39a59666114b3f9 |
23-Jan-2010 |
Anders Carlsson <andersca@mac.com> |
Baby steps towards migrating the InitListChecker over to the new initialization code. Pass an InitializedEntity pointer through to most init checker functions. Right now, it's ignored everywhere except when initializing vectors in C++. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94325 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
4e033254ee9b1b856cc4915d5932b6f8d1bee194 |
23-Jan-2010 |
Anders Carlsson <andersca@mac.com> |
When an InitializedEntity is passed to CheckSingleInitializer, call the new Sema::PerformCopyInitialization overload. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94324 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
1f24350dac272caea50ae9a52f1b85722fd3557a |
23-Jan-2010 |
Anders Carlsson <andersca@mac.com> |
When an InitializedEntity is passed to CheckSingleInitializer, call the new Sema::PerformCopyInitialization overload. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94324 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
c5c88c7a76e2f161fc732a944830db293e53e9d3 |
23-Jan-2010 |
Anders Carlsson <andersca@mac.com> |
Change CheckSingleInitializer to take/return OwningExprResults instead. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94316 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
c07b8c02f7c54631ab9a9bd7db9f031d3db170ca |
23-Jan-2010 |
Anders Carlsson <andersca@mac.com> |
Change CheckSingleInitializer to take/return OwningExprResults instead. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94316 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
682f1a42a7bd9da18140ed86153c3f38bf06394c |
23-Jan-2010 |
Benjamin Kramer <benny.kra@googlemail.com> |
Simplify code with StringRef. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94314 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
c96f49417b2039d6227b042cd2d975f0869df79d |
23-Jan-2010 |
Benjamin Kramer <benny.kra@googlemail.com> |
Simplify code with StringRef. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94314 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
f118bd48a7f9e03fe64b69f54b35e4b63db64854 |
23-Jan-2010 |
John McCall <rjmccall@apple.com> |
Produce a special diagnostic when users call a function with an argument of incomplete type (or a pointer/reference to such). The causes of this problem are different enough to justify a different "design" for the diagnostic. Most notably, it doesn't give an operand index: it's usually pretty obvious which operand is the problem, it adds a lot of clutter to mention it, and the fix is usually in a different part of the file anyway. This is yet another diagnostic that should really have an analogue in the non-overloaded case --- which should be much easier to write because of the weaker space constraints. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94303 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
258b203b853e1c684c290fccd0088d1f340c137f |
23-Jan-2010 |
John McCall <rjmccall@apple.com> |
Produce a special diagnostic when users call a function with an argument of incomplete type (or a pointer/reference to such). The causes of this problem are different enough to justify a different "design" for the diagnostic. Most notably, it doesn't give an operand index: it's usually pretty obvious which operand is the problem, it adds a lot of clutter to mention it, and the fix is usually in a different part of the file anyway. This is yet another diagnostic that should really have an analogue in the non-overloaded case --- which should be much easier to write because of the weaker space constraints. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94303 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
844a3bb8807281e2f3d8fd3f88a99265d7be874a |
23-Jan-2010 |
Anders Carlsson <andersca@mac.com> |
Fix the EntityKind order so that all entity kinds that can be copied (using copy constructors) come first. Also, fix a bug where EK_New was left out of the err_init_conversion_failed diagnostic (It is now reported as 'new value'). Please review Doug :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94289 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.h
|
a729bbb739ca97a8dc52b6b0495725590a0367dc |
23-Jan-2010 |
Anders Carlsson <andersca@mac.com> |
Fix the EntityKind order so that all entity kinds that can be copied (using copy constructors) come first. Also, fix a bug where EK_New was left out of the err_init_conversion_failed diagnostic (It is now reported as 'new value'). Please review Doug :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94289 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.h
|
87ef500cd688379ff56bca9934ed5d2e97d410e4 |
23-Jan-2010 |
John McCall <rjmccall@apple.com> |
During overload resolution diagnostics, sort non-viable candidates by the quality of their conversions. To make this work, fill out all conversions for all candidates (but only when diagnosing overload failure). Split out a few cases from ovl_fail_bad_conversion which didn't actually involve a failed argument conversion. I'm pretty sure this is not a well-founded ordering, but I'm not sure it matters. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94283 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaOverload.h
|
717e8910bb6444f744db78d8d1a020f8f57a83e1 |
23-Jan-2010 |
John McCall <rjmccall@apple.com> |
During overload resolution diagnostics, sort non-viable candidates by the quality of their conversions. To make this work, fill out all conversions for all candidates (but only when diagnosing overload failure). Split out a few cases from ovl_fail_bad_conversion which didn't actually involve a failed argument conversion. I'm pretty sure this is not a well-founded ordering, but I'm not sure it matters. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94283 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaOverload.h
|
d7f73eb3cfa8c6c0a4d39b2bfc813cc9dda8bea1 |
23-Jan-2010 |
Anders Carlsson <andersca@mac.com> |
Separate EK_ArrayOrVectorElement into EK_ArrayElement and EK_VectorElement; arrays and vectors are pretty different beasts in C++. Doug, please review/comment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94279 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
emaInit.h
|
d3d824d45c32d457493e7cb79cc34a4761afb760 |
23-Jan-2010 |
Anders Carlsson <andersca@mac.com> |
Separate EK_ArrayOrVectorElement into EK_ArrayElement and EK_VectorElement; arrays and vectors are pretty different beasts in C++. Doug, please review/comment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94279 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
emaInit.h
|
7db083f218f6dca7312610367675183343c91dd3 |
23-Jan-2010 |
John McCall <rjmccall@apple.com> |
Implement elementary access control. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94268 91177308-0d34-0410-b5e6-96231b3b80d8
ookup.h
ema.h
emaAccess.cpp
emaDecl.cpp
emaLookup.cpp
|
92f883177b162928a8e632e4e3b93fafd2b26072 |
23-Jan-2010 |
John McCall <rjmccall@apple.com> |
Implement elementary access control. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94268 91177308-0d34-0410-b5e6-96231b3b80d8
ookup.h
ema.h
emaAccess.cpp
emaDecl.cpp
emaLookup.cpp
|
3d0ea87f8c50f0c9e9ac43e9a79d0ae8941f419f |
23-Jan-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
outside a method, 'super' should resolve in a normal name look up to mimic gcc's behavior. Fixes radar 7400691. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94246 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
e4fb82839a762e632f63e195058015e2f1ca27a8 |
23-Jan-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
outside a method, 'super' should resolve in a normal name look up to mimic gcc's behavior. Fixes radar 7400691. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94246 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
8e9f33b927c532a664f8281d2b456250562b4403 |
22-Jan-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch fixes a lookup bug in c++'s anonymous union member lookup. Fixes radar 7562438. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94191 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
588a4ad562d717ccbbdbbc36f57e967c0b1ca147 |
22-Jan-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch fixes a lookup bug in c++'s anonymous union member lookup. Fixes radar 7562438. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94191 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
aafb44e38113036243c69c5f796c01caf6e5c1fb |
22-Jan-2010 |
Anders Carlsson <andersca@mac.com> |
No need to canonicalize the type and use dyn_cast. Also, correctly diagnose trying to override a function returning an lvalue reference with a function overriding an rvalue reference. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94183 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
f2a04bf1689cd88dd04012c311ba86e9d8b2b1b2 |
22-Jan-2010 |
Anders Carlsson <andersca@mac.com> |
No need to canonicalize the type and use dyn_cast. Also, correctly diagnose trying to override a function returning an lvalue reference with a function overriding an rvalue reference. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94183 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
7d6daee381af83c0a576cc8973392e1b65e20bba |
22-Jan-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Fix an obvious goof that caused us to only see the top level of return types when checking for covariance. Added some fun test cases, fixes PR6110. This felt obvious enough to just commit. ;] Let me know if anything needs tweaking. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94173 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
ceb7e001c488a7ea09dc631518515290518db47a |
22-Jan-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Fix an obvious goof that caused us to only see the top level of return types when checking for covariance. Added some fun test cases, fixes PR6110. This felt obvious enough to just commit. ;] Let me know if anything needs tweaking. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94173 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
114233778db96bfb79a4cc55d8cc4d1b5c2b7865 |
22-Jan-2010 |
Daniel Dunbar <daniel@zuster.org> |
Use raw_ostream instead of cstdio. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94136 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
f3f91f3719a95036175ad767805657cdfeb54406 |
22-Jan-2010 |
Daniel Dunbar <daniel@zuster.org> |
Use raw_ostream instead of cstdio. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94136 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
5ed791b2da3b283f9e414b9ce79db6db45c896ea |
22-Jan-2010 |
John McCall <rjmccall@apple.com> |
Create function, block, and template parameters in the context of the translation unit. This is temporary for function and block parameters; template parameters can just stay this way, since Templates aren't DeclContexts. This gives us the nice property that everything created in a record DC should have access in C++. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94122 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
7a9813ced7455b8a33a807489ca77a4f809c8a73 |
22-Jan-2010 |
John McCall <rjmccall@apple.com> |
Create function, block, and template parameters in the context of the translation unit. This is temporary for function and block parameters; template parameters can just stay this way, since Templates aren't DeclContexts. This gives us the nice property that everything created in a record DC should have access in C++. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94122 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
e4de52161137c9952c05b15ac6d364d7cd5ba73d |
22-Jan-2010 |
Mike Stump <mrs@apple.com> |
Wire up the new range reporting for unreachable code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94118 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
4a415670481424a210df419a9f96e29db9939106 |
22-Jan-2010 |
Mike Stump <mrs@apple.com> |
Wire up the new range reporting for unreachable code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94118 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
f00fb3a58da531a5eef862e48833e23e7b41b57e |
22-Jan-2010 |
Mike Stump <mrs@apple.com> |
Improve unreachable code warnings with respect to dead member and dead array references. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94115 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
b5c775575b496c03d862ea03587a9f1d74193c9f |
22-Jan-2010 |
Mike Stump <mrs@apple.com> |
Improve unreachable code warnings with respect to dead member and dead array references. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94115 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
d1224ba451b73cd38e0fb0ef2713fbc300f9e107 |
21-Jan-2010 |
Mike Stump <mrs@apple.com> |
Improve unreachable code warnings for with respect to dead functional casts in C++. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94106 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
2d6ceab0ad062989ecb7b8666c85e58a2fcd95ce |
21-Jan-2010 |
Mike Stump <mrs@apple.com> |
Improve unreachable code warnings for with respect to dead functional casts in C++. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94106 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
48ea5833666706326cce7dbf110232cad82e198b |
21-Jan-2010 |
Mike Stump <mrs@apple.com> |
Improve unreachable code warnings for with respect to c-style casts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94094 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
44582300b63ac128989643adcd12b6349b67abe4 |
21-Jan-2010 |
Mike Stump <mrs@apple.com> |
Improve unreachable code warnings for with respect to c-style casts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94094 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
bf9e08e10411773c0ff6884a824f2ba8b3f1e1e4 |
21-Jan-2010 |
Mike Stump <mrs@apple.com> |
Improve unreachable code warnings for with respect to ? :. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94093 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
e5fba7058ce34cc3d75e16e777ec6fc8096183f8 |
21-Jan-2010 |
Mike Stump <mrs@apple.com> |
Improve unreachable code warnings for with respect to ? :. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94093 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
bf430198a91b6f352db12499d423464278fdb660 |
21-Jan-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to implement rewriting of properties. Fixes radar 7562952. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94087 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
d0502407c1b41b2ace326f355d7b7a6876246223 |
21-Jan-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to implement rewriting of properties. Fixes radar 7562952. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94087 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
69d7409450cd1bf9c331726bdc1b82d0f1709d9d |
21-Jan-2010 |
Mike Stump <mrs@apple.com> |
Improve unreachable code warnings for with respect to compound assignments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94086 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
45db90de59f6effb7bd9a55660ca97aa3feadc6c |
21-Jan-2010 |
Mike Stump <mrs@apple.com> |
Improve unreachable code warnings for with respect to compound assignments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94086 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
9b81729d31ae7c7608885c3d38b05cd7dba9b2d1 |
21-Jan-2010 |
Mike Stump <mrs@apple.com> |
Improve unreachable code warnings with respect to dead binary and unary operators. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94084 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
55f988efeb08b84c2dd9e4c05990b88c81fe2b58 |
21-Jan-2010 |
Mike Stump <mrs@apple.com> |
Improve unreachable code warnings with respect to dead binary and unary operators. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94084 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
11199344fc3c37c12534dc1eaf692d77c70dc5d9 |
21-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Teach code-completion to deal with calls to functions without prototypes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94076 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
c0265406a82d391a5fc60d16dd1c6cd61a92cfce |
21-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Teach code-completion to deal with calls to functions without prototypes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94076 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
c5a125febb22d5636fbb9558ef1abbd58aa5b47d |
21-Jan-2010 |
Mike Stump <mrs@apple.com> |
Speed up compilation by avoiding generating exceptional edges from CallExprs as those edges help cause a n^2 explosion in the number of destructor calls. Other consumers, such as static analysis, that would like to have more a more complete CFG can select the inclusion of those edges as CFG build time. This also fixes up the two compilation users of CFGs to be tolerant of having or not having those edges. All catch code is assumed be to live if we didn't generate the exceptional edges for CallExprs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94074 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDecl.cpp
|
4c45aa1b00b91847acfb082acfaced3ffa294d1d |
21-Jan-2010 |
Mike Stump <mrs@apple.com> |
Speed up compilation by avoiding generating exceptional edges from CallExprs as those edges help cause a n^2 explosion in the number of destructor calls. Other consumers, such as static analysis, that would like to have more a more complete CFG can select the inclusion of those edges as CFG build time. This also fixes up the two compilation users of CFGs to be tolerant of having or not having those edges. All catch code is assumed be to live if we didn't generate the exceptional edges for CallExprs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94074 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDecl.cpp
|
d20857caaa205b03aa5f178f6c8c7177fda2da67 |
21-Jan-2010 |
Mike Stump <mrs@apple.com> |
Move some recent checking code into SemaChecking instead. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94067 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDecl.cpp
|
f8c4921c73d73123e2b79221ad4f1775ce984cfd |
21-Jan-2010 |
Mike Stump <mrs@apple.com> |
Move some recent checking code into SemaChecking instead. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94067 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDecl.cpp
|
fa0b98f15cb480ca528c2a9228308b57817b7d03 |
21-Jan-2010 |
Mike Stump <mrs@apple.com> |
Avoid instantiating std::sort to save on compiler size. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94065 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d40e94d050670208ba3d9e7ffa59b5d7cb58ef0a |
21-Jan-2010 |
Mike Stump <mrs@apple.com> |
Avoid instantiating std::sort to save on compiler size. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94065 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
5c4f961594b71558c819ea9192c6478e520a8770 |
21-Jan-2010 |
Mike Stump <mrs@apple.com> |
When checking for unreachable code, we can trivially avoid checking for unreachable loops if all the blocks are already marked live by this point. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94064 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
44fa21054574cf9e5f3a08c0b6a44f82aa5b44e4 |
21-Jan-2010 |
Mike Stump <mrs@apple.com> |
When checking for unreachable code, we can trivially avoid checking for unreachable loops if all the blocks are already marked live by this point. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94064 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
537a4775a5fc2d0d8112ffa0fd46a3ec23782cb4 |
21-Jan-2010 |
Mike Stump <mrs@apple.com> |
When checking for unreachable blocks, we can trivially avoid extra work, if we know we already marked all blocks as live. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94063 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
6bde1ae4b7e790691b3a8080a7f1a8fd8a943d3f |
21-Jan-2010 |
Mike Stump <mrs@apple.com> |
When checking for unreachable blocks, we can trivially avoid extra work, if we know we already marked all blocks as live. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94063 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
9e3fdbbc2997fbbdcbcaaf7d78f09deadea3455d |
21-Jan-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Fixes comments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94053 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
481683955a28dc5e373d4c380c4737bf3ad51f1c |
21-Jan-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Fixes comments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94053 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
b0154a58a1a41f1f755268350511db21d26fd7d5 |
21-Jan-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Also allow cast of block pointer type to pointer to an any object. Another variation of radar 7562285. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94052 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
f7c43fdd28d4963a16291cb6b000ed955f044262 |
21-Jan-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Also allow cast of block pointer type to pointer to an any object. Another variation of radar 7562285. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94052 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
42b8ee0e5d829b051cff1861586882ce15722df1 |
20-Jan-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
In objective-c++ land, a block pointer is another object pointer. So, casting a generic object pointer ('id' or 'Class') to the block pointer is allowed. Fixes radar 7562285. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94045 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
b351a7daad4bcac7716d52aa0044a6b7c323ad0d |
20-Jan-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
In objective-c++ land, a block pointer is another object pointer. So, casting a generic object pointer ('id' or 'Class') to the block pointer is allowed. Fixes radar 7562285. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94045 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
2815dc14e57c57c7d6212be2687f5df937c451a3 |
20-Jan-2010 |
John McCall <rjmccall@apple.com> |
First pass at collecting access-specifier information along inheritance paths. Triggers lots of assertions about missing access information; fix them. Will actually consume this information soon. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94038 91177308-0d34-0410-b5e6-96231b3b80d8
ookup.h
emaDecl.cpp
emaLookup.cpp
emaTemplateInstantiateDecl.cpp
|
46460a68f6508775e98c19b4bb8454bb471aac24 |
20-Jan-2010 |
John McCall <rjmccall@apple.com> |
First pass at collecting access-specifier information along inheritance paths. Triggers lots of assertions about missing access information; fix them. Will actually consume this information soon. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94038 91177308-0d34-0410-b5e6-96231b3b80d8
ookup.h
emaDecl.cpp
emaLookup.cpp
emaTemplateInstantiateDecl.cpp
|
460512d0f4aa4a31fff7592c23ced4337975a5f6 |
20-Jan-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Settled rule on warning on unimplemented property in category implementation when some implementations are missing in the primary class implementation. (fixes radar 6505200). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94014 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
3ad230eb626d630877c17d6e81b167ec7476d84e |
20-Jan-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Settled rule on warning on unimplemented property in category implementation when some implementations are missing in the primary class implementation. (fixes radar 6505200). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94014 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
e96e844a70643365e1a79871d3c7cf4563db5d93 |
20-Jan-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Improve performance of warning when not implementing a required property of a protocol (my previous patch). No change in functionality. (radar 7544809). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94005 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
a84f2e4270fb36e3ad9d849c4343e38a42aefe6f |
20-Jan-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Improve performance of warning when not implementing a required property of a protocol (my previous patch). No change in functionality. (radar 7544809). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94005 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
345bcb9e51d1ba887238c5486ae7a447932e1c9f |
20-Jan-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to implement required warnings for unimplemented properties imported frfom protocol. Fixes radar 7544809. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93965 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
3ac1edaab9063f1235a2939ca82ba4db24bbf695 |
20-Jan-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to implement required warnings for unimplemented properties imported frfom protocol. Fixes radar 7544809. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93965 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
8d326ceb3e196f350b6a286f5ae3127ee10788e8 |
20-Jan-2010 |
John McCall <rjmccall@apple.com> |
Give UnresolvedSet the ability to store access specifiers for each declaration. Change LookupResult to use UnresolvedSet. Also extract UnresolvedSet into its own header and make it templated over an inline capacity. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93959 91177308-0d34-0410-b5e6-96231b3b80d8
ookup.h
emaDeclCXX.cpp
emaExprCXX.cpp
emaInit.cpp
emaLookup.cpp
emaOverload.cpp
emaStmt.cpp
|
eec51cf1ba5f0e62c9cdb81b5c63babdd6e649ab |
20-Jan-2010 |
John McCall <rjmccall@apple.com> |
Give UnresolvedSet the ability to store access specifiers for each declaration. Change LookupResult to use UnresolvedSet. Also extract UnresolvedSet into its own header and make it templated over an inline capacity. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93959 91177308-0d34-0410-b5e6-96231b3b80d8
ookup.h
emaDeclCXX.cpp
emaExprCXX.cpp
emaInit.cpp
emaLookup.cpp
emaOverload.cpp
emaStmt.cpp
|
8ff7d69e3cfae245a243edcf074dadd4883ae3a2 |
20-Jan-2010 |
Mike Stump <mrs@apple.com> |
Improve CheckFallThrough analysis in the presense of the new C++ EH support. WIP. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93956 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
e2ab979cf6b52efac3b6c5f121900ec57a34689c |
20-Jan-2010 |
Mike Stump <mrs@apple.com> |
Improve CheckFallThrough analysis in the presense of the new C++ EH support. WIP. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93956 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
64ec9de57a038064c631176a4a0ed3e314b1e55c |
20-Jan-2010 |
Mike Stump <mrs@apple.com> |
Implement goto inside of blocks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93945 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaStmt.cpp
|
a3899eb5e30426b00b80232a15ae557dd4caa5b8 |
20-Jan-2010 |
Mike Stump <mrs@apple.com> |
Implement goto inside of blocks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93945 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaStmt.cpp
|
349f08701b41fd9991d80ab14dabccb4897c3eac |
19-Jan-2010 |
John McCall <rjmccall@apple.com> |
The type of a compound literal expression is not necessarily the same as the type which was syntactically written. Fixes PR 6080. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93933 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
reeTransform.h
|
1d7d8d66eff7ed0f3e957d330930cc9ab8047add |
19-Jan-2010 |
John McCall <rjmccall@apple.com> |
The type of a compound literal expression is not necessarily the same as the type which was syntactically written. Fixes PR 6080. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93933 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
reeTransform.h
|
5e36b2af3617ee008876affef6489a8f65d4828c |
19-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Eliminate cursor kinds used to express definitions. Instead, provide CIndex functions that (1) map from a reference or declaration to the corresponding definition, if available, and (2) determine whether a given declaration cursor is also a definition. This eliminates a lot of duplication in the cursor kinds, and maps more closely to the Clang ASTs. This is another API + ABI breaker with no deprecation. Yay, progress. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93893 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
|
b699866820102a69d83d6ac6941985c5ef4e8c40 |
19-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Eliminate cursor kinds used to express definitions. Instead, provide CIndex functions that (1) map from a reference or declaration to the corresponding definition, if available, and (2) determine whether a given declaration cursor is also a definition. This eliminates a lot of duplication in the cursor kinds, and maps more closely to the Clang ASTs. This is another API + ABI breaker with no deprecation. Yay, progress. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93893 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
|
138bcb0fc9c3b61b423205e76c21f03ed49aa9c2 |
19-Jan-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Issue diagnostics (instead of crashing in code gen) when using property dot-syntax notation to use setter/getters in objective-c. Fixes radar 7553050. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93883 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
dd0cb9097ff4a9c88cb6a3cd377245ecb260c120 |
19-Jan-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Issue diagnostics (instead of crashing in code gen) when using property dot-syntax notation to use setter/getters in objective-c. Fixes radar 7553050. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93883 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
1b8763fcf094388111cd84242ad9e3541c678e04 |
19-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Teach Sema::ActOnDependentTemplateName that a dependent template name in a member access expression referring into the current instantiation need not be resolved at template definition *if* the current instantiation has any dependent base classes. Fixes PR6081. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93877 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaTemplate.cpp
|
0707bc504c392c8bd214a463f07b01809a23daa5 |
19-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Teach Sema::ActOnDependentTemplateName that a dependent template name in a member access expression referring into the current instantiation need not be resolved at template definition *if* the current instantiation has any dependent base classes. Fixes PR6081. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93877 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaTemplate.cpp
|
1acb63ed02ad20d43009fdfd1073ff77caa4a6f1 |
19-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
In a mem-initializer, a nested-name-specifier followed by an identifier always names a type. In the case of a dependent nested-name-specifier, build a TypenameType to describe the dependent base type. I'd like to move more of this behavior up into the parser, but this fixes PR6062. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93871 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
7a886e1a12ded84f49181cac9423e9db645cc452 |
19-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
In a mem-initializer, a nested-name-specifier followed by an identifier always names a type. In the case of a dependent nested-name-specifier, build a TypenameType to describe the dependent base type. I'd like to move more of this behavior up into the parser, but this fixes PR6062. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93871 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
c4dc63e665942c2cdb77d4ab5b0a5a3914caf0bf |
19-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When looking up enumerator names for redeclaration, use the ForRedeclaration flag so that we don't look into base classes. Fixes PR6061. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93862 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
e39fe72df7da662c195ef4bcd542d58ec87d5422 |
19-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
When looking up enumerator names for redeclaration, use the ForRedeclaration flag so that we don't look into base classes. Fixes PR6061. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93862 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
19115dc6b0544114f91fbec25ae828fb0850549e |
18-Jan-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Allow conversion of pointer to an objective-c pointer to a similar pointer. Fixes radar 7552179. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93803 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
83b7b31fff0b3b0d6519676c5738b61058202d88 |
18-Jan-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Allow conversion of pointer to an objective-c pointer to a similar pointer. Fixes radar 7552179. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93803 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
c1beadbbdca275e932d68978944b8feefbf51941 |
18-Jan-2010 |
John McCall <rjmccall@apple.com> |
Preserve type source information in compound literal expressions. Patch by Enea Zaffanella! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93752 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
reeTransform.h
|
42f56b50062cd3b3c6b23fdb9053578ae9145664 |
18-Jan-2010 |
John McCall <rjmccall@apple.com> |
Preserve type source information in compound literal expressions. Patch by Enea Zaffanella! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93752 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
reeTransform.h
|
e4b54f8c68be4ce1a3718640829bd3be7d171fea |
18-Jan-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Mostly renaming some methods and updating comments to reflect what these methods are actually doing. One method template for future work. No change in functionality. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93742 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
107089f36de33b03f411ace7b9352606a69bc3af |
18-Jan-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Mostly renaming some methods and updating comments to reflect what these methods are actually doing. One method template for future work. No change in functionality. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93742 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
bc6fcc7a405e5d9caf60f0485f374446300bc3cf |
18-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve source-location information for builtin TypeLocs, from Enea Zaffanella (with a couple of my tweaks). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93733 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
reeTransform.h
|
ddf889a2ad2888f1dea573987bbe952d9912c1a0 |
18-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Improve source-location information for builtin TypeLocs, from Enea Zaffanella (with a couple of my tweaks). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93733 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
reeTransform.h
|
31cc550280fe5c50d7f6ff57978ec083d284b53b |
18-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Encoding calling conventions in the type system, from Charles Davis! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93726 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
ab8bbf4ebd3e3e6eab913cb044772a62b7581941 |
18-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Encoding calling conventions in the type system, from Charles Davis! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93726 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
58ff985bae1bcf667e55572561bad5b8d5aef5a2 |
16-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Introduce a second queue of "local" pending implicit instantiation, which are instantiations of the member functions of local classes. These implicit instantiations have to occur at the same time as---and in the same local instantiation scope as---the enclosing function, since the member functions of the local class can refer to locals within the enclosing function. This should really, really fix PR5764. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93666 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaTemplateInstantiateDecl.cpp
|
60406bede202b66ebdd98cac0c38d20f9698aeca |
16-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Introduce a second queue of "local" pending implicit instantiation, which are instantiations of the member functions of local classes. These implicit instantiations have to occur at the same time as---and in the same local instantiation scope as---the enclosing function, since the member functions of the local class can refer to locals within the enclosing function. This should really, really fix PR5764. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93666 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaTemplateInstantiateDecl.cpp
|
f658702f2cd01e7b648a7131cb00ff55bc371e9a |
16-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When we are instantiating a member function of a local class, be sure to merge the local instantiation scope with the outer local instantiation scope, so that we can instantiate declarations from the function owning the local class. Fixes an assert while instantiating Boost.MPL's BOOST_MPL_ASSERT_MSG. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93651 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
79c2278a66d8fc0943774d1b7c71a32f7764e1e2 |
16-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
When we are instantiating a member function of a local class, be sure to merge the local instantiation scope with the outer local instantiation scope, so that we can instantiate declarations from the function owning the local class. Fixes an assert while instantiating Boost.MPL's BOOST_MPL_ASSERT_MSG. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93651 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
90b68203fe13ee160281fb1bf42a880d4ba8b688 |
16-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Partial fix for PR6022, where we were complaining when a friend function template declared within a class template did not match a function in another scope. We really need to rework how friends-in-templates are semantically checked. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93642 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
5d52e47ed6a4f920723ebec371594a3fe7878d7c |
16-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Partial fix for PR6022, where we were complaining when a friend function template declared within a class template did not match a function in another scope. We really need to rework how friends-in-templates are semantically checked. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93642 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
efae5800004586a05ac2f6153e71771d6e7187fd |
16-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve location information for Objective-C category declarations. We previously only had a single location (the @ in @interface); now we know where the @ is (for the start of the declaration), where the class name is (that's the normal "location" now for diagnostics), and where the category name is. Also, eliminated the redundant "end" location, since ObjCContainerDecl already has better @end information. The only XFAIL'd test is temporary; will un-XFAIL-it once I've taught CIndex how to use the new locations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93639 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
3db211b617c5073aa70eb25d37ed44ae0dca17c4 |
16-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Improve location information for Objective-C category declarations. We previously only had a single location (the @ in @interface); now we know where the @ is (for the start of the declaration), where the class name is (that's the normal "location" now for diagnostics), and where the category name is. Also, eliminated the redundant "end" location, since ObjCContainerDecl already has better @end information. The only XFAIL'd test is temporary; will un-XFAIL-it once I've taught CIndex how to use the new locations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93639 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
7158dd960d2b47b2f2ab7bf94fa1702ca2778cdd |
16-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Keep track of the source locations for each protocol reference in Objective-C classes, protocol definitions, forward protocol declarations, and categories. This information isn't actually used yet; that's coming next. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93636 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
18df52bbb5d28ca082064d31ae7558dbdae52377 |
16-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Keep track of the source locations for each protocol reference in Objective-C classes, protocol definitions, forward protocol declarations, and categories. This information isn't actually used yet; that's coming next. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93636 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
8c96e75391a7104fcaaad8b7f5fc46e7bba4948d |
16-Jan-2010 |
John McCall <rjmccall@apple.com> |
Fix a use of uninitialized memory in overload diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93629 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
f3cf22b3b4535282998d74826ccff970a140258f |
16-Jan-2010 |
John McCall <rjmccall@apple.com> |
Fix a use of uninitialized memory in overload diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93629 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
fb18c216730c3e36dd0d842b4063a7b88696d729 |
16-Jan-2010 |
Eli Friedman <eli.friedman@gmail.com> |
Make the AST explicitly represent the cast of the first operand of a pointer-to-member operator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93592 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
3005efeb131ccddcda9c332c83e49c32349e2aed |
16-Jan-2010 |
Eli Friedman <eli.friedman@gmail.com> |
Make the AST explicitly represent the cast of the first operand of a pointer-to-member operator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93592 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
52f96b511fe5e1c782dcb0a8f85ef0d79fd1f26e |
16-Jan-2010 |
Mike Stump <mrs@apple.com> |
Generalize handling for unreachable code warnings to all binary operators. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93584 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
823000cdeeb2deb861dd92463d739c1e71fea5d2 |
16-Jan-2010 |
Mike Stump <mrs@apple.com> |
Generalize handling for unreachable code warnings to all binary operators. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93584 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
05d65a0df11caac8b8f2a58c8e40ffd68be6550f |
16-Jan-2010 |
John McCall <rjmccall@apple.com> |
Candidates with arity mismatches are extra-special non-viable and need to stand at the back of the line. Thanks to Oliver Hunt for reminding me to do this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93583 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
1b77e73ef6b7ed886abbc79b89fcb59b0e5c69a1 |
16-Jan-2010 |
John McCall <rjmccall@apple.com> |
Candidates with arity mismatches are extra-special non-viable and need to stand at the back of the line. Thanks to Oliver Hunt for reminding me to do this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93583 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
13550e08024d7c6476149f800c01ed0306e403f0 |
16-Jan-2010 |
Mike Stump <mrs@apple.com> |
Refine location reporting for unreachable code warnings for comma expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93574 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
8eae0907c5094b8af61e26b8b809baf3c1ba75c8 |
16-Jan-2010 |
Mike Stump <mrs@apple.com> |
Refine location reporting for unreachable code warnings for comma expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93574 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
bf7f8fef3c6270f3d920e94d323d39589bdde56b |
15-Jan-2010 |
John McCall <rjmccall@apple.com> |
Make LookupResult::resolveKind() robust against NotFoundInCurrentInstantiation. Fixes PR 6049. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93557 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
dc5c78639f4e64d790c08e7b6494ae86ceea4ff1 |
15-Jan-2010 |
John McCall <rjmccall@apple.com> |
Make LookupResult::resolveKind() robust against NotFoundInCurrentInstantiation. Fixes PR 6049. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93557 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
f367dfe17bb6b043fa1ba4ee5604b727df3b3126 |
15-Jan-2010 |
John McCall <rjmccall@apple.com> |
Preserve type source information for C++ named casts through template instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93533 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXCast.cpp
reeTransform.h
|
c89724cc6dcb178ec79c76d7e629d9a7b5d83418 |
15-Jan-2010 |
John McCall <rjmccall@apple.com> |
Preserve type source information for C++ named casts through template instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93533 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXCast.cpp
reeTransform.h
|
7ba61937c84dc2be29180398eff77541f3916ee3 |
15-Jan-2010 |
John McCall <rjmccall@apple.com> |
Don't lose type source information when rebuilding C-style cast expressions. Also we don't need to recheck for altivec initializers, I think. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93529 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
reeTransform.h
|
b042fdfc9460e0018276412257e3c3226f9ea96e |
15-Jan-2010 |
John McCall <rjmccall@apple.com> |
Don't lose type source information when rebuilding C-style cast expressions. Also we don't need to recheck for altivec initializers, I think. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93529 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
reeTransform.h
|
d5ecc399aa8985536852b0af8c2c63d5650f6857 |
15-Jan-2010 |
John McCall <rjmccall@apple.com> |
Preserve type source information in explicit cast expressions. Patch by Enea Zaffanella. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93522 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaExpr.cpp
emaExprCXX.cpp
reeTransform.h
|
9d125033a9853f3b572a4c9e2f9e2d4e5e346973 |
15-Jan-2010 |
John McCall <rjmccall@apple.com> |
Preserve type source information in explicit cast expressions. Patch by Enea Zaffanella. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93522 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaExpr.cpp
emaExprCXX.cpp
reeTransform.h
|
681b0568ecae7b4379c6fdda24b83ea84142f739 |
15-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When determining whether the type is the current instantiation, strip qualifiers. Fixes PR6021. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93513 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
|
1cfb7da1f34723021f362cb09636965e5ade0c6d |
15-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
When determining whether the type is the current instantiation, strip qualifiers. Fixes PR6021. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93513 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
|
14eb2996b980102a3861635ca9ea6bad6d1e21e0 |
15-Jan-2010 |
John McCall <rjmccall@apple.com> |
Don't repeat lookup when instantiating resolved member expressions. Adjust BuildMemberReferenceExpr to perform the inheritance check on implicit member accesses, which can arise from unqualified lookups and therefore may reference decls from enclosing class scopes. Fixes PR 5838. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93510 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
reeTransform.h
|
c2233c5c46eafebd5529bf2bbd1f0a723b892e61 |
15-Jan-2010 |
John McCall <rjmccall@apple.com> |
Don't repeat lookup when instantiating resolved member expressions. Adjust BuildMemberReferenceExpr to perform the inheritance check on implicit member accesses, which can arise from unqualified lookups and therefore may reference decls from enclosing class scopes. Fixes PR 5838. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93510 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
reeTransform.h
|
42f1cc084a02cebedf4e9e7cadc7039a46193081 |
15-Jan-2010 |
Mike Stump <mrs@apple.com> |
Refine unreachable warnings. WIP. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93500 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
a609f56ab5cc680ee778174665fe6c66a5160dd6 |
15-Jan-2010 |
Mike Stump <mrs@apple.com> |
Refine unreachable warnings. WIP. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93500 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
46ff27fa7eaad8af5e9dea988a5bdb74eb674c35 |
15-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When performing qualified name lookup into the current instantiation, do not look into base classes if there are any dependent base classes. Instead, note in the lookup result that we couldn't look into any dependent bases. Use that new result kind to detect when this case occurs, so that we can fall back to treating the type/value/etc. as a member of an unknown specialization. Fixes an issue where we were resolving lookup at template definition time and then missing an ambiguity at template instantiation time. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93497 91177308-0d34-0410-b5e6-96231b3b80d8
ookup.h
ema.h
emaDecl.cpp
emaLookup.cpp
emaTemplate.cpp
|
7d3f576dc9ea6e866757abcd1736eb7e7433c325 |
15-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
When performing qualified name lookup into the current instantiation, do not look into base classes if there are any dependent base classes. Instead, note in the lookup result that we couldn't look into any dependent bases. Use that new result kind to detect when this case occurs, so that we can fall back to treating the type/value/etc. as a member of an unknown specialization. Fixes an issue where we were resolving lookup at template definition time and then missing an ambiguity at template instantiation time. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93497 91177308-0d34-0410-b5e6-96231b3b80d8
ookup.h
ema.h
emaDecl.cpp
emaLookup.cpp
emaTemplate.cpp
|
0fe2256a5f250149806a989986758a2af96ba281 |
14-Jan-2010 |
Chris Lattner <sabre@nondot.org> |
fix grammaro git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93452 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
8a3da0fb0a6fddc1cc0cc2f04c69f39c6b96b8de |
14-Jan-2010 |
Chris Lattner <sabre@nondot.org> |
fix grammaro git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93452 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
ecdc4c315cc0f0d45c3c14e8d076db06d59ff6ad |
14-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
After dyn_cast'ing, it generally makes sense to check the *output* of the dyn_cast against NULL rather than the *input*. Fixes PR6025. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93435 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
c781f9cd854f3d5d1c826f4a13382c6abca4cff7 |
14-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
After dyn_cast'ing, it generally makes sense to check the *output* of the dyn_cast against NULL rather than the *input*. Fixes PR6025. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93435 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
d53936ede29c21c7f937368abec6eb6b7e4ca9f0 |
14-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When qualified lookup into the current instantiation fails (because it finds nothing), and the current instantiation has dependent base classes, treat the qualified lookup as if it referred to an unknown specialization. Fixes PR6031. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93433 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaDecl.cpp
emaTemplate.cpp
|
9edad9b6184c730a73dc9241c043ea3bae54189f |
14-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
When qualified lookup into the current instantiation fails (because it finds nothing), and the current instantiation has dependent base classes, treat the qualified lookup as if it referred to an unknown specialization. Fixes PR6031. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93433 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaDecl.cpp
emaTemplate.cpp
|
d152d13efeaea574eeee9d2822717f452623ed1d |
14-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Switch a few callers of MaybeAddResult over to AddResult, when the declarations we're adding do not need any name-hiding checks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93431 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
608300be1972c43fe99154d25d62d697e7c0a0c2 |
14-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Switch a few callers of MaybeAddResult over to AddResult, when the declarations we're adding do not need any name-hiding checks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93431 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
4528cb1abe745849c3b8a34a58bc83f796f60c29 |
14-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Switch code-completion's ivar lookup over to LookupVisibleDecls, eliminating yet one more ResultBuilder::MaybeAddResult caller. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93430 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
80f4f4ce5a4c1416492ca6835cc85bb7e538ffc9 |
14-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Switch code-completion's ivar lookup over to LookupVisibleDecls, eliminating yet one more ResultBuilder::MaybeAddResult caller. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93430 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
93668ee020491a95c2a471a587b93d79ad1ea99e |
14-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Start migrating code-completion results from ResultBuilder::MaybeAddResult over to ResultBuilder::AddResult. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93429 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
a4477810e45b2d203ffc960615d130137d2e6449 |
14-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Start migrating code-completion results from ResultBuilder::MaybeAddResult over to ResultBuilder::AddResult. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93429 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
f8eb39f98e08085c4abbf7f870f9dfc61a092b3b |
14-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Switch the remaining code completions over to LookupVisibleDecls, after adding the ability to determine whether our lookup is a base-class lookup. Eliminate CollectMemberLookupResults, since it is no longer used (yay). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93428 91177308-0d34-0410-b5e6-96231b3b80d8
ookup.h
emaCodeComplete.cpp
emaLookup.cpp
|
0cc8404f8cf320da140e560899e1560bce80fe8c |
14-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Switch the remaining code completions over to LookupVisibleDecls, after adding the ability to determine whether our lookup is a base-class lookup. Eliminate CollectMemberLookupResults, since it is no longer used (yay). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93428 91177308-0d34-0410-b5e6-96231b3b80d8
ookup.h
emaCodeComplete.cpp
emaLookup.cpp
|
a9e74d7eae4ce20f6f650598503a39d6ffb230c9 |
14-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Move code completion for qualified name lookup (foo::) to LookupVisibleDecls. Also, a function does not hide another function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93421 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
emaLookup.cpp
|
def9107059d460ada5f0eb3d58189c59122e3c3f |
14-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Move code completion for qualified name lookup (foo::) to LookupVisibleDecls. Also, a function does not hide another function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93421 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
emaLookup.cpp
|
e02f1e2fb37ddd0ec1f25fd0cec534f16c8cad4f |
14-Jan-2010 |
John McCall <rjmccall@apple.com> |
Improve overload diagnostics some more by calling out qualifier mismatches for special diagnostics. Unfortunately, the non-overload diagnostics are not this good. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93420 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
651f3eec130099fb46e2ce2c8aee9d01531dc3b5 |
14-Jan-2010 |
John McCall <rjmccall@apple.com> |
Improve overload diagnostics some more by calling out qualifier mismatches for special diagnostics. Unfortunately, the non-overload diagnostics are not this good. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93420 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
156c2974bd56d5fbbf0db0cd5efe5af7115dbdc5 |
14-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Eliminate the code-completion-specifier CollectLookupResults in favor of the more general LookupVisibleDecls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93419 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
5d2fc405c71f307d4f9b71cc807ad3c4843cd2cc |
14-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Eliminate the code-completion-specifier CollectLookupResults in favor of the more general LookupVisibleDecls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93419 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
3ab219ce8662e4900a22759e71f841a26b8ba5ea |
14-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Simplify the code-completion logic for nested-name-specifiers: rather than traversing visible declarations twice, only perform one traversal and recognize nested-name-specifiers as special. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93418 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
45bcd43e34b07958b0a72dad6584fdacf6a11c3c |
14-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Simplify the code-completion logic for nested-name-specifiers: rather than traversing visible declarations twice, only perform one traversal and recognize nested-name-specifiers as special. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93418 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
3f9e1038983818cd08c2ce821bff5351a9695d40 |
14-Jan-2010 |
Mike Stump <mrs@apple.com> |
Don't assume a random access iterator, instead just use CFG::iterator. Thanks Ted. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93413 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
b64cc58087b0874ed96ac76ebcf8d9006bd63282 |
14-Jan-2010 |
Mike Stump <mrs@apple.com> |
Don't assume a random access iterator, instead just use CFG::iterator. Thanks Ted. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93413 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
14df670ee887db865f8d894ea3341cd9b5142090 |
14-Jan-2010 |
Mike Stump <mrs@apple.com> |
Avoid snowballing errors into additional warnings. To do better, we'd need an error term for the CFG. I suspect we'll always have to cope with getCFG returning 0, though, I'd love to see even that possibility removed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93411 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
cb4a4fb7810b46fd7d62f1f1e54299d2229cd8dc |
14-Jan-2010 |
Mike Stump <mrs@apple.com> |
Avoid snowballing errors into additional warnings. To do better, we'd need an error term for the CFG. I suspect we'll always have to cope with getCFG returning 0, though, I'd love to see even that possibility removed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93411 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
6067ddb9cda8cb1dcb060ce9927d991e09f575e8 |
14-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When providing completions for a member access expression in C++, provided nested-name-specifier results for base classes (only), rather than everything that could possibly be a nested-name-specifier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93398 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
e3eef64ae7a730f3611a08b133a08b786a3773a8 |
14-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
When providing completions for a member access expression in C++, provided nested-name-specifier results for base classes (only), rather than everything that could possibly be a nested-name-specifier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93398 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
356154eacf54b3019ec471764fdd47576fbd69ba |
14-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Switch code-completion for ordinary names over to the new(ish) LookupVisibleDecls, unifying the name lookup mechanisms used by code completion and typo correction. Aside from the software-engineering improvements, this makes code-completion see through using directives and see ivars when performing unqualified name lookup in an Objective-C instance method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93397 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
1ca6ae865cc632e9f626faacd4937e666eb05f6b |
14-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Switch code-completion for ordinary names over to the new(ish) LookupVisibleDecls, unifying the name lookup mechanisms used by code completion and typo correction. Aside from the software-engineering improvements, this makes code-completion see through using directives and see ivars when performing unqualified name lookup in an Objective-C instance method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93397 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
ce0452369fa01deec5f736574ff6fe55c54f151b |
14-Jan-2010 |
John McCall <rjmccall@apple.com> |
Improve the diagnostic for bad conversions in overload resolution to talk about 'object argument' vs. 'nth argument'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93395 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
e81e15ed0c31f828104b339ceb66648d1c815a8b |
14-Jan-2010 |
John McCall <rjmccall@apple.com> |
Improve the diagnostic for bad conversions in overload resolution to talk about 'object argument' vs. 'nth argument'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93395 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
aca834cb7f3c02b5f0c714f26fcecfc6db351574 |
14-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
More refactoring of ResultBuilder::MaybeAddResult. No intended functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93386 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
6660d845af8edb99098a08cf2539233a3be650b3 |
14-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
More refactoring of ResultBuilder::MaybeAddResult. No intended functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93386 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
82ce77fa677325b794da853a5b0b81a6392c05c7 |
14-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Refactor the "is this declaration interesting" logic in code-completion's ResultBuilder::MaybeAddResult for later reuse. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93379 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
e495b7f7b4fffbba7e61229d2a4205a0b164cbe8 |
14-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Refactor the "is this declaration interesting" logic in code-completion's ResultBuilder::MaybeAddResult for later reuse. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93379 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
2832ad44f390a4dda48217116e1f22a6592cbe21 |
14-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Look through using declarations when determining whether one decl hides another git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93378 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
efcf16d87d7964015e05e917041beef9947c32cd |
14-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Look through using declarations when determining whether one decl hides another git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93378 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
bedfe2752593796f67ba5f5f27968a4644965c64 |
14-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Banish the notion of a "rank" for code-completion results, since we are no longer using it for anything. No intended functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93376 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
bca403c17b3eee38ea0644fb70f652629b285faf |
14-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Banish the notion of a "rank" for code-completion results, since we are no longer using it for anything. No intended functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93376 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
916033e99a497f2bd499dcf5429fc9eccf1e49ee |
14-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve the sorting of code-completion results. We now always sort by the "typed" text, first, then take into account nested-name-specifiers, name hiding, etc. This means that the resulting sort is actually alphabetical :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93370 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
|
ab0b4f1d66de54b4c3102b96d56964510361ba7d |
14-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Improve the sorting of code-completion results. We now always sort by the "typed" text, first, then take into account nested-name-specifiers, name hiding, etc. This means that the resulting sort is actually alphabetical :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93370 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
|
e1b71bd74dc966f31ff69f362965a52c20645f9f |
13-Jan-2010 |
John McCall <rjmccall@apple.com> |
Don't report ambiguities in the user-defined conversion if we weren't supposed to be considering user-defined conversions in the first place. Doug, please review; I'm not sure what we should be doing if we see a real ambiguity in selecting a copy constructor when otherwise suppressing user-defined conversions. Fixes PR6014. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93365 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
cefd3ada97faf5a759dac4705900053d3aa071e9 |
13-Jan-2010 |
John McCall <rjmccall@apple.com> |
Don't report ambiguities in the user-defined conversion if we weren't supposed to be considering user-defined conversions in the first place. Doug, please review; I'm not sure what we should be doing if we see a real ambiguity in selecting a copy constructor when otherwise suppressing user-defined conversions. Fixes PR6014. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93365 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
3e4f060b9d51b5e210c9d6ebc78b12bc8735ea6b |
13-Jan-2010 |
John McCall <rjmccall@apple.com> |
Don't a.k.a. through the primary typedef of an anonymous tag decl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93362 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
64f7e258e9c43eefb7f82dfcd600abeed48dc395 |
13-Jan-2010 |
John McCall <rjmccall@apple.com> |
Don't a.k.a. through the primary typedef of an anonymous tag decl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93362 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
19a2e1e609e6a9db13f649ccd9f4d1ec16aa5acd |
13-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Code-completion for @public, @protected, @private, @package. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93361 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
|
c38c3e1e726630458154534227d74eda833d26a0 |
13-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Code-completion for @public, @protected, @private, @package. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93361 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
|
13529ab3783ec557034e2fce4d4152372aaabe64 |
13-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Whenever completing ordinary names for an Objective-C source, also provide completions for @ keywords. Previously, we only provided @-completions after an @ was actually typed, which is useful but probably not the common case. Also, make sure a few Objective-C 2.0 completions only show up when Objective-C 2.0 support is enabled (the default). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93354 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
b6ac2451bfed36206c5cec7217372c4299f67f2b |
13-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Whenever completing ordinary names for an Objective-C source, also provide completions for @ keywords. Previously, we only provided @-completions after an @ was actually typed, which is useful but probably not the common case. Also, make sure a few Objective-C 2.0 completions only show up when Objective-C 2.0 support is enabled (the default). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93354 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
6469dffc68a0b6fb195096b473763f3e1476b954 |
13-Jan-2010 |
John McCall <rjmccall@apple.com> |
Add type source information for both kinds of typeof types. Patch by Enea Zaffanella. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93344 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
reeTransform.h
|
cfb708c354e2f30ccc5cba9d644650f408a1ec3e |
13-Jan-2010 |
John McCall <rjmccall@apple.com> |
Add type source information for both kinds of typeof types. Patch by Enea Zaffanella. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93344 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
reeTransform.h
|
9e433f356f535443788b9ec6a2cd28fa25a0d33d |
13-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Reimplement constructor declarator parsing to cope with template-ids that name constructors, the endless joys of out-of-line constructor definitions, and various other corner cases that the previous hack never imagined. Fixes PR5688 and tightens up semantic analysis for constructor names. Additionally, fixed a problem where we wouldn't properly enter the declarator scope of a parenthesized declarator. We were entering the scope, then leaving it when we saw the ")"; now, we re-enter the declarator scope before parsing the parameter list. Note that we are forced to perform some tentative parsing within a class (call it C) to tell the difference between C(int); // constructor and C (f)(int); // member function which is rather unfortunate. And, although it isn't necessary for correctness, we use the same tentative-parsing mechanism for out-of-line constructors to improve diagnostics in icky cases like: C::C C::f(int); // error: C::C refers to the constructor name, but // we complain nicely and recover by treating it as // a type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93322 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaType.cpp
|
0efc2c1716be4f1c5f1343cad3b047e74861f030 |
13-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Reimplement constructor declarator parsing to cope with template-ids that name constructors, the endless joys of out-of-line constructor definitions, and various other corner cases that the previous hack never imagined. Fixes PR5688 and tightens up semantic analysis for constructor names. Additionally, fixed a problem where we wouldn't properly enter the declarator scope of a parenthesized declarator. We were entering the scope, then leaving it when we saw the ")"; now, we re-enter the declarator scope before parsing the parameter list. Note that we are forced to perform some tentative parsing within a class (call it C) to tell the difference between C(int); // constructor and C (f)(int); // member function which is rather unfortunate. And, although it isn't necessary for correctness, we use the same tentative-parsing mechanism for out-of-line constructors to improve diagnostics in icky cases like: C::C C::f(int); // error: C::C refers to the constructor name, but // we complain nicely and recover by treating it as // a type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93322 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaType.cpp
|
5eb9a064368fb4640e144bc97c247e7c1099b26d |
13-Jan-2010 |
John McCall <rjmccall@apple.com> |
Record some basic information about bad conversion sequences. Use that information to feed diagnostics instead of regenerating it. Much room for improvement here, but fixes some unfortunate problems reporting on method calls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93316 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExprCXX.cpp
emaOverload.cpp
emaOverload.h
|
adbb8f8aa44216d30d204e843c4a74abab929dae |
13-Jan-2010 |
John McCall <rjmccall@apple.com> |
Record some basic information about bad conversion sequences. Use that information to feed diagnostics instead of regenerating it. Much room for improvement here, but fixes some unfortunate problems reporting on method calls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93316 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExprCXX.cpp
emaOverload.cpp
emaOverload.h
|
23b70b8d8a7271402c433f023e3012717a03cc6b |
13-Jan-2010 |
Sean Hunt <rideau3@gmail.com> |
Implement semantic checking for C++ literal operators. This now rejects literal operators that don't meet the requirements. Templates are not yet checked for. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93315 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
a6c058dd75c5563cced821fc16766a7cc179e00c |
13-Jan-2010 |
Sean Hunt <rideau3@gmail.com> |
Implement semantic checking for C++ literal operators. This now rejects literal operators that don't meet the requirements. Templates are not yet checked for. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93315 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
fe6189ee1a85456792b2dd58f3ef7c93de9c4ed0 |
13-Jan-2010 |
Mike Stump <mrs@apple.com> |
Add an unreachable code checker. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93287 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaExpr.cpp
|
fa6ef180c0d3609124217387618fbb51bbdd2e48 |
13-Jan-2010 |
Mike Stump <mrs@apple.com> |
Add an unreachable code checker. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93287 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaExpr.cpp
|
ec29a8136449036f485e28f6e1e21ae3fb0289a0 |
13-Jan-2010 |
John McCall <rjmccall@apple.com> |
Improve the reporting of non-viable overload candidates by noting the reason why the candidate is non-viable. There's a lot we can do to improve this, but it's a good start. Further improvements should probably be integrated with the bad-initialization reporting routines. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93277 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
220ccbf2c9ef97034cce80561f9f46c4f1f63bc7 |
13-Jan-2010 |
John McCall <rjmccall@apple.com> |
Improve the reporting of non-viable overload candidates by noting the reason why the candidate is non-viable. There's a lot we can do to improve this, but it's a good start. Further improvements should probably be integrated with the bad-initialization reporting routines. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93277 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
a16804b739096e39340be54a5659966d108177e1 |
13-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Remove broken fix-it when a default function argument has been redefined. There's a FIXME with an apology about why we don't try to do better here. Fixes <rdar://problem/7513023>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93274 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
4f123ffe49764759db2e6f88880a1b1c3a13eecb |
13-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Remove broken fix-it when a default function argument has been redefined. There's a FIXME with an apology about why we don't try to do better here. Fixes <rdar://problem/7513023>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93274 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
311eeebcf890d6e822982a38b6bc05ee870832f9 |
13-Jan-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
When in objective-c methods, do the built-in name lookup after ivar name lookup. Fixes pr5986. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93271 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
48c2d562fbfcd5fcfc212d62d070591f27d0eafa |
13-Jan-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
When in objective-c methods, do the built-in name lookup after ivar name lookup. Fixes pr5986. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93271 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
03d4a759ca310279ed396418a3d6469dd1f06c3a |
13-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Don't emit string-comparison or self-comparison warnings in unevaluated contexts, because they only matter for code that will actually be evaluated at runtime. As part of this, I had to extend PartialDiagnostic to support fix-it hints. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93266 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
d1e4d9bfd57f643d950eb1373f582bda4dfb8dc7 |
13-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Don't emit string-comparison or self-comparison warnings in unevaluated contexts, because they only matter for code that will actually be evaluated at runtime. As part of this, I had to extend PartialDiagnostic to support fix-it hints. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93266 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
88e81df92be9c5d7dfcd48e83aa28a95c47df3bd |
12-Jan-2010 |
Chris Lattner <sabre@nondot.org> |
use DiagRuntimeBehavior to silence the div/rem by zero warning when not in an evaluated context. This removes some bogus warnings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93258 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
cb329c506d0e041b9523618158ac925d620c24ac |
12-Jan-2010 |
Chris Lattner <sabre@nondot.org> |
use DiagRuntimeBehavior to silence the div/rem by zero warning when not in an evaluated context. This removes some bogus warnings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93258 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
0dca8ec36388fb792cca7e25345dbd3e755ccbad |
12-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve recovery for template-ids whose template-name doesn't actually name a template, when they occur in a base-specifier. This is one of the (few) places where we know for sure that an identifier followed by a '<' must be a template name, so we can diagnose and recover well: test/SemaTemplate/dependent-base-classes.cpp:9:16: error: missing 'template' keyword prior to dependent template name 'T::apply' struct X1 : T::apply<U> { }; // expected-error{{missing 'template' ... ^ template test/SemaTemplate/dependent-base-classes.cpp:12:13: error: unknown template name 'vector' struct X2 : vector<T> { }; // expected-error{{unknown template name 'vector'}} ^ 2 diagnostics generated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93257 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
|
84d0a19828599e8623223632d59447fd498999cf |
12-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Improve recovery for template-ids whose template-name doesn't actually name a template, when they occur in a base-specifier. This is one of the (few) places where we know for sure that an identifier followed by a '<' must be a template name, so we can diagnose and recover well: test/SemaTemplate/dependent-base-classes.cpp:9:16: error: missing 'template' keyword prior to dependent template name 'T::apply' struct X1 : T::apply<U> { }; // expected-error{{missing 'template' ... ^ template test/SemaTemplate/dependent-base-classes.cpp:12:13: error: unknown template name 'vector' struct X2 : vector<T> { }; // expected-error{{unknown template name 'vector'}} ^ 2 diagnostics generated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93257 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
|
07dae20d1c4268bc0b7548a9d21ae55062acdb53 |
12-Jan-2010 |
Chris Lattner <sabre@nondot.org> |
implement PR6004, warning about divide and remainder by zero. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93256 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
7ef655a78863c0a7550bfe51174b9c340ab1dce0 |
12-Jan-2010 |
Chris Lattner <sabre@nondot.org> |
implement PR6004, warning about divide and remainder by zero. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93256 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
a96e8bff5e65b4ddafb5464c8511ecf5cc2d9b1f |
12-Jan-2010 |
Chris Lattner <sabre@nondot.org> |
implement PR6007, diagnosing invalid attribute((section)) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93255 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
a1e1dc77e995b746826b64752751dbf35f323767 |
12-Jan-2010 |
Chris Lattner <sabre@nondot.org> |
implement PR6007, diagnosing invalid attribute((section)) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93255 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
8d1563a9c50fbde7ce7d4d79f21a6f9abc9a20e1 |
12-Jan-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Fix the CodeGen half of PR5911 by changing reference initialization to correctly look through arrays to see cv-qualifiers. Also enhances the routine for doing this to preserve more type sugaring for diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93252 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
5535c38a2fcface6c13bc8bbeca66882de2fa227 |
12-Jan-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Fix the CodeGen half of PR5911 by changing reference initialization to correctly look through arrays to see cv-qualifiers. Also enhances the routine for doing this to preserve more type sugaring for diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93252 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
0bd6edefed85cfd2835223cc5c2b500c1a5f1b4a |
12-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When determining whether a given name is a template in a dependent context, do not attempt typo correction. This harms performance (as Abramo noted) and can cause some amusing errors, as in this new testcase. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93240 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
2e9338824f896790ca0766f7505259ce129eb51a |
12-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
When determining whether a given name is a template in a dependent context, do not attempt typo correction. This harms performance (as Abramo noted) and can cause some amusing errors, as in this new testcase. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93240 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
03b8e58e57f064f404939de152689e3b176f8280 |
12-Jan-2010 |
John McCall <rjmccall@apple.com> |
So I was sitting around, trying vainly to think of something to commit, and then I said to myself, self, why don't you go add a couple of parameters to a method and then fail to use them, and I thought that sounded like a pretty good idea, so I did it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93233 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
|
cbce60633c9864261105b289473e5a3ed7b4a729 |
12-Jan-2010 |
John McCall <rjmccall@apple.com> |
So I was sitting around, trying vainly to think of something to commit, and then I said to myself, self, why don't you go add a couple of parameters to a method and then fail to use them, and I thought that sounded like a pretty good idea, so I did it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93233 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
|
fa9f0a085ea5a535fa8c7f7782b39f838ceb2130 |
12-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Use horizontal-space markers in code-completion results rather than embedding single space characters. <rdar://problem/7485503> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93231 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
834389b87451b24618513b907b4dfb5b00d211f3 |
12-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Use horizontal-space markers in code-completion results rather than embedding single space characters. <rdar://problem/7485503> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93231 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
c0e8d18ceec34f3a9ef7f838c430835e5c06ac7e |
12-Jan-2010 |
John McCall <rjmccall@apple.com> |
Reorganize some of the code to note overload candidates. Improves the fidelity with which we note them as functions/constructors and templates thereof. Also will be helpful when reporting bad conversions (next). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93224 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
3c80f573dfbc01f29cc292f6c1fc794705823d52 |
12-Jan-2010 |
John McCall <rjmccall@apple.com> |
Reorganize some of the code to note overload candidates. Improves the fidelity with which we note them as functions/constructors and templates thereof. Also will be helpful when reporting bad conversions (next). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93224 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
efddd4a320a0ed40fb27ae71a7e573ea49952744 |
12-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Name lookup should know better than to look into a class before it's defined git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93217 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
3f477a1a804ead812781168bd354af2adefddde8 |
12-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Name lookup should know better than to look into a class before it's defined git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93217 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
b23880668346d2a3f821109e16a1322613f68c39 |
12-Jan-2010 |
John McCall <rjmccall@apple.com> |
Sort overload results by viability. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93215 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
bf65c0bb5705430aa7d9a16ca5d441f0cb15071d |
12-Jan-2010 |
John McCall <rjmccall@apple.com> |
Sort overload results by viability. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93215 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
62afaed1476587a639825466ee88be4150e51847 |
12-Jan-2010 |
John McCall <rjmccall@apple.com> |
Introduce a specific representation for the ambiguous implicit conversion sequence. Lots of small relevant changes. Fixes some serious problems with ambiguous conversions; also possibly improves associated diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93214 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXCast.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
emaOverload.h
|
1d31833450e6d2947a33cb0840d87661d92eec07 |
12-Jan-2010 |
John McCall <rjmccall@apple.com> |
Introduce a specific representation for the ambiguous implicit conversion sequence. Lots of small relevant changes. Fixes some serious problems with ambiguous conversions; also possibly improves associated diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93214 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXCast.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
emaOverload.h
|
47cf4be6c9f4f88aa797465deb8ea4dcb2ed7558 |
12-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Eliminate an embarrassing performance regression in C/ObjC, where we were performing name lookup for template names in C/ObjC and always finding nothing. Turn off such lookup unless we're in C++ mode, along with the check that determines whether the given identifier is a "current class name", and assert that we don't make this mistake again. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93207 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplate.cpp
|
b862b8f93424a583fc912ab37bbbac1c231e852e |
12-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Eliminate an embarrassing performance regression in C/ObjC, where we were performing name lookup for template names in C/ObjC and always finding nothing. Turn off such lookup unless we're in C++ mode, along with the check that determines whether the given identifier is a "current class name", and assert that we don't make this mistake again. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93207 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplate.cpp
|
3a9e9827764ceccf47a1f424a3426a5f39f92a47 |
12-Jan-2010 |
David Chisnall <csdavec@swan.ac.uk> |
Reverted r93198; done without reading relevant PR. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93205 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
af40776922bc5c28e740adb0342faa09f35b0068 |
12-Jan-2010 |
David Chisnall <csdavec@swan.ac.uk> |
Reverted r93198; done without reading relevant PR. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93205 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
6fb928374fd68a3e6d7c21b67c70e121ee83d8a0 |
11-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When performing name lookup into a scope, check that its entity is non-NULL before looking at the entity itself. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93199 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
277d280c20d4414d61e307789949bef8ee3063fd |
11-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
When performing name lookup into a scope, check that its entity is non-NULL before looking at the entity itself. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93199 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
7de632aea6937644d227e19975bc047b44ed26af |
11-Jan-2010 |
David Chisnall <csdavec@swan.ac.uk> |
Allow VLAs in C++ if in GNU mode (GNU C++ permits them). Clang can now compile LanguageKit, although the resulting code crashes (although not in any of the functions that use VLAs). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93198 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
004f81f8d1ec38047dba4d198311d31ccc8dd94d |
11-Jan-2010 |
David Chisnall <csdavec@swan.ac.uk> |
Allow VLAs in C++ if in GNU mode (GNU C++ permits them). Clang can now compile LanguageKit, although the resulting code crashes (although not in any of the functions that use VLAs). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93198 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
012c014c2feaaf01c9fd281cbc43a36083d663df |
11-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
C++0x [dcl.typedef]p4, take 3, where we actually figure out what "that is not also a typedef-name" actually means. For anyone keeping score, that's John: 2, Doug: 0. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93196 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
05f650001bc66c2dc238e7cee709cb7896bd8a37 |
11-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
C++0x [dcl.typedef]p4, take 3, where we actually figure out what "that is not also a typedef-name" actually means. For anyone keeping score, that's John: 2, Doug: 0. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93196 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
e15e62c2544d5fe5a98bdcd33e07d50458098516 |
11-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Use isa<ElaboratedType> rather than getAs<ElaboratedType>, since the latter may (eventually) perform multiple levels of desugaring (thus breaking the newly-added tests) and the former is faster. Thanks, John! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93192 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
39700992bf99573983ff80fc519ec51fce0f0f61 |
11-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Use isa<ElaboratedType> rather than getAs<ElaboratedType>, since the latter may (eventually) perform multiple levels of desugaring (thus breaking the newly-added tests) and the former is faster. Thanks, John! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93192 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d981ecb2ffac5135461c19eb3c18f927d9bce19c |
11-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Allow redefinitions of typedef-names within class scope when the type they redefine is a class-name but not a typedef-name, per C++0x [dcl.typedef]p4. The code in the test was valid C++98 and is valid C++0x, but an unintended consequence of DR56 made it ill-formed in C++03 (which we were luck enough to implement). Fixes PR5455. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93188 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
93dda720a6f5b67ea997c8d98414f90ec362b43c |
11-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Allow redefinitions of typedef-names within class scope when the type they redefine is a class-name but not a typedef-name, per C++0x [dcl.typedef]p4. The code in the test was valid C++98 and is valid C++0x, but an unintended consequence of DR56 made it ill-formed in C++03 (which we were luck enough to implement). Fixes PR5455. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93188 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
58253a580a747ded47eaf7d89c2b4e8a050a9ddd |
11-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When resolving a single function template specialization to a function, be sure to adjust the resulting argument type to a pointer (if necessary). Fixes PR5910 and PR5949. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93178 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
9e68871f1e99e7e1536f16d5364fd5e2a352e9c4 |
11-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
When resolving a single function template specialization to a function, be sure to adjust the resulting argument type to a pointer (if necessary). Fixes PR5910 and PR5949. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93178 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
350dd5e3b9f5a4dc20e732a25868c614abd6d0bf |
11-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When computing surrogates for calls to a value of object type, look for all visible conversion functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93173 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
9007328043c9c17029e07c99d89d0488fb3da3a7 |
11-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
When computing surrogates for calls to a value of object type, look for all visible conversion functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93173 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
35d9f8061a2bb8629d060ed8df2fc83b72c4efd8 |
11-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Remove some pointless FIXMEs. No functionality change git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93168 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
066b0f122fb919ddffe402de8d43e5395b521b3e |
11-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Remove some pointless FIXMEs. No functionality change git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93168 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
890c0f2b66c62fb97520c0cceac78e7ae2017622 |
11-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Add support for out-of-line definitions of conversion function templates. Previously, a little thinko in the code that replaced a conversion function template with its redeclaration was causing some very weird lookup behavior. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93166 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
0c55106cf91a8aaa82199eeae6db0c5f8696b791 |
11-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Add support for out-of-line definitions of conversion function templates. Previously, a little thinko in the code that replaced a conversion function template with its redeclaration was causing some very weird lookup behavior. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93166 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
8f3a00f7d3af66b977d410e83acfd328b7956a31 |
11-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Tighten up the "cannot return array or function type" diagnostic to say either "array type" or "function type", whichever it is. No reason to make the user guess. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93164 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
58408bc4ead86b08af56cd06fc966fd858b48b2d |
11-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Tighten up the "cannot return array or function type" diagnostic to say either "array type" or "function type", whichever it is. No reason to make the user guess. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93164 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
ba171099c6991c1bdc65631c7b89dc1ea746e786 |
11-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement name lookup for conversion function template specializations (C++ [temp.mem]p5-6), which involves template argument deduction based on the type named, e.g., given struct X { template<typename T> operator T*(); } x; when we call x.operator int*(); we perform template argument deduction to determine that T=int. This template argument deduction is needed for template specialization and explicit instantiation, e.g., template<> X::operator float*() { /* ... */ } and when calling or otherwise naming a conversion function (as in the first example). This fixes PR5742 and PR5762, although there's some remaining ugliness that's causing out-of-line definitions of conversion function templates to fail. I'll look into that separately. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93162 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExpr.cpp
emaLookup.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaType.cpp
|
48026d26fb58e413544874eead5491b1452e2ebf |
11-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement name lookup for conversion function template specializations (C++ [temp.mem]p5-6), which involves template argument deduction based on the type named, e.g., given struct X { template<typename T> operator T*(); } x; when we call x.operator int*(); we perform template argument deduction to determine that T=int. This template argument deduction is needed for template specialization and explicit instantiation, e.g., template<> X::operator float*() { /* ... */ } and when calling or otherwise naming a conversion function (as in the first example). This fixes PR5742 and PR5762, although there's some remaining ugliness that's causing out-of-line definitions of conversion function templates to fail. I'll look into that separately. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93162 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExpr.cpp
emaLookup.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaType.cpp
|
549ba49e99494d17bcade748696f3f48384a46cb |
11-Jan-2010 |
Ken Dyck <ken.dyck@onsemi.com> |
Roll out ASTContext::getTypeSizeInChars(), replacing instances of "ASTContext::getTypeSize() / 8". Replace [u]int64_t variables with CharUnits ones as appropriate. Also rename RawType, fromRaw(), and getRaw() in CharUnits to QuantityType, fromQuantity(), and getQuantity() for clarity. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93153 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
199c3d6cd16aebbb9c7f0d42af9d922c9628bf70 |
11-Jan-2010 |
Ken Dyck <ken.dyck@onsemi.com> |
Roll out ASTContext::getTypeSizeInChars(), replacing instances of "ASTContext::getTypeSize() / 8". Replace [u]int64_t variables with CharUnits ones as appropriate. Also rename RawType, fromRaw(), and getRaw() in CharUnits to QuantityType, fromQuantity(), and getQuantity() for clarity. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93153 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
611405cf9f2eafde425844480ea81c427b2778ce |
11-Jan-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Make Clang complain about taking the address of an unqualified member function. Fixes PR5985. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93150 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e27d87ff27b26e5886cf6472271d3b5e18ec3d87 |
11-Jan-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Make Clang complain about taking the address of an unqualified member function. Fixes PR5985. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93150 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b33725c345a3de48248ba7bb1c7bec3b829f6d11 |
11-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve code completion by introducing patterns for the various C and C++ grammatical constructs that show up in top-level (namespace-level) declarations, member declarations, template declarations, statements, expressions, conditions, etc. For example, we now provide a pattern for static_cast<type>(expr) when we can have an expression, or using namespace identifier; when we can have a using directive. Also, improves the results of code completion at the beginning of a top-level declaration. Previously, we would see value names (function names, global variables, etc.); now we see types, namespace names, etc., but no values. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93134 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
ema.h
emaCodeComplete.cpp
|
01dfea02d1da297e8b53db8eea3d3cc652acda8d |
11-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Improve code completion by introducing patterns for the various C and C++ grammatical constructs that show up in top-level (namespace-level) declarations, member declarations, template declarations, statements, expressions, conditions, etc. For example, we now provide a pattern for static_cast<type>(expr) when we can have an expression, or using namespace identifier; when we can have a using directive. Also, improves the results of code completion at the beginning of a top-level declaration. Previously, we would see value names (function names, global variables, etc.); now we see types, namespace names, etc., but no values. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93134 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
ema.h
emaCodeComplete.cpp
|
2625fe1f13bd905a3f12bb738da887ad8025ac15 |
10-Jan-2010 |
Anton Korobeynikov <asl@math.spbu.ru> |
Try to make cmake happy git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93119 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
|
f3e27bf71d9f157071ef65258945abe57f49a6a1 |
10-Jan-2010 |
Anton Korobeynikov <asl@math.spbu.ru> |
Try to make cmake happy git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93119 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
|
698d8f3d012663fd816aece0570f291926fb35d0 |
10-Jan-2010 |
Anton Korobeynikov <asl@math.spbu.ru> |
Generalize target weirdness handling having proper layering in mind: 1. Add helper class for sema checks for target attributes 2. Add helper class for codegen of target attributes As a proof-of-concept - implement msp430's 'interrupt' attribute. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93118 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDeclAttr.cpp
argetAttributesSema.cpp
argetAttributesSema.h
|
82d0a418c8699fc6f4a9417457ffe93d43bba1c1 |
10-Jan-2010 |
Anton Korobeynikov <asl@math.spbu.ru> |
Generalize target weirdness handling having proper layering in mind: 1. Add helper class for sema checks for target attributes 2. Add helper class for codegen of target attributes As a proof-of-concept - implement msp430's 'interrupt' attribute. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93118 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDeclAttr.cpp
argetAttributesSema.cpp
argetAttributesSema.h
|
20f1ae547000f312b3d8611b6665e2d3926098ba |
08-Jan-2010 |
John McCall <rjmccall@apple.com> |
Change the printing of OR_Deleted overload results to print all the candidates, not just the viable ones. This is reasonable because the most common use of deleted functions is to exclude some implicit conversion during calls; users therefore will want to figure out why some other options were excluded. Started sorting overload results. Right now it just sorts by location in the translation unit (after putting viable functions first), but we can do better than that. Changed bool OnlyViable parameter to PrintOverloadCandidates to an enum for better self-documentation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92990 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
|
81201626aa08bcc9d05c8b3c6a1d38a7d577c3ce |
08-Jan-2010 |
John McCall <rjmccall@apple.com> |
Change the printing of OR_Deleted overload results to print all the candidates, not just the viable ones. This is reasonable because the most common use of deleted functions is to exclude some implicit conversion during calls; users therefore will want to figure out why some other options were excluded. Started sorting overload results. Right now it just sorts by location in the translation unit (after putting viable functions first), but we can do better than that. Changed bool OnlyViable parameter to PrintOverloadCandidates to an enum for better self-documentation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92990 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
|
86c021e54174a1a376c25299786b564627476f8b |
08-Jan-2010 |
John McCall <rjmccall@apple.com> |
Reorganize PrintOverloadCandidates. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92979 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
a1d7d627a4e6b2f5586644b848b9bd62f54109f4 |
08-Jan-2010 |
John McCall <rjmccall@apple.com> |
Reorganize PrintOverloadCandidates. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92979 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
f06c73ec0e1154646664ef846508152fa4789b11 |
08-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve the fix-its for -Wparentheses to ensure that the fix-it suggestions follow recovery. Additionally, add a note to these diagnostics which suggests a fix-it for changing the behavior to what the user probably meant. Examples: t.cpp:2:9: warning: & has lower precedence than ==; == will be evaluated first [-Wparentheses] if (i & j == k) { ^~~~~~~~ ( ) t.cpp:2:9: note: place parentheses around the & expression to evaluate it first if (i & j == k) { ^ ( ) t.cpp:14:9: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] if (i = f()) { ~~^~~~~ ( ) t.cpp:14:9: note: use '==' to turn this assignment into an equality comparison if (i = f()) { ^ == git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92975 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
827feec561c8a1f23c099da56c4ac98364ecfc09 |
08-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Improve the fix-its for -Wparentheses to ensure that the fix-it suggestions follow recovery. Additionally, add a note to these diagnostics which suggests a fix-it for changing the behavior to what the user probably meant. Examples: t.cpp:2:9: warning: & has lower precedence than ==; == will be evaluated first [-Wparentheses] if (i & j == k) { ^~~~~~~~ ( ) t.cpp:2:9: note: place parentheses around the & expression to evaluate it first if (i & j == k) { ^ ( ) t.cpp:14:9: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] if (i = f()) { ~~^~~~~ ( ) t.cpp:14:9: note: use '==' to turn this assignment into an equality comparison if (i = f()) { ^ == git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92975 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
48a26b4d276d5d0fd55da6182c8dcae33b11479a |
08-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Add an "implicit" bit to CXXThisExpr, so that we can track implicitness without losing track of the (logical or actual) location where "this" would occur in the source. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92958 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprCXX.cpp
emaOverload.cpp
reeTransform.h
|
828a197317288e3333b0ce6f5cedadd036e3531f |
08-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Add an "implicit" bit to CXXThisExpr, so that we can track implicitness without losing track of the (logical or actual) location where "this" would occur in the source. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92958 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprCXX.cpp
emaOverload.cpp
reeTransform.h
|
6b2a65de031ad19968e314365b37a09ba3c68b10 |
07-Jan-2010 |
John McCall <rjmccall@apple.com> |
Improve the lead diagnostic for C++ object subscript expressions with no viable overloads. Use a different message when the class provides no operator[] overloads at all; use it for operator(), too. Partially addresses PR 5900. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92894 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
1eb3e1003d5cda4d47f54321d81d678c26981e7a |
07-Jan-2010 |
John McCall <rjmccall@apple.com> |
Improve the lead diagnostic for C++ object subscript expressions with no viable overloads. Use a different message when the class provides no operator[] overloads at all; use it for operator(), too. Partially addresses PR 5900. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92894 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
42c0c4c4c5a06ed3bca2f21b65d3f42827dcfd57 |
07-Jan-2010 |
Ted Kremenek <kremenek@apple.com> |
Change ObjCContainerDecl to contain the entire range for the '@end' piece of the declaration. The '@' and the 'end' are separate tokens, and require two SourceLocations to accurately track. This change was motivated because ObjCContainerDecl::getSourceRange() would previously not return the entire range of the declaration (the 'end' would be left off). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92891 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
782f2f52b78d8ca785110398a7f7b56b830b9ac7 |
07-Jan-2010 |
Ted Kremenek <kremenek@apple.com> |
Change ObjCContainerDecl to contain the entire range for the '@end' piece of the declaration. The '@' and the 'end' are separate tokens, and require two SourceLocations to accurately track. This change was motivated because ObjCContainerDecl::getSourceRange() would previously not return the entire range of the declaration (the 'end' would be left off). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92891 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
079419867c4ea5c6781e3341d020cc8f44c6b8f3 |
07-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix the search for visible declarations within a Scope to ensure that we look into a Scope that corresponds to a compound statement whose scope was combined with the scope of the function that owns it. This improves typo correction in many common cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92879 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
539c5c34063066753f27bb0f39fdcde1acc06328 |
07-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Fix the search for visible declarations within a Scope to ensure that we look into a Scope that corresponds to a compound statement whose scope was combined with the scope of the function that owns it. This improves typo correction in many common cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92879 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
8ee4c875b808dd97e2e57d023b4793cdd1944290 |
07-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When we typo-correct a base class initializer, point to the base class specifier that we corrected to. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92878 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
0d535c89c5d02017153fb971e1ef080cd80cb4b8 |
07-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
When we typo-correct a base class initializer, point to the base class specifier that we corrected to. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92878 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
7647520a7a73590ec995696304cd282df94d0310 |
07-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Whenever we emit a typo-correction diagnostic, also emit a note pointing to the declaration that we found that has that name (if it is unique). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92877 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaInit.cpp
emaTemplate.cpp
|
67dd1d4df1b28973e12e0981129b2517d2033b66 |
07-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Whenever we emit a typo-correction diagnostic, also emit a note pointing to the declaration that we found that has that name (if it is unique). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92877 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaInit.cpp
emaTemplate.cpp
|
e3ccb20710d1d4903d600a2b08e55f7b4d375c6c |
07-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When suggesting a typo correction for an @implementation without a corresponding @interface, provide a note showing which interface we're referring to. This note has the fix-it hint on it. Also, don't automatically apply fix-it hints for notes. They're meant to express fix-its that would change semantics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92870 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
a6f26387355c9a9e61a33c480e28f1a9a15f9b62 |
07-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
When suggesting a typo correction for an @implementation without a corresponding @interface, provide a note showing which interface we're referring to. This note has the fix-it hint on it. Also, don't automatically apply fix-it hints for notes. They're meant to express fix-its that would change semantics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92870 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
8ca761bc62a3749d80becb3e49dd54098c9079d3 |
07-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Move the allocation of designators in DesignatedInitExpr to the ASTContext. Fixes <rdar://problem/7495428>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92867 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
319d57f21600dd2c4d52ccc27bd12ce260b174e7 |
07-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Move the allocation of designators in DesignatedInitExpr to the ASTContext. Fixes <rdar://problem/7495428>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92867 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
8287d920eab6bef61345edc41b79d18c430f3296 |
06-Jan-2010 |
John McCall <rjmccall@apple.com> |
Don't assert when dealing with unsigned casts of lvalues. Fixes PR5961. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92866 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
0acc311bf73c85fd34ce6f89a4e786b7ecd214aa |
06-Jan-2010 |
John McCall <rjmccall@apple.com> |
Don't assert when dealing with unsigned casts of lvalues. Fixes PR5961. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92866 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
41b9f88649e701ff290b538500bc2c362a10552f |
06-Jan-2010 |
John McCall <rjmccall@apple.com> |
Derive tighter ranges for & and >> in the conversion-checking code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92862 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
60fad45739b764886f707bd204eae9ecce6db1f2 |
06-Jan-2010 |
John McCall <rjmccall@apple.com> |
Derive tighter ranges for & and >> in the conversion-checking code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92862 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
1ef8ab9226a240cc29713ef1c0d51b82772e9aeb |
06-Jan-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Fix a bug when property is redeclared in multiple continuation classes and its original declaration is imported from a protocol. This fixes radar 7509234. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92856 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
b73e281956ff1ba40c921511a2cd6e7e76ed86a7 |
06-Jan-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Fix a bug when property is redeclared in multiple continuation classes and its original declaration is imported from a protocol. This fixes radar 7509234. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92856 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
523e1537f65f1a591a9a7c4706c199d6c796fa0a |
06-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix marking of virtual members for nested classes whose first non-pure virtual function has a body inlined in the class git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92855 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
4b0f21c0f8bed0e2a7dc62d73be64e7e277d6c9a |
06-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Fix marking of virtual members for nested classes whose first non-pure virtual function has a body inlined in the class git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92855 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
6d51e8fa8092b7b65450d80b1810dd2c3e6efae9 |
06-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Make sure that the key-function computation produces the correct result for a nested class whose first non-pure virtual member function has an inline body. Previously, we were checking for the key function before we had seen the (delayed) inline body. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92839 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
adda84683944e11820b9a03c6b170edd109289c5 |
06-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Make sure that the key-function computation produces the correct result for a nested class whose first non-pure virtual member function has an inline body. Previously, we were checking for the key function before we had seen the (delayed) inline body. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92839 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
84b499ee169a4de028ac44ffd1a360802b40dd89 |
06-Jan-2010 |
John McCall <rjmccall@apple.com> |
Improve the diagnostics used to report implicitly-generated class members as parts of overload sets. Also, refer to constructors as 'constructors' rather than functions. Adjust a lot of tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92832 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExprCXX.cpp
emaOverload.cpp
|
b1622a1fd7b7f4ab8d00d0183d17c90ad25c14e3 |
06-Jan-2010 |
John McCall <rjmccall@apple.com> |
Improve the diagnostics used to report implicitly-generated class members as parts of overload sets. Also, refer to constructors as 'constructors' rather than functions. Adjust a lot of tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92832 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExprCXX.cpp
emaOverload.cpp
|
e0be75f38130baeb6f4e09a6107aacbca6775063 |
06-Jan-2010 |
John McCall <rjmccall@apple.com> |
Significantly rework the calculation of effective integer-expression ranges for -Wsign-compare and -Wconversion, and use that coordinated logic to drive both diagnostics. The new logic works more transparently with implicit conversions, conditional operators, etc., as well as bringing -Wconversion's ability to deal with pseudo-closed operations (e.g. arithmetic on shorts) to -Wsign-compare. Fixes PRs 5887, 5937, 5938, and 5939. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92823 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
f2370c9b4aade940e2253b5b33262ba507d1d71f |
06-Jan-2010 |
John McCall <rjmccall@apple.com> |
Significantly rework the calculation of effective integer-expression ranges for -Wsign-compare and -Wconversion, and use that coordinated logic to drive both diagnostics. The new logic works more transparently with implicit conversions, conditional operators, etc., as well as bringing -Wconversion's ability to deal with pseudo-closed operations (e.g. arithmetic on shorts) to -Wsign-compare. Fixes PRs 5887, 5937, 5938, and 5939. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92823 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
a3da2548a6ef2c8af00b84d00868ac8ef665e953 |
06-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Make our marking of virtual members functions in a class be deterministic and work properly with templates. Once a class that needs a vtable has been defined, we now do one if two things: - If the class has no key function, we place the class on a list of classes whose virtual functions will need to be "marked" at the end of the translation unit. The delay until the end of the translation unit is needed because we might see template specializations of these virtual functions. - If the class has a key function, we do nothing; when the key function is defined, the class will be placed on the aforementioned list. At the end of the translation unit, we "mark" all of the virtual functions of the classes on the list as used, possibly causing template instantiation and other classes to be added to the list. This gets LLVM's lib/Support/CommandLine.cpp compiling again. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92821 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaTemplateInstantiate.cpp
|
159ef1ed9f024f73028aa3c9b27ae0717e43786c |
06-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Make our marking of virtual members functions in a class be deterministic and work properly with templates. Once a class that needs a vtable has been defined, we now do one if two things: - If the class has no key function, we place the class on a list of classes whose virtual functions will need to be "marked" at the end of the translation unit. The delay until the end of the translation unit is needed because we might see template specializations of these virtual functions. - If the class has a key function, we do nothing; when the key function is defined, the class will be placed on the aforementioned list. At the end of the translation unit, we "mark" all of the virtual functions of the classes on the list as used, possibly causing template instantiation and other classes to be added to the list. This gets LLVM's lib/Support/CommandLine.cpp compiling again. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92821 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaTemplateInstantiate.cpp
|
a020b09e2e4498b3a57abe0259ec5a485ceaa6b5 |
06-Jan-2010 |
Ted Kremenek <kremenek@apple.com> |
Per offline discussion with Doug, don't perform typo correction when we have encountered a fatal error. On some files that are woefully wrong (missing headers) this can cause a 3x slowdown in some cases when parsing the file. It makes sense not to perform typo correction in this case because after a fatal error diagnostics will either be suppressed or not really make any sense. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92809 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
1dac3418f43c132df0b836a2f514f82a44189ef9 |
06-Jan-2010 |
Ted Kremenek <kremenek@apple.com> |
Per offline discussion with Doug, don't perform typo correction when we have encountered a fatal error. On some files that are woefully wrong (missing headers) this can cause a 3x slowdown in some cases when parsing the file. It makes sense not to perform typo correction in this case because after a fatal error diagnostics will either be suppressed or not really make any sense. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92809 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
887812cf082a4640e761e5bda9aafa648e3617cb |
06-Jan-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Do not diagnose method disguised as property setter for a 'readonly' property. Fixes radar 7427072. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92808 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
02deae8f9bb2cbd177816cd6b4b10129461980f7 |
06-Jan-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Do not diagnose method disguised as property setter for a 'readonly' property. Fixes radar 7427072. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92808 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
a32cdfb7f79b52f2f533002207b5262b6ba3e24e |
05-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve key-function computation for templates. In particular: - All classes can have a key function; templates don't change that. non-template classes when computing the key function. - We always mark all of the virtual member functions of class template instantiations. - The vtable for an instantiation of a class template has weak linkage. We could probably use available_externally linkage for vtables of classes instantiated by explicit instantiation declarations (extern templates), but GCC doesn't do this and I'm not 100% that the ABI permits it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92753 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
bd6d6197fcfc98356ea60e816365eb0648b69556 |
05-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Improve key-function computation for templates. In particular: - All classes can have a key function; templates don't change that. non-template classes when computing the key function. - We always mark all of the virtual member functions of class template instantiations. - The vtable for an instantiation of a class template has weak linkage. We could probably use available_externally linkage for vtables of classes instantiated by explicit instantiation declarations (extern templates), but GCC doesn't do this and I'm not 100% that the ABI permits it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92753 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
3d1e103e971807fecb909bdffad0cfd606b91137 |
05-Jan-2010 |
Mike Stump <mrs@apple.com> |
Disallow captured arrays in blocks as well. Radar 7438948. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92677 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
2849734790738585a9726a84b263c60e3be0193f |
05-Jan-2010 |
Mike Stump <mrs@apple.com> |
Disallow captured arrays in blocks as well. Radar 7438948. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92677 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
7cca37d40d1587a897e85fc19db19a74e2d9b458 |
05-Jan-2010 |
Mike Stump <mrs@apple.com> |
Disallow capturing vlas inside blocks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92676 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
0d6fd570e52f5d7fc637c9f41382992a97b94b4c |
05-Jan-2010 |
Mike Stump <mrs@apple.com> |
Disallow capturing vlas inside blocks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92676 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
8d60903d97a722712a25b69e8a814473795c6877 |
05-Jan-2010 |
Ted Kremenek <kremenek@apple.com> |
Remove stale comment. We already do format string checking for functions with the format attribute. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92553 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
724d7fc12c34944e43388ab2b35a076132e3e76e |
05-Jan-2010 |
Ted Kremenek <kremenek@apple.com> |
Remove stale comment. We already do format string checking for functions with the format attribute. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92553 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
4d636d91a62d5ed9bf08685c70af9a3a15c71707 |
05-Jan-2010 |
John McCall <rjmccall@apple.com> |
Move the -Wconversion logic into SemaChecking.cpp. There's a fair amount of overlap between this and -Wsign-compare, which is why I want them in the same place. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92543 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaChecking.cpp
|
51313c39c84407dd6a323be99a8c322bf8d052a9 |
05-Jan-2010 |
John McCall <rjmccall@apple.com> |
Move the -Wconversion logic into SemaChecking.cpp. There's a fair amount of overlap between this and -Wsign-compare, which is why I want them in the same place. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92543 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaChecking.cpp
|
2a3ab35c3106b9322f99f6abacf36015abec921f |
05-Jan-2010 |
John McCall <rjmccall@apple.com> |
Move the -Wsign-compare logic into SemaChecking.cpp. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92541 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExpr.cpp
|
ba26e58c64b4f6233dfc4bcd3ef6ce83aab47ffc |
05-Jan-2010 |
John McCall <rjmccall@apple.com> |
Move the -Wsign-compare logic into SemaChecking.cpp. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92541 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExpr.cpp
|
07d6cf938bb06ae024a0c4d5cac89e07fcaa06eb |
05-Jan-2010 |
Mike Stump <mrs@apple.com> |
Avoid warnings for functions that return a value using MS-style inline assembly code. This avoids changing the bahvior when normal asm("") statements are used. The type of code affected would be: void* t4(void) { __asm mov eax, fs:[0x10] } I hope people like this version, if not, let me know. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92531 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
1cd95e210b1b084ee275e0dfa9dd8a7e65b577d7 |
05-Jan-2010 |
Mike Stump <mrs@apple.com> |
Avoid warnings for functions that return a value using MS-style inline assembly code. This avoids changing the bahvior when normal asm("") statements are used. The type of code affected would be: void* t4(void) { __asm mov eax, fs:[0x10] } I hope people like this version, if not, let me know. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92531 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
bf8cc88a863ad503648b9fc01ace1c1f8812c196 |
04-Jan-2010 |
Mike Stump <mrs@apple.com> |
Remember if the AsmStmt came from Microsoft-style inline assembly code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92526 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaStmt.cpp
|
3b11fd3b52e7b88233c602407c151d07cb093e75 |
04-Jan-2010 |
Mike Stump <mrs@apple.com> |
Remember if the AsmStmt came from Microsoft-style inline assembly code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92526 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaStmt.cpp
|
14d7a9d0edea7d99b6d9576b2c5984921a849e35 |
04-Jan-2010 |
John McCall <rjmccall@apple.com> |
-Wsign-compare shouldn't warn when the signed operand is a conditional operator whose operands are non-negative integer constant expressions. This comes up in LLVM in a few places. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92525 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
bc021702e67a1c11d72a926f995cf418bb456315 |
04-Jan-2010 |
John McCall <rjmccall@apple.com> |
-Wsign-compare shouldn't warn when the signed operand is a conditional operator whose operands are non-negative integer constant expressions. This comes up in LLVM in a few places. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92525 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
3cbd6c34b9affed2b0571489e52f50444172d949 |
04-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Make sure to use ASTContext::getAs*ArrayType() when decomposing array types. Fixes APFloat.cpp compilation failure. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92523 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
442471309fa97348f849687a6a8ef4acc3bc2c1f |
04-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Make sure to use ASTContext::getAs*ArrayType() when decomposing array types. Fixes APFloat.cpp compilation failure. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92523 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
40cd149f9ac16960a8a366edd067596fc75d864c |
04-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When declaring an Objective-C implementation without a corresponding interface, suggest correction of typos. For example, given: @interface NSString @end @implementation NSstring @end we'll warn with: t.m:4:19: warning: cannot find interface declaration for 'NSstring'; did you mean 'NSString'? @implementation NSstring ^ However, since this is just a warning, we don't provide a fix-it hint. Good idea, Ted! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92488 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
95ff742380d1c3dd5152739183bfe085cf27197f |
04-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
When declaring an Objective-C implementation without a corresponding interface, suggest correction of typos. For example, given: @interface NSString @end @implementation NSstring @end we'll warn with: t.m:4:19: warning: cannot find interface declaration for 'NSstring'; did you mean 'NSString'? @implementation NSstring ^ However, since this is just a warning, we don't provide a fix-it hint. Good idea, Ted! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92488 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
1ce05a85971be4d02f9bb3f6ca8198364e32bfcb |
03-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement typo correction for a variety of Objective-C-specific constructs: - Instance variable lookup ("foo->ivar" and, in instance methods, "ivar") - Property name lookup ("foo.prop") - Superclasses - Various places where a class name is required - Protocol names (e.g., id<proto>) This seems to cover many of the common places where typos could occur. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92449 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprObjC.cpp
emaLookup.cpp
|
f06cdae9c68dfc4191fbf6b9e5ea0fd748488d88 |
03-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement typo correction for a variety of Objective-C-specific constructs: - Instance variable lookup ("foo->ivar" and, in instance methods, "ivar") - Property name lookup ("foo.prop") - Superclasses - Various places where a class name is required - Protocol names (e.g., id<proto>) This seems to cover many of the common places where typos could occur. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92449 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprObjC.cpp
emaLookup.cpp
|
f04797576e4fa925388c521571b7b3234d9ee5e5 |
03-Jan-2010 |
Eli Friedman <eli.friedman@gmail.com> |
Fix minor oversight for increment/decrement of complex int. Add tests for coverage. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92433 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
5b088a10e106a287684bef78cd6c3a3830ac0721 |
03-Jan-2010 |
Eli Friedman <eli.friedman@gmail.com> |
Fix minor oversight for increment/decrement of complex int. Add tests for coverage. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92433 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e5ba7a208d9c09bfce00554c4ccc0a4493b9bf3a |
02-Jan-2010 |
Eli Friedman <eli.friedman@gmail.com> |
Get rid of more unnecessary code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92429 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
de8ac49d32e85d4f65f3e9624f5e21d631babbb0 |
02-Jan-2010 |
Eli Friedman <eli.friedman@gmail.com> |
Get rid of more unnecessary code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92429 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
f0a4b6b82387e0ebf7f50c4403e5ec55dcb4191e |
02-Jan-2010 |
Eli Friedman <eli.friedman@gmail.com> |
Get rid of some unnecessary code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92428 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
|
d2835b709e9929a97c09ea3e651342d0951ec982 |
02-Jan-2010 |
Eli Friedman <eli.friedman@gmail.com> |
Get rid of some unnecessary code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92428 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
|
44ba7da5fd53d0ab01f5b9180a31e7cbfd4c27cc |
02-Jan-2010 |
Eli Friedman <eli.friedman@gmail.com> |
Eliminate dead code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92424 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
dentifierResolver.h
ema.h
emaType.cpp
|
3a349947e5d4ba6bd16d775ce17cf9c9d181bc39 |
02-Jan-2010 |
Eli Friedman <eli.friedman@gmail.com> |
Eliminate dead code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92424 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
dentifierResolver.h
ema.h
emaType.cpp
|
acda55e0d38b86058bb961eb7168e9a94124c5bf |
01-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Make sure that the search for visible declarations looks into the semantic parents of out-of-line function contexts git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92397 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
e3582011a63a78cdfa0917077ed87ccb9b3a87b5 |
01-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Make sure that the search for visible declarations looks into the semantic parents of out-of-line function contexts git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92397 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
155688d9c744250db176dd99c073adfb095de3c2 |
01-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
When typo correction for an id-expression finds a type (or Objective-C class), provide a suggestion for the type or class found. However, since we can't recover properly in this case, don't provide a fix-it hint. Example: test/FixIt/typo.m:8:3: error: use of undeclared identifier 'NSstring'; did you mean 'NSString'? NSstring *str = @"A string"; ... ^ 1 diagnostic generated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92379 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
d203a162966cfc2157857f5fdfb0e30a4f669281 |
01-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
When typo correction for an id-expression finds a type (or Objective-C class), provide a suggestion for the type or class found. However, since we can't recover properly in this case, don't provide a fix-it hint. Example: test/FixIt/typo.m:8:3: error: use of undeclared identifier 'NSstring'; did you mean 'NSString'? NSstring *str = @"A string"; ... ^ 1 diagnostic generated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92379 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
1241be32b423ef5cdd79abb89beb11bf0679f24e |
01-Jan-2010 |
Douglas Gregor <doug.gregor@gmail.com> |
Typo correction for C99 designated field initializers, e.g., test/FixIt/typo.c:19:4: error: field designator 'bunds' does not refer to any field in type 'struct Window'; did you mean 'bounds'? .bunds. ^~~~~ bounds git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92376 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
c171e3b192a372669cf622ff0b6a847f8e5b4220 |
01-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Typo correction for C99 designated field initializers, e.g., test/FixIt/typo.c:19:4: error: field designator 'bunds' does not refer to any field in type 'struct Window'; did you mean 'bounds'? .bunds. ^~~~~ bounds git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92376 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
548ac1d48327dbb32e14adc45c8bc1e6f6d9e290 |
31-Dec-2009 |
Anders Carlsson <andersca@mac.com> |
It's OK for a return type to be incomplete if it's being defined. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92367 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
ac4c939c2dfca2dc5b785169670125511ea5bb62 |
31-Dec-2009 |
Anders Carlsson <andersca@mac.com> |
It's OK for a return type to be incomplete if it's being defined. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92367 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
894683184ed0584a7bff845671a224ef5e5a3d49 |
31-Dec-2009 |
Anders Carlsson <andersca@mac.com> |
Make sure that an overriding return type is complete before checking if it's covariant. Fixes PR5920. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92365 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
be2e205add4c1f6375bb430e847b712a88581e46 |
31-Dec-2009 |
Anders Carlsson <andersca@mac.com> |
Make sure that an overriding return type is complete before checking if it's covariant. Fixes PR5920. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92365 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
699a60a2225911ed5a0fa015b5442e4567622e58 |
31-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Typo correction for C++ base and member initializers, e.g., test/FixIt/typo.cpp:41:15: error: initializer 'base' does not name a non-static data member or base class; did you mean the base class 'Base'? Derived() : base(), ^~~~ Base test/FixIt/typo.cpp:42:15: error: initializer 'ember' does not name a non-static data member or base class; did you mean the member 'member'? ember() { } ^~~~~ member git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92355 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
fe0241e31dd2d1af60116adf6f71dedc88cd1f68 |
31-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Typo correction for C++ base and member initializers, e.g., test/FixIt/typo.cpp:41:15: error: initializer 'base' does not name a non-static data member or base class; did you mean the base class 'Base'? Derived() : base(), ^~~~ Base test/FixIt/typo.cpp:42:15: error: initializer 'ember' does not name a non-static data member or base class; did you mean the member 'member'? ember() { } ^~~~~ member git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92355 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
a38d24673384b536f90c91150b2e808065a6a08e |
31-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Typo correction for identifiers within nested name specifiers, e.g., typo.cpp:18:1: error: use of undeclared identifier 'other_std'; did you mean 'otherstd'? other_std::strng str1; ^~~~~~~~~ otherstd git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92350 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
|
175a65686eba7c7a9cb02412136fddd2d2c56dd7 |
31-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Typo correction for identifiers within nested name specifiers, e.g., typo.cpp:18:1: error: use of undeclared identifier 'other_std'; did you mean 'otherstd'? other_std::strng str1; ^~~~~~~~~ otherstd git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92350 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
|
66a10cbaa65d56b5607e4484f16124e186c419b9 |
31-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Typo correction for template names, e.g., typo.cpp:27:8: error: no template named 'basic_sting' in namespace 'std'; did you mean 'basic_string'? std::basic_sting<char> b2; ~~~~~^~~~~~~~~~~ basic_string git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92348 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
bfea239cafdb13256982eb891b151c5c07c1e7a9 |
31-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Typo correction for template names, e.g., typo.cpp:27:8: error: no template named 'basic_sting' in namespace 'std'; did you mean 'basic_string'? std::basic_sting<char> b2; ~~~~~^~~~~~~~~~~ basic_string git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92348 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
c930c3df18b1a9df5dadc2b41bc6992a1715ee5c |
31-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Typo correction for member access into classes/structs/unions, e.g., s.fnd("hello") git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92345 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaLookup.cpp
|
2dcc01195b7850692b9e25c65f77978e6a5a69a5 |
31-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Typo correction for member access into classes/structs/unions, e.g., s.fnd("hello") git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92345 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaLookup.cpp
|
8b4cf27b95c1cfbe66a3cc5c4ebb8f75a0fc7d90 |
31-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement typo correction for id-expressions, e.g., typo.cpp:22:10: error: use of undeclared identifier 'radious'; did you mean 'radius'? return radious * pi; ^~~~~~~ radius This was super-easy, since we already had decent recovery by looking for names in dependent base classes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92341 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaLookup.cpp
emaOverload.cpp
|
bb092bafa984e9fa05136b5cef40fd4374dea0f6 |
31-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement typo correction for id-expressions, e.g., typo.cpp:22:10: error: use of undeclared identifier 'radious'; did you mean 'radius'? return radious * pi; ^~~~~~~ radius This was super-easy, since we already had decent recovery by looking for names in dependent base classes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92341 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaLookup.cpp
emaOverload.cpp
|
bd136ed3f65bf7847b85dae55113fa8ca028668a |
31-Dec-2009 |
Chris Lattner <sabre@nondot.org> |
improve diagnostics for case when a field type is unknown by not emitting a follow-on error about 'int', which the user never wrote. PR5924. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92339 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
8c3f89032c8822c443fb8a1633d297b60e5ca90c |
31-Dec-2009 |
Chris Lattner <sabre@nondot.org> |
improve diagnostics for case when a field type is unknown by not emitting a follow-on error about 'int', which the user never wrote. PR5924. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92339 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
35229a5d7c38efed309238f8d103997133ad9218 |
30-Dec-2009 |
Chris Lattner <sabre@nondot.org> |
when making a decl for __builtin_fabsf() make sure to attach the appropriate attributes to it. I don't think this manifests as any real change though, we're still not getting the right LLVM IR attributes out of codegen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92316 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
551f7087786d1a5e257f4e2a0999da8c709437fd |
30-Dec-2009 |
Chris Lattner <sabre@nondot.org> |
when making a decl for __builtin_fabsf() make sure to attach the appropriate attributes to it. I don't think this manifests as any real change though, we're still not getting the right LLVM IR attributes out of codegen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92316 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
2b89563a64d606178257a99ad2b57cfec4c58f94 |
30-Dec-2009 |
Chris Lattner <sabre@nondot.org> |
fix PR5917, L'x' was getting the wrong type in c++ mode. Per C++2.13.2p2: "A wide-character literal has type wchar_t" git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92313 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e8337dff778f6386f0a2a08f5def71a8dd44f2c8 |
30-Dec-2009 |
Chris Lattner <sabre@nondot.org> |
fix PR5917, L'x' was getting the wrong type in c++ mode. Per C++2.13.2p2: "A wide-character literal has type wchar_t" git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92313 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e8f5b904f1da7387717d6e9bead87560ccd706c0 |
30-Dec-2009 |
Chris Lattner <sabre@nondot.org> |
remove extraneous #include git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92310 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
6b401c0e7f663e83e82fdba8660d5d65a8631138 |
30-Dec-2009 |
Chris Lattner <sabre@nondot.org> |
remove extraneous #include git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92310 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
b41a2bbe98b693690dca7df2305750e511c81df9 |
30-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Typo correction for type names when they appear in declarations, e.g., given tring str2; we produce the following diagnostic + fix-it: typo.cpp:15:1: error: unknown type name 'tring'; did you mean 'string'? tring str2; ^~~~~ string To make this really useful, we'll need to introduce typo correction in many more places (wherever we do name lookup), and implement declaration-vs-expression heuristics that cope with typos better. However, for now this will handle the simple cases where we already get good "unknown type name" diagnostics. The LookupVisibleDecls functions are intended to be used by code completion as well as typo correction; that refactoring will happen later. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92308 91177308-0d34-0410-b5e6-96231b3b80d8
ookup.h
ema.h
emaCodeComplete.cpp
emaDecl.cpp
emaLookup.cpp
|
546be3c5c000626c8cdf65e32e8ed9b90c424edd |
30-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Typo correction for type names when they appear in declarations, e.g., given tring str2; we produce the following diagnostic + fix-it: typo.cpp:15:1: error: unknown type name 'tring'; did you mean 'string'? tring str2; ^~~~~ string To make this really useful, we'll need to introduce typo correction in many more places (wherever we do name lookup), and implement declaration-vs-expression heuristics that cope with typos better. However, for now this will handle the simple cases where we already get good "unknown type name" diagnostics. The LookupVisibleDecls functions are intended to be used by code completion as well as typo correction; that refactoring will happen later. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92308 91177308-0d34-0410-b5e6-96231b3b80d8
ookup.h
ema.h
emaCodeComplete.cpp
emaDecl.cpp
emaLookup.cpp
|
a914424c7b8fd1ad073b35bc86aebdc53b0bfab1 |
30-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix typo in comment git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92307 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
|
a6e51993362fcd53c13c2fa30a288d6fcbce4de6 |
30-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Fix typo in comment git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92307 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
|
6d18ae945b0b85054942aaac9ee32011d5b8b34d |
30-Dec-2009 |
Chandler Carruth <chandlerc@gmail.com> |
More fixes to the handling of CVR-comparisons on array types. Adds a method to QualType to get CVR-qualifiers through array types, and switches the primary comparison methods to use it. This may allow simplifying some of the callers of getUnqualifiedArrayType. Also fix the normalizing of CV-qualification during template deduction to normalize through arrays and allow a more qualified deduced array type. This fixes PR5911. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92289 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
e724246b9f655801bd96b727daf9dddc44beef4d |
30-Dec-2009 |
Chandler Carruth <chandlerc@gmail.com> |
More fixes to the handling of CVR-comparisons on array types. Adds a method to QualType to get CVR-qualifiers through array types, and switches the primary comparison methods to use it. This may allow simplifying some of the callers of getUnqualifiedArrayType. Also fix the normalizing of CV-qualification during template deduction to normalize through arrays and allow a more qualified deduced array type. This fixes PR5911. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92289 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
e6cd706648aa42c1022d30c68e3b77f2a7a68a73 |
30-Dec-2009 |
John McCall <rjmccall@apple.com> |
Typedefs can be redeclared. That seems like something we should record in the AST lest we run into some crazy canonicalization bug like PR5874. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92283 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplateInstantiateDecl.cpp
|
5126fd0dd92c4ec211c837ee78d5ce59c68dcbd5 |
30-Dec-2009 |
John McCall <rjmccall@apple.com> |
Typedefs can be redeclared. That seems like something we should record in the AST lest we run into some crazy canonicalization bug like PR5874. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92283 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplateInstantiateDecl.cpp
|
0d65b2237a3653e625a10e8df091bef3b08ec40e |
29-Dec-2009 |
Chandler Carruth <chandlerc@gmail.com> |
Fix support for const_cast<>s of array types which actual change the CV-qualifiers. Remove an error expectation from the 'good' set of const-cast test cases. With this patch, the final non-template test case from PR5542 passes. (It's the same as the one already in const-cast.cpp.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92257 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
595e290bcb69af7ea053fe43f87701ee761d68d3 |
29-Dec-2009 |
Chandler Carruth <chandlerc@gmail.com> |
Fix support for const_cast<>s of array types which actual change the CV-qualifiers. Remove an error expectation from the 'good' set of const-cast test cases. With this patch, the final non-template test case from PR5542 passes. (It's the same as the one already in const-cast.cpp.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92257 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
8f36583a712cf7f8dd6d88712739572c4642629e |
29-Dec-2009 |
Chandler Carruth <chandlerc@gmail.com> |
Correctly refer to element CVR qualifications when determining if a type is more or less cv-qualified than another during implicit conversion and overload resolution ([basic.type.qualifier] p5). Factors the logic out of template deduction and into the ASTContext so it can be shared. This fixes several aspects of PR5542, but not all of them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92248 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaOverload.cpp
emaTemplateDeduction.cpp
|
28e318cc6008c2bc008f0caee70dc736a03d6289 |
29-Dec-2009 |
Chandler Carruth <chandlerc@gmail.com> |
Correctly refer to element CVR qualifications when determining if a type is more or less cv-qualified than another during implicit conversion and overload resolution ([basic.type.qualifier] p5). Factors the logic out of template deduction and into the ASTContext so it can be shared. This fixes several aspects of PR5542, but not all of them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92248 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaOverload.cpp
emaTemplateDeduction.cpp
|
79f414435ef406f9fb3dc7733b93715ac6313425 |
29-Dec-2009 |
Anders Carlsson <andersca@mac.com> |
Get rid of FixedWidthIntType, as suggested by Chris and Eli. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92246 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDeclAttr.cpp
emaTemplateDeduction.cpp
reeTransform.h
|
f5f7d864f5067d1ea4bff7fcf41b53a43b7b48ba |
29-Dec-2009 |
Anders Carlsson <andersca@mac.com> |
Get rid of FixedWidthIntType, as suggested by Chris and Eli. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92246 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDeclAttr.cpp
emaTemplateDeduction.cpp
reeTransform.h
|
56edbe3bc39822016b9f776fde07e04c547246ec |
29-Dec-2009 |
Chandler Carruth <chandlerc@gmail.com> |
Handle using declarations in overloaded and template functions during ADL and address resolution. This fixes PR5751. Also, while we're here, remove logic from ADL which mistakenly included the definition namespaces of overloaded and/or templated functions whose name or address is used as an argument. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92245 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
emaOverload.cpp
|
bd64729ac6de8fed320e7a722597cc5444709c63 |
29-Dec-2009 |
Chandler Carruth <chandlerc@gmail.com> |
Handle using declarations in overloaded and template functions during ADL and address resolution. This fixes PR5751. Also, while we're here, remove logic from ADL which mistakenly included the definition namespaces of overloaded and/or templated functions whose name or address is used as an argument. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92245 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
emaOverload.cpp
|
eb3932311b1e1e58f84456ce599e734f0ccc640b |
26-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Don't look through casts when looking for the underlying decl for a function call; the standard doesn't expect us to, and the program could be doing something crazy. Fixes PR5882. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92166 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
efa42f7d88a33c0c00e571fbcba8032a9baf7088 |
26-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Don't look through casts when looking for the underlying decl for a function call; the standard doesn't expect us to, and the program could be doing something crazy. Fixes PR5882. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92166 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
eafbe2cc787ab564a649f030d19235f09b939ccc |
26-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Attempted fix for PR5884; this code will be dead soon, but this fix should help for the moment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92165 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
e6d11b75f68980645fa695b56dc24487ecf13c32 |
26-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Attempted fix for PR5884; this code will be dead soon, but this fix should help for the moment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92165 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
3cc4b35bacf2de5e7ac286b8d0ba949947dc8527 |
25-Dec-2009 |
Benjamin Kramer <benny.kra@googlemail.com> |
Remove some dead variables clang-analyzer found. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92162 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaCodeComplete.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaStmt.cpp
|
54d76db0aa7107597cac0b80d8e138a37e6d1de9 |
25-Dec-2009 |
Benjamin Kramer <benny.kra@googlemail.com> |
Remove some dead variables clang-analyzer found. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92162 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaCodeComplete.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaStmt.cpp
|
02bd998ac81cc220e353508bc0356991cde2b148 |
25-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Make copy constructor elimination work in more cases; the case in question here affects clang-on-clang. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92151 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
cb48f8a60ad26b56d299cca9a57f8ea683d8a909 |
25-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Make copy constructor elimination work in more cases; the case in question here affects clang-on-clang. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92151 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
480622ffee581a2915378aa97f2cd8f1af66b639 |
24-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Egregious, disgusting workaround for PR5866. We need to rework how we keep track of friends within templates, which will provide a real for PR5866. For now, this makes sure we don't do something entirely stupid with friends of specializations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92143 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
|
7557a1348d2821dce126a778aa7acd7a00b814fd |
24-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Egregious, disgusting workaround for PR5866. We need to rework how we keep track of friends within templates, which will provide a real for PR5866. For now, this makes sure we don't do something entirely stupid with friends of specializations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92143 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
|
e94eec54f4ccb4c16b908e4b00e3eb5f93b723ef |
24-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Add test case for PR5868, and improve location information slightly for implicit "this" expressions git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92141 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
reeTransform.h
|
8aa5f407d9e4787ff08bd66e1a2fe39be174fddc |
24-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Add test case for PR5868, and improve location information slightly for implicit "this" expressions git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92141 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
reeTransform.h
|
2ccb28360d09d1e5978e891ed22db30a8748708a |
24-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When rebuilding a MemberExpr that refers to an anonymous union, be sure to perform derived-to-base conversions on the base expression. Fixes PR5868. Proper testcase is coming soon. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92139 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
83a56c4a1d5bbf7e4b6b08b105051575a2421d34 |
24-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
When rebuilding a MemberExpr that refers to an anonymous union, be sure to perform derived-to-base conversions on the base expression. Fixes PR5868. Proper testcase is coming soon. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92139 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
cd8368ca230c45bfe0516da914e536b2cb8f1b03 |
24-Dec-2009 |
Daniel Dunbar <daniel@zuster.org> |
Fix -Asserts warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92137 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
51846265634fe593bfe8046d82b4f8fbe335e791 |
24-Dec-2009 |
Daniel Dunbar <daniel@zuster.org> |
Fix -Asserts warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92137 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
cb179eed8ae9d5405f14a25e51f5ac5fc9a3fe7b |
24-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When transforming CXXExprWithTemporaries and CXXBindTemporaryExpr expressions (e.g., for template instantiation), just transform the subexpressions and return those, since the temporary-related nodes will be implicitly regenerated. Fixes PR5867, but I said that before... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92135 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaTemplateInstantiate.cpp
reeTransform.h
|
5132655e4296b780672e9a96b46a740135073534 |
24-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
When transforming CXXExprWithTemporaries and CXXBindTemporaryExpr expressions (e.g., for template instantiation), just transform the subexpressions and return those, since the temporary-related nodes will be implicitly regenerated. Fixes PR5867, but I said that before... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92135 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaTemplateInstantiate.cpp
reeTransform.h
|
2cbffce264caa5014c07b08f70f4a65591efcd2c |
24-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
InitializationSequence handles binding to temporaries, so that argument-passing doesn't have to. Fixes PR5867, where we were binding a temporary twice in the AST and, therefore, calling its destructor twice. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92131 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
65552c424750aaa58533ca385a90b77c033cc635 |
24-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
InitializationSequence handles binding to temporaries, so that argument-passing doesn't have to. Fixes PR5867, where we were binding a temporary twice in the AST and, therefore, calling its destructor twice. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92131 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ea34ad8f287dab59700a666a4e2228c6120270a1 |
24-Dec-2009 |
John McCall <rjmccall@apple.com> |
Fix the clang-on-clang build: APFloat reports underflow whenever we get a denormal, but we only want to diagnose if we underflowed to zero. This allows people to write constants in the denormal range. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92129 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
9f2df88757c8db3d97fa198f0ad4b6f139baa66a |
24-Dec-2009 |
John McCall <rjmccall@apple.com> |
Fix the clang-on-clang build: APFloat reports underflow whenever we get a denormal, but we only want to diagnose if we underflowed to zero. This allows people to write constants in the denormal range. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92129 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e4d072c96b52a58a0f118e29bb31379aa388641d |
24-Dec-2009 |
John McCall <rjmccall@apple.com> |
Tweak the text of several main() diagnostics and punch a hole specifically for Darwin's sekrit fourth argument. This should probably be factored to let targets make target-specific decisions about what main() should look like. Fixes rdar://problem/7414990 or if different platforms have radically different ideas of what they want in git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92128 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
6675586c70945fdd71911d96f83324788b93edd4 |
24-Dec-2009 |
John McCall <rjmccall@apple.com> |
Tweak the text of several main() diagnostics and punch a hole specifically for Darwin's sekrit fourth argument. This should probably be factored to let targets make target-specific decisions about what main() should look like. Fixes rdar://problem/7414990 or if different platforms have radically different ideas of what they want in git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92128 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
b1459dbc72261bf9df555e143f24635a4a6a75bc |
24-Dec-2009 |
John McCall <rjmccall@apple.com> |
Diagnose out-of-bounds floating-point constants. Fixes rdar://problem/6974641 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92127 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
94c939dc1d4958b62ea5a89294dd8b2905f3191f |
24-Dec-2009 |
John McCall <rjmccall@apple.com> |
Diagnose out-of-bounds floating-point constants. Fixes rdar://problem/6974641 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92127 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b3d99486899a520596aea0e35dbbe46ae1c25f11 |
24-Dec-2009 |
Nuno Lopes <nunoplopes@sapo.pt> |
allow the noreturn attribute to be used in class methods git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92090 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f75b8309e3e40290683e3d34bac3a04e88d9c625 |
24-Dec-2009 |
Nuno Lopes <nunoplopes@sapo.pt> |
allow the noreturn attribute to be used in class methods git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92090 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
74ad412c8f5727a8108c46b25b7675e7005ecfbb |
24-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When we see a CXXDefaultArgExpr during template instantiation, rebuild the default argument so that we're sure to mark any referenced declarations. This gets us another little step closer to fixing PR5810. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92078 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaTemplateInstantiate.cpp
reeTransform.h
|
036aed18662e0193aafe0e8ae13d2e57efe6df25 |
24-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
When we see a CXXDefaultArgExpr during template instantiation, rebuild the default argument so that we're sure to mark any referenced declarations. This gets us another little step closer to fixing PR5810. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92078 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaTemplateInstantiate.cpp
reeTransform.h
|
41764a048865ace23b13521528910c4fb03a2118 |
23-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
There is no such thing as typeinfo for a cv-qualified type. Assert that this is true when mangling, then fix up the various places in Sema and/or CodeGen that need to remove qualifiers. Addresses a linking issue when building LLVM with Clang. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92064 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
154fe9812faddcd94568a64aee5f3cb0d47003d9 |
23-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
There is no such thing as typeinfo for a cv-qualified type. Assert that this is true when mangling, then fix up the various places in Sema and/or CodeGen that need to remove qualifiers. Addresses a linking issue when building LLVM with Clang. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92064 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
8a60ea384dab832a2f8a2eb89f3304c6612409fe |
23-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Diagnose the use of incomplete types in C++ typeid expressions git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92045 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
765ccba920269eefbf572ec4bcd6ac7b6e9f9f77 |
23-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Diagnose the use of incomplete types in C++ typeid expressions git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92045 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
687742107a0e6f4f0dc2336973ca7c79aca5083d |
23-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Remove cv-qualifiers from the argument to typeid git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92041 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
f57f207a0fcf5fb7883597b57dd03faf952318dd |
23-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Remove cv-qualifiers from the argument to typeid git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92041 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
aaa095b2b1db8d4cbfe67eb7e94cb8343bc7de16 |
23-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix the overflow calculation in Sema::CheckTemplateArgument to be a bit more accurate. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92018 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
29f89f6be93b2f5c7a2b43877cf2555d03aa92a6 |
23-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix the overflow calculation in Sema::CheckTemplateArgument to be a bit more accurate. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92018 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
918683ef98bf33c9526bacea7ca860cfc34589b3 |
23-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When using a default function argument for a function template (or member function thereof), perform the template instantiation each time the default argument is needed. This ensures that (1) We get different CXXTemporary objects for each instantiation, and (2) Any other instantiations or definitions triggered by the instantiation of the default argument expression are guaranteed to happen; previously, they might have been suppressed, e.g., because they happened in an unevaluated context. This fixes the majority of PR5810. However, it does not address the problem where we may have multiple uses of the same CXXTemporary within an expression when the temporary came from a non-instantiated default argument expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92015 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
65222e82d97af2120b3952d19cbd3cd923f4b43e |
23-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
When using a default function argument for a function template (or member function thereof), perform the template instantiation each time the default argument is needed. This ensures that (1) We get different CXXTemporary objects for each instantiation, and (2) Any other instantiations or definitions triggered by the instantiation of the default argument expression are guaranteed to happen; previously, they might have been suppressed, e.g., because they happened in an unevaluated context. This fixes the majority of PR5810. However, it does not address the problem where we may have multiple uses of the same CXXTemporary within an expression when the temporary came from a non-instantiated default argument expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92015 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ad1010d663754058b1fa43a0ebe47d27e195d661 |
23-Dec-2009 |
Nuno Lopes <nunoplopes@sapo.pt> |
move a few more symbols to .rodata/.data.rel.ro git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92012 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
2550d70aabb5f603e8f74cc5fb6a69a7af5b51f3 |
23-Dec-2009 |
Nuno Lopes <nunoplopes@sapo.pt> |
move a few more symbols to .rodata/.data.rel.ro git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92012 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
32db22fe16b904778c993deca73fca4a3cbdabb9 |
23-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix DISABLE_SMART_POINTERS build git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92008 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
e1a5c17bffba76d20efa89d1d74e5f44159a67bd |
23-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Fix DISABLE_SMART_POINTERS build git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92008 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
1de3142b329b55ac8682e8af4e639cf2827c976d |
23-Dec-2009 |
Eric Christopher <echristo@apple.com> |
Update for the intrinsic changes in llvm: the object size intrinsic only takes a boolean second argument now. Update tests accordingly. Currently the builtin still accepts the full range for compatibility. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91983 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
fee667f35e64751baa7fefe70b4e7bab06c8cd86 |
23-Dec-2009 |
Eric Christopher <echristo@apple.com> |
Update for the intrinsic changes in llvm: the object size intrinsic only takes a boolean second argument now. Update tests accordingly. Currently the builtin still accepts the full range for compatibility. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91983 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
5c856b3eccbcf10343e1587334fc3652981ddeb4 |
23-Dec-2009 |
John McCall <rjmccall@apple.com> |
Set a member's access specifier even if it doesn't match the previous specifier. Prevents an assert on successive redeclarations. Fixed PR5573. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91956 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
44e067bd8f923ba8e7c24b2189e06717d70015c8 |
23-Dec-2009 |
John McCall <rjmccall@apple.com> |
Set a member's access specifier even if it doesn't match the previous specifier. Prevents an assert on successive redeclarations. Fixed PR5573. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91956 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
276e8648c3b5398250032dd460b7f0baee9f6df7 |
23-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Objective-C methods can be variadic, too. Who knew. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91951 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
2a17af0c7e05500e25d4cc71341f1f232085ebea |
23-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Objective-C methods can be variadic, too. Who knew. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91951 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
5c823e947ea27a4b036221c933cfae0c4582d389 |
23-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Switch Sema::CreateOverloadedUnaryOp over to InitializationSequence. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91948 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
baecfed8b995ace7d6da56e897ee610b8d477828 |
23-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Switch Sema::CreateOverloadedUnaryOp over to InitializationSequence. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91948 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
8ebca3f26aaac8de84c4a3092d07dd0d90d40f52 |
23-Dec-2009 |
Nuno Lopes <nunoplopes@sapo.pt> |
warn when attribute warn_unused_result is applied to void functions. while at it, remove an outdated FIXME git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91946 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
f857798fa77ac50c6d0a262d96ad6176187190e3 |
23-Dec-2009 |
Nuno Lopes <nunoplopes@sapo.pt> |
warn when attribute warn_unused_result is applied to void functions. while at it, remove an outdated FIXME git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91946 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
56522247be058e1bb797c11cac6cb3de6f60caad |
23-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Allow the first parameter of operator new to be a cv-qualified size_t. Also, fix an issue with initialization of parameters in calls, where we weren't removing the cv-qualifiers on the parameter type itself. Fixes PR5823. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91941 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExprCXX.cpp
emaInit.h
|
6e790ab61bf4835944971955e84279112833ef0c |
23-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Allow the first parameter of operator new to be a cv-qualified size_t. Also, fix an issue with initialization of parameters in calls, where we weren't removing the cv-qualifiers on the parameter type itself. Fixes PR5823. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91941 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExprCXX.cpp
emaInit.h
|
96f64ce7192b9999ee4f9c5cb95d8d51283d20c8 |
22-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Make sure that reinterpret_cast gets a CastKind on all successful paths. Fixes "cannot compile this unexpected cast lvalue yet" error in llvm/lib/Analysis/IPA/GlobalsModRef.cpp. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91932 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
f2a5539ea74bc4c4637851395f6bf6f78689f4e6 |
22-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Make sure that reinterpret_cast gets a CastKind on all successful paths. Fixes "cannot compile this unexpected cast lvalue yet" error in llvm/lib/Analysis/IPA/GlobalsModRef.cpp. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91932 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
d57d3121e3fce60c5f6d73ab8964a28c09c1f1f7 |
22-Dec-2009 |
John McCall <rjmccall@apple.com> |
Add using shadow decls to the "instantiated locals" map, fixing PR5847. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91928 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
323c310efa0abd7a786b0303501186b5f33eb8d7 |
22-Dec-2009 |
John McCall <rjmccall@apple.com> |
Add using shadow decls to the "instantiated locals" map, fixing PR5847. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91928 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
fb88e3cab26a3e28c4256c6addb10b1ee67fb112 |
22-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Switch Sema::AddCXXDirectInitializerToDecl over to InitializationSequence git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91927 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExprCXX.cpp
|
90f9382b3e97afa55e6aaaa4ab31c7473a8c7bb9 |
22-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Switch Sema::AddCXXDirectInitializerToDecl over to InitializationSequence git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91927 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExprCXX.cpp
|
2f2b14bd14ea053be51f0daf4acfe410f9f3efa9 |
22-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Switch parameter passing for overloaded binary operators to InitializationSequence. Fixes the -fsyntax-only failure in llvm/lib/Transforms/Scalar/InstructionCombining.cpp. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91921 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
4c2458a5ae09fc22fc61aedd380daf54f96d6112 |
22-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Switch parameter passing for overloaded binary operators to InitializationSequence. Fixes the -fsyntax-only failure in llvm/lib/Transforms/Scalar/InstructionCombining.cpp. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91921 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
9b489aacf5547315deaab5c7d4fcaae7d71ae83e |
22-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When transforming a C++ "new" expression that was not explicitly given a size, check whether the transformed type is itself an array type. If so, take the major array bound as the size to allocate. Fixes PR5833. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91907 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
5b5ad8453c8e79f642c3ddfeeadf162ae67309c0 |
22-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
When transforming a C++ "new" expression that was not explicitly given a size, check whether the transformed type is itself an array type. If so, take the major array bound as the size to allocate. Fixes PR5833. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91907 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
493abb5e204523a31328b003a550eb577059212f |
22-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Switch parameter-passing for calls via function pointers (where we don't have a FunctionDecl) over to InitializationSequence. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91906 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaInit.cpp
emaInit.h
|
a188ff2d8a18140541fcd5884deda4552dac71a7 |
22-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Switch parameter-passing for calls via function pointers (where we don't have a FunctionDecl) over to InitializationSequence. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91906 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaInit.cpp
emaInit.h
|
d458926d0d7e9d2d180952b4eff63d0c2ddb4838 |
22-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Switch InitializedEntity from TypeLoc down to just QualTypes, since we don't use the location information but we did spend a bunch of time building faked-up TypeLocs git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91905 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaInit.h
emaStmt.cpp
|
d6542d8efcf8389c3aab764f9e29ac284e16eda6 |
22-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Switch InitializedEntity from TypeLoc down to just QualTypes, since we don't use the location information but we did spend a bunch of time building faked-up TypeLocs git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91905 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaInit.h
emaStmt.cpp
|
3889eca20ff4fe680d2c6e823f3ff2a5b81f3bad |
22-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Switch initialization of parameters in a call over to InitializationSequence (when a FunctionDecl is present). This required a few small fixes to initialization sequences: - Make sure to use the adjusted parameter type for initialization of function parameters. - Implement transparent union calling semantics in C git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91902 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaInit.cpp
|
aa0373107968aa7a26bf63f4a2673b8325b800af |
22-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Switch initialization of parameters in a call over to InitializationSequence (when a FunctionDecl is present). This required a few small fixes to initialization sequences: - Make sure to use the adjusted parameter type for initialization of function parameters. - Implement transparent union calling semantics in C git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91902 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaInit.cpp
|
b9ae32ae469a95c859eaf4aa22c17597ccb146c7 |
22-Dec-2009 |
Chris Lattner <sabre@nondot.org> |
fix a bug handling the gnu ?: extension. Patch by Storlek on IRC, who prefers to be stealthy and mysterious. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91888 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
813b70d6db54dbf149cfaa14ec7502142121d86f |
22-Dec-2009 |
Chris Lattner <sabre@nondot.org> |
fix a bug handling the gnu ?: extension. Patch by Storlek on IRC, who prefers to be stealthy and mysterious. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91888 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
058ffce710217a2b78b6c05eb48db71b1a297a22 |
22-Dec-2009 |
Anders Carlsson <andersca@mac.com> |
When we simply return a retained member expression when instantiating, we must also mark the member decl as referenced. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91887 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
1f24032ea28d0df9d6227e4faf89306dfa990994 |
22-Dec-2009 |
Anders Carlsson <andersca@mac.com> |
When we simply return a retained member expression when instantiating, we must also mark the member decl as referenced. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91887 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
5e64aac569210db792d7f6aa0472dbdb69d68c13 |
22-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Zap CheckInitializerTypes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91884 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaInit.cpp
|
bba48cbd77ff5168b32efa9b77845d45f9205e48 |
22-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Zap CheckInitializerTypes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91884 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaInit.cpp
|
c5f1e784ca8c89603872118111ca19252e4c0aa1 |
22-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Switch default arguments over to InitializationSequence. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91883 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
4a2c19bf2330e31851330423187ec48035cab1a5 |
22-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Switch default arguments over to InitializationSequence. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91883 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
36db36a6ad56b48d0f7dc02ad5cce595ff50b109 |
22-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Switch compound literals over to InitializationSequence. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91882 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaInit.cpp
|
085446216a198ced4183ec1571e1ae51c2920e98 |
22-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Switch compound literals over to InitializationSequence. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91882 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaInit.cpp
|
d572382d75c0ba18b4ef18172ecc02d12d74cd7e |
22-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Switch file-scope assignment initialization over to InitializationSequence. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91881 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaInit.cpp
|
a91eb541a6adf81acf872e7315bc6b814c3241eb |
22-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Switch file-scope assignment initialization over to InitializationSequence. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91881 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaInit.cpp
|
f4c6280092d41cab08d0dfea596f0b77e955bf5e |
22-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Centralize the emission/suppression/delay of diagnostics describing runtime before in the new function Sema::DiagRuntimeBehavior, addressing one of Chris' comments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91870 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
1c7c3fb2641812fdf31b3f80f995116b02ac7863 |
22-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Centralize the emission/suppression/delay of diagnostics describing runtime before in the new function Sema::DiagRuntimeBehavior, addressing one of Chris' comments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91870 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
a04f5dcaba86eebe768972ad02fb42f5be685365 |
22-Dec-2009 |
John McCall <rjmccall@apple.com> |
Stop diagnosing the use of inner classes as friends. ddunbar asked whether this was useful, and on review Doug and I decided it was probably on the level of a bug in the standard and therefore not worth a warning even in -pedantic. If someone disagrees and urgently wants clang++ to warn about this in strict c++98 mode, we can talk about it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91868 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
a236a5584732c7c285316d7608168f771fac2059 |
22-Dec-2009 |
John McCall <rjmccall@apple.com> |
Stop diagnosing the use of inner classes as friends. ddunbar asked whether this was useful, and on review Doug and I decided it was probably on the level of a bug in the standard and therefore not worth a warning even in -pedantic. If someone disagrees and urgently wants clang++ to warn about this in strict c++98 mode, we can talk about it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91868 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
b94a110b0e81aad5bb0156e4bf55eed7adc9ff56 |
22-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Eliminate the ASTContext argument to CXXConstructorDecl::isCopyConstructor, since the context is available in the Decl git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91862 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaInit.cpp
emaOverload.cpp
|
9e9199d8649cf3e10c98a69403f05dbb666d8fb1 |
22-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Eliminate the ASTContext argument to CXXConstructorDecl::isCopyConstructor, since the context is available in the Decl git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91862 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaInit.cpp
emaOverload.cpp
|
758fbf26582e8bf829b9d748bfef923480a3cde0 |
22-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When converting from a type to itself or one of its base classes via a constructor call, the conversion is only a standard conversion sequence if that constructor is a copy constructor. This fixes PR5834 in a semi-lame way, because the "real" fix will be to move over to InitializationSequence. That will happen "soonish", but not now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91861 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
0d6d12b2db47ff34d6cd30917992a8c8ad97aac2 |
22-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
When converting from a type to itself or one of its base classes via a constructor call, the conversion is only a standard conversion sequence if that constructor is a copy constructor. This fixes PR5834 in a semi-lame way, because the "real" fix will be to move over to InitializationSequence. That will happen "soonish", but not now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91861 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
6cebeb040be3ea2ff1ffa3b97b33ed62bd53ca4a |
22-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When filling in value initializations within an initializer list, be sure to fill in the initialized member of a union when a member was explicitly designated. Fixes PR5843. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91858 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
d6d37dee48cfc5bbcc998bd9d151e4fb3a9437e8 |
22-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
When filling in value initializations within an initializer list, be sure to fill in the initialized member of a union when a member was explicitly designated. Fixes PR5843. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91858 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
f50ccbfbe65f0aa666e446aea4f9e55792c6465d |
22-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When a template-id refers to a single function template, and the explicitly-specified template arguments are enough to determine the instantiation, and either template argument deduction fails or is not performed in that context, we can resolve the template-id down to a function template specialization (so sayeth C++0x [temp.arg.explicit]p3). Fixes PR5811. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91852 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaOverload.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaType.cpp
|
4b52e25f3b05ab0f9d2492276a52323a50a84fb7 |
22-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
When a template-id refers to a single function template, and the explicitly-specified template arguments are enough to determine the instantiation, and either template argument deduction fails or is not performed in that context, we can resolve the template-id down to a function template specialization (so sayeth C++0x [temp.arg.explicit]p3). Fixes PR5811. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91852 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaOverload.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaType.cpp
|
d11c2dfc55daba60cb59a8d1b2b3069db91a8dd8 |
21-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Introduce an assertion to ensure that template argument deduction does not deduce an "overload" type. Such a deduction indicates a failure in semantic analysis (e.g., PR5811) that currently isn't caught until code-generation time. This assertions makes it clearer that this particular issue is a semantic-analysis problem, not a code-gen problem. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91844 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
c78a69dd901f200de958063997946119e366e4d2 |
21-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Introduce an assertion to ensure that template argument deduction does not deduce an "overload" type. Such a deduction indicates a failure in semantic analysis (e.g., PR5811) that currently isn't caught until code-generation time. This assertions makes it clearer that this particular issue is a semantic-analysis problem, not a code-gen problem. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91844 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
d0ffc0903935b5db6625a2c200ebb37dabcb803d |
21-Dec-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Allow comparison of 'void *' with function pointer as a g++ extension (fixes radar 7481987). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91827 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
51874dd2eda9e160b3413873459e31d32ffb7820 |
21-Dec-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Allow comparison of 'void *' with function pointer as a g++ extension (fixes radar 7481987). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91827 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
32ed04f4e45c5b08ac6fcbe656a2b2fc80804ae5 |
21-Dec-2009 |
John McCall <rjmccall@apple.com> |
Reorganize the base-lookup bits of ActOnMemInitializer in order to better support diagnostics and error recovery. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91825 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
2b194418b83ecbe670a6e5a8e57b84f32d8b123b |
21-Dec-2009 |
John McCall <rjmccall@apple.com> |
Reorganize the base-lookup bits of ActOnMemInitializer in order to better support diagnostics and error recovery. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91825 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
bc91cb361f70709f021466aa6802401fd5b10f09 |
21-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix for PR5840: fix the kind of name lookup used for classes in Sema::getTypeName. "LookupNestedNameSpecifierName" isn't quite the right kind of lookup, though; it doesn't ignore namespaces. Someone more familiar with the lookup code should fix this properly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91809 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
0f0615bba035f5aeaed0960d5a7802dff42f4b60 |
21-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix for PR5840: fix the kind of name lookup used for classes in Sema::getTypeName. "LookupNestedNameSpecifierName" isn't quite the right kind of lookup, though; it doesn't ignore namespaces. Someone more familiar with the lookup code should fix this properly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91809 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
3ad00d058179171e7047bf8d3343895f8ef9e13b |
21-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Small comment fix. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91808 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
|
b1df333e8b9ebf3e6eac859403af77336a7b3441 |
21-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Small comment fix. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91808 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
|
86a7c7a112be801d31dd8a3989f5f0f8f731ab5d |
21-Dec-2009 |
Nuno Lopes <nunoplopes@sapo.pt> |
fix PR4010: add support for the warn_unused_result for function pointers git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91803 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaStmt.cpp
|
d20254f2875d0004c57ee766f258dbcee29f4841 |
21-Dec-2009 |
Nuno Lopes <nunoplopes@sapo.pt> |
fix PR4010: add support for the warn_unused_result for function pointers git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91803 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaStmt.cpp
|
976b17d26732dda008d6e741671938cf29a02834 |
20-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Make sure we instantiate the destructor for variables initialized by assignment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91798 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
dd4e485a0db4e651f28281cd3eda93aad6ee04fd |
20-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Make sure we instantiate the destructor for variables initialized by assignment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91798 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
10a623fef7e22297e5e26b683ea5a29c7ed06e5c |
20-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix review comment; no visible change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91797 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
33c2da9b3abdade4f0df4f90962fb8c518967fc4 |
20-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix review comment; no visible change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91797 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
320cc336ffd00cae2854dbba25778da5b341f2dc |
20-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Switch default-initialization of variables of class type (or array thereof) over to InitializationSequence. I could swear that this fixes a PR somewhere, but I couldn't figure out which one git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91796 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaInit.cpp
|
745880f35066bdb1950d0e870608295221346fc5 |
20-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Switch default-initialization of variables of class type (or array thereof) over to InitializationSequence. I could swear that this fixes a PR somewhere, but I couldn't figure out which one git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91796 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaInit.cpp
|
7d75dad0d759cd0bbb491548ac1a4005db0b6bf2 |
20-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Revert accidental commit git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91795 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
947f633616bf2239cf0d03598a85d90f1e36664b |
20-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Revert accidental commit git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91795 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d81bf24f08ca8f376c98ccf1ad65caad93df180a |
20-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix CMake build on windows, from Cedric Venet git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91794 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
04f81b1fa04c02809a303d34ee6b19149d5aa29f |
20-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Fix CMake build on windows, from Cedric Venet git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91794 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
a7a09e24bee9060b6c7ed975b8bad2491f8d2c3b |
20-Dec-2009 |
John McCall <rjmccall@apple.com> |
Don't inject the class name until that magical lbrace. Because of the rules of base-class lookup* and the restrictions on typedefs, it was actually impossible for this to cause any problems more serious than the spurious acceptance of template <class T> class A : B<A> { ... }; instead of template <class T> class A : B<A<T> > { ... }; but I'm sure we can all agree that that is a very important restriction which is well worth making another Parser->Sema call for. (*) n.b. clang++ does not implement these rules correctly; we are not ignoring non-type names git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91792 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
f9368159334ff86ea5fa367225c1a580977f3b03 |
20-Dec-2009 |
John McCall <rjmccall@apple.com> |
Don't inject the class name until that magical lbrace. Because of the rules of base-class lookup* and the restrictions on typedefs, it was actually impossible for this to cause any problems more serious than the spurious acceptance of template <class T> class A : B<A> { ... }; instead of template <class T> class A : B<A<T> > { ... }; but I'm sure we can all agree that that is a very important restriction which is well worth making another Parser->Sema call for. (*) n.b. clang++ does not implement these rules correctly; we are not ignoring non-type names git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91792 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
80263a94e0e14b447b408334cfe62dd3d7c661ac |
19-Dec-2009 |
John McCall <rjmccall@apple.com> |
Kill off PreDeclaratorDC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91772 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
|
db0ee1da16e9dbec19b144c9cd96ee9f55fe0c53 |
19-Dec-2009 |
John McCall <rjmccall@apple.com> |
Kill off PreDeclaratorDC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91772 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
|
ab37872411b5ac0f98530d546a804db2f69dc437 |
19-Dec-2009 |
John McCall <rjmccall@apple.com> |
Refactor to remove more dependencies on PreDeclaratorDC. I seem to have made the redeclaration problems in the [temp.explicit]p3 testcase worse, but I can live with that; they'll need to be fixed more holistically anyhow. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91771 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
|
7a1dc562d4ad59237ed9fe7e8cef56f9eaa7a26c |
19-Dec-2009 |
John McCall <rjmccall@apple.com> |
Refactor to remove more dependencies on PreDeclaratorDC. I seem to have made the redeclaration problems in the [temp.explicit]p3 testcase worse, but I can live with that; they'll need to be fixed more holistically anyhow. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91771 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
|
9ecc829ac2c4a84e9dc8ee4548f514bb4290a027 |
19-Dec-2009 |
John McCall <rjmccall@apple.com> |
Don't use EnterDeclaratorContext when rebuilding a type in the current instantiation, since we're not using a Scope object for that anyway. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91770 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
0dd7ceb72cc369195d698ccc26c70ac0e56ab945 |
19-Dec-2009 |
John McCall <rjmccall@apple.com> |
Don't use EnterDeclaratorContext when rebuilding a type in the current instantiation, since we're not using a Scope object for that anyway. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91770 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
379be023656eafcdd86e6d8fc653288904935135 |
19-Dec-2009 |
John McCall <rjmccall@apple.com> |
Just push a new scope when parsing an out-of-line variable definition. Magically fixes all the terrible lookup problems associated with not pushing a new scope. Resolves an ancient xfail and an LLVM misparse. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91769 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
731ad843b7bf1862f6547ac79539f0f5b4c539bd |
19-Dec-2009 |
John McCall <rjmccall@apple.com> |
Just push a new scope when parsing an out-of-line variable definition. Magically fixes all the terrible lookup problems associated with not pushing a new scope. Resolves an ancient xfail and an LLVM misparse. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91769 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
d9391424d6453613b2206cced54f0da55fd06fba |
19-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Initialization improvements: addition of string initialization and a few small bug fixes in SemaInit, switch over SemaDecl to use it more often, and change a bunch of diagnostics which are different with the new initialization code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91767 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaInit.cpp
emaInit.h
|
cfdc81a83467973b14e4ea5e9e9af1690f135415 |
19-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Initialization improvements: addition of string initialization and a few small bug fixes in SemaInit, switch over SemaDecl to use it more often, and change a bunch of diagnostics which are different with the new initialization code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91767 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaInit.cpp
emaInit.h
|
412ae80abd3a8b2d805d36746d6a85b01044cdde |
19-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Switch more of Sema::CheckInitializerTypes over to InitializationSequence. Specially, switch initialization of a C++ class type (either copy- or direct-initialization). Also, make sure that we create an elidable copy-construction when performing copy initialization of a C++ class variable. Fixes PR5826. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91750 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
emaInit.h
|
7abfbdbc97ad8e7f340789f751df1e32b10118b4 |
19-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Switch more of Sema::CheckInitializerTypes over to InitializationSequence. Specially, switch initialization of a C++ class type (either copy- or direct-initialization). Also, make sure that we create an elidable copy-construction when performing copy initialization of a C++ class variable. Fixes PR5826. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91750 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
emaInit.h
|
a2628885c3ad752aed543996a99a7dfb5034c7f2 |
19-Dec-2009 |
John McCall <rjmccall@apple.com> |
Unresolved implicit member accesses are dependent if the object type is dependent. Avoids an assertion arising during object-argument initialization in overload resolution. In theory we can resolve this at definition time if the class hierarchy for the member is fully known. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91747 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
410a3f3c194a541acb5cdf3b98e96d6078685cf2 |
19-Dec-2009 |
John McCall <rjmccall@apple.com> |
Unresolved implicit member accesses are dependent if the object type is dependent. Avoids an assertion arising during object-argument initialization in overload resolution. In theory we can resolve this at definition time if the class hierarchy for the member is fully known. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91747 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e376d017de3b00926d3c2163e5d8278655ef6d8e |
18-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Extend code-completion results with the type of each result git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91702 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
|
ff5ce6eefc7c253ef6edf4d4bfc996fdd82d09aa |
18-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Extend code-completion results with the type of each result git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91702 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
|
a41fdf6975c14d75b6d07187d6671a1e62349827 |
18-Dec-2009 |
John McCall <rjmccall@apple.com> |
When diagnosing that a decl ref expr is not a value, note the declaration with "declared at" rather than "previous declaration is here". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91699 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
87cf6704e2fcce63d2bb0baafe8122c09a657737 |
18-Dec-2009 |
John McCall <rjmccall@apple.com> |
When diagnosing that a decl ref expr is not a value, note the declaration with "declared at" rather than "previous declaration is here". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91699 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
dd19a855d98ee85b17a2aed6734cefcac8410940 |
18-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Try to de-bork DISABLE_SMART_POINTERS build git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91696 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
bd8f371fec3d69e5fd8e173e1bf4020225dd47d9 |
18-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Try to de-bork DISABLE_SMART_POINTERS build git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91696 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
1464ab957f5a51f3f97a01ba968f60df4a5414f5 |
18-Dec-2009 |
John McCall <rjmccall@apple.com> |
Set up the semantic context correctly when declaring a friend class template. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91678 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
65c49466278f3739ac879f961b94b2aff744beed |
18-Dec-2009 |
John McCall <rjmccall@apple.com> |
Set up the semantic context correctly when declaring a friend class template. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91678 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
08d46d27084eefd45a6436599071782c67d4967e |
18-Dec-2009 |
John McCall <rjmccall@apple.com> |
Look through using decls when checking whether a name is an acceptable nested-name specifier name. I accidentally checked in the test case for this in the last commit --- fortunately, that refactor was inspired by having debugged this problem already, so I can fix the bug quick (though probably not fast enough for the buildbots). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91677 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
4e0d81f7088276ecf0c76824a28a9469482b067b |
18-Dec-2009 |
John McCall <rjmccall@apple.com> |
Look through using decls when checking whether a name is an acceptable nested-name specifier name. I accidentally checked in the test case for this in the last commit --- fortunately, that refactor was inspired by having debugged this problem already, so I can fix the bug quick (though probably not fast enough for the buildbots). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91677 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
33527a1634104d8fd29aa469c9b48b7a88939111 |
18-Dec-2009 |
John McCall <rjmccall@apple.com> |
Pull Sema::isAcceptableLookupResult into SemaLookup. Extract the criteria into different functions and pick the function at lookup initialization time. In theory we could actually divide the criteria functions into N different functions for the N cases, but it's so not worth it. Among other things, lets us invoke LookupQualifiedName without recomputing IDNS info every time. Do some refactoring in SemaDecl to avoid an awkward special case in LQN that was only necessary for redeclaration testing for anonymous structs/unions --- which could be done more efficiently with a scoped lookup anyway. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91676 91177308-0d34-0410-b5e6-96231b3b80d8
ookup.h
ema.h
emaDecl.cpp
emaLookup.cpp
|
1d7c52803e49d651a66cee782e264f62078c1da5 |
18-Dec-2009 |
John McCall <rjmccall@apple.com> |
Pull Sema::isAcceptableLookupResult into SemaLookup. Extract the criteria into different functions and pick the function at lookup initialization time. In theory we could actually divide the criteria functions into N different functions for the N cases, but it's so not worth it. Among other things, lets us invoke LookupQualifiedName without recomputing IDNS info every time. Do some refactoring in SemaDecl to avoid an awkward special case in LQN that was only necessary for redeclaration testing for anonymous structs/unions --- which could be done more efficiently with a scoped lookup anyway. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91676 91177308-0d34-0410-b5e6-96231b3b80d8
ookup.h
ema.h
emaDecl.cpp
emaLookup.cpp
|
ccfe15ea60d055936a15b370765006c10c25d81a |
18-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Switch the initialization required by return statements over to the new InitializationSequence. This fixes some bugs (e.g., PR5808), changed some diagnostics, and caused more churn than expected. What's new: - InitializationSequence now has a "C conversion sequence" category and step kind, which falls back to - Changed the diagnostics for returns to always have the result type of the function first and the type of the expression second. CheckSingleAssignmentConstraints to peform checking in C. - Improved ASTs for initialization of return values. The ASTs now capture all of the temporaries we need to create, but intentionally do not bind the tempoary that is actually returned, so that it won't get destroyed twice. - Make sure to perform an (elidable!) copy of the class object that is returned from a class. - Fix copy elision in CodeGen to properly see through the subexpressions that occur with elidable copies. - Give "new" its own entity kind; as with return values and thrown objects, we don't bind the expression so we don't call a destructor for it. Note that, with this patch, I've broken returning move-only types in C++0x. We'll fix it later, when we tackle NRVO. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91669 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExprCXX.cpp
emaInit.cpp
emaInit.h
emaStmt.cpp
|
18ef5e28a9a2677f8b1dce1fb2638d66e0a1621f |
18-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Switch the initialization required by return statements over to the new InitializationSequence. This fixes some bugs (e.g., PR5808), changed some diagnostics, and caused more churn than expected. What's new: - InitializationSequence now has a "C conversion sequence" category and step kind, which falls back to - Changed the diagnostics for returns to always have the result type of the function first and the type of the expression second. CheckSingleAssignmentConstraints to peform checking in C. - Improved ASTs for initialization of return values. The ASTs now capture all of the temporaries we need to create, but intentionally do not bind the tempoary that is actually returned, so that it won't get destroyed twice. - Make sure to perform an (elidable!) copy of the class object that is returned from a class. - Fix copy elision in CodeGen to properly see through the subexpressions that occur with elidable copies. - Give "new" its own entity kind; as with return values and thrown objects, we don't bind the expression so we don't call a destructor for it. Note that, with this patch, I've broken returning move-only types in C++0x. We'll fix it later, when we tackle NRVO. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91669 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExprCXX.cpp
emaInit.cpp
emaInit.h
emaStmt.cpp
|
e951d9cda8108d8f71a7b02154b4b7860e5d132e |
18-Dec-2009 |
John McCall <rjmccall@apple.com> |
Patch over yet more problems with friend declarations which were provoking problems on LLVM-Code-Syntax. This proved remarkably easy to "fix" once I settled on how I was going to approach it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91633 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
e129d44aab6324aa2094d68730a7843c41a4e45f |
18-Dec-2009 |
John McCall <rjmccall@apple.com> |
Patch over yet more problems with friend declarations which were provoking problems on LLVM-Code-Syntax. This proved remarkably easy to "fix" once I settled on how I was going to approach it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91633 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
1b3ccb44c5810b581ecbce2d1048400ceb027941 |
17-Dec-2009 |
Mike Stump <mrs@apple.com> |
Revert r91073. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91629 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
29da559b62d229f067a5b1851e438561dcbfd9bd |
17-Dec-2009 |
Mike Stump <mrs@apple.com> |
Revert r91073. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91629 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
770fd8dcf4381c0360f52c7db9244626657028a2 |
17-Dec-2009 |
Nuno Lopes <nunoplopes@sapo.pt> |
implement PR3962: diagnose more faulty cases of usage of the restrict qualifier. this also removes a FIXME git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91601 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
0a8bab019dbf980911fbefa56d7debd648b7b239 |
17-Dec-2009 |
Nuno Lopes <nunoplopes@sapo.pt> |
implement PR3962: diagnose more faulty cases of usage of the restrict qualifier. this also removes a FIXME git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91601 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d8ebaa41846df288c8e9bb826bf36b14aa8199c7 |
17-Dec-2009 |
Nuno Lopes <nunoplopes@sapo.pt> |
revert part of my last patch, and mark only the c++ global new operator as noalias. the rest will be infered by llvm optz git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91600 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
b23f20d72021548c812ddc81b91bf7ad78fe708c |
17-Dec-2009 |
Nuno Lopes <nunoplopes@sapo.pt> |
revert part of my last patch, and mark only the c++ global new operator as noalias. the rest will be infered by llvm optz git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91600 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
38bbd5449aed51d8bcd9eb6c0effbc360af2f7fd |
17-Dec-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Diagnose duplicate declaration of a property. Fixes PR5809 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91575 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
6dd30fc45af6bdee05a735d9817b6d9c72cdce35 |
17-Dec-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Diagnose duplicate declaration of a property. Fixes PR5809 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91575 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
cd7e4450853285412c60d7e0556367b9a91b1db8 |
17-Dec-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Allow pointer convesion of an objective-c pointer to 'void *' to mimic gcc's behavior. (fixes radar 7477351). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91570 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
adcfab1ffcb754672fb943832e04a79593a07a49 |
17-Dec-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Allow pointer convesion of an objective-c pointer to 'void *' to mimic gcc's behavior. (fixes radar 7477351). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91570 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
bae8e39f4919aa1723ab7686677bc22bdf2e3bff |
16-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Make sure C-specific enum warning doesn't trigger in C++. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91563 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
2aaad63ec5d012e6de40f72e114c60df9c205a24 |
16-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Make sure C-specific enum warning doesn't trigger in C++. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91563 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f8ff357ceb797373e6a1b5618554db1d3636c520 |
16-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Correctly calcluate abstract-ness in the case where an implicitly declared method overrides a pure virtual method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91558 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
ff2d87840df9f269d8a2f9df27518548da3d40f1 |
16-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Correctly calcluate abstract-ness in the case where an implicitly declared method overrides a pure virtual method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91558 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
158df1c7b4604fbde219753ec23cd931ca1612f7 |
16-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When value-initializing a class with no user-defined constructors but with a non-trivial default constructor, zero-initialize the storage and then call the default constructor. Fixes PR5800. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91548 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaInit.cpp
|
16006c901315fa12a108b4e571f187f4b676e426 |
16-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
When value-initializing a class with no user-defined constructors but with a non-trivial default constructor, zero-initialize the storage and then call the default constructor. Fixes PR5800. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91548 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaInit.cpp
|
87eabddeb17746908be6f8b202b6ca5e95b09a4a |
16-Dec-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Diagnose property of reference type as unsupported instead of crashing for now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91546 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
dd69aae2851577e4266b62f3430a1fce757b65ae |
16-Dec-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Diagnose property of reference type as unsupported instead of crashing for now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91546 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
2186f97cb2706eb3bf26b0f5c943e228e4055593 |
16-Dec-2009 |
Nuno Lopes <nunoplopes@sapo.pt> |
implement PR5654: add -fassume-sane-operator-new, which is enabled by default, and adds the malloc attribute to the global function new() and to the overloaded new operators. feel free to chage the name to this lengthy argument git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91543 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaExprCXX.cpp
|
fc2844846e91398205fddc71196fe9dda04e105f |
16-Dec-2009 |
Nuno Lopes <nunoplopes@sapo.pt> |
implement PR5654: add -fassume-sane-operator-new, which is enabled by default, and adds the malloc attribute to the global function new() and to the overloaded new operators. feel free to chage the name to this lengthy argument git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91543 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaExprCXX.cpp
|
55fa5b08fc457c8fcb804a9f20693c3b28ca30e1 |
16-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
In Sema::CheckInitializerTypes, replace a use of CheckReferenceInit with an InitializationSequence git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91542 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
52bb5d2a1474460707e5ca11656b2749a7a33a82 |
16-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
In Sema::CheckInitializerTypes, replace a use of CheckReferenceInit with an InitializationSequence git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91542 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
414aec550c08388c408c27de302f119146c0231f |
16-Dec-2009 |
Nuno Lopes <nunoplopes@sapo.pt> |
fix build git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91539 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
|
9a84ac24833942bae83a90c44fe7d4937b3e6c3c |
16-Dec-2009 |
Nuno Lopes <nunoplopes@sapo.pt> |
fix build git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91539 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
|
bc9012ac0bf35e1ba8c9aa1068fb60e44fdedb9a |
16-Dec-2009 |
John McCall <rjmccall@apple.com> |
Shift things around so that it's easier to recover from a missing function in a C++ call using an arbitrary call-expression type. Actually exploit this to fix the recovery implemented earlier. The diagnostic is still iffy, though. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91538 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
emaExpr.cpp
emaOverload.cpp
|
3b4294e5c1e904a2e0f74449dbc3f52f69cc8e9f |
16-Dec-2009 |
John McCall <rjmccall@apple.com> |
Shift things around so that it's easier to recover from a missing function in a C++ call using an arbitrary call-expression type. Actually exploit this to fix the recovery implemented earlier. The diagnostic is still iffy, though. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91538 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
emaExpr.cpp
emaOverload.cpp
|
8b29f57d867495ace41cda6a06013f05961c68ca |
16-Dec-2009 |
John McCall <rjmccall@apple.com> |
Introduce a centralized routine in Sema for diagnosing failed lookups (when used as expressions). In dependent contexts, try to recover by doing a lookup in previously-dependent base classes. We get better diagnostics out, but unfortunately the recovery fails: we need to turn it into a method call expression, not a bare call expression. Thus this is still a WIP. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91525 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaOverload.cpp
|
578b69b186d9cba0a6ae1dd7f4c04cd6a49f0aac |
16-Dec-2009 |
John McCall <rjmccall@apple.com> |
Introduce a centralized routine in Sema for diagnosing failed lookups (when used as expressions). In dependent contexts, try to recover by doing a lookup in previously-dependent base classes. We get better diagnostics out, but unfortunately the recovery fails: we need to turn it into a method call expression, not a bare call expression. Thus this is still a WIP. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91525 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaOverload.cpp
|
66e0718d80152ad92684c5ec8863839e92bed7eb |
16-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Eliminate Sema::CheckValueInitialization; its callers now use InitializationSequence to perform the actual initialization. Also, introduced the notion of a tree of initialized entities, so that we can know where an initialization began when dealing with nested initializations (as occur when performing list initialization). This will, eventually, be useful for producing better diagnostics when list initialization fails, because we can show the path from the top-level object being initialized down to the actual subobject where initialization failed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91516 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaInit.cpp
emaInit.h
|
cb57fb9f91e0976f4a3382b89a2734ffa50eb6fb |
16-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Eliminate Sema::CheckValueInitialization; its callers now use InitializationSequence to perform the actual initialization. Also, introduced the notion of a tree of initialized entities, so that we can know where an initialization began when dealing with nested initializations (as occur when performing list initialization). This will, eventually, be useful for producing better diagnostics when list initialization fails, because we can show the path from the top-level object being initialized down to the actual subobject where initialization failed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91516 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaInit.cpp
emaInit.h
|
3f1172d26f28f44501d422546566ac29a7c656d0 |
16-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix semantic diagnostics that embed English works, from Nicola Gigante! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91503 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXCast.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaInit.cpp
emaOverload.cpp
emaStmt.cpp
|
6864748fc9a780e6db0bb5a7bd20aa889882dc94 |
16-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Fix semantic diagnostics that embed English works, from Nicola Gigante! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91503 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXCast.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaInit.cpp
emaOverload.cpp
emaStmt.cpp
|
10a2b23ef59f4e4de0172a0ebe8ceeb5bb027206 |
16-Dec-2009 |
Anders Carlsson <andersca@mac.com> |
Check in a rudimentary FullExpr class that isn't used anywhere yet. Rename Action::FullExpr to Action::MakeFullExpr to avoid name clashes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91494 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
reeTransform.h
|
5ee56e95c3905d2e7bc403631b03865cdbdd8a42 |
16-Dec-2009 |
Anders Carlsson <andersca@mac.com> |
Check in a rudimentary FullExpr class that isn't used anywhere yet. Rename Action::FullExpr to Action::MakeFullExpr to avoid name clashes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91494 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
reeTransform.h
|
54cd39974f9a8b026851d607f4be60164fee3c2d |
16-Dec-2009 |
John McCall <rjmccall@apple.com> |
Successive anonymous namespaces name the same scope. I misinterpreted the standard the last time. Fixes PR5766. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91493 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
5fdd7643ae81af4ace04f8be888f225b9fcc64b7 |
16-Dec-2009 |
John McCall <rjmccall@apple.com> |
Successive anonymous namespaces name the same scope. I misinterpreted the standard the last time. Fixes PR5766. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91493 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
afe90ebd9ce0079385245d72f893d2da32c3692b |
16-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Switch the C++ new expression over to InitializationSequence, rather than using its own partial implementation of initialization. Switched CheckInitializerTypes over to InitializedEntity/InitializationKind, to help move us closer to InitializationSequence. Added InitializedEntity::getName() to retrieve the name of the entity, for diagnostics that care about such things. Implemented support for default initialization in InitializationSequence. Clean up the determination of the "source expressions" for an initialization sequence in InitializationSequence::Perform. Taught CXXConstructExpr to store more location information. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91492 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaInit.h
|
99a2e600f9e2e51d3ce10fb6f27191677ac65b2a |
16-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Switch the C++ new expression over to InitializationSequence, rather than using its own partial implementation of initialization. Switched CheckInitializerTypes over to InitializedEntity/InitializationKind, to help move us closer to InitializationSequence. Added InitializedEntity::getName() to retrieve the name of the entity, for diagnostics that care about such things. Implemented support for default initialization in InitializationSequence. Clean up the determination of the "source expressions" for an initialization sequence in InitializationSequence::Perform. Taught CXXConstructExpr to store more location information. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91492 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaInit.h
|
16640d5b58859b171c052ce26c1b07dffcc702b4 |
16-Dec-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Diagnose attempting to assign to a sub-structure of an ivar using objective-c property. (fixes radar 7449707) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91474 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
2514a309204341798f96912ce7a90841bea59727 |
16-Dec-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Diagnose attempting to assign to a sub-structure of an ivar using objective-c property. (fixes radar 7449707) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91474 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
0d792394d60420ddd4acda5327555eddf4e5bf78 |
15-Dec-2009 |
John McCall <rjmccall@apple.com> |
Link up member-class redeclarations during template instantiation. This test courtesy of LLVM. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91462 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
6c1c1b8c6ca743a5b6b4c81f9ac56392c12c7457 |
15-Dec-2009 |
John McCall <rjmccall@apple.com> |
Link up member-class redeclarations during template instantiation. This test courtesy of LLVM. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91462 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
358674dd4933c52e876f36af273b55f34af2342d |
15-Dec-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Fixes a code gen bug related to accessing a now non-existing 'isa' field of a non-existing struct type all related to legacy type definition for 'id' which we have dropped in clang in favor of a built-in type. (fixes radar 7470820). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91455 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
a7fa7cd3eaa5459dfb2d1495384ece9786f8434c |
15-Dec-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Fixes a code gen bug related to accessing a now non-existing 'isa' field of a non-existing struct type all related to legacy type definition for 'id' which we have dropped in clang in favor of a built-in type. (fixes radar 7470820). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91455 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
aa43f81f2f155a0ed8d0c9dfce11eaec516b85a3 |
15-Dec-2009 |
Anders Carlsson <andersca@mac.com> |
ShouldDestroyTemporaries? I don't think so. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91450 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaStmt.cpp
reeTransform.h
|
0ece491d8f62ce67f047491a6703fac0d3bd4ff4 |
15-Dec-2009 |
Anders Carlsson <andersca@mac.com> |
ShouldDestroyTemporaries? I don't think so. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91450 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaStmt.cpp
reeTransform.h
|
b057a6b9f0891dc5de5e984bb8769301bee50ad6 |
15-Dec-2009 |
Anders Carlsson <andersca@mac.com> |
If a ParmVarDecl's default argument is a CXXExprWithTemporaries, return the underlying expr instead. Add getNumDefaultArgTemporaries and getDefaultArgTemporary which returns the temporaries a default arg creates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91439 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
337cba4b3e17b98cfa512dfd12e57f4ccb0859be |
15-Dec-2009 |
Anders Carlsson <andersca@mac.com> |
If a ParmVarDecl's default argument is a CXXExprWithTemporaries, return the underlying expr instead. Add getNumDefaultArgTemporaries and getDefaultArgTemporary which returns the temporaries a default arg creates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91439 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
39577075101aa6fa0663e64775ff66ab7763da6f |
15-Dec-2009 |
Nate Begeman <natebegeman@mac.com> |
Support OpenCL 1.1 odd-length vector component accessors. For hi/odd of an odd-length vector, the last component is undefined. Since we shuffle with an undef vector, no CodeGen needs to change to support this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91437 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
0479a0b9f22331da74df4ea50bce193f9bafb145 |
15-Dec-2009 |
Nate Begeman <natebegeman@mac.com> |
Support OpenCL 1.1 odd-length vector component accessors. For hi/odd of an odd-length vector, the last component is undefined. Since we shuffle with an undef vector, no CodeGen needs to change to support this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91437 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b49da815d5fc3299dc8e8bbf1886f0a193ad8894 |
15-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix some diagnostic-related FIXMEs, from Nicola Gigante git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91433 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExpr.cpp
|
5cc07df89ab9afa9079baeec1243ee90c3f84d9d |
15-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Fix some diagnostic-related FIXMEs, from Nicola Gigante git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91433 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExpr.cpp
|
dbf0031fbbd30144c3ac070baa4f2d0e551a8de9 |
15-Dec-2009 |
Chris Lattner <sabre@nondot.org> |
update to match LLVM API change: Remove isPod() from DenseMapInfo, splitting it out to its own isPodLike type trait. This is a generally useful type trait for more than just DenseMap, and we really care about whether something acts like a pod, not whether it really is a pod. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91422 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
06159e878569e5f39bf0e8f11b84ac3ad0970597 |
15-Dec-2009 |
Chris Lattner <sabre@nondot.org> |
update to match LLVM API change: Remove isPod() from DenseMapInfo, splitting it out to its own isPodLike type trait. This is a generally useful type trait for more than just DenseMap, and we really care about whether something acts like a pod, not whether it really is a pod. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91422 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
58893a8d7669ee6124b4a40457b6e8be429bea86 |
15-Dec-2009 |
Daniel Dunbar <daniel@zuster.org> |
Fix a COVTCTII (crash-on-valid-that-clang-thinks-is-invalid, duh), note_previous_decl was used where note_previous_declaration was intended. Better names or PR5785 might be nice. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91413 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ec3455fb1373091effbf1445762d1347124f4865 |
15-Dec-2009 |
Daniel Dunbar <daniel@zuster.org> |
Fix a COVTCTII (crash-on-valid-that-clang-thinks-is-invalid, duh), note_previous_decl was used where note_previous_declaration was intended. Better names or PR5785 might be nice. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91413 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
38228ff312f6dccb78123782a57658638012f88a |
15-Dec-2009 |
Mike Stump <mrs@apple.com> |
This patch should fix PR2461. It allows clang to apply the noreturn attribute to function pointers. It also fixes Sema to check function pointers for the noreturn attribute when checking for fallthrough. Patch by Chip Davis, with a slight fix to pass the testsuite. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91408 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
|
3ee77640c722a70ab7e0181f36dc2af21cab3d23 |
15-Dec-2009 |
Mike Stump <mrs@apple.com> |
This patch should fix PR2461. It allows clang to apply the noreturn attribute to function pointers. It also fixes Sema to check function pointers for the noreturn attribute when checking for fallthrough. Patch by Chip Davis, with a slight fix to pass the testsuite. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91408 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
|
424284d871025feac9ba4fac208bac30641cce76 |
15-Dec-2009 |
John McCall <rjmccall@apple.com> |
Diagnose the use of typedefs for template specialization types in the scope specifiers for out-of-line declarations, e.g. typedef Temp<int> MyTemp; template <> MyTemp::foo; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91395 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
4b2b02b26cd51e2e44fa315143618285fd72ce77 |
15-Dec-2009 |
John McCall <rjmccall@apple.com> |
Diagnose the use of typedefs for template specialization types in the scope specifiers for out-of-line declarations, e.g. typedef Temp<int> MyTemp; template <> MyTemp::foo; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91395 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
6ff2c023d18e35edcc63d53c7592f2aca39af954 |
15-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement value initialization in InitializationSequence; untested WIP, yet again. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91368 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
emaInit.h
|
71d1740c94060b424bb745d6c6973ff27cfdee06 |
15-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement value initialization in InitializationSequence; untested WIP, yet again. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91368 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
emaInit.h
|
0ad8ff518d419fc80e5aafc267477fc3fb4717c4 |
15-Dec-2009 |
John McCall <rjmccall@apple.com> |
Fix PR5716 by bandaging over the solution until we can come back to it. I apologize for friend declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91359 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
e976ffe18ee60b81641423f42ff6feec2f5e3cb7 |
15-Dec-2009 |
John McCall <rjmccall@apple.com> |
Fix PR5716 by bandaging over the solution until we can come back to it. I apologize for friend declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91359 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
58087f12d8b9416eb7d9160f44e9877bbc397747 |
14-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Minor cleanups for constructor initialization in InitializationSequence git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91325 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
emaInit.h
|
a6ca65075490a1f217bbe5f83fe7b80e821df2d8 |
14-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Minor cleanups for constructor initialization in InitializationSequence git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91325 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
emaInit.h
|
3a7097031d063b02ae0e9af715784972b16a45ff |
14-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Constructor initialization for InitializationSequence. Untested WIP. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91323 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
emaInit.h
|
51c56d6c8a944c2e49dd714db65a780d9f627e15 |
14-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Constructor initialization for InitializationSequence. Untested WIP. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91323 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
emaInit.h
|
dcbf08f1765a91c8c902d453cd0850188f2638e1 |
14-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve template instantiation for object constructions in several ways: - During instantiation, drop default arguments from constructor and call expressions; they'll be recomputed anyway, and we don't want to instantiate them twice. - Rewrote the instantiation of variable initializers to cope with non-dependent forms properly. Together, these fix a handful of problems I introduced with the switch to always rebuild expressions from the source code "as written." git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91315 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
6eef519fc8a97bb7ca6066f23d35e10f06b2c1b5 |
14-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Improve template instantiation for object constructions in several ways: - During instantiation, drop default arguments from constructor and call expressions; they'll be recomputed anyway, and we don't want to instantiate them twice. - Rewrote the instantiation of variable initializers to cope with non-dependent forms properly. Together, these fix a handful of problems I introduced with the switch to always rebuild expressions from the source code "as written." git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91315 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
1587a6c1933f6d7fd4b90a83293e2b2c42951a4d |
14-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement user-defined conversions in InitializationSequence. WPI that isn't turned on anyway yet, so it cannot be tested. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91294 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
emaInit.h
|
4a520a2bd8a6b79fa5d4771f02e34e7bd6bc461d |
14-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement user-defined conversions in InitializationSequence. WPI that isn't turned on anyway yet, so it cannot be tested. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91294 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
emaInit.h
|
7e6dc786e6f825b326737ffc4126d764d132526b |
14-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When rebuilding CXXConstructExprs after a transformation, use CompleteConstructorCall to perform type-checking. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91279 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
4411d2e674b0119f682ac472c3a377f14fa9fa30 |
14-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
When rebuilding CXXConstructExprs after a transformation, use CompleteConstructorCall to perform type-checking. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91279 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
564c3f94ae496b8ba664558ca19aced510c7cda1 |
13-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix PR5756 a different, better way: we don't have a "pointer conversion to void*" according to C++ [over.ics.rank]p4b2 if the type we're converting from is not a pointer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91254 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
019196975a4e6224c95dd1b7d974a1d729e15945 |
13-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Fix PR5756 a different, better way: we don't have a "pointer conversion to void*" according to C++ [over.ics.rank]p4b2 if the type we're converting from is not a pointer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91254 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
e2847e26cbb014f3f0afe5df21a5b7e523997cec |
13-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Don't assume that all conversions to a void pointer are converting from a PointerType. Fixes PR5756. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91253 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
335b07ae470045dab25739ded6541744ec8fe40b |
13-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Don't assume that all conversions to a void pointer are converting from a PointerType. Fixes PR5756. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91253 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
6e7705bab234bfdf2c0e931ffa4a3b92883df924 |
13-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix template instantiation for non-dependent calls to overloaded call operators. Fixes PR5266. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91252 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
668d6d9dc100b3ef28a9b8e6fe987c2f5b6edcc9 |
13-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Fix template instantiation for non-dependent calls to overloaded call operators. Fixes PR5266. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91252 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
b053bff48230137a33fff2c871a27d72fe2b4bc2 |
13-Dec-2009 |
Anders Carlsson <andersca@mac.com> |
More improvements to checking allocation and deallocation functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91244 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
156c78e4ef14e5f7ba251554ea8f2dbec573fef3 |
13-Dec-2009 |
Anders Carlsson <andersca@mac.com> |
More improvements to checking allocation and deallocation functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91244 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
00874ad5bb1845b7dfa3d39411ecfc09df321ad7 |
13-Dec-2009 |
Chandler Carruth <chandlerc@gmail.com> |
Silence some release build warnings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91234 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
60cfcecaf48e4310339dcfbdb0e3f0e6d2853855 |
13-Dec-2009 |
Chandler Carruth <chandlerc@gmail.com> |
Silence some release build warnings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91234 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
e26ac9c9acf105e72a23ebefabfce652f0541db9 |
12-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Rework the way we handle template instantiation for implicitly-generated AST nodes. We previously built instantiated nodes for each of these AST nodes, then passed them on to Sema, which was not prepared to see already-type-checked nodes (see PR5755). In some places, we had ugly workarounds to try to avoid re-type-checking (e.g., in VarDecl initializer instantiation). Now, we skip implicitly-generated nodes when performing instantiation, preferring instead to build just the AST nodes that directly reflect what was written in the source code. This has several advantages: - We don't need to instantiate anything that doesn't have a direct correlation to the source code, so we can have better location information. - Semantic analysis sees the same thing at template instantiation time that it would see for a non-template. - At least one ugly hack (VarDecl initializers) goes away. Fixes PR5755. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91218 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
a88cfbfac9bbcbb9858f048d6d73a48711d8e93d |
12-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Rework the way we handle template instantiation for implicitly-generated AST nodes. We previously built instantiated nodes for each of these AST nodes, then passed them on to Sema, which was not prepared to see already-type-checked nodes (see PR5755). In some places, we had ugly workarounds to try to avoid re-type-checking (e.g., in VarDecl initializer instantiation). Now, we skip implicitly-generated nodes when performing instantiation, preferring instead to build just the AST nodes that directly reflect what was written in the source code. This has several advantages: - We don't need to instantiate anything that doesn't have a direct correlation to the source code, so we can have better location information. - Semantic analysis sees the same thing at template instantiation time that it would see for a non-template. - At least one ugly hack (VarDecl initializers) goes away. Fixes PR5755. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91218 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
82f33653cc721f85e2f3c578b5c470efd6f62570 |
12-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When certain diagnostics involving run-time behavior would be emitted in a potentially potentially evaluated context, queue those diagnostics and only emit them if the context ends up being potentially evaluated. This completes the fix for PR5761. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91213 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
06d33699f11277a494c1118a0d25a83dab3bbd4c |
12-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
When certain diagnostics involving run-time behavior would be emitted in a potentially potentially evaluated context, queue those diagnostics and only emit them if the context ends up being potentially evaluated. This completes the fix for PR5761. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91213 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
ee1695d18f7fdf57893beadded33a8fac2345b76 |
12-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Suppress warnings and errors about certain uses of non-POD types (in __builtin_offsetof, passing through an ellipsis) when we're in an unevaluated context. This is the first part of the fix to PR5761, which deals with the simple case of an unevaluated context. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91210 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
75b699a883ed02e9183cb5f4ad7086f4e3c6adf1 |
12-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Suppress warnings and errors about certain uses of non-POD types (in __builtin_offsetof, passing through an ellipsis) when we're in an unevaluated context. This is the first part of the fix to PR5761, which deals with the simple case of an unevaluated context. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91210 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
9d02e7c5fa4e30ceb52a2956c0018ec41a5b6da0 |
12-Dec-2009 |
Jeffrey Yasskin <jyasskin@google.com> |
Un-namespace-qualify llvm_unreachable. It's a macro, so the qualification gave no extra safety anyway. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91207 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
emaInit.cpp
emaLookup.cpp
emaTemplate.cpp
emaType.cpp
reeTransform.h
|
9f61aa9e280adea9fbf3365f0e4f6ed568c9885a |
12-Dec-2009 |
Jeffrey Yasskin <jyasskin@google.com> |
Un-namespace-qualify llvm_unreachable. It's a macro, so the qualification gave no extra safety anyway. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91207 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
emaInit.cpp
emaLookup.cpp
emaTemplate.cpp
emaType.cpp
reeTransform.h
|
34f2d7f54af9d44f276eaae2c774fb671853106a |
12-Dec-2009 |
Anders Carlsson <andersca@mac.com> |
Fix tyop. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91204 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
fcfdb2ba4275183c1b018b4afe05e1ef1178c1ef |
12-Dec-2009 |
Anders Carlsson <andersca@mac.com> |
Fix tyop. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91204 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
e4d41bd1f70c1a8d53bf32da03dbead15e28bd6f |
12-Dec-2009 |
Anders Carlsson <andersca@mac.com> |
Correctly diagnose [basic.stc.dynamic.allocation]p1 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91190 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
20d45d2a9ebb8e20683b11287878a7e341bfea1a |
12-Dec-2009 |
Anders Carlsson <andersca@mac.com> |
Correctly diagnose [basic.stc.dynamic.allocation]p1 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91190 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
4b779b3b686bbd883b8f9dc5c9eb7c263da58bfc |
12-Dec-2009 |
Anders Carlsson <andersca@mac.com> |
Factor operator new declaration checking out into a separate function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91189 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
a3ccda58913cc1a4b8564e349448b12acc462da7 |
12-Dec-2009 |
Anders Carlsson <andersca@mac.com> |
Factor operator new declaration checking out into a separate function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91189 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
a83e8005e94b71d84046ba1941fd56d7e1ee484a |
12-Dec-2009 |
Anders Carlsson <andersca@mac.com> |
More work on improving the operator delete diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91187 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
46991d63642c5a29f62d8b92456f62b0fe564fd0 |
12-Dec-2009 |
Anders Carlsson <andersca@mac.com> |
More work on improving the operator delete diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91187 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
d7e57d04fcea6e6b4c280f42671f1cb5d5134db9 |
12-Dec-2009 |
Anders Carlsson <andersca@mac.com> |
Fix build. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91182 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
1152c39c8a9849f437ccac68391db7845e7c42b9 |
12-Dec-2009 |
Anders Carlsson <andersca@mac.com> |
Fix build. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91182 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
2af481dc4abb92b99f655264582aa2ff86170385 |
12-Dec-2009 |
Anders Carlsson <andersca@mac.com> |
Improve diagnostics for malformed delete operator function declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91180 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
9d59ecb4d2c2e8efdb214589753826b662246d82 |
12-Dec-2009 |
Anders Carlsson <andersca@mac.com> |
Improve diagnostics for malformed delete operator function declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91180 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
eb264b1e729713043c0921ef84559dac75af9fdc |
11-Dec-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to allow C-style cast from 'void *' to block pointer type. (fixes radar 7465023). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91171 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
3b27f1a80e4e433b503efd344c909eeafaa9033c |
11-Dec-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to allow C-style cast from 'void *' to block pointer type. (fixes radar 7465023). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91171 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
0a13c505b131d1818d397eac7421a738460dde4f |
11-Dec-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Consider conversion of objective-c pointer to 'bool' a valid standard conversion to match g++'s behaviour. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91157 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
1f7711d1131f147a2317be0a860041c6e25c69a1 |
11-Dec-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Consider conversion of objective-c pointer to 'bool' a valid standard conversion to match g++'s behaviour. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91157 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
0a09a2d30fc18d8cf622140f1fc7b8d197373b5d |
11-Dec-2009 |
John McCall <rjmccall@apple.com> |
Don't enter a new scope for a namespace-qualified declarator unless we're in a file context. In well-formed code, only happens with friend functions. Fixes PR 5760. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91146 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
|
e7e278bce2301990107cef3f873cbbf7da94469a |
11-Dec-2009 |
John McCall <rjmccall@apple.com> |
Don't enter a new scope for a namespace-qualified declarator unless we're in a file context. In well-formed code, only happens with friend functions. Fixes PR 5760. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91146 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
|
f4fb5c4393fcc4bb1a427853d574ff41821089ab |
11-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When code completion of an overload set fails, produce results for ordinary name lookup instead. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91141 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
ef96eac2b83e2ed62144bb25b051d09a02296fe0 |
11-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
When code completion of an overload set fails, produce results for ordinary name lookup instead. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91141 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
5fb8c1c3a0b8b33367b803bf61a0adde8d6d45e8 |
11-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Add a function's cv-qualifiers to the code-completion results as an informative chunk. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91139 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
a61a87980d64d1d49872a9a7eeca7eaeb7f95d30 |
11-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Add a function's cv-qualifiers to the code-completion results as an informative chunk. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91139 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
414c899998e57463cd74562f38847033333c38bd |
11-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Teach code completion to instantiate templates when it needs to git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91138 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
d1cd31aeb806077340be94e32429f3192cf139b0 |
11-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Teach code completion to instantiate templates when it needs to git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91138 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
3d35f7ca54aa7f2d658b4f72d634c33c169c812c |
11-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Member function templates can occur after . or -> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91137 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
ce82196076cd15f5ecfa029fcda8b58dc0146cf1 |
11-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Member function templates can occur after . or -> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91137 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
727cc90f7b20b6e41839930458b6f8e3c17ec9cd |
11-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Tweak code-completion results by suppressing class template specializations and class template partial specializations (they're never named directly). Also, member access expressions only refer to value declarations (fields, functions, enumerators, etc.) and Objective-C property declarations; filter out everything else. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91133 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
7628294ee86c2f5459b6bf476434fdc8f4f7055e |
11-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Tweak code-completion results by suppressing class template specializations and class template partial specializations (they're never named directly). Also, member access expressions only refer to value declarations (fields, functions, enumerators, etc.) and Objective-C property declarations; filter out everything else. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91133 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
e85c6c1b1f685e6a63a315ba1e39fecebb301371 |
11-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Class template (partial) specializations should not show up in code completion results git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91125 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
e29ffaae9b2f474b1cf559704c66de8498177559 |
11-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Class template (partial) specializations should not show up in code completion results git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91125 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
51d39d3978afa5bc5e2b8ebd81ea8f555113a518 |
11-Dec-2009 |
Benjamin Kramer <benny.kra@googlemail.com> |
Random string-related cleanups. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91119 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
8d04258483be6583f0865464234d014807a3e1cc |
11-Dec-2009 |
Benjamin Kramer <benny.kra@googlemail.com> |
Random string-related cleanups. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91119 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
1d8b1f31261e0d7d436625e7d75dd62bf7ebf479 |
11-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix a recent regression from the initialization changes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91097 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
emaInit.h
|
03981014e4f0c3b4e935872dda96a28c2f1874ea |
11-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix a recent regression from the initialization changes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91097 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
emaInit.h
|
a24d6b78f6799108200202836cf3bc9133ef4b18 |
11-Dec-2009 |
John McCall <rjmccall@apple.com> |
Check if the target of a using decl is already declared in this scope before doing any of the other redeclaration checks. We were missing a few cases. Fixes PR 5752. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91096 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
d7533ec10b618d360eb8952e62edb5657199acd3 |
11-Dec-2009 |
John McCall <rjmccall@apple.com> |
Check if the target of a using decl is already declared in this scope before doing any of the other redeclaration checks. We were missing a few cases. Fixes PR 5752. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91096 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
74fa91164768a5469fd299206e893349dcd3c343 |
11-Dec-2009 |
John McCall <rjmccall@apple.com> |
Implement access declarations. Most of the work here is parsing them, which is difficult because they're so terribly, terribly ambiguous. We implement access declarations in terms of using declarations, which is quite reasonable. However, we should really persist the access/using distinction in the AST and use the appropriate name in diagnostics. This isn't a priority, so I'll just file a PR and hope someone else does it. :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91095 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
60fa3cfd7aa63c29f9fc2d593bac56a3646337cc |
11-Dec-2009 |
John McCall <rjmccall@apple.com> |
Implement access declarations. Most of the work here is parsing them, which is difficult because they're so terribly, terribly ambiguous. We implement access declarations in terms of using declarations, which is quite reasonable. However, we should really persist the access/using distinction in the AST and use the appropriate name in diagnostics. This isn't a priority, so I'll just file a PR and hope someone else does it. :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91095 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
d010b5ed7d9253daa3fff1ead3a06fad27fbdf04 |
11-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix the handling of dependent enums per C++ DR 502. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91089 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
ed0716b7b79d8cdef34f3bd35776a91aa3c943e5 |
11-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix the handling of dependent enums per C++ DR 502. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91089 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
5555f2e6ecd5a73c8fb08bdbed3b28d509213ab1 |
11-Dec-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to fix a crash trying to access a category name in objective-c++ mode and also removed dead-code in this area. (fixes radar 7456710). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91081 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaLookup.cpp
|
737061fc2948776f941e1854a9bc6ebd070d9151 |
11-Dec-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to fix a crash trying to access a category name in objective-c++ mode and also removed dead-code in this area. (fixes radar 7456710). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91081 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaLookup.cpp
|
21cb330b8884c43fd7f7e6ca35a0a13118dc6b6c |
10-Dec-2009 |
Mike Stump <mrs@apple.com> |
Don't complain about falling off the end of a function with an asm block, if the function is supposed to return a value as we don't know exactly what the asm code does. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91073 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
c9875bfa6ffecc8d8316820e2970cf7354f610d2 |
10-Dec-2009 |
Mike Stump <mrs@apple.com> |
Don't complain about falling off the end of a function with an asm block, if the function is supposed to return a value as we don't know exactly what the asm code does. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91073 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
95efe4d129a2e4ddefad90ac164700da1e6e9405 |
10-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Clean up enum constants so that they're finally sane. Fixes PR3173 and a recently introduced crash. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91070 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
29a7f3342c3c6dd15d914c61ae22246c36d51ce7 |
10-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Clean up enum constants so that they're finally sane. Fixes PR3173 and a recently introduced crash. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91070 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
c56eebefe11c21409029922cb9998176fcca37e2 |
10-Dec-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Add support for finding composite type of twp objective-c pointers in objective-c++ mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91059 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
5501636b41318a9161d5f2b278e6e2c6a794e4d2 |
10-Dec-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Add support for finding composite type of twp objective-c pointers in objective-c++ mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91059 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
78a8000d29c787541c1d0b1c9a45020ef3aac7e3 |
10-Dec-2009 |
John McCall <rjmccall@apple.com> |
Improve the diagnostic when a new declaration conflicts with a using shadow declaration. Rename note_using_decl to note_using, which is possibly less confusing. Add a test for non-class-scope using decl collisions and be sure to note the case we can't diagnose yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91057 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
|
41ce66f8e20159d8bd39fff54ae01608da06c294 |
10-Dec-2009 |
John McCall <rjmccall@apple.com> |
Improve the diagnostic when a new declaration conflicts with a using shadow declaration. Rename note_using_decl to note_using, which is possibly less confusing. Add a test for non-class-scope using decl collisions and be sure to note the case we can't diagnose yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91057 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
|
4abd44b04ffa33d27fdf1e1858104680fd391060 |
10-Dec-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Move composite type finding of two objective-c expressions into its own helper method. No change in functionality. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91056 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
eebc4750fd66be9e395ab3fc757a067e050a9677 |
10-Dec-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Move composite type finding of two objective-c expressions into its own helper method. No change in functionality. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91056 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
4e79ac50a8c9b966a500b107c8e169ab36c7a965 |
10-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement C++ DR437, which involves exception-specifications that name a type currently being defined, from Nicola Gigante! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91052 91177308-0d34-0410-b5e6-96231b3b80d8
emaExceptionSpec.cpp
|
0966f358989e2f3900d3a4efaca4c14250f2777b |
10-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement C++ DR437, which involves exception-specifications that name a type currently being defined, from Nicola Gigante! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91052 91177308-0d34-0410-b5e6-96231b3b80d8
emaExceptionSpec.cpp
|
d3346686e8b4377150695eff5660b31fa07ec6b1 |
10-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Move initialization via initializer list over to InitializationSequences. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91050 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaInit.cpp
emaInit.h
|
d87b61f6398bab21176f73818a8d11ca1c3632c8 |
10-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Move initialization via initializer list over to InitializationSequences. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91050 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaInit.cpp
emaInit.h
|
9e1d5827a6feaf18cb72a9d8eca80645e2075528 |
10-Dec-2009 |
John McCall <rjmccall@apple.com> |
Implement redeclaration checking and hiding semantics for using declarations. There are a couple of O(n^2) operations in this, some analogous to the usual O(n^2) redeclaration problem and some not. In particular, retroactively removing shadow declarations when they're hidden by later decls is pretty unfortunate. I'm not yet convinced it's worse than the alternative, though. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91045 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaLookup.cpp
emaOverload.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
9f54ad4381370c6b771424b53d219e661d6d6706 |
10-Dec-2009 |
John McCall <rjmccall@apple.com> |
Implement redeclaration checking and hiding semantics for using declarations. There are a couple of O(n^2) operations in this, some analogous to the usual O(n^2) redeclaration problem and some not. In particular, retroactively removing shadow declarations when they're hidden by later decls is pretty unfortunate. I'm not yet convinced it's worse than the alternative, though. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91045 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaLookup.cpp
emaOverload.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
2c3aa2aeb55fc7d5a15eec89af13a481d290e15a |
10-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix for PR5515: allow "merging" array bounds both forwards and backwards. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91044 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
153c33ed957b135a366178c61bbe22b6b1362a2a |
10-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix for PR5515: allow "merging" array bounds both forwards and backwards. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91044 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
da86f093507a7733ae955d7511b88f8bf4f61752 |
10-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Reimplement reference initialization (C++ [dcl.init.ref]) using the new notion of an "initialization sequence", which encapsulates the computation of the initialization sequence along with diagnostic information and the capability to turn the computed sequence into an expression. At present, I've only switched one CheckReferenceInit callers over to this new mechanism; more will follow. Aside from (hopefully) being much more true to the standard, the diagnostics provided by this reference-initialization code are a bit better than before. Some examples: p5-var.cpp:54:12: error: non-const lvalue reference to type 'struct Derived' cannot bind to a value of unrelated type 'struct Base' Derived &dr2 = b; // expected-error{{non-const lvalue reference to ... ^ ~ p5-var.cpp:55:9: error: binding of reference to type 'struct Base' to a value of type 'struct Base const' drops qualifiers Base &br3 = bc; // expected-error{{drops qualifiers}} ^ ~~ p5-var.cpp:57:15: error: ambiguous conversion from derived class 'struct Diamond' to base class 'struct Base': struct Diamond -> struct Derived -> struct Base struct Diamond -> struct Derived2 -> struct Base Base &br5 = diamond; // expected-error{{ambiguous conversion from ... ^~~~~~~ p5-var.cpp:59:9: error: non-const lvalue reference to type 'long' cannot bind to a value of unrelated type 'int' long &lr = i; // expected-error{{non-const lvalue reference to type ... ^ ~ p5-var.cpp:74:9: error: non-const lvalue reference to type 'struct Base' cannot bind to a temporary of type 'struct Base' Base &br1 = Base(); // expected-error{{non-const lvalue reference to ... ^ ~~~~~~ p5-var.cpp:102:9: error: non-const reference cannot bind to bit-field 'i' int & ir1 = (ib.i); // expected-error{{non-const reference cannot ... ^ ~~~~~~ p5-var.cpp:98:7: note: bit-field is declared here int i : 17; // expected-note{{bit-field is declared here}} ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90992 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXCast.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaInit.cpp
emaInit.h
emaOverload.cpp
emaOverload.h
|
20093b4bf698f292c664676987541d5103b65b15 |
10-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Reimplement reference initialization (C++ [dcl.init.ref]) using the new notion of an "initialization sequence", which encapsulates the computation of the initialization sequence along with diagnostic information and the capability to turn the computed sequence into an expression. At present, I've only switched one CheckReferenceInit callers over to this new mechanism; more will follow. Aside from (hopefully) being much more true to the standard, the diagnostics provided by this reference-initialization code are a bit better than before. Some examples: p5-var.cpp:54:12: error: non-const lvalue reference to type 'struct Derived' cannot bind to a value of unrelated type 'struct Base' Derived &dr2 = b; // expected-error{{non-const lvalue reference to ... ^ ~ p5-var.cpp:55:9: error: binding of reference to type 'struct Base' to a value of type 'struct Base const' drops qualifiers Base &br3 = bc; // expected-error{{drops qualifiers}} ^ ~~ p5-var.cpp:57:15: error: ambiguous conversion from derived class 'struct Diamond' to base class 'struct Base': struct Diamond -> struct Derived -> struct Base struct Diamond -> struct Derived2 -> struct Base Base &br5 = diamond; // expected-error{{ambiguous conversion from ... ^~~~~~~ p5-var.cpp:59:9: error: non-const lvalue reference to type 'long' cannot bind to a value of unrelated type 'int' long &lr = i; // expected-error{{non-const lvalue reference to type ... ^ ~ p5-var.cpp:74:9: error: non-const lvalue reference to type 'struct Base' cannot bind to a temporary of type 'struct Base' Base &br1 = Base(); // expected-error{{non-const lvalue reference to ... ^ ~~~~~~ p5-var.cpp:102:9: error: non-const reference cannot bind to bit-field 'i' int & ir1 = (ib.i); // expected-error{{non-const reference cannot ... ^ ~~~~~~ p5-var.cpp:98:7: note: bit-field is declared here int i : 17; // expected-note{{bit-field is declared here}} ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90992 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXCast.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaInit.cpp
emaInit.h
emaOverload.cpp
emaOverload.h
|
ca404a5c6408dddb2463009d6d56d1043b428a7e |
09-Dec-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Codegen. support for ObjCIsaExpr AST which until now was not needed (fixes radar 7453430). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90981 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
83dc32594cde6bd083bd8b98b24bde2346585cad |
09-Dec-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Codegen. support for ObjCIsaExpr AST which until now was not needed (fixes radar 7453430). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90981 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
472f89244393933f55431259174d6e7ca14d44a6 |
09-Dec-2009 |
John McCall <rjmccall@apple.com> |
First pass at implementing C++ enum semantics: calculate (and store) an "integer promotion" type associated with an enum decl, and use this type to determine which type to promote to. This type obeys C++ [conv.prom]p2 and is therefore generally signed unless the range of the enumerators forces it to be unsigned. Kills off a lot of false positives from -Wsign-compare in C++, addressing rdar://7455616 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90965 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaOverload.cpp
|
842aef8d942a880eeb9535d40de31a86838264cb |
09-Dec-2009 |
John McCall <rjmccall@apple.com> |
First pass at implementing C++ enum semantics: calculate (and store) an "integer promotion" type associated with an enum decl, and use this type to determine which type to promote to. This type obeys C++ [conv.prom]p2 and is therefore generally signed unless the range of the enumerators forces it to be unsigned. Kills off a lot of false positives from -Wsign-compare in C++, addressing rdar://7455616 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90965 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaOverload.cpp
|
87a4b80c8a9249bcb089e7279cb9bca481348c00 |
09-Dec-2009 |
Anders Carlsson <andersca@mac.com> |
Look through using declarations when searching for allocation overloads. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90961 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
eac813909b3ca1142ad186f6c6a1b1ae0dbf9378 |
09-Dec-2009 |
Anders Carlsson <andersca@mac.com> |
Look through using declarations when searching for allocation overloads. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90961 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
ec350ab2cf05b9dc74bbb5ca363de41b7dc623b6 |
09-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix for PR5730: make sure to consistently call PerformObjectArgumentInitialization from BuildCXXMemberCallExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90950 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
772fffa2349524dbcad59dbfec7b71a47be229e6 |
09-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix for PR5730: make sure to consistently call PerformObjectArgumentInitialization from BuildCXXMemberCallExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90950 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
5545fcb03d0cd194818fed4652b19fb5baad7e94 |
09-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Whitespace fix. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90949 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
c8c771ed7e3724d882177fc58933b178de61da8e |
09-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Whitespace fix. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90949 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
95839be6a0dc3df91b0745e4d14d152d67161413 |
09-Dec-2009 |
Anders Carlsson <andersca@mac.com> |
Don't warn about function templates or function template specializations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90943 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
63fb6737e7488e3af85c822d4d030663e2b4feaf |
09-Dec-2009 |
Anders Carlsson <andersca@mac.com> |
Don't warn about function templates or function template specializations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90943 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
938e6bcb16fe70553f890c9a8a73043bea564d08 |
09-Dec-2009 |
John McCall <rjmccall@apple.com> |
Rename Sema::IsOverload to Sema::CheckOverload. Teach it to ignore unresolved using value decls; we optimistically assume they won't turn into conflicts. Teach it to tell the caller *why* the function doesn't overload with the returned decl; this will be useful for using hiding. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90939 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaOverload.cpp
|
871b2e7c0f70f87b87b5d5e110391d016a309b63 |
09-Dec-2009 |
John McCall <rjmccall@apple.com> |
Rename Sema::IsOverload to Sema::CheckOverload. Teach it to ignore unresolved using value decls; we optimistically assume they won't turn into conflicts. Teach it to tell the caller *why* the function doesn't overload with the returned decl; this will be useful for using hiding. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90939 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaOverload.cpp
|
c46e419fba4cce03b10d58525ece6c6383287779 |
09-Dec-2009 |
Anders Carlsson <andersca@mac.com> |
Move the missing prototypes checking out into a new function. Don't warn about inline functions. Add a test. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90938 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
9f89dd783d9abb9539bd7e952e5823301415c076 |
09-Dec-2009 |
Anders Carlsson <andersca@mac.com> |
Move the missing prototypes checking out into a new function. Don't warn about inline functions. Add a test. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90938 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
724a5099b0e3ffb3913e3c36d1c0282d9985eeda |
09-Dec-2009 |
Anders Carlsson <andersca@mac.com> |
Pass the current SourceLocation to getAssignOperatorMethod, fixing a crash when the assign operator method needs to be instantiated. Doug, please review the updated default-assignment-operator.cpp change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90935 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
b6cc91be4da4f55c7e3dca87ecfdb532b33c83ca |
09-Dec-2009 |
Anders Carlsson <andersca@mac.com> |
Pass the current SourceLocation to getAssignOperatorMethod, fixing a crash when the assign operator method needs to be instantiated. Doug, please review the updated default-assignment-operator.cpp change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90935 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
9cf03eec0131751c8483e21f49bd951fa35fa798 |
09-Dec-2009 |
Mike Stump <mrs@apple.com> |
Add support for the cleanup attribute for C++; we don't have to copy all of g++'s bugs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90924 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
b89192151e3bda48d7cfb41ff61842d9cd06fc82 |
09-Dec-2009 |
Mike Stump <mrs@apple.com> |
Add support for the cleanup attribute for C++; we don't have to copy all of g++'s bugs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90924 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
f649a723918ae081408f162b5786727cfddbdb51 |
09-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implemented an implicit conversion from "noreturn" function types (and pointers thereof) to their corresponding non-noreturn function types. This conversion is considered an exact match for overload-resolution purposes. Note that we are a little more strict that GCC is, because we encode noreturn in the type system, but that's a Good Thing (TM) because it does not allow us to pretend that potentially-returning function pointers are non-returning function pointers. Fxies PR5620. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90913 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaOverload.cpp
emaOverload.h
|
43c79c2b07abc7ba6d9f243b84ee6539de4d2652 |
09-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Implemented an implicit conversion from "noreturn" function types (and pointers thereof) to their corresponding non-noreturn function types. This conversion is considered an exact match for overload-resolution purposes. Note that we are a little more strict that GCC is, because we encode noreturn in the type system, but that's a Good Thing (TM) because it does not allow us to pretend that potentially-returning function pointers are non-returning function pointers. Fxies PR5620. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90913 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaOverload.cpp
emaOverload.h
|
ac5ad7ebb178bbc9e7b1bb0983852de795c7d027 |
09-Dec-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
More detailed analysis of typecast to an objective-c pointer in objective-c++ mode without being too lenient. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90895 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
92ef5d75720c032808181133e4d7c5f82230237e |
09-Dec-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
More detailed analysis of typecast to an objective-c pointer in objective-c++ mode without being too lenient. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90895 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
5e71de20060a9137fa7dce8e500e8421a21d4554 |
08-Dec-2009 |
John McCall <rjmccall@apple.com> |
Handle unresolved using decls in bare lookups. These are not being adequately tested. Fixes PR5727. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90893 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
fead20c1de136b5a199a5cc4225f64be771452e4 |
08-Dec-2009 |
John McCall <rjmccall@apple.com> |
Handle unresolved using decls in bare lookups. These are not being adequately tested. Fixes PR5727. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90893 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
24b1b21330118acb5c293ec526c4304f79a5a92c |
08-Dec-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to allow matching 0 with an objective-c pointer type in objective-c++ mode. Fixes radar 7443165 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90874 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
0cedfbdb44d865f38ec2de4bf92838f53c5607ec |
08-Dec-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to allow matching 0 with an objective-c pointer type in objective-c++ mode. Fixes radar 7443165 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90874 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
5603bdebc4c693a65b2ae04a6293eaaac5817cbc |
08-Dec-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to allow cstyle cast of objective-c pointers in objective-c++ mode as they are pervasive. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90867 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
ebea307a766729981ed923db9b77543437d726dc |
08-Dec-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to allow cstyle cast of objective-c pointers in objective-c++ mode as they are pervasive. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90867 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
cce90c8ca24da520e4bbeb8b4769b22163889ff5 |
08-Dec-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Refactor objective-c pointer assignment compatibility logic. No intended functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90865 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
52efc3fdbabaf4848f47887eda130b0961508cd0 |
08-Dec-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Refactor objective-c pointer assignment compatibility logic. No intended functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90865 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
8223ec2682ffd2046247550c495ec845a4820bc4 |
08-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement template instantiation for exception specifications. Also, print exception specifications on function types and declarations. Fixes <rdar://problem/7450999>. There is some poor source-location information here, because we don't track locations of the types in exception specifications. Filed PR5719. Failures during template instantiation of the signature of a function or function template have wrong point-of-instantiation location information. I'll tackle that with a separate commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90863 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
0ae7b3f1d5403265f693ed75384603ca8fbba74d |
08-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement template instantiation for exception specifications. Also, print exception specifications on function types and declarations. Fixes <rdar://problem/7450999>. There is some poor source-location information here, because we don't track locations of the types in exception specifications. Filed PR5719. Failures during template instantiation of the signature of a function or function template have wrong point-of-instantiation location information. I'll tackle that with a separate commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90863 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
2539385eb3e538c81831f6ed136091f68e989574 |
08-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When performing unqualified name lookup in C++, don't look directly into transparent contexts; instead, we'll look into their nearest enclosing non-transparent contexts further up the stack. Fixes PR5479. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90859 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
1237259bda343504cc0bd3cfe2198bdeea2b2fdf |
08-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
When performing unqualified name lookup in C++, don't look directly into transparent contexts; instead, we'll look into their nearest enclosing non-transparent contexts further up the stack. Fixes PR5479. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90859 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
caf652320f6effe3b5e1aea7e007bb8263800138 |
08-Dec-2009 |
John McCall <rjmccall@apple.com> |
The refactor of implicit member access expressions means we don't need this horrible isAddressOfOperand hack in TreeTransform, since that syntactic information is managed by the initial parser callbacks now. That's enough insomniac commits for one night. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90849 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
reeTransform.h
|
454feb9da67504b475d032ca2a9fc34c5744748e |
08-Dec-2009 |
John McCall <rjmccall@apple.com> |
The refactor of implicit member access expressions means we don't need this horrible isAddressOfOperand hack in TreeTransform, since that syntactic information is managed by the initial parser callbacks now. That's enough insomniac commits for one night. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90849 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
reeTransform.h
|
b85c1556de06cc741c9465e669cbe8c2c559ffde |
08-Dec-2009 |
John McCall <rjmccall@apple.com> |
DeclRefExpr stores a ValueDecl internally. Template instantiation can re-use DeclRefExprs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90848 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaTemplateInstantiate.cpp
reeTransform.h
|
dbd872f273a8dbf22e089b3def6c09f0a460965d |
08-Dec-2009 |
John McCall <rjmccall@apple.com> |
DeclRefExpr stores a ValueDecl internally. Template instantiation can re-use DeclRefExprs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90848 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaTemplateInstantiate.cpp
reeTransform.h
|
59a1058f1b34622e6709045c19555490d59af894 |
08-Dec-2009 |
John McCall <rjmccall@apple.com> |
Correctly implement the C++03 and 0x restrictions on class-member using declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90843 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
|
604e7f14d672af80ca5b9044f30f3dc23d37ddd5 |
08-Dec-2009 |
John McCall <rjmccall@apple.com> |
Correctly implement the C++03 and 0x restrictions on class-member using declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90843 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
|
62de4fc38bb2d7f733d638bf71112fb7f6113d0c |
08-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix for PR5710: make sure to put function template specializations into the DeclContext, so they don't completely disappear from the AST. I don't particularly like this fix, but I don't see any obviously better way to deal with it, and I think it's pretty clearly an improvement; comments welcome. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90835 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
6bc20135a2c46f97da15994095616a305be35c6a |
08-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix for PR5710: make sure to put function template specializations into the DeclContext, so they don't completely disappear from the AST. I don't particularly like this fix, but I don't see any obviously better way to deal with it, and I think it's pretty clearly an improvement; comments welcome. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90835 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
41c05b578992b39698a22d677e81ebbd8485698b |
08-Dec-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to warn when discarding objective-c pointer type qualifiers Still some refactoring to do. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90830 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
7e42cf2ca1d7058e46dbec269b9462eaa52b7d79 |
08-Dec-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to warn when discarding objective-c pointer type qualifiers Still some refactoring to do. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90830 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
97ea8cc943409d290b600024924c8847839944ac |
07-Dec-2009 |
John McCall <rjmccall@apple.com> |
Recover from dot accesses to record pointers and arrow accesses to records. Patch by Nicola Gigante! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90814 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
812c15476c9dddb72a8fd48deb7ca86402664b94 |
07-Dec-2009 |
John McCall <rjmccall@apple.com> |
Recover from dot accesses to record pointers and arrow accesses to records. Patch by Nicola Gigante! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90814 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
56822845f0cacc282d6d55083202966abfb241e2 |
07-Dec-2009 |
Ted Kremenek <kremenek@apple.com> |
Add the BlockDecl to the DeclContext. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90808 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
3cdff236e23e68fa19ed0b69f79ab7eb04593d28 |
07-Dec-2009 |
Ted Kremenek <kremenek@apple.com> |
Add the BlockDecl to the DeclContext. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90808 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
76f80035adc4962acdac7cdd3d1ed8ab331adc4e |
07-Dec-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Allow accessing 'isa' via '->' operator. (fixes radar 7447251). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90795 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
6d910f07d8727c22e06cff2357bbc1bba25d0910 |
07-Dec-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Allow accessing 'isa' via '->' operator. (fixes radar 7447251). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90795 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
5a2a5c4fff0430ba97ad04ebd3c68c2cab8ad301 |
07-Dec-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to allow restrict applied to id/Class types. (fixes radar 7442244). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90773 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
2b5ff1a1471819192ae805b51b888030ecb52914 |
07-Dec-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to allow restrict applied to id/Class types. (fixes radar 7442244). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90773 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
c4ee39ca343616573c465c064a38422e9d9c91ce |
07-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When in an Objective-C instance method, super is a valid code-completion result git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90758 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
2a7925c4abe45650f3ab27be09468e3a3a98084a |
07-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
When in an Objective-C instance method, super is a valid code-completion result git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90758 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
b4c7be862abff31c56ff098f9f56aa4d5e47c443 |
07-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Code completion for Objective-C @ keywords that are statements or expressions git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90757 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
|
9a0c85e640a08174569a303db22981612f05d385 |
07-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Code completion for Objective-C @ keywords that are statements or expressions git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90757 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
|
debc7cbc085252e68d7672d68620cfab1c714e1b |
07-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Code completion for Objective-C @ directives git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90756 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
|
c464ae8444edb6d07ea49b7a0eae1674c0fa1bb8 |
07-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Code completion for Objective-C @ directives git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90756 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
|
77bd49ad78bfae00f88817629076fdb21d150ab9 |
07-Dec-2009 |
Anders Carlsson <andersca@mac.com> |
Rework how virtual member functions are marked. If a class has no key function, we now wait until the end of the translation unit to mark its virtual member functions as references. This lays the groundwork for fixing PR5557. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90752 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
|
d6a637f8c8a93863509fc1bc555513ff6504957d |
07-Dec-2009 |
Anders Carlsson <andersca@mac.com> |
Rework how virtual member functions are marked. If a class has no key function, we now wait until the end of the translation unit to mark its virtual member functions as references. This lays the groundwork for fixing PR5557. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90752 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
|
39cf32a9e9019054816da59a27b52416d9a664e0 |
07-Dec-2009 |
Anders Carlsson <andersca@mac.com> |
Move key functions to a separate map. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90745 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
f53df2398e07d13be9962b95aebc19b31706fa33 |
07-Dec-2009 |
Anders Carlsson <andersca@mac.com> |
Move key functions to a separate map. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90745 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
7755c88dcbfa1d4273fd97bdd3415c5c2aa19039 |
07-Dec-2009 |
John McCall <rjmccall@apple.com> |
DeclaratorInfo -> TypeSourceInfo. Makes an effort to rename associated variables, but the results are imperfect. For posterity, I did: cat <<EOF > $cmdfile s/DeclaratorInfo/TypeSourceInfo/g s/DInfo/TInfo/g s/TypeTypeSourceInfo/TypeSourceInfo/g s/SourceTypeSourceInfo/TypeSourceInfo/g EOF find lib -name '*.cpp' -not -path 'lib/Parse/*' -exec sed -i '' -f $cmdfile '{}' \; find lib -name '*.h' -exec sed -i '' -f $cmdfile '{}' \; find include -name '*.h' -not -path 'include/clang/Parse/*' -not -path 'include/clang/Basic/*' -exec sed -i '' -f $cmdfile '{}' \; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90743 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
reeTransform.h
|
a93c934af4fbf97cbe8e649d82e68ccacfe57c95 |
07-Dec-2009 |
John McCall <rjmccall@apple.com> |
DeclaratorInfo -> TypeSourceInfo. Makes an effort to rename associated variables, but the results are imperfect. For posterity, I did: cat <<EOF > $cmdfile s/DeclaratorInfo/TypeSourceInfo/g s/DInfo/TInfo/g s/TypeTypeSourceInfo/TypeSourceInfo/g s/SourceTypeSourceInfo/TypeSourceInfo/g EOF find lib -name '*.cpp' -not -path 'lib/Parse/*' -exec sed -i '' -f $cmdfile '{}' \; find lib -name '*.h' -exec sed -i '' -f $cmdfile '{}' \; find include -name '*.h' -not -path 'include/clang/Parse/*' -not -path 'include/clang/Basic/*' -exec sed -i '' -f $cmdfile '{}' \; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90743 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
reeTransform.h
|
18973ce02baf8b310df51803738460c99a566cf0 |
07-Dec-2009 |
Chris Lattner <sabre@nondot.org> |
reapply my patch for PR4451, which improves diagnostics for :: vs : confusion. This time with a fix to bail out when in a dependent context. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90730 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
reeTransform.h
|
46646491834cd8faabb22482dfe93b24ce28a6c1 |
07-Dec-2009 |
Chris Lattner <sabre@nondot.org> |
reapply my patch for PR4451, which improves diagnostics for :: vs : confusion. This time with a fix to bail out when in a dependent context. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90730 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
reeTransform.h
|
9bd6336f0b6e378125ce33d562a00a278c4350d8 |
07-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Move RequireCompleteType requirement for fields early into ActOnField so that subsequent code which depends on a complete type does the right thing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90727 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplateInstantiate.cpp
|
721e77db41cd9a07d2e1c9fdf08a4bd2eee1bc98 |
07-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Move RequireCompleteType requirement for fields early into ActOnField so that subsequent code which depends on a complete type does the right thing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90727 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplateInstantiate.cpp
|
c011ed832b1cbb793299ff5d50ab1ee97315caf5 |
06-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
PointerUnion == PointerUnion does not do what I thought it did. Also, fix a thinko in a PointerUnion::get call. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90719 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
d490f953e812a9bb1729637cc70a6db7d997ced0 |
06-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
PointerUnion == PointerUnion does not do what I thought it did. Also, fix a thinko in a PointerUnion::get call. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90719 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
701ae24245e603b38ccfc45252604e99f60fa66c |
06-Dec-2009 |
Chris Lattner <sabre@nondot.org> |
revert my previous patch, it is breaking something and I don't have time to fix it ATM. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90717 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
reeTransform.h
|
1ade4ca0aa9331c2388cca9becad1357a154ae34 |
06-Dec-2009 |
Chris Lattner <sabre@nondot.org> |
revert my previous patch, it is breaking something and I don't have time to fix it ATM. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90717 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
reeTransform.h
|
e213bc51ec27cc46986ddfe81dee750f7a1592e8 |
06-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Switch the std::multimap shadow map used in code completion to an llvm::DenseMap, for a 20% performance improvement in the Cocoa-big-list performance benchmark. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90715 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
fbcb5d60d0cac6279ac0dd1411937218146237c7 |
06-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Switch the std::multimap shadow map used in code completion to an llvm::DenseMap, for a 20% performance improvement in the Cocoa-big-list performance benchmark. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90715 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
12668c9ba492222aab34ac1d3a5054035bb58194 |
06-Dec-2009 |
Chris Lattner <sabre@nondot.org> |
implement PR4451, improving error recovery for a mistaken : where a :: was intended. On the first testcase in the bug, we now produce: cxx-decl.cpp:12:2: error: unexpected ':' in nested name specifier y:a a2; ^ :: instead of: t.cc:8:1: error: C++ requires a type specifier for all declarations x:a a2; ^ t.cc:8:2: error: invalid token after top level declarator x:a a2; ^ ; t.cc:9:11: error: use of undeclared identifier 'a2' x::a a3 = a2; ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90713 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
reeTransform.h
|
a564b17dcc7daf298ffa72cde94630343bf9c31a |
06-Dec-2009 |
Chris Lattner <sabre@nondot.org> |
implement PR4451, improving error recovery for a mistaken : where a :: was intended. On the first testcase in the bug, we now produce: cxx-decl.cpp:12:2: error: unexpected ':' in nested name specifier y:a a2; ^ :: instead of: t.cc:8:1: error: C++ requires a type specifier for all declarations x:a a2; ^ t.cc:8:2: error: invalid token after top level declarator x:a a2; ^ ; t.cc:9:11: error: use of undeclared identifier 'a2' x::a a3 = a2; ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90713 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
reeTransform.h
|
27590ae4d6a8f1fb4d2fa838f27126731796b5d8 |
06-Dec-2009 |
Chris Lattner <sabre@nondot.org> |
remove some extraneous syntax: sourceloc implicitly converts to sourcerange. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90710 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaInit.cpp
emaTemplate.cpp
|
29d9c1adfadf65e2d847d44bec37746844b9e0e3 |
06-Dec-2009 |
Chris Lattner <sabre@nondot.org> |
remove some extraneous syntax: sourceloc implicitly converts to sourcerange. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90710 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaInit.cpp
emaTemplate.cpp
|
0b560eee5880694f1a23a72d658bf6d27b1fed04 |
06-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix a slight oversight in computing whether a copy constructor is elidable. Fixes PR5695. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90702 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
0336843eb0d04f2d4423189c26ec55b7654b1dec |
06-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix a slight oversight in computing whether a copy constructor is elidable. Fixes PR5695. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90702 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
4186a17226c4900a4aef3c899557e95345c49161 |
06-Dec-2009 |
Anders Carlsson <andersca@mac.com> |
Pass the desired vtable linkage to GenerateVtable directly. Only call MaybeMarkVirtualImplicitMembersReferenced for non-inline functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90686 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
3527225899adf04e7b966e533da72e4550f9c7e5 |
06-Dec-2009 |
Anders Carlsson <andersca@mac.com> |
Pass the desired vtable linkage to GenerateVtable directly. Only call MaybeMarkVirtualImplicitMembersReferenced for non-inline functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90686 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
856171b7e0bef187d0cb6f91a8547507b468c274 |
06-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix for PR5693: shift some code into SetClassDeclAttributesFromBase so that it gets called during template instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90682 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
d013733c73507674b5db55d1686339e45c9e6edf |
06-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix for PR5693: shift some code into SetClassDeclAttributesFromBase so that it gets called during template instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90682 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
1231e1ee9ba5dbbcf3245e0d0578902d011bdc78 |
05-Dec-2009 |
Benjamin Kramer <benny.kra@googlemail.com> |
Avoid trashing two temporary strings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90663 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
0e7049fc6f2cc13d1236630782b702f11f6aaf9f |
05-Dec-2009 |
Benjamin Kramer <benny.kra@googlemail.com> |
Avoid trashing two temporary strings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90663 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
9f4ae74a8c93674ce54d20ceb2a183416c8e95de |
05-Dec-2009 |
Benjamin Kramer <benny.kra@googlemail.com> |
strcasecmp is unportable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90662 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
f42d4886ae4eb37e212d88e78e7c695904f2444e |
05-Dec-2009 |
Benjamin Kramer <benny.kra@googlemail.com> |
strcasecmp is unportable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90662 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
fcae3b19c34cd4aecc5b07a3e46abfb87ca06621 |
05-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve the performance of code completion by 2.2x when completing for ordinary names with Cocoa.h included, by drastically improving the performance of our results sorting. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90661 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
2b0cc12cf1f9fd05ceb2551686641837c7800528 |
05-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Improve the performance of code completion by 2.2x when completing for ordinary names with Cocoa.h included, by drastically improving the performance of our results sorting. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90661 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
f3c65fa67b36fbe6f267cac5cc195d1704caa4cb |
05-Dec-2009 |
Chris Lattner <sabre@nondot.org> |
fix rdar://7446395, a crash on invalid, by fixing a broken assertion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90647 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
02dd4b1e279114cc51422fab8b42a7759421800e |
05-Dec-2009 |
Chris Lattner <sabre@nondot.org> |
fix rdar://7446395, a crash on invalid, by fixing a broken assertion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90647 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
caf383ae337966d67380b6b161fab17ec2b53d04 |
04-Dec-2009 |
John McCall <rjmccall@apple.com> |
Fix "using typename" and the instantiation of non-dependent using declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90614 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
ed97649e9574b9d854fa4d6109c9333ae0993554 |
04-Dec-2009 |
John McCall <rjmccall@apple.com> |
Fix "using typename" and the instantiation of non-dependent using declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90614 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
263de251d8f7a3d24ee50ce1e21b353c9dea5566 |
04-Dec-2009 |
Anders Carlsson <andersca@mac.com> |
Diagnose declarations of implicit member functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90605 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
5c478cf2d54157062cd843737324e0d0df03a464 |
04-Dec-2009 |
Anders Carlsson <andersca@mac.com> |
Diagnose declarations of implicit member functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90605 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f3497adb0e0329bd32c4129cc2ac6e692b7ffcfd |
04-Dec-2009 |
John Thompson <john.thompson.jtsoftware@gmail.com> |
Fix for PR5650 - Revised vector_size attribute handling to be done earlier before declaration is finalized. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90600 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaType.cpp
|
6e132aab867c189b1c3ee7463ef9d2b1f03a294d |
04-Dec-2009 |
John Thompson <John.Thompson.JTSoftware@gmail.com> |
Fix for PR5650 - Revised vector_size attribute handling to be done earlier before declaration is finalized. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90600 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaType.cpp
|
f802f1fc1069baea84d372db4361e5becadbb694 |
04-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Make sure to call PerformObjectMemberConversion where necessary. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90555 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
16c5378c1e3af09a33604e096b3fe20742fc629d |
04-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Make sure to call PerformObjectMemberConversion where necessary. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90555 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
2ed2ca150395db08e9ac31401c2ea00fe10a76b9 |
04-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Make the type of the Decl referred to by a MemberExpr a bit more precise. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90549 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
reeTransform.h
|
f595cc41c4d95fe323f8a2b209523de9956f874d |
04-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Make the type of the Decl referred to by a MemberExpr a bit more precise. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90549 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
reeTransform.h
|
ed499d2ef7d56bd48a9da678e3db71cf00c18013 |
04-Dec-2009 |
Anders Carlsson <andersca@mac.com> |
Make sure that overridden method decls are always canonical. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90542 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
3aaf486af649d6be464e6b937c8181529ffef931 |
04-Dec-2009 |
Anders Carlsson <andersca@mac.com> |
Make sure that overridden method decls are always canonical. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90542 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
dcb5b8c17602418d0ea1359cf7481507a1b7c03f |
04-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix for PR5679: make __builtin_prefetch a bit more flexible in what it accepts as a constant integer. Also, some minor cleanup and improvements to the diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90504 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
9aef7263d84d9224575e113878cfbb06b8343cbf |
04-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix for PR5679: make __builtin_prefetch a bit more flexible in what it accepts as a constant integer. Also, some minor cleanup and improvements to the diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90504 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
746e7b15e3f9776e70cb749cbf78798f1f158232 |
04-Dec-2009 |
John McCall <rjmccall@apple.com> |
When recovering from an invalid forward reference to an enum type in C++, create the enum type in the same scope as you would a record type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90500 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
5023437f5a897d513c08ddf64b74d688252a23e5 |
04-Dec-2009 |
John McCall <rjmccall@apple.com> |
When recovering from an invalid forward reference to an enum type in C++, create the enum type in the same scope as you would a record type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90500 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
2f5b7a8b9a82804a119ac53a8d69aeab48181eb5 |
03-Dec-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
A new helper function to set various bits in the class when a new virtual function is declared/instantiated. it is used in couple of places. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90470 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplateInstantiateDecl.cpp
|
e7184df728bb339633d88c774b5097dd9318cc8a |
03-Dec-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
A new helper function to set various bits in the class when a new virtual function is declared/instantiated. it is used in couple of places. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90470 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplateInstantiateDecl.cpp
|
16d41ca8932b22d587c10391a223844215cd6bfa |
03-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Unify the end-of-class code paths used by the parser and template instantiation, to ensure that we mark class template specilizations as abstract when we need to and perform checking of abstract classes. Also, move the checking that determines whether we are creating a variable of abstract class type *after* we check whether the type is complete. Otherwise, we won't see when we have an abstract class template specialization that is implicitly instantiated by this declaration. This is the "something else" that Sebastian had noted earlier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90467 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaTemplateInstantiate.cpp
|
1ab537be683c31afba3272a61ddd13811967d3be |
03-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Unify the end-of-class code paths used by the parser and template instantiation, to ensure that we mark class template specilizations as abstract when we need to and perform checking of abstract classes. Also, move the checking that determines whether we are creating a variable of abstract class type *after* we check whether the type is complete. Otherwise, we won't see when we have an abstract class template specialization that is implicitly instantiated by this declaration. This is the "something else" that Sebastian had noted earlier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90467 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaTemplateInstantiate.cpp
|
b437ba28cadcc2bdcb2b63797208734703ef3e2e |
03-Dec-2009 |
Anders Carlsson <andersca@mac.com> |
When instantiating a class, if a base specifier is not dependent we still need to copy its attributes down to the instantiated class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90463 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaTemplateInstantiate.cpp
|
51f940457ab20f82c62c2093389763bb9f5187eb |
03-Dec-2009 |
Anders Carlsson <andersca@mac.com> |
When instantiating a class, if a base specifier is not dependent we still need to copy its attributes down to the instantiated class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90463 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaTemplateInstantiate.cpp
|
e96f3144c42b2cc4c1e6a82def00fdf0a8e46810 |
03-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When we're building a CXXExprWithTemporaries, only include those temporaries that are within our current evaluation context. That way, nested evaluation contexts (e.g., within a sizeof() expression) won't see temporaries from outer contexts. Also, make sure to push a new evaluation context when instantiating the initializer of a variable; this may be an unevaluated context or a potentially-evaluated context, depending on whether it's an in-class initializer or not. Fixes PR5672. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90460 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
|
1f5f3a4d58a1c7c50c331b33329fc14563533c04 |
03-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
When we're building a CXXExprWithTemporaries, only include those temporaries that are within our current evaluation context. That way, nested evaluation contexts (e.g., within a sizeof() expression) won't see temporaries from outer contexts. Also, make sure to push a new evaluation context when instantiating the initializer of a variable; this may be an unevaluated context or a potentially-evaluated context, depending on whether it's an in-class initializer or not. Fixes PR5672. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90460 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
|
fbe573a01c289ddb7d50a1981188e21633c3fb82 |
03-Dec-2009 |
John McCall <rjmccall@apple.com> |
Honor using declarations in overload resolution. Most of the code for overloaded-operator resolution is wildly untested, but the parallel code for methods seems to satisfy some trivial tests. Also change some overload-resolution APIs to take a type instead of an expression, which lets us avoid creating a spurious CXXThisExpr when resolving implicit member accesses. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90410 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaOverload.cpp
|
701c89e02cde6e0fb9673cbe7c97eadc74b50358 |
03-Dec-2009 |
John McCall <rjmccall@apple.com> |
Honor using declarations in overload resolution. Most of the code for overloaded-operator resolution is wildly untested, but the parallel code for methods seems to satisfy some trivial tests. Also change some overload-resolution APIs to take a type instead of an expression, which lets us avoid creating a spurious CXXThisExpr when resolving implicit member accesses. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90410 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaOverload.cpp
|
956affe43fe9655a9ffa93ffbc8f0458a854ec58 |
03-Dec-2009 |
John McCall <rjmccall@apple.com> |
Stop stripping UnresolvedUsingDecls out of LookupResults that have other results in them (which we were doing intentionally as a stopgap). Fix an DeclContext lookup-table ordering problem which was causing UsingDecls to show up incorrectly when looking for ordinary results. And oh hey Clang-Code-Syntax passes now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90367 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
fda8e12774921e3cac3ebcba1148bcf4479ddd7a |
03-Dec-2009 |
John McCall <rjmccall@apple.com> |
Stop stripping UnresolvedUsingDecls out of LookupResults that have other results in them (which we were doing intentionally as a stopgap). Fix an DeclContext lookup-table ordering problem which was causing UsingDecls to show up incorrectly when looking for ordinary results. And oh hey Clang-Code-Syntax passes now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90367 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
2409a21ff088c4aab328a9d32fb96502efd9de18 |
02-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve source location information for C++ member initializers in a constructor, by keeping the DeclaratorInfo* rather than just the type and a single location. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90355 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaInit.h
emaTemplateInstantiateDecl.cpp
|
802ab45fea51beff12f386329d4928811a479c6e |
02-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Improve source location information for C++ member initializers in a constructor, by keeping the DeclaratorInfo* rather than just the type and a single location. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90355 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaInit.h
emaTemplateInstantiateDecl.cpp
|
89f54008f8e28161b97c99420263f6f0131a664d |
02-Dec-2009 |
John McCall <rjmccall@apple.com> |
Use a more rigorous definition of 'class member'. I don't have any evidence that this was causing a problem, but it could have. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90343 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
144238edd9349029ae845eefd082224b656359a8 |
02-Dec-2009 |
John McCall <rjmccall@apple.com> |
Use a more rigorous definition of 'class member'. I don't have any evidence that this was causing a problem, but it could have. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90343 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
6d53ea6153217b57da6690128eb80bf3c7233f46 |
02-Dec-2009 |
John McCall <rjmccall@apple.com> |
Recognize that EnumConstantDecls can be found by lookup and are not instance members. Fixes PR5667. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90341 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
336e7743b8e2222d8557e2cf7c100c8f878df630 |
02-Dec-2009 |
John McCall <rjmccall@apple.com> |
Recognize that EnumConstantDecls can be found by lookup and are not instance members. Fixes PR5667. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90341 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
3901b72e9ecb9bc37106905b4f4a6e861a7029b5 |
02-Dec-2009 |
Anders Carlsson <andersca@mac.com> |
In Sema, whenever we think that a function is going to cause a vtable to be generated, we mark any virtual implicit member functions as referenced. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90327 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
|
5ec02ae147760c32ad5b6fb0fec30ab3b3696778 |
02-Dec-2009 |
Anders Carlsson <andersca@mac.com> |
In Sema, whenever we think that a function is going to cause a vtable to be generated, we mark any virtual implicit member functions as referenced. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90327 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
|
54d93fde6518761f600ccc71dad2e9b5e0e93ebf |
02-Dec-2009 |
John McCall <rjmccall@apple.com> |
r90313, in which OverloadedFunctionDecl is removed and never spoken of again. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90313 91177308-0d34-0410-b5e6-96231b3b80d8
ookup.h
emaOverload.cpp
|
51fa86f738a9768fac4e1cad7bdde53774b5b322 |
02-Dec-2009 |
John McCall <rjmccall@apple.com> |
r90313, in which OverloadedFunctionDecl is removed and never spoken of again. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90313 91177308-0d34-0410-b5e6-96231b3b80d8
ookup.h
emaOverload.cpp
|
47240bc8b677020c5653cf8b48fc3c3d7c21dda4 |
02-Dec-2009 |
John McCall <rjmccall@apple.com> |
Rip out the last remaining implicit use of OverloadedFunctionDecl in Sema: LookupResult::getAsSingleDecl() is no more. Shift Sema::LookupSingleName to return null on overloaded results. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90309 91177308-0d34-0410-b5e6-96231b3b80d8
ookup.h
ema.h
emaAttr.cpp
emaCXXScopeSpec.cpp
emaDecl.cpp
emaExpr.cpp
emaExprCXX.cpp
emaLookup.cpp
emaTemplate.cpp
|
1bcee0a5a29981f8c78a8620d1c78841dbc5c348 |
02-Dec-2009 |
John McCall <rjmccall@apple.com> |
Rip out the last remaining implicit use of OverloadedFunctionDecl in Sema: LookupResult::getAsSingleDecl() is no more. Shift Sema::LookupSingleName to return null on overloaded results. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90309 91177308-0d34-0410-b5e6-96231b3b80d8
ookup.h
ema.h
emaAttr.cpp
emaCXXScopeSpec.cpp
emaDecl.cpp
emaExpr.cpp
emaExprCXX.cpp
emaLookup.cpp
emaTemplate.cpp
|
894fc4791408c58549d78f6fa333d7e2c1dd5f4e |
02-Dec-2009 |
John McCall <rjmccall@apple.com> |
Push overloaded function templates through the parser using a totally different leaked data structure than before. This kills off the last remaining explicit uses of OverloadedFunctionDecl in Sema. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90306 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
emaTemplate.cpp
|
0bd6feb9e9d40fc889fd47e899985125a43dfed8 |
02-Dec-2009 |
John McCall <rjmccall@apple.com> |
Push overloaded function templates through the parser using a totally different leaked data structure than before. This kills off the last remaining explicit uses of OverloadedFunctionDecl in Sema. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90306 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
emaTemplate.cpp
|
967cdd314e37ecbc308565af74a1c79466537f99 |
02-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix another "operator delete missing" crash: make sure we don't check isVirtual() before we've actually calculated whether the destructor is virtual. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90303 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
5fcf1f0df06e72581647efd579f970378f77eb55 |
02-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix another "operator delete missing" crash: make sure we don't check isVirtual() before we've actually calculated whether the destructor is virtual. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90303 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
b3c065a56cb6ef8856187a92942467fff03d8609 |
02-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Make sure to call AddOverriddenMethods for implicit copy assignment operators; it's rare, but possible, for the difference to be significant. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90301 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
ca6affd01612fa1e4db78ae40509ac01d661730d |
02-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Make sure to call AddOverriddenMethods for implicit copy assignment operators; it's rare, but possible, for the difference to be significant. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90301 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
132dc9fddfb41b6578ae35b9241b49301864547a |
02-Dec-2009 |
John McCall <rjmccall@apple.com> |
Stop trying to analyze class-hierarchies for dependently-scoped id-expressions; there's nothing interesting we can say now that we're correctly not requiring the qualifier to name a known base class in dependent contexts. Require scope specifiers on member access expressions to name complete types if they're not dependent; delay lookup when they are dependent. Use more appropriate diagnostics when qualified implicit member access expressions find declarations from unrelated classes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90289 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaTemplate.cpp
|
2f841ba3b3fd6babe751667470735651907b4001 |
02-Dec-2009 |
John McCall <rjmccall@apple.com> |
Stop trying to analyze class-hierarchies for dependently-scoped id-expressions; there's nothing interesting we can say now that we're correctly not requiring the qualifier to name a known base class in dependent contexts. Require scope specifiers on member access expressions to name complete types if they're not dependent; delay lookup when they are dependent. Use more appropriate diagnostics when qualified implicit member access expressions find declarations from unrelated classes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90289 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaTemplate.cpp
|
a3968c80ab00f6222fd1f472cf6a10f56ee8c089 |
02-Dec-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Fix a code gen. crash synthesizing a destructor. Fixes pr5660. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90283 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExprCXX.cpp
|
6bc9768408d4b45e00350018b6e3540bc05d267d |
02-Dec-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Fix a code gen. crash synthesizing a destructor. Fixes pr5660. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90283 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExprCXX.cpp
|
97f7dc2bede5bd32ecc23b13b4445267d2e71403 |
01-Dec-2009 |
John McCall <rjmccall@apple.com> |
Fix IsProvablyNotDerivedFrom to always use record definitions when available. Gets clang-on-clang passing again. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90270 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b1b425648c4968824a3ef706b8c0ca35e88e8846 |
01-Dec-2009 |
John McCall <rjmccall@apple.com> |
Fix IsProvablyNotDerivedFrom to always use record definitions when available. Gets clang-on-clang passing again. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90270 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
317ae5eb67c34b9be76e991c7851d72dd355f78d |
01-Dec-2009 |
John McCall <rjmccall@apple.com> |
Rework how we support C++ implicit member accesses. If we can resolve an implicit member access to a specific declaration, go ahead and create it as a DeclRefExpr or a MemberExpr (with implicit CXXThisExpr base) as appropriate. Otherwise, create an UnresolvedMemberExpr or DependentScopeMemberExpr with a null base expression. By representing implicit accesses directly in the AST, we get the ability to correctly delay the decision about whether it's actually an instance member access or not until resolution is complete. This permits us to correctly avoid diagnosing the 'problem' of 'MyType::foo()' where the relationship to the type isn't really known until instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90266 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaOverload.cpp
emaTemplate.cpp
reeTransform.h
|
aa81e1658d87b9011125c632aa902d154ae4b02c |
01-Dec-2009 |
John McCall <rjmccall@apple.com> |
Rework how we support C++ implicit member accesses. If we can resolve an implicit member access to a specific declaration, go ahead and create it as a DeclRefExpr or a MemberExpr (with implicit CXXThisExpr base) as appropriate. Otherwise, create an UnresolvedMemberExpr or DependentScopeMemberExpr with a null base expression. By representing implicit accesses directly in the AST, we get the ability to correctly delay the decision about whether it's actually an instance member access or not until resolution is complete. This permits us to correctly avoid diagnosing the 'problem' of 'MyType::foo()' where the relationship to the type isn't really known until instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90266 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaOverload.cpp
emaTemplate.cpp
reeTransform.h
|
dc8da56001c07f54ea809d33fb2e6ee174aaad46 |
01-Dec-2009 |
Daniel Dunbar <daniel@zuster.org> |
Add {ExternalSemaSource,SemaConsumer}::ForgetSema callback, and update PCHReader to use it so it at least won't try to access Sema once it is gone. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90261 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
|
ec2a4ed278a1112ebf84fdcb80ed66f53d8ec8ba |
01-Dec-2009 |
Daniel Dunbar <daniel@zuster.org> |
Add {ExternalSemaSource,SemaConsumer}::ForgetSema callback, and update PCHReader to use it so it at least won't try to access Sema once it is gone. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90261 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
|
6d5fd14c02db3b2d5532337eb6bce737b12fb7a9 |
01-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Funtion templates and function template specializations do not override virtual functions. Also, eliminate a (now redundant) call to AddOverriddenMethods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90242 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplateInstantiateDecl.cpp
|
e6342c06356976508525145a6ba433d05f893171 |
01-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Funtion templates and function template specializations do not override virtual functions. Also, eliminate a (now redundant) call to AddOverriddenMethods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90242 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplateInstantiateDecl.cpp
|
d16dfb960d267c80b79b7ff7bf3649ebf45fa427 |
01-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Move the checking of overridden virtual functions into the code path common to both parsing and template instantiation, so that we'll find overridden virtuals for member functions of class templates when they are instantiated. Additionally, factor out the checking for pure virtual functions, so that it will be executed both at parsing time and at template instantiation time. These changes fix PR5656 (for real), although one more tweak w.r.t. member function templates will be coming along shortly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90241 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
|
4ba3136b3eb9740a07bd61d0ab23ce9a8d894dee |
01-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Move the checking of overridden virtual functions into the code path common to both parsing and template instantiation, so that we'll find overridden virtuals for member functions of class templates when they are instantiated. Additionally, factor out the checking for pure virtual functions, so that it will be executed both at parsing time and at template instantiation time. These changes fix PR5656 (for real), although one more tweak w.r.t. member function templates will be coming along shortly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90241 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
|
800403606c795e97685f1f95fe494cd20003d776 |
01-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Don't automatically assume that an id-expression refers to a ValueDecl, because that isn't always the case in ill-formed code. Diagnose a common mistake (forgetting to provide a template argument list for a class template, PR5655) and dyn_cast so that we handle the general problem of referring to a non-value declaration gracefully. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90239 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExpr.cpp
|
9af2f52fbcb993350f54e57d498e7849ba29c75d |
01-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Don't automatically assume that an id-expression refers to a ValueDecl, because that isn't always the case in ill-formed code. Diagnose a common mistake (forgetting to provide a template argument list for a class template, PR5655) and dyn_cast so that we handle the general problem of referring to a non-value declaration gracefully. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90239 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExpr.cpp
|
4f5c394adaf0c66a3597b8f3fe18d4eda53e3b44 |
01-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
An inherited virtual (where "virtual" wasn't written explicitly) can be defined as pure. Fixes PR5656. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90237 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d3a505827fd8775ce479498e5726b484336eedd8 |
01-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
An inherited virtual (where "virtual" wasn't written explicitly) can be defined as pure. Fixes PR5656. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90237 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
63b2bd2961598da03211cbd9c5851d7a54363d47 |
01-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Switch the clang-to-CIndex interface for code-completion to a binary format, for a massive speedup git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90209 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
|
2b4074f1d3919e77cb33ca49c960521dea27afab |
01-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Switch the clang-to-CIndex interface for code-completion to a binary format, for a massive speedup git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90209 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
|
caa8b1fc9b3f2920fe94951a5213eed86f9458c8 |
01-Dec-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Eliminate warning in Release-Asserts mode. No functionality change git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90204 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
958aeb04f466588665c104558b1a7fe4c89161ca |
01-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Eliminate warning in Release-Asserts mode. No functionality change git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90204 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ae224672bd3e85428f7d94553e3e607049e2eafc |
01-Dec-2009 |
John McCall <rjmccall@apple.com> |
Fix and test for a problem caught by the clang-on-clang buildbot: qualified IDs in dependent contexts are not dependent if the context names a namespace. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90171 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e1599cee9310e523af40c3c8a5f21be6f7302981 |
01-Dec-2009 |
John McCall <rjmccall@apple.com> |
Fix and test for a problem caught by the clang-on-clang buildbot: qualified IDs in dependent contexts are not dependent if the context names a namespace. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90171 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
5e656295dba37dd0517564fb297e97596ce3e710 |
30-Nov-2009 |
John McCall <rjmccall@apple.com> |
Remove all of Sema's explicit uses of OverloadedFunctionDecl except for those associated with TemplateNames. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90162 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
emaDecl.cpp
emaExpr.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
7dafdf51176d2f52e3a27f1ef70161ea2133ff52 |
30-Nov-2009 |
John McCall <rjmccall@apple.com> |
Remove all of Sema's explicit uses of OverloadedFunctionDecl except for those associated with TemplateNames. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90162 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
emaDecl.cpp
emaExpr.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
abb74cc24e06928418871be6535520b14d714a8e |
30-Nov-2009 |
John McCall <rjmccall@apple.com> |
Eliminate the use of OverloadedFunctionDecl in member expressions. Create a new UnresolvedMemberExpr for these lookups. Assorted hackery around qualified member expressions; this will all go away when we implement the correct (i.e. extremely delayed) implicit-member semantics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90161 91177308-0d34-0410-b5e6-96231b3b80d8
ookup.h
ema.h
emaDecl.cpp
emaExpr.cpp
emaExprCXX.cpp
emaOverload.cpp
reeTransform.h
|
129e2df52ed7e0434b3f1cf1867fd6a5cb083ff6 |
30-Nov-2009 |
John McCall <rjmccall@apple.com> |
Eliminate the use of OverloadedFunctionDecl in member expressions. Create a new UnresolvedMemberExpr for these lookups. Assorted hackery around qualified member expressions; this will all go away when we implement the correct (i.e. extremely delayed) implicit-member semantics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90161 91177308-0d34-0410-b5e6-96231b3b80d8
ookup.h
ema.h
emaDecl.cpp
emaExpr.cpp
emaExprCXX.cpp
emaOverload.cpp
reeTransform.h
|
686986ccccb6e40d3374c7c1669fae76bff03730 |
30-Nov-2009 |
Anders Carlsson <andersca@mac.com> |
When we're trying to define an implicit virtual destructor, make sure that we have a valid delete operator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90156 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
37909808416da93703cecc83091e2b9eab0053d6 |
30-Nov-2009 |
Anders Carlsson <andersca@mac.com> |
When we're trying to define an implicit virtual destructor, make sure that we have a valid delete operator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90156 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
c44208598d88308695d0e7c5a6d7ba3ead6e6904 |
30-Nov-2009 |
Benjamin Kramer <benny.kra@googlemail.com> |
Use StringRef in Attr constructors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90140 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
|
bb377edda2656752016a0bc01fe4f9f8b6f80e19 |
30-Nov-2009 |
Benjamin Kramer <benny.kra@googlemail.com> |
Use StringRef in Attr constructors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90140 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
|
18ab55f97210a8835bdbc7e2aa86966dd3e83ec5 |
29-Nov-2009 |
Benjamin Kramer <benny.kra@googlemail.com> |
Remove useless c_str() calls in SemaCodeComplete. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90088 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
660cc18ba28dac6785ab00350974b4ca57e62ada |
29-Nov-2009 |
Benjamin Kramer <benny.kra@googlemail.com> |
Remove useless c_str() calls in SemaCodeComplete. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90088 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
93d00495aacfd597302e85b8c6bd7c9a7e717295 |
29-Nov-2009 |
Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> |
Don't call Decl::CollectingStats(false) and Stmt::CollectingStats(false). When called with false these functions return whether statistics are enabled. They don't change any state. Since we're not using the return value avoid calling them in the first place. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90077 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
|
7d8a7828d655d03a35407d5e063072bf947e0a40 |
29-Nov-2009 |
Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> |
Don't call Decl::CollectingStats(false) and Stmt::CollectingStats(false). When called with false these functions return whether statistics are enabled. They don't change any state. Since we're not using the return value avoid calling them in the first place. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90077 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
|
c481191979b4ca7f2c5511ce9cc4d0fe65fd1d46 |
29-Nov-2009 |
Sean Hunt <rideau3@gmail.com> |
Add DeclarationName support for C++0x operator literals. They should now work as function names outside of templates - they'll probably cause some damage there as they're largely untested. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90064 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
emaTemplate.cpp
reeTransform.h
|
3e518bda00d710754ca077cf9be8dd821e16a854 |
29-Nov-2009 |
Sean Hunt <rideau3@gmail.com> |
Add DeclarationName support for C++0x operator literals. They should now work as function names outside of templates - they'll probably cause some damage there as they're largely untested. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90064 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
emaTemplate.cpp
reeTransform.h
|
fb3e3709b3fed78813b92fe6f107b97135a148cb |
29-Nov-2009 |
Sean Hunt <rideau3@gmail.com> |
Fix 80-cols violations git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90057 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f4fdd9b58cdfc4c9d375fbc918418023d72f4267 |
29-Nov-2009 |
Sean Hunt <rideau3@gmail.com> |
Fix 80-cols violations git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90057 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
27bfc13423e9aa70bce84e04ae98ade156b2960d |
28-Nov-2009 |
Benjamin Kramer <benny.kra@googlemail.com> |
Remove remaining VISIBILITY_HIDDEN from anonymous namespaces. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90044 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaDeclCXX.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
85b4521e34dcd4a0a4a1f0819e1123128e5a3125 |
28-Nov-2009 |
Benjamin Kramer <benny.kra@googlemail.com> |
Remove remaining VISIBILITY_HIDDEN from anonymous namespaces. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90044 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaDeclCXX.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
df134516dda69eaccca7031f41ca50686401d4c2 |
28-Nov-2009 |
Sean Hunt <rideau3@gmail.com> |
Fix test and handle IK_LiteralOperatorId in a few more places. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90030 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
e6252d1587f98dbac704178e7b2ce53116048310 |
28-Nov-2009 |
Sean Hunt <rideau3@gmail.com> |
Fix test and handle IK_LiteralOperatorId in a few more places. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90030 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
f784707e88e25ad4fd14eab0da1f93f7ad7d5519 |
28-Nov-2009 |
Sean Hunt <rideau3@gmail.com> |
Add Parser support for C++0x literal operators ('operator "" i'). DeclarationName can't handle them yet, so right now Parser just errors out on them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90027 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaType.cpp
|
0486d746019f8310589b1f0d92edcc4bb3916b33 |
28-Nov-2009 |
Sean Hunt <rideau3@gmail.com> |
Add Parser support for C++0x literal operators ('operator "" i'). DeclarationName can't handle them yet, so right now Parser just errors out on them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90027 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaType.cpp
|
13cf977e8adae4823d644c73285fa4b7ec74f9be |
27-Nov-2009 |
Eli Friedman <eli.friedman@gmail.com> |
More work on ScalarExprEmitter::EmitCastExpr: for every cast kind, either implement it explicitly or assert that it doesn't make sense for a scalar. This caught a couple interesting issues: one, CK_BaseToDerivedMemberPointer casts were getting silently miscompiled, and two, Sema was constructing some strange implicit casts of type CK_UserDefinedConversion. The change in SemaExprCXX makes sure the cast kinds are getting set correctly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89987 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
d888962cff03b543fbe9ac6051ec6addf5b993b4 |
27-Nov-2009 |
Eli Friedman <eli.friedman@gmail.com> |
More work on ScalarExprEmitter::EmitCastExpr: for every cast kind, either implement it explicitly or assert that it doesn't make sense for a scalar. This caught a couple interesting issues: one, CK_BaseToDerivedMemberPointer casts were getting silently miscompiled, and two, Sema was constructing some strange implicit casts of type CK_UserDefinedConversion. The change in SemaExprCXX makes sure the cast kinds are getting set correctly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89987 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
3eebdf82f6af3813e980c2eea95a27dfd7bb8d14 |
27-Nov-2009 |
Anders Carlsson <andersca@mac.com> |
Fix thinko. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89983 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
1a68972b541025ee3cc5197cda672bf2d6097d6d |
27-Nov-2009 |
Anders Carlsson <andersca@mac.com> |
Fix thinko. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89983 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
385f7dade39b8b447df9c8e95144bd15593054eb |
26-Nov-2009 |
Anders Carlsson <andersca@mac.com> |
When adding an implicit destructor, make sure to mark it as virtual if it overrides existing destructors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89967 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
d5a942b9118d2dea65b5bfdf0803ef5716a3e68b |
26-Nov-2009 |
Anders Carlsson <andersca@mac.com> |
When adding an implicit destructor, make sure to mark it as virtual if it overrides existing destructors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89967 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
d6fa3ba354329db3b83a07adb3fd2d430471319a |
26-Nov-2009 |
Anders Carlsson <andersca@mac.com> |
Correctly find overridden destructors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89966 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
954968034e801906ec7c0461c36540bbb6d21161 |
26-Nov-2009 |
Anders Carlsson <andersca@mac.com> |
Correctly find overridden destructors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89966 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
25abc98d7bd848e9024a37b35f698cc18aaab06c |
26-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Refactor our handling of expression evaluation contexts, so that Sema maintains a stack of evaluation contexts rather than having the parser do it. This change made it simpler to track in which contexts temporaries were created, so that we could... "Forget" about temporaries created within unevaluated contexts, so that we don't build a CXXExprWithTemporaries and, therefore, destroy the integral-constness of our expressions. Fixes PR5609. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89908 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaExpr.cpp
emaExprCXX.cpp
|
2afce7248b7a362f1e322ad18e43484d575b9c9d |
26-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Refactor our handling of expression evaluation contexts, so that Sema maintains a stack of evaluation contexts rather than having the parser do it. This change made it simpler to track in which contexts temporaries were created, so that we could... "Forget" about temporaries created within unevaluated contexts, so that we don't build a CXXExprWithTemporaries and, therefore, destroy the integral-constness of our expressions. Fixes PR5609. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89908 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaExpr.cpp
emaExprCXX.cpp
|
96c4d512d3ce2f9c900de3ae50623583959bf5a4 |
26-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Allow user re-definition of SEL as well as accessing its fields. This fixes pr5611. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89895 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDecl.cpp
emaExpr.cpp
|
369a3bd9979cf529eed529aa037de713c213e47d |
26-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Allow user re-definition of SEL as well as accessing its fields. This fixes pr5611. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89895 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDecl.cpp
emaExpr.cpp
|
c01f9e5cbcab06ff67a12e97897300bbc40f63e1 |
25-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement the rules in C++ [basic.link] and C99 6.2.2 for computing the linkage of a declaration. Switch the lame (and completely wrong) NamedDecl::hasLinkage() over to using the new NamedDecl::getLinkage(), along with the "can this declaration be a template argument?" check that started all of this. Fixes -fsyntax-only for PR5597. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89891 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
d85b5b9b8fcf53906d9a61649b3657ca0d902017 |
25-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement the rules in C++ [basic.link] and C99 6.2.2 for computing the linkage of a declaration. Switch the lame (and completely wrong) NamedDecl::hasLinkage() over to using the new NamedDecl::getLinkage(), along with the "can this declaration be a template argument?" check that started all of this. Fixes -fsyntax-only for PR5597. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89891 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
7c673affc5085b622fe64d1caa932572962b94f3 |
25-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Better diagnostic on deleted constructor when no initializer name is available. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89885 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
6a587cbd6913117b0eec47bd5e60831607577270 |
25-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Better diagnostic on deleted constructor when no initializer name is available. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89885 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
f5028c7fd91dfc91cab36ab486a1b9e8233200e8 |
25-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement support for default template arguments of function templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89874 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaTemplateDeduction.cpp
|
51ffb0c9d43b2d3fd210e51ecdd67ba5d1790d70 |
25-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement support for default template arguments of function templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89874 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaTemplateDeduction.cpp
|
112ca686f089a6ad06e2f3749ddb5a4e07801543 |
25-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Diagnose ill-formed uses of default template arguments in function templates (in C++98), friend function templates, and out-of-line definitions of members of class templates. Also handles merging of default template arguments from previous declarations of function templates, for C++0x. However, we don't yet make use of those default template arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89872 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaTemplate.cpp
|
5b6d70e2dece713de82612ffbac2f2bc5c367f73 |
25-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Diagnose ill-formed uses of default template arguments in function templates (in C++98), friend function templates, and out-of-line definitions of members of class templates. Also handles merging of default template arguments from previous declarations of function templates, for C++0x. However, we don't yet make use of those default template arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89872 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaTemplate.cpp
|
917b05ad51278b56081f9a2215fc0594e5043198 |
25-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix a thinko where we weren't always performing unary conversions on the switch condition, fixing PR5612 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89864 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
0de55e7e6b8a53c5d1f2e9a811fd0a4ea13ed5b0 |
25-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Fix a thinko where we weren't always performing unary conversions on the switch condition, fixing PR5612 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89864 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
7bf73371652d1894427cd3cda256f4a91198f6e1 |
25-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When the condition of a switch() statement is semantically invalid, still parse the body of the switch to try to avoid spurious diagnostics. Fixes PR5606. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89847 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
be724bab2ba7ad47aebced25e7c8ec551eb72d28 |
25-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
When the condition of a switch() statement is semantically invalid, still parse the body of the switch to try to avoid spurious diagnostics. Fixes PR5606. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89847 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
9ecba16c8c84d153128f0e3ac7873dec01fe3238 |
25-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Don't crash when we re-use a template specialization node for an explicit instantiation. lib/Support/CommandLine.cpp is our test case git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89845 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
d78f598e020c12bf5a8fddc8d08a3be4cff8dc78 |
25-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Don't crash when we re-use a template specialization node for an explicit instantiation. lib/Support/CommandLine.cpp is our test case git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89845 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
d3d4a56ac6c24c0a0181d1560fedc0c4ffe953a8 |
25-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Refactor ActOnFinishSwitchStmt to simplify it further git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89843 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
a0d3ca1ea5578bc736bb71bcec50ab41fefc87b9 |
25-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Refactor ActOnFinishSwitchStmt to simplify it further git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89843 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
fd413c9d4ff7b3cff6ce4ccda94e4a7eff121ad6 |
25-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Refactor ActOnFinishSwitchStmt to simplify and reduce nesting git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89842 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
0be3193b3bc695eb4b0debc7f85bc832026ce862 |
25-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Refactor ActOnFinishSwitchStmt to simplify and reduce nesting git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89842 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
fcbd31311a686139f05764c16e267a537ec879b9 |
25-Nov-2009 |
Sean Hunt <rideau3@gmail.com> |
Parse C++ member check attributes - base_check, hiding, and override. The attributes are currently ignored. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89837 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
7725e67639fa2fe74f8775b7ed884a076ffdbffc |
25-Nov-2009 |
Sean Hunt <rideau3@gmail.com> |
Parse C++ member check attributes - base_check, hiding, and override. The attributes are currently ignored. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89837 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
cc288c291c0b6e71806f376281e8800775e47e6b |
25-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Some fancy footwork to move the decision on how to build casted expression-list AST to Sema. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89827 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
reeTransform.h
|
f88f7ab5adaa11d050270ffee6aa871e855f83b8 |
25-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Some fancy footwork to move the decision on how to build casted expression-list AST to Sema. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89827 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
reeTransform.h
|
e16949907574662cb76b58caf13b1a4601276bc5 |
25-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Eliminate CXXConditionDeclExpr with extreme prejudice. All statements that involve conditions can now hold on to a separate condition declaration (a VarDecl), and will use a DeclRefExpr referring to that VarDecl for the condition expression. ForStmts now have such a VarDecl (I'd missed those in previous commits). Also, since this change reworks the Action interface for if/while/switch/for, use FullExprArg for the full expressions in those expressions, to ensure that we're emitting Note that we are (still) not generating the right cleanups for condition variables in for statements. That will be a follow-on commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89817 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExprCXX.cpp
emaStmt.cpp
reeTransform.h
|
99e9b4d172f6877e6ba5ebe75bb8238721f5e01c |
25-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Eliminate CXXConditionDeclExpr with extreme prejudice. All statements that involve conditions can now hold on to a separate condition declaration (a VarDecl), and will use a DeclRefExpr referring to that VarDecl for the condition expression. ForStmts now have such a VarDecl (I'd missed those in previous commits). Also, since this change reworks the Action interface for if/while/switch/for, use FullExprArg for the full expressions in those expressions, to ensure that we're emitting Note that we are (still) not generating the right cleanups for condition variables in for statements. That will be a follow-on commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89817 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExprCXX.cpp
emaStmt.cpp
reeTransform.h
|
2f9d7b5fa1fa416089a9a72c6092e06cfd5a2f6c |
25-Nov-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Have the parser tell sema whether a member declaration is a function definition. This allows sema to not emit spurious diagnostics in some invalid code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89816 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
d1a7846699a82f85ff3ce6b2e383409537c3f5c5 |
25-Nov-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Have the parser tell sema whether a member declaration is a function definition. This allows sema to not emit spurious diagnostics in some invalid code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89816 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
bfa7aed080e2f6125ed2e30c6d2b300ddbad7005 |
24-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Refactor argument collection of constructor calls using the common routine. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89802 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
|
2fe168fc8979d9640e5babec17fa5cf11400088b |
24-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Refactor argument collection of constructor calls using the common routine. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89802 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
|
64ba265d4b05c2621add63b6d5959ac321bd5dc3 |
24-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Clean up the AST for while loops and fix several problems with cleanups for while loops: 1) Make sure that we destroy the condition variable of a while statement each time through the loop for, e.g., while (shared_ptr<WorkInt> p = getWorkItem()) { // ... } 2) Make sure that we always enter a new cleanup scope for the body of the while loop, even when there is no compound expression, e.g., while (blah) RAIIObject raii(blah+1); git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89800 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
reeTransform.h
|
5656e14d91405417182171a705ed3e3d2d6d7aa3 |
24-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Clean up the AST for while loops and fix several problems with cleanups for while loops: 1) Make sure that we destroy the condition variable of a while statement each time through the loop for, e.g., while (shared_ptr<WorkInt> p = getWorkItem()) { // ... } 2) Make sure that we always enter a new cleanup scope for the body of the while loop, even when there is no compound expression, e.g., while (blah) RAIIObject raii(blah+1); git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89800 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
reeTransform.h
|
f7bd11079effbbb43279795ac5e449308adc8da3 |
24-Nov-2009 |
John McCall <rjmccall@apple.com> |
Fix some major problems dealing with dependently-qualified names in implicit member-reference contexts. Fixes some clang-on-clang asserts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89796 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
26416068d3eb883a280fdceeffa74fffc9131031 |
24-Nov-2009 |
John McCall <rjmccall@apple.com> |
Fix some major problems dealing with dependently-qualified names in implicit member-reference contexts. Fixes some clang-on-clang asserts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89796 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
1faf7c1d3cde66fc92834d1aa08bcfd8e6e2815a |
24-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
More cleanup of argument call collection. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89789 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprCXX.cpp
|
4cd1c706c2bfd3533df563c3b7292c85c7143f31 |
24-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
More cleanup of argument call collection. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89789 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprCXX.cpp
|
47e18bea5f3330ad69725c7d8d23a5a3f862d14e |
24-Nov-2009 |
John McCall <rjmccall@apple.com> |
Rip out TemplateIdRefExpr and make UnresolvedLookupExpr and DependentScopeDeclRefExpr support storing templateids. Unite the common code paths between ActOnDeclarationNameExpr and ActOnTemplateIdExpr. This gets us to a point where we don't need to store function templates in the AST using TemplateNames, which is critical to ripping out OverloadedFunction. Also resolves a few FIXMEs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89785 91177308-0d34-0410-b5e6-96231b3b80d8
ookup.h
ema.h
emaCodeComplete.cpp
emaDeclAttr.cpp
emaExpr.cpp
emaExprCXX.cpp
emaLookup.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
reeTransform.h
|
f7a1a744eba4b29ceb0f20af8f34515d892fdd64 |
24-Nov-2009 |
John McCall <rjmccall@apple.com> |
Rip out TemplateIdRefExpr and make UnresolvedLookupExpr and DependentScopeDeclRefExpr support storing templateids. Unite the common code paths between ActOnDeclarationNameExpr and ActOnTemplateIdExpr. This gets us to a point where we don't need to store function templates in the AST using TemplateNames, which is critical to ripping out OverloadedFunction. Also resolves a few FIXMEs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89785 91177308-0d34-0410-b5e6-96231b3b80d8
ookup.h
ema.h
emaCodeComplete.cpp
emaDeclAttr.cpp
emaExpr.cpp
emaExprCXX.cpp
emaLookup.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
reeTransform.h
|
e076c640003e4d5da7e4f03b31f70b81e9d2c963 |
24-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Refactor collection of call arguments in common code. Add support for variadic collection functions. More to do here. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89781 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprCXX.cpp
|
048f52aa9c9c78538fa369af2fc4b7031a55fa77 |
24-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Refactor collection of call arguments in common code. Add support for variadic collection functions. More to do here. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89781 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprCXX.cpp
|
d434ff383bbe706f27a4e8155e4258785436db2b |
24-Nov-2009 |
Anders Carlsson <andersca@mac.com> |
GNUNullExpr is a valid sentinel even though it isn't of pointer type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89778 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e4d2bdd54c29656f2eba004d6db1e4942f2bfcd9 |
24-Nov-2009 |
Anders Carlsson <andersca@mac.com> |
GNUNullExpr is a valid sentinel even though it isn't of pointer type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89778 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
a4b8172b40e73af01884d28c0e832ab117951eb6 |
24-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Explicitly store the condition variable within switch statements, and make sure that this variable is destroyed when we exit the switch statement. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89776 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
reeTransform.h
|
d3d5301c44138b92bf01286183f5bf310cdd37cf |
24-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Explicitly store the condition variable within switch statements, and make sure that this variable is destroyed when we exit the switch statement. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89776 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
reeTransform.h
|
7f61dfddc2d88f0f5a43ab6627aecdd32639daa3 |
24-Nov-2009 |
Anders Carlsson <andersca@mac.com> |
Fix a crash when "instantiating" VarDecls that are neither type nor value dependent. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89774 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
a244dc3a554f6bf82416697e34f9e96dc1efbb88 |
24-Nov-2009 |
Anders Carlsson <andersca@mac.com> |
Fix a crash when "instantiating" VarDecls that are neither type nor value dependent. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89774 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
318c653d0514791a8fe8794ce7646d21c91b1fac |
24-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Un-break instantiation of if statements with conditional variables git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89767 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
a7605db78f39fa744da94faacee504e7601bb7c5 |
24-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Un-break instantiation of if statements with conditional variables git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89767 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
c4e83f118f11c74fc620eb23729a4f48901bde96 |
24-Nov-2009 |
Anders Carlsson <andersca@mac.com> |
Set the template specialization kind before instantiating the function definition so that the function will have the right linkage. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89740 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
26d6e9d56527b6b52c44b892aed3171a27d98eb6 |
24-Nov-2009 |
Anders Carlsson <andersca@mac.com> |
Set the template specialization kind before instantiating the function definition so that the function will have the right linkage. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89740 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
ccb5a3248dbe899ccd0081c0b4e62e2842956496 |
24-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Explicitly track the condition variable within an "if" statement, rather than burying it in a CXXConditionDeclExpr (that occassionally hides behind implicit conversions). Similar changes for switch, while, and do-while will follow, then the removal of CXXConditionDeclExpr. This commit is the canary. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89717 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
emaStmt.cpp
reeTransform.h
|
8cfe5a784133d90bf329fd20801824a6f71bb8ca |
24-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Explicitly track the condition variable within an "if" statement, rather than burying it in a CXXConditionDeclExpr (that occassionally hides behind implicit conversions). Similar changes for switch, while, and do-while will follow, then the removal of CXXConditionDeclExpr. This commit is the canary. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89717 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
emaStmt.cpp
reeTransform.h
|
2374dbf98b07c128c022762c9b585002b9419989 |
23-Nov-2009 |
Anders Carlsson <andersca@mac.com> |
Convert the && and || operands to bool using standard conversions. Fixes PR5593. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89704 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
a4c98cd60e7151ea6eccfc677742bdbcf58d2a55 |
23-Nov-2009 |
Anders Carlsson <andersca@mac.com> |
Convert the && and || operands to bool using standard conversions. Fixes PR5593. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89704 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
7deb1a5f25fa38306fec3b79129df808fdb90eb6 |
23-Nov-2009 |
Anders Carlsson <andersca@mac.com> |
Handle converting member pointers to bool. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89692 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
bc0e0781da778bd5eb41a810419912893ae20448 |
23-Nov-2009 |
Anders Carlsson <andersca@mac.com> |
Handle converting member pointers to bool. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89692 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
fa5b709bcdedb3e6821f1e9277aa58403717d861 |
23-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Fix a recent regression probably caused by addition of altivec-style type-casts in the parser. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89691 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
|
a79f8b3989558884d9dbbbdbd4da861117345865 |
23-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Fix a recent regression probably caused by addition of altivec-style type-casts in the parser. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89691 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
|
2380a5875ed09da01b8686536e2a4d7577a7bddf |
23-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Make 'SEL' pointer to a builtin type and not an objective-c pointer type. This was a serious mishap and luckily, Ted's test caught that (and patch fixes the test case). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89680 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
04765ac135e0c4e6b78651c2a287d80a32b2b8b9 |
23-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Make 'SEL' pointer to a builtin type and not an objective-c pointer type. This was a serious mishap and luckily, Ted's test caught that (and patch fixes the test case). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89680 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
1c5ecf0835f3153ad95c8972ac6e657717e4ab36 |
23-Nov-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Intercept sizeof and alignof references before they get into ASTContext methods. This fixes a crash when writing sizeof(Incomplete&), and lets ASTContext's methods do the right thing for CodeGen, which fixes PR5590. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89668 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
5d484e8cf710207010720589d89602233de61d01 |
23-Nov-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Intercept sizeof and alignof references before they get into ASTContext methods. This fixes a crash when writing sizeof(Incomplete&), and lets ASTContext's methods do the right thing for CodeGen, which fixes PR5590. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89668 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b4a0a8293aff2c6160e11edb51d8715a670248c6 |
23-Nov-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Let using directives refer to namespace aliases. Fixes PR5479. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89657 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
eb0d8c95b43549ebf1acbb78d597901ace6dc8b7 |
23-Nov-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Let using directives refer to namespace aliases. Fixes PR5479. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89657 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
6f004c558de407237662ee018bd84b897a54b71f |
23-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Require a class type to be complete before probing its conversion functions for a switch condition's conversion to integral or enumeration type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89656 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
f21bac640870db0569e697a8a14f59f6ca069f80 |
23-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Require a class type to be complete before probing its conversion functions for a switch condition's conversion to integral or enumeration type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89656 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
40a5b87dba33d7113618513c375a152c62dcb1a8 |
23-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement conversion from a switch condition with class type to an integral or enumeration type (vi user-defined conversions). Fixes PR5518. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89655 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
84fb9c0be621c9e4ca4e56f67dae2a0bb6e44821 |
23-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement conversion from a switch condition with class type to an integral or enumeration type (vi user-defined conversions). Fixes PR5518. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89655 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
a2dbee58f960e9b6d8b605341cb77460f0493e23 |
23-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve type-checking of templates by distinguishing between members of the current instantiation and members of an unknown specialization when type-checking a qualified-if expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89653 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ac564f3e8d79c44fefa5da5ab1b58484ae781051 |
23-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Improve type-checking of templates by distinguishing between members of the current instantiation and members of an unknown specialization when type-checking a qualified-if expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89653 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
f6778cab8aa6004205ed04418f9fba6fa8b0b5b5 |
23-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Do not mark declarations as used when performing overload resolution. Fixes PR5541 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89652 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExprCXX.cpp
emaOverload.cpp
|
7edfb69ae192d9c1f5b1f32af30130f34f98386e |
23-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Do not mark declarations as used when performing overload resolution. Fixes PR5541 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89652 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExprCXX.cpp
emaOverload.cpp
|
a3f73b773c9a8b982b5ff65a3d3e25cd751a4709 |
23-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Tolerate extraneous "template<>" headers better, downgrading the complaint to a warning and providing a helpful node in the case where the "template<>" header is redundant because the corresponding template-id refers to an explicit specialization. C++0x might still change this behavior, and existing practice is all over the place on the number of "template<>" headers actually needed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89651 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
3ebd75399112dd9ad1c96ee5e7c59df580378cc8 |
23-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Tolerate extraneous "template<>" headers better, downgrading the complaint to a warning and providing a helpful node in the case where the "template<>" header is redundant because the corresponding template-id refers to an explicit specialization. C++0x might still change this behavior, and existing practice is all over the place on the number of "template<>" headers actually needed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89651 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
39e1291cdbae6ce02b7642b12dd39af8762cfa93 |
23-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Centralize and complete the computation of value- and type-dependence for DeclRefExprs git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89649 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaOverload.cpp
emaTemplateInstantiate.cpp
reeTransform.h
|
0da76df9218d7c27b471b0a4d83a5b29fe24e5b4 |
23-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Centralize and complete the computation of value- and type-dependence for DeclRefExprs git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89649 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaOverload.cpp
emaTemplateInstantiate.cpp
reeTransform.h
|
ed9480970db65f8705eeba0760fbe8feefe6389b |
23-Nov-2009 |
John McCall <rjmccall@apple.com> |
Encapsulate "an array of TemplateArgumentLocs and two angle bracket locations" into a new class. Use it pervasively throughout Sema. My fingers hurt. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89638 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
d5532b6cfff2977e0c59fa6ead7f7973984a620d |
23-Nov-2009 |
John McCall <rjmccall@apple.com> |
Encapsulate "an array of TemplateArgumentLocs and two angle bracket locations" into a new class. Use it pervasively throughout Sema. My fingers hurt. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89638 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
44ff8dcd7c461d04668bc3f86aaabce570b0ea1a |
22-Nov-2009 |
John McCall <rjmccall@apple.com> |
Fix LookupResult's sanity-check to handle shadow decls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89624 91177308-0d34-0410-b5e6-96231b3b80d8
ookup.h
|
97d9e21205c8dae85ecce0e7c4a594345f8db582 |
22-Nov-2009 |
John McCall <rjmccall@apple.com> |
Fix LookupResult's sanity-check to handle shadow decls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89624 91177308-0d34-0410-b5e6-96231b3b80d8
ookup.h
|
13ba22dcaf15c9e70c62b752bd4a59862c488cb7 |
22-Nov-2009 |
John McCall <rjmccall@apple.com> |
If a C++ qualified id is followed by a postfix suffix, it is never the direct operand of an addressof operator, and so we should not treat it as an abstract member-pointer expression and therefore suppress the implicit member access. This is really a well-formedness constraint on expressions: a DeclRefExpr of a FieldDecl or a non-static CXXMethodDecl (or template thereof, or unresolved collection thereof) should not be allowed in an arbitrary location in the AST. Arguably it shouldn't be allowed anywhere and we should have a different expr node type for this. But unfortunately we don't have a good way of enforcing this kind of constraint right now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89578 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b681b61fea36618778b8030360e90e3f4641233b |
22-Nov-2009 |
John McCall <rjmccall@apple.com> |
If a C++ qualified id is followed by a postfix suffix, it is never the direct operand of an addressof operator, and so we should not treat it as an abstract member-pointer expression and therefore suppress the implicit member access. This is really a well-formedness constraint on expressions: a DeclRefExpr of a FieldDecl or a non-static CXXMethodDecl (or template thereof, or unresolved collection thereof) should not be allowed in an arbitrary location in the AST. Arguably it shouldn't be allowed anywhere and we should have a different expr node type for this. But unfortunately we don't have a good way of enforcing this kind of constraint right now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89578 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
4dfa4154be99cef496ad6298738b3f52c515dcd2 |
22-Nov-2009 |
John McCall <rjmccall@apple.com> |
Reorganize the intermediate BuildDeclarationNameExpr routines again. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89575 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaTemplateInstantiate.cpp
|
5b3f9130b95c0b73b74a8835d428b1e89397e066 |
22-Nov-2009 |
John McCall <rjmccall@apple.com> |
Reorganize the intermediate BuildDeclarationNameExpr routines again. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89575 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaTemplateInstantiate.cpp
|
331835cdfdc06157ab5143808dd44f3143e9861e |
22-Nov-2009 |
John McCall <rjmccall@apple.com> |
Consider a FunctionTemplate to be an overload all on its lonesome. Track this information through lookup rather than rederiving it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89570 91177308-0d34-0410-b5e6-96231b3b80d8
ookup.h
ema.h
emaCodeComplete.cpp
emaExpr.cpp
emaLookup.cpp
emaOverload.cpp
emaTemplateInstantiate.cpp
|
7453ed4cb2cab113de3378df371b1c6f1243d832 |
22-Nov-2009 |
John McCall <rjmccall@apple.com> |
Consider a FunctionTemplate to be an overload all on its lonesome. Track this information through lookup rather than rederiving it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89570 91177308-0d34-0410-b5e6-96231b3b80d8
ookup.h
ema.h
emaCodeComplete.cpp
emaExpr.cpp
emaLookup.cpp
emaOverload.cpp
emaTemplateInstantiate.cpp
|
a238d6daa15f845738a8b15a3bc9f5b84617744b |
21-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
This patch implements objective-c's 'SEL' type as a built-in type and fixes a long-standing code gen. crash reported in at least two PRs and a radar. (radar 7405040 and pr5025). There are couple of remaining issues that I would like for Ted. and Doug to look at: Ted, please look at failure in Analysis/MissingDealloc.m. I have temporarily added an expected-warning to make the test pass. This tests has a declaration of 'SEL' type which may not co-exist with the new changes. Doug, please look at a FIXME in PCHWriter.cpp/PCHReader.cpp. I think the changes which I have ifdef'ed out are correct. They need be considered for in a few Indexer/PCH test cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89561 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDecl.cpp
|
13dcd00615de5c4279d97bdf63cd5f0a14fd9dcc |
21-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
This patch implements objective-c's 'SEL' type as a built-in type and fixes a long-standing code gen. crash reported in at least two PRs and a radar. (radar 7405040 and pr5025). There are couple of remaining issues that I would like for Ted. and Doug to look at: Ted, please look at failure in Analysis/MissingDealloc.m. I have temporarily added an expected-warning to make the test pass. This tests has a declaration of 'SEL' type which may not co-exist with the new changes. Doug, please look at a FIXME in PCHWriter.cpp/PCHReader.cpp. I think the changes which I have ifdef'ed out are correct. They need be considered for in a few Indexer/PCH test cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89561 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDecl.cpp
|
ee2143abd4497eeb4a022d312aebe8e23a41aa06 |
21-Nov-2009 |
John McCall <rjmccall@apple.com> |
Overload resolution doesn't decide whether to do ADL or not anymore; stopping threading that state. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89557 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaOverload.cpp
|
d2ede7dfbc0d5ba7925a9d2e893af2db6010a855 |
21-Nov-2009 |
John McCall <rjmccall@apple.com> |
Overload resolution doesn't decide whether to do ADL or not anymore; stopping threading that state. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89557 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaOverload.cpp
|
a32612ec0fdca70ce6dea0c7477e64bef1691906 |
21-Nov-2009 |
John McCall <rjmccall@apple.com> |
"Incremental" progress on using expressions, by which I mean totally ripping into pretty much everything about overload resolution in order to wean BuildDeclarationNameExpr off LookupResult::getAsSingleDecl(). Replace UnresolvedFunctionNameExpr with UnresolvedLookupExpr, which generalizes the idea of a non-member lookup that we haven't totally resolved yet, whether by overloading, argument-dependent lookup, or (eventually) the presence of a function template in the lookup results. Incidentally fixes a problem with argument-dependent lookup where we were still performing ADL even when the lookup results contained something from a block scope. Incidentally improves a diagnostic when using an ObjC ivar from a class method. This just fell out from rewriting BuildDeclarationNameExpr's interaction with lookup, and I'm too apathetic to break it out. The only remaining uses of OverloadedFunctionDecl that I know of are in TemplateName and MemberExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89544 91177308-0d34-0410-b5e6-96231b3b80d8
ookup.h
ema.h
emaCodeComplete.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaLookup.cpp
emaOverload.cpp
emaTemplateInstantiate.cpp
reeTransform.h
|
ba13543329afac4a0d01304ec2ec4924d99306a6 |
21-Nov-2009 |
John McCall <rjmccall@apple.com> |
"Incremental" progress on using expressions, by which I mean totally ripping into pretty much everything about overload resolution in order to wean BuildDeclarationNameExpr off LookupResult::getAsSingleDecl(). Replace UnresolvedFunctionNameExpr with UnresolvedLookupExpr, which generalizes the idea of a non-member lookup that we haven't totally resolved yet, whether by overloading, argument-dependent lookup, or (eventually) the presence of a function template in the lookup results. Incidentally fixes a problem with argument-dependent lookup where we were still performing ADL even when the lookup results contained something from a block scope. Incidentally improves a diagnostic when using an ObjC ivar from a class method. This just fell out from rewriting BuildDeclarationNameExpr's interaction with lookup, and I'm too apathetic to break it out. The only remaining uses of OverloadedFunctionDecl that I know of are in TemplateName and MemberExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89544 91177308-0d34-0410-b5e6-96231b3b80d8
ookup.h
ema.h
emaCodeComplete.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaLookup.cpp
emaOverload.cpp
emaTemplateInstantiate.cpp
reeTransform.h
|
53529e8c71aa94b2ea008510a577d59ba8afe3f6 |
21-Nov-2009 |
Sean Hunt <rideau3@gmail.com> |
Added rudimentary C++0x attribute support. The following attributes are currently supported in C++0x attribute lists (and in GNU ones as well): - align() - semantics believed to be conformant to n3000, except for redeclarations and what entities it may apply to - final - semantics believed to be conformant to CWG issue 817's proposed wording, except for redeclarations - noreturn - semantics believed to be conformant to n3000, except for redeclarations - carries_dependency - currently ignored (this is an optimization hint) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89543 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
|
bbd37c62e34db3f5a95c899723484a76c71d7757 |
21-Nov-2009 |
Sean Hunt <rideau3@gmail.com> |
Added rudimentary C++0x attribute support. The following attributes are currently supported in C++0x attribute lists (and in GNU ones as well): - align() - semantics believed to be conformant to n3000, except for redeclarations and what entities it may apply to - final - semantics believed to be conformant to CWG issue 817's proposed wording, except for redeclarations - noreturn - semantics believed to be conformant to n3000, except for redeclarations - carries_dependency - currently ignored (this is an optimization hint) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89543 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
|
51d8507971945b0b848ecedf74cafda48d2268be |
21-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Cope with extraneous "template" keyword when providing an out-of-line definition of a member template (or a member thereof). Fixes PR5566. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89512 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
reeTransform.h
|
a481edb1b11c956a46cb42cd0dc4dd9851c10801 |
21-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Cope with extraneous "template" keyword when providing an out-of-line definition of a member template (or a member thereof). Fixes PR5566. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89512 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
reeTransform.h
|
f1408014375a5a65a277e8aa177055878939490f |
20-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement C++ [basic.lookup.classref]p3, which states how the type name 'T' is looked up in the expression t.~T() Previously, we weren't looking into the type of "t", and therefore would fail when T actually referred to an injected-class-name. Fixes PR5530. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89493 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
f6e6fc801c700c7b8ac202ddbe550d9843a816fc |
20-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement C++ [basic.lookup.classref]p3, which states how the type name 'T' is looked up in the expression t.~T() Previously, we weren't looking into the type of "t", and therefore would fail when T actually referred to an injected-class-name. Fixes PR5530. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89493 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
0cf5065595a6225cbfb9ab9cde0f4cea9a26ab00 |
20-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When checking the base object of a member access expression (b.foo, b->foo), don't look through pointers unless we have an -> operator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89480 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
31658dfe908d07666e2820ced8443a9a1988f1eb |
20-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
When checking the base object of a member access expression (b.foo, b->foo), don't look through pointers unless we have an -> operator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89480 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
7669b3c5eead19744f3d05f9774f62da8fdc652c |
20-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Teach FixOverloadedFunctionReference to build new expression ASTs rather than tweaking existing ASTs, since we were (*gasp*) stomping on ASTs within templates. I'm glad we found this little stick of TNT early... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89475 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
699ee52b2f383b62865013c3575510b520055811 |
20-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Teach FixOverloadedFunctionReference to build new expression ASTs rather than tweaking existing ASTs, since we were (*gasp*) stomping on ASTs within templates. I'm glad we found this little stick of TNT early... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89475 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
ee7bf8770882f83fa92405f80a94e914f1a0ffe6 |
20-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Don't build an explicit conversion to a reference type git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89441 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
e44201a2841a38cc4165f630afd1709e7d9cd752 |
20-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Don't build an explicit conversion to a reference type git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89441 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
666a73769f51a2ab11780baa84afdc85a584c803 |
20-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When we have a non-dependent expression such as A::f that occurs within a non-static member function with a type-dependent "this", don't consider this to be a case for introduction of an implicit "(*this)." to refer to a specific member function unless we know (at template definition time) that A is a base class of *this. There is some disagreement here between GCC, EDG, and Clang about the handling of this case. I believe that Clang now has the correct, literal interpretation of the standard, but have asked for clarification (c++std-core-15483). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89425 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
f3c1f0e13614d384f77b2b1fdea386c74c407d0f |
20-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
When we have a non-dependent expression such as A::f that occurs within a non-static member function with a type-dependent "this", don't consider this to be a case for introduction of an implicit "(*this)." to refer to a specific member function unless we know (at template definition time) that A is a base class of *this. There is some disagreement here between GCC, EDG, and Clang about the handling of this case. I believe that Clang now has the correct, literal interpretation of the standard, but have asked for clarification (c++std-core-15483). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89425 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
8182d63828ad84eed671cf412935b0505f7d2256 |
20-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Deduce a ConstantArrayType from a value-dependent initializer list rather than punting to a DependentSizedArrayType, tightening up our type checking for template definitions. Thanks, John! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89407 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
73460a32bc5299a5927d23d2e464d72af796eabf |
20-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Deduce a ConstantArrayType from a value-dependent initializer list rather than punting to a DependentSizedArrayType, tightening up our type checking for template definitions. Thanks, John! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89407 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
ccb556aedb901dfaad70f5ea8b815e7c47a533e6 |
19-Nov-2009 |
John McCall <rjmccall@apple.com> |
Draw a brighter line between "unresolved" expressions, where we have done the appropriate lookup and simply can't resolve the referrent yet, and "dependent scope" expressions, where we can't do the lookup yet because the entity we need to look into is a dependent type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89402 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaTemplate.cpp
reeTransform.h
|
865d447ac6a4721ab58e898d014a21f2eff74b06 |
19-Nov-2009 |
John McCall <rjmccall@apple.com> |
Draw a brighter line between "unresolved" expressions, where we have done the appropriate lookup and simply can't resolve the referrent yet, and "dependent scope" expressions, where we can't do the lookup yet because the entity we need to look into is a dependent type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89402 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaTemplate.cpp
reeTransform.h
|
1afca66f4228d6acdc8ef2bf31a032184a36d506 |
19-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Don't issue spurious diagnostic with Obj-C fast enumeration. (radar 7409165). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89400 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaStmt.cpp
|
a7cf23a72b0846fc5aacf3f38bb8c8f9e76784cf |
19-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Don't issue spurious diagnostic with Obj-C fast enumeration. (radar 7409165). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89400 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaStmt.cpp
|
1a2b2add8f4847b23bcd2a59cf7d61a5f54f8a81 |
19-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to implement new-operators with default args. Fixes pr5547. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89370 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
498429fa24555ac1c849d8bc6a893d29bd3da4b6 |
19-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to implement new-operators with default args. Fixes pr5547. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89370 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
393c00d16a75731eceb7f815751722e4b4a950e4 |
19-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Cope with an amusingly little anomaly with dependent types and incomplete array initialization, where we have the following in a template: int a[] = { 1, 2, something-value-dependent }; // ... sizeof(a); The type of "a" appears to be a non-dependent IncompleteArrayType, but treating it as such makes the sizeof(a) fail at template definition time. We now correctly handle this by morphing the IncompleteArrayType into a DependentSizedArrayType with a NULL expression, indicating that its size has no corresponding expression (and, therefore, the type is distinct from others). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89366 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
cb78d8852a454684c987220132cdb5e54dd00121 |
19-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Cope with an amusingly little anomaly with dependent types and incomplete array initialization, where we have the following in a template: int a[] = { 1, 2, something-value-dependent }; // ... sizeof(a); The type of "a" appears to be a non-dependent IncompleteArrayType, but treating it as such makes the sizeof(a) fail at template definition time. We now correctly handle this by morphing the IncompleteArrayType into a DependentSizedArrayType with a NULL expression, indicating that its size has no corresponding expression (and, therefore, the type is distinct from others). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89366 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
ef7852884e0ae4748a7e2e91e7961b623062a4f4 |
19-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Objective-C code completion within properties after "setter = " or "getter = ", to provide suitable method names. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89334 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
|
4ad9685b3e2d5e2923c9cda7baaf7973ef0b1c62 |
19-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Objective-C code completion within properties after "setter = " or "getter = ", to provide suitable method names. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89334 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
|
e01238c4317c2bd5cfceec1dcd5acea6de2f05f4 |
19-Nov-2009 |
Eli Friedman <eli.friedman@gmail.com> |
The sub-statement of a case statement is not an unevaluated context! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89303 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
264c1f8ec895952466eab59b84b8b06801e721fa |
19-Nov-2009 |
Eli Friedman <eli.friedman@gmail.com> |
The sub-statement of a case statement is not an unevaluated context! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89303 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
6e60f5fab8203f51b1eac69c8f071c786d5fa39e |
19-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve code completion for Objective-C message sends, so that we provide completion results before each keyword argument, e.g., [foo Method:arg WithArg1:arg1 WithArg2:arg2] We now complete before "WithArg1" and before "WithArg2", in addition to completing before "Method". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89290 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
|
d3c6854153fd6bc6a412a29e4491dbd0a47bdb14 |
19-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Improve code completion for Objective-C message sends, so that we provide completion results before each keyword argument, e.g., [foo Method:arg WithArg1:arg1 WithArg2:arg2] We now complete before "WithArg1" and before "WithArg2", in addition to completing before "Method". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89290 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
|
27a83994bf18e991170d370e11b6d7ac7aa9d6f0 |
19-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve the accuracy of code completion for the attributes of an @property declaration, so that we don't produce completions for attributes that would conflict with already-specified attributes git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89281 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
988358f218e00f1918d4a46c9b2340ec2980ded2 |
19-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Improve the accuracy of code completion for the attributes of an @property declaration, so that we don't produce completions for attributes that would conflict with already-specified attributes git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89281 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
7ee33727703b1972fced6a6e0fb4aee656d8b4a6 |
19-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve code-completion results for the flags in an @property declaration by providing patterns for "getter = <method>" and "setter = <method>". As part of this, invented a new "pattern" result kind that is merely a semantic string. The "pattern" result kind should help with other kinds of code templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89277 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
|
54f016150acf7e0d4dab702d3d7d5e40ba1fdebf |
19-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Improve code-completion results for the flags in an @property declaration by providing patterns for "getter = <method>" and "setter = <method>". As part of this, invented a new "pattern" result kind that is merely a semantic string. The "pattern" result kind should help with other kinds of code templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89277 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
|
74ae1c6338d2c1d1160ff1954d2983fb57276c59 |
19-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Do not enter forward class 'Protocol' in decl context. Will do it later. Fixes pr5552. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89269 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
10324db994455a9a1520be6cfe5bb29685cde141 |
19-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Do not enter forward class 'Protocol' in decl context. Will do it later. Fixes pr5552. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89269 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
0810eea13d9a973eddd663952e5a3d6833f00cac |
19-Nov-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Do overload resolution for compound assignment even if only the RHS is overloadable. Compound assignment may be overloaded as a non-member, and anyway the overload resolution is necessary because it triggers implicit (used-defined) conversions. Fixes PR5512, but not really the deeper issues lurking. Those are standard defects. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89268 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
275c2b47a1dc200d6b55dd867bdfeb7a91b8d876 |
19-Nov-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Do overload resolution for compound assignment even if only the RHS is overloadable. Compound assignment may be overloaded as a non-member, and anyway the overload resolution is necessary because it triggers implicit (used-defined) conversions. Fixes PR5512, but not really the deeper issues lurking. Those are standard defects. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89268 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
3d682f21889a52f57b244e4c3635f1640ecb52f1 |
19-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Rename CodeCompleteObjCProperty to something more specific. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89267 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
|
a93b108e025ef2480fa867cc533e7781a40a639b |
19-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Rename CodeCompleteObjCProperty to something more specific. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89267 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
|
2359600f15eeb83b24ae675045a07cd239a629c2 |
18-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Code completion after @dynamic git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89265 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
|
424b2a546dbd09cf70d43087771c7fff851ca158 |
18-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Code completion after @dynamic git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89265 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
|
1c23b3ff07ff44e67f0bbc0cc55e2268da57912f |
18-Nov-2009 |
John McCall <rjmccall@apple.com> |
Overhaul previous-declaration and overload checking to work on lookup results rather than NamedDecl*. This is a major step towards eliminating OverloadedFunctionDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89263 91177308-0d34-0410-b5e6-96231b3b80d8
ookup.h
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaLookup.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
6826314938f8510cd1a6b03b5d032592456ae27b |
18-Nov-2009 |
John McCall <rjmccall@apple.com> |
Overhaul previous-declaration and overload checking to work on lookup results rather than NamedDecl*. This is a major step towards eliminating OverloadedFunctionDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89263 91177308-0d34-0410-b5e6-96231b3b80d8
ookup.h
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaLookup.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
a6a4e66b9a313407931ac91b941221b013080b3a |
18-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Code completion for Objective-C @synthesized. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89259 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
|
322328b8a65ad2e45829eb06d245addb64037f6f |
18-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Code completion for Objective-C @synthesized. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89259 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
|
d04bc067c5168a9678985b088a7d82a982876298 |
18-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
ignore parens surounding the type when diagnosing pointer-to-member cast types used in expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89255 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
19d70731388c4ed84d9270ddc5b1937218dcf572 |
18-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
ignore parens surounding the type when diagnosing pointer-to-member cast types used in expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89255 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
c764354133398d5decdb8f88b72e6c008c93bbbd |
18-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
This patch fixes a bug in misdiagnosing correct use of pointer to data member. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89251 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
05ebda9490e15f900edb2e5c690e067abcb37b2e |
18-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
This patch fixes a bug in misdiagnosing correct use of pointer to data member. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89251 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
589887b8e062c3969175d9923d1509c8314c042a |
18-Nov-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Track overriding methods when instantiating a template class. Fixes PR5550. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89248 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplateInstantiateDecl.cpp
|
a165da09c0313309d2d4dda42d0b2d4096a372a1 |
18-Nov-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Track overriding methods when instantiating a template class. Fixes PR5550. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89248 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplateInstantiateDecl.cpp
|
10808770cce93335d8c7cbf566bb589c022f0eb4 |
18-Nov-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Pretend destructors are const and volatile. This allows calling them with const and/or volatile objects. Fixes PR5548. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89244 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
65bdbfa6ca6b9a1170e052cc567d098d0f99cdae |
18-Nov-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Pretend destructors are const and volatile. This allows calling them with const and/or volatile objects. Fixes PR5548. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89244 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
fc54427abbd454163d6b62f49a2dcec9b63a1d56 |
18-Nov-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Don't generate superfluous and ambiguous built-in candidates for multi-level array subscript and arithmetic. Fixes PR5546. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89242 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
a9efadada0430493a4d68b34b2e76580d0fd8f10 |
18-Nov-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Don't generate superfluous and ambiguous built-in candidates for multi-level array subscript and arithmetic. Fixes PR5546. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89242 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
502995460462ad6a49a9cbb84dab33d7ea75b437 |
18-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement code completion for Objective-C category names in @interface and @implementation declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89223 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
|
33ced0b8550f3e7169f326944731ee02e9338659 |
18-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement code completion for Objective-C category names in @interface and @implementation declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89223 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
|
36b3afb0afe028b54c179f8a3f284b676d255e7d |
18-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Don't warn if objc method param types in declaration and implementation mismatch in their qualifiers only. This will match similar behavior in c/c++ and fixes radar 7211653. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89220 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
3393f8157a11627fd52889fbc3fd279f6704d5d4 |
18-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Don't warn if objc method param types in declaration and implementation mismatch in their qualifiers only. This will match similar behavior in c/c++ and fixes radar 7211653. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89220 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
fcffbe7ac7f3c0b86bbef40990ccbeadc6ffdcee |
18-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Improve on diagnosing type mismatches because of lack of viable convesion functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89216 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaOverload.cpp
|
cc5306ac8a39cdd5e7f83e597cba911e97c4a595 |
18-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Improve on diagnosing type mismatches because of lack of viable convesion functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89216 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaOverload.cpp
|
6e9503346648da21feedcf6eea76a893bc0531cd |
18-Nov-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
CastsAwayConstness shouldn't care if member pointers point into different classes. Fixes PR5545. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89215 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
76d69bb7f984c390f90504a06dfc7485387ffdd7 |
18-Nov-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
CastsAwayConstness shouldn't care if member pointers point into different classes. Fixes PR5545. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89215 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
11881a45ef70f5107501a89e82e2a328b24ecf6c |
18-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Code completion for Objective-C class names after @interface, @implementation, and in the declaration of the superclass of an @interface. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89207 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
|
3b49aca913dc0c1838321b9bb2dc9a4cb4681922 |
18-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Code completion for Objective-C class names after @interface, @implementation, and in the declaration of the superclass of an @interface. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89207 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
|
3f6ba19a0b24bd9b4943e60a03b74966430382ad |
18-Nov-2009 |
John McCall <rjmccall@apple.com> |
Split LookupResult into its own header. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89199 91177308-0d34-0410-b5e6-96231b3b80d8
ookup.h
ema.h
emaAttr.cpp
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaLookup.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
7d384dd5ace9ae9a22a69e700d2cacb256bc6c69 |
18-Nov-2009 |
John McCall <rjmccall@apple.com> |
Split LookupResult into its own header. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89199 91177308-0d34-0410-b5e6-96231b3b80d8
ookup.h
ema.h
emaAttr.cpp
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaLookup.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
16a726b129e225e2560927f8e9668ddeb5d8f492 |
18-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Code completion after @property, providing the names of forward-declared properties git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89196 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
|
083128f6b13dfa4fc615a838c49b516d901b1ac0 |
18-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Code completion after @property, providing the names of forward-declared properties git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89196 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
|
c7d37b2f351456c5bff6ef45303fb6323c05355a |
18-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Code completion for Objective-C properly lists git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89194 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
|
55385fe3e723cd675001e45f42d61adde6b7f075 |
18-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Code completion for Objective-C properly lists git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89194 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
|
4fb1b69eed865d47e05f6b9ddde638311d277714 |
18-Nov-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Make CreateOverloadedUnaryOp build the correct node for postinc/dec operators. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89192 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
4c3b8962291d4255e6f4e27080efefa5ff01dabf |
18-Nov-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Make CreateOverloadedUnaryOp build the correct node for postinc/dec operators. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89192 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
5371a6cae331e4b131e25643c27dd213313d859c |
18-Nov-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Simplify ActOnPostfixUnaryOp. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89188 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e4216e9d76635279fed9d5ee796872d9b8e5dc1e |
18-Nov-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Simplify ActOnPostfixUnaryOp. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89188 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
9d020f660eea532c69449d77862f842b1538c62b |
18-Nov-2009 |
John McCall <rjmccall@apple.com> |
Incremental progress on using declarations. Split UnresolvedUsingDecl into two classes, one for typenames and one for values; this seems to have some support from Doug if not necessarily from the extremely-vague-on-this-point standard. Track the location of the 'typename' keyword in a using-typename decl. Make a new lookup result for unresolved values and deal with it in most places. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89184 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaLookup.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
7ba107a1863ddfa1664555854f0d7bdb3c491c92 |
18-Nov-2009 |
John McCall <rjmccall@apple.com> |
Incremental progress on using declarations. Split UnresolvedUsingDecl into two classes, one for typenames and one for values; this seems to have some support from Doug if not necessarily from the extremely-vague-on-this-point standard. Track the location of the 'typename' keyword in a using-typename decl. Make a new lookup result for unresolved values and deal with it in most places. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89184 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaLookup.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
2f36d1f5205d90f279af957f8abba35aed93e1fe |
18-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Code completion for member accesses that involve Objective-C properties and instance variables git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89182 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
95ac6556a5dfc504491103c37f9aa05b303d2729 |
18-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Code completion for member accesses that involve Objective-C properties and instance variables git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89182 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
6b495ae9252abb223f865086fc35ef840660847c |
18-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Eliminate some completely-redundant lookups git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89181 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
a14cd1111f5daf6891be4f3c9e534a75b5ce6294 |
18-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Eliminate some completely-redundant lookups git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89181 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
9ec12f17d85a21547ddd0a4d998edd06ebae6bbe |
18-Nov-2009 |
Eli Friedman <eli.friedman@gmail.com> |
PR5520: Make sure to check whether the base type is complete before looking for operator->. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89180 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
f43fb722f6bf048d548659ad326cfb1cfc14420b |
18-Nov-2009 |
Eli Friedman <eli.friedman@gmail.com> |
PR5520: Make sure to check whether the base type is complete before looking for operator->. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89180 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
d1448cac120e790d85643475f88a02ede2fb53fa |
18-Nov-2009 |
Ted Kremenek <kremenek@apple.com> |
Add SourceLocations to ObjCClassDecl for the class identifiers referenced by @class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89170 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
321c22f1c4271c3d9a3d4d3fc18847f948ab595b |
18-Nov-2009 |
Ted Kremenek <kremenek@apple.com> |
Add SourceLocations to ObjCClassDecl for the class identifiers referenced by @class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89170 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
1ed2d7186f193d0976586dae7dd2f548f42e7191 |
18-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Finish code completion for Objective-C message sends git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89168 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
f74a419b7219d050e1e40ff920d30832e903e5a8 |
18-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Finish code completion for Objective-C message sends git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89168 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
cc63b0ae295c41df978ae287d9fbf452394553bf |
18-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Rename Objective-C message send completion functions to indicate that we're referring to message sends git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89164 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
|
60b01cc44855d62979f76dc4cdffa4277f321049 |
18-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Rename Objective-C message send completion functions to indicate that we're referring to message sends git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89164 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
|
9201d5cde8e918dc2f7272b8fcbcde96c245a567 |
18-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Refactor code-completion support for message sends, collecting the code to find and add Objective-C methods (starting at an ObjCContainerDecl) into a single, static function. Also, make sure that we search into the implementations of classes and categories to find even more methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89163 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
36ecb0461977afeb8620d773e938ab4719718a5f |
18-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Refactor code-completion support for message sends, collecting the code to find and add Objective-C methods (starting at an ObjCContainerDecl) into a single, static function. Also, make sure that we search into the implementations of classes and categories to find even more methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89163 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
47c04774d0e646160cb4cbc2ae1ea9f2e5df04d7 |
18-Nov-2009 |
Ted Kremenek <kremenek@apple.com> |
Pass source locations of identifiers referenced by @class through Action::ActOnForwardClassDeclaration(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89162 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
c09cba67d0ad01e53e0fed07322e95dd281bcfd9 |
18-Nov-2009 |
Ted Kremenek <kremenek@apple.com> |
Pass source locations of identifiers referenced by @class through Action::ActOnForwardClassDeclaration(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89162 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
9ded0033a8b194fe90bfc969551d0c3c93504ede |
17-Nov-2009 |
Ted Kremenek <kremenek@apple.com> |
Do not register ObjCInterfaceDecls implicitly created by @class in the current DeclContext. These "imaginary" declarations pose issues for clients searching DeclContext for actual declarations. Instead, register them for name lookup, and add the ObjCInterfaceDecl later to the DeclContext when we hit an actual @interface declaration. This also fixes a bug where the invariant that the Decls in a DeclContext are sorted in order of their appearance is no longer violated. What could happen is that an @class causes an ObjCInterfaceDecl to get added first to the DeclContext, then the ObjCClassDecl itself is added, and then later the SourceLocation of the ObjCInterfaceDecl is updated with the correct location (which is later in the file). This breaks an assumed invariant in ResolveLocation.cpp (and possibly other clients). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89160 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
c32b1d82c1f6d0f0d6c615beb3b6bdfbfbea7098 |
17-Nov-2009 |
Ted Kremenek <kremenek@apple.com> |
Do not register ObjCInterfaceDecls implicitly created by @class in the current DeclContext. These "imaginary" declarations pose issues for clients searching DeclContext for actual declarations. Instead, register them for name lookup, and add the ObjCInterfaceDecl later to the DeclContext when we hit an actual @interface declaration. This also fixes a bug where the invariant that the Decls in a DeclContext are sorted in order of their appearance is no longer violated. What could happen is that an @class causes an ObjCInterfaceDecl to get added first to the DeclContext, then the ObjCClassDecl itself is added, and then later the SourceLocation of the ObjCInterfaceDecl is updated with the correct location (which is later in the file). This breaks an assumed invariant in ResolveLocation.cpp (and possibly other clients). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89160 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
2987e3bb32d74addb4bdfb4627cc2e52cdadca66 |
17-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve location information when adding conversion candidates git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89141 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
0a0d1ac3bd993ea998c3ed8134ddc85b22436943 |
17-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Improve location information when adding conversion candidates git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89141 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
41bfc9ad25d823ddb6a4d6f8df89491965b67531 |
17-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Start support of weak_import objective-c classes. (Radar 6815425). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89124 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaDeclObjC.cpp
|
5f8f8571c52dbf12fdefb15d2fedbcccb212c15c |
17-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Start support of weak_import objective-c classes. (Radar 6815425). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89124 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaDeclObjC.cpp
|
caa6e1b62b09f5a619dddaf10da7f849c8473c3e |
17-Nov-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Adjust format attribute index for implicit object arguments. Fixes PR5521. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89113 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDeclAttr.cpp
|
4a2614e94672c47395abcde60518776fbebec589 |
17-Nov-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Adjust format attribute index for implicit object arguments. Fixes PR5521. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89113 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDeclAttr.cpp
|
c6a9cb91565a061abbf01323cc92120cf8cb7db3 |
17-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement code completion for Objective-C message sends to "super". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89112 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
24a069f5ebf441d86eaec7524365101adf6b2aeb |
17-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement code completion for Objective-C message sends to "super". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89112 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
6b16b29529787b8d7b5403b0e338d6aff587db9f |
17-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Fixes a typo, reported by Doug. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89107 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
|
1ac7104947020a60430ba6f519cd5869af77046f |
17-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Fixes a typo, reported by Doug. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89107 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
|
b509f6af7bf1a2c7dccf8a0f753ccca36c42c3fb |
17-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Augment code-completion results to provide argument names and placeholder arguments for Objective-C message sends. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89103 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
9630eb6e375c4477d7fd7fd72ddfa64bb6685a03 |
17-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Augment code-completion results to provide argument names and placeholder arguments for Objective-C message sends. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89103 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
ab9c3e9089b542af76352ac862a71b4fe709a958 |
17-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
StringRef'ify CodeCompletionString git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89102 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
|
92eff466867fd6a82fb3e245f2091e96a3e9888e |
17-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
StringRef'ify CodeCompletionString git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89102 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
|
21ffdc6fe2cbf7ff67b1aae655fb9a10ac037e06 |
17-Nov-2009 |
John McCall <rjmccall@apple.com> |
Temporarily unbreak the clang-on-llvm tests. :) Not going to fix unresolved lookup all in a night. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89089 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
5b47faf3543ac4435297e37877372d34d440a9fd |
17-Nov-2009 |
John McCall <rjmccall@apple.com> |
Temporarily unbreak the clang-on-llvm tests. :) Not going to fix unresolved lookup all in a night. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89089 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
fe4e764c4d61fba5cf6c073d450b0eccee6186c4 |
17-Nov-2009 |
John McCall <rjmccall@apple.com> |
Store "sugared" decls in LookupResults (i.e. decl aliases like using declarations); strip the sugar off in getFoundDecl() and getAsSingleDecl(), but leave it on for clients like overload resolution who want to use the iterators. Refactor a few pieces of overload resolution to strip off using declarations in a single place. Don't do anything useful with the extra context knowledge yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89061 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaLookup.cpp
emaOverload.cpp
|
314be4e7d8ef86202b0ec8e9ff0dcef853db3320 |
17-Nov-2009 |
John McCall <rjmccall@apple.com> |
Store "sugared" decls in LookupResults (i.e. decl aliases like using declarations); strip the sugar off in getFoundDecl() and getAsSingleDecl(), but leave it on for clients like overload resolution who want to use the iterators. Refactor a few pieces of overload resolution to strip off using declarations in a single place. Don't do anything useful with the extra context knowledge yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89061 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaLookup.cpp
emaOverload.cpp
|
660f0a0ecd56cfda36aa921a6c68b065e2e4988f |
17-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Silence some warnings produced by Clang, and add a missing header git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89051 91177308-0d34-0410-b5e6-96231b3b80d8
umpDiagnostics.cpp
arseAST.cpp
emaDeclCXX.cpp
|
6490ae5003226cae28f980648948bea8b21a8638 |
17-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Silence some warnings produced by Clang, and add a missing header git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89051 91177308-0d34-0410-b5e6-96231b3b80d8
umpDiagnostics.cpp
arseAST.cpp
emaDeclCXX.cpp
|
9066f0ea5c3e1733fd179ceed659c98f3120ef8b |
17-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement template instantiation for using directives, which is dead simple. Also, make the "don't know how to instantiate a particular kind of declaration" diagnostic nicer, so we don't have to trap Clang in a debugger to figure out what went wrong. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89050 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
48c32a7e7c977f317dc1dc19524c2f54d29c7270 |
17-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement template instantiation for using directives, which is dead simple. Also, make the "don't know how to instantiate a particular kind of declaration" diagnostic nicer, so we don't have to trap Clang in a debugger to figure out what went wrong. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89050 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
5b05662377e2fd448c3e356aa6cc0bfe9e38bb35 |
17-Nov-2009 |
John McCall <rjmccall@apple.com> |
Instead of hanging a using declaration's target decls directly off the using decl, create shadow declarations and put them in scope like normal. Work in progress. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89048 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
emaDeclCXX.cpp
emaLookup.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
9488ea120e093068021f944176c3d610dd540914 |
17-Nov-2009 |
John McCall <rjmccall@apple.com> |
Instead of hanging a using declaration's target decls directly off the using decl, create shadow declarations and put them in scope like normal. Work in progress. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89048 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
emaDeclCXX.cpp
emaLookup.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
c7fe2da068df4621ab3fd372b2bcb8fd8def8947 |
17-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Require the object type of a member access expression ("." or "->") to be complete. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89042 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaTemplate.cpp
|
03c5705a99a96a471b2868898ee9688a6721e02a |
17-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Require the object type of a member access expression ("." or "->") to be complete. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89042 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaTemplate.cpp
|
2fb7bee22e3174d9103071aee16fc9ab7affe879 |
17-Nov-2009 |
Anders Carlsson <andersca@mac.com> |
Unify the way destructor epilogues are generated for synthesized and regular destructors. Also fix PR5529. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89034 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
9f853df0d3c25c646907a7b7ef22398370def00f |
17-Nov-2009 |
Anders Carlsson <andersca@mac.com> |
Unify the way destructor epilogues are generated for synthesized and regular destructors. Also fix PR5529. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89034 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
ff7bf10d1cb8274573589a41fd570396d7abb2ed |
17-Nov-2009 |
John McCall <rjmccall@apple.com> |
Carry lookup configuration throughout lookup on the LookupResult. Give LookupResult RAII powers to diagnose ambiguity in the results. Other diagnostics (e.g. access control and deprecation) will be moved to automatically trigger during lookup as part of this same mechanism. This abstraction makes it much easier to encapsulate aliasing declarations (e.g. using declarations) inside the lookup system: eventually, lookup will just produce the aliases in the LookupResult, and the standard access methods will naturally strip the aliases off. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89027 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaAttr.cpp
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaLookup.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
a24dc2e38c7fb0f7f138b3d14b5f0f241fd0eccf |
17-Nov-2009 |
John McCall <rjmccall@apple.com> |
Carry lookup configuration throughout lookup on the LookupResult. Give LookupResult RAII powers to diagnose ambiguity in the results. Other diagnostics (e.g. access control and deprecation) will be moved to automatically trigger during lookup as part of this same mechanism. This abstraction makes it much easier to encapsulate aliasing declarations (e.g. using declarations) inside the lookup system: eventually, lookup will just produce the aliases in the LookupResult, and the standard access methods will naturally strip the aliases off. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89027 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaAttr.cpp
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaLookup.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
90342ea0d6089daa4a0e11ca4b11666aa9a7162b |
17-Nov-2009 |
Eli Friedman <eli.friedman@gmail.com> |
PR5526: Make sure to set the right cast kinds for the inserted implicit casts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89023 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
16fea9b2e5888443a6e2f96b397c92d3f6710ee8 |
17-Nov-2009 |
Eli Friedman <eli.friedman@gmail.com> |
PR5526: Make sure to set the right cast kinds for the inserted implicit casts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89023 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
63c0b824070e7a7b797aa793f4182173a302a02f |
17-Nov-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Simplify the AST a bit by skipping creating member initializers for members with a trivial constructor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88990 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
e73d3bc991d752b80dc97a156463e02bd06841cb |
17-Nov-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Simplify the AST a bit by skipping creating member initializers for members with a trivial constructor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88990 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
c79209789205c9de5fcc7aedfd6308057d40b618 |
16-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
First part of changes to eliminate problems with cv-qualifiers and sugared types. The basic problem is that our qualifier accessors (getQualifiers, getCVRQualifiers, isConstQualified, etc.) only look at the current QualType and not at any qualifiers that come from sugared types, meaning that we won't see these qualifiers through, e.g., typedefs: typedef const int CInt; typedef CInt Self; Self.isConstQualified() currently returns false! Various bugs (e.g., PR5383) have cropped up all over the front end due to such problems. I'm addressing this problem by splitting each qualifier accessor into two versions: - the "local" version only returns qualifiers on this particular QualType instance - the "normal" version that will eventually combine qualifiers from this QualType instance with the qualifiers on the canonical type to produce the full set of qualifiers. This commit adds the local versions and switches a few callers from the "normal" version (e.g., isConstQualified) over to the "local" version (e.g., isLocalConstQualified) when that is the right thing to do, e.g., because we're printing or serializing the qualifiers. Also, switch a bunch of Context.getCanonicalType(T1).getUnqualifiedType() == Context.getCanonicalType(T2).getQualifiedType() expressions over to Context.hasSameUnqualifiedType(T1, T2) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88969 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaChecking.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExceptionSpec.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaLookup.cpp
emaOverload.cpp
emaStmt.cpp
emaTemplateDeduction.cpp
reeTransform.h
|
a4923eb7c4b04d360cb2747641a5e92818edf804 |
16-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
First part of changes to eliminate problems with cv-qualifiers and sugared types. The basic problem is that our qualifier accessors (getQualifiers, getCVRQualifiers, isConstQualified, etc.) only look at the current QualType and not at any qualifiers that come from sugared types, meaning that we won't see these qualifiers through, e.g., typedefs: typedef const int CInt; typedef CInt Self; Self.isConstQualified() currently returns false! Various bugs (e.g., PR5383) have cropped up all over the front end due to such problems. I'm addressing this problem by splitting each qualifier accessor into two versions: - the "local" version only returns qualifiers on this particular QualType instance - the "normal" version that will eventually combine qualifiers from this QualType instance with the qualifiers on the canonical type to produce the full set of qualifiers. This commit adds the local versions and switches a few callers from the "normal" version (e.g., isConstQualified) over to the "local" version (e.g., isLocalConstQualified) when that is the right thing to do, e.g., because we're printing or serializing the qualifiers. Also, switch a bunch of Context.getCanonicalType(T1).getUnqualifiedType() == Context.getCanonicalType(T2).getQualifiedType() expressions over to Context.hasSameUnqualifiedType(T1, T2) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88969 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaChecking.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExceptionSpec.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaLookup.cpp
emaOverload.cpp
emaStmt.cpp
emaTemplateDeduction.cpp
reeTransform.h
|
ecb640d51ba596941d9fcb9a3c5dd19dd1af7209 |
16-Nov-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Repair broken FindCompositePointerType. Correct early termination condition. Get CVR qualifiers from canonical types. Traverse collected qualifiers in reverse order on rebuilding the pointer, so that we don't swap inner and outer qualifiers. That last one fixes PR5509. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88960 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
a439e6f8f57eaeb0a02960d8f2d8ad124ba8b3d5 |
16-Nov-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Repair broken FindCompositePointerType. Correct early termination condition. Get CVR qualifiers from canonical types. Traverse collected qualifiers in reverse order on rebuilding the pointer, so that we don't swap inner and outer qualifiers. That last one fixes PR5509. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88960 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
3f703c7c57e18a1bc415c8a859428042b8054186 |
16-Nov-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix PR5488: special-case the overloaded arrow operator so that we don't try to treat it as a unary operator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88938 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
1a3c75f32f0d27de5f3f6b2ef4c6bbe7e18bddad |
16-Nov-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix PR5488: special-case the overloaded arrow operator so that we don't try to treat it as a unary operator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88938 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
1e77493df0663d644f9191c6909cb43a32da88b5 |
16-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Handle case of missing '@end' in implementation context gracefully, on par with gcc, by: Issuing a warning, doing final sematinc check of its definitions and generating its meta-data. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88934 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
emaDeclObjC.cpp
|
63e963cdffca9530f920dbab58b9b4eecb2a582c |
16-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Handle case of missing '@end' in implementation context gracefully, on par with gcc, by: Issuing a warning, doing final sematinc check of its definitions and generating its meta-data. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88934 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
emaDeclObjC.cpp
|
7858975b1d26e3199b47eba7a532f8d0f827c36f |
16-Nov-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Set the cast kind for a few more code paths. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88893 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
05d9d7aa2d5dcb92ff434143803cdaf70a21c9f9 |
16-Nov-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Set the cast kind for a few more code paths. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88893 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
683b021318387947f24f1553abb11e727d35a7eb |
15-Nov-2009 |
Anders Carlsson <andersca@mac.com> |
Make sure that virtual destructors have delete operators. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88877 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
6d7013940a37f03fd324ef438ff984a5369013b0 |
15-Nov-2009 |
Anders Carlsson <andersca@mac.com> |
Make sure that virtual destructors have delete operators. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88877 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
8b2e5ea5abccc88f29730b8f7f24f5394785b605 |
15-Nov-2009 |
Anders Carlsson <andersca@mac.com> |
Deallocation functions must also be static. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88859 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
1f126bd18c85ea129c3897f8729cebb090917d01 |
15-Nov-2009 |
Anders Carlsson <andersca@mac.com> |
Deallocation functions must also be static. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88859 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
c4cd5cfe6f3bb7a3cce25da6232407f6ca439073 |
15-Nov-2009 |
Anders Carlsson <andersca@mac.com> |
allocation functions are always static. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88858 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
67bf2e7706b82d5debd5c189d9454130df7db0d8 |
15-Nov-2009 |
Anders Carlsson <andersca@mac.com> |
allocation functions are always static. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88858 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
a040ad9812f8781b603dc23f6fc02f3a462b0a0a |
15-Nov-2009 |
Anders Carlsson <andersca@mac.com> |
Factor finding a deallocation function for a record type out into a separate function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88857 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
|
78f74551815f8b23bc0f8acf87640e963fad07d4 |
15-Nov-2009 |
Anders Carlsson <andersca@mac.com> |
Factor finding a deallocation function for a record type out into a separate function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88857 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
|
5f73455853da1acb0307d98608529ddf19375bee |
15-Nov-2009 |
Anders Carlsson <andersca@mac.com> |
If we find a deallocation function in the class scope, but it is a placement function we should not look for a deallocation function in the global scope. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88851 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
50724302e24d44a27e3bc45e7185a710d6eb3c2d |
15-Nov-2009 |
Anders Carlsson <andersca@mac.com> |
If we find a deallocation function in the class scope, but it is a placement function we should not look for a deallocation function in the global scope. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88851 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
221063b0793eddc22e1e2444541ce978a1622087 |
15-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When performing a static downcast as part of a static_cast, make sure that we're dealing with canonical types like the documentation say (yay, CanQualType). Alas, this is another instance where using getQualifiers() on a non-canonical QualType got us in trouble. Good news: with this fix, Clang can now parse all of its own headers! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88848 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
ab15d0e5af616c11b6cbb478c81d0a8eaa9d450a |
15-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
When performing a static downcast as part of a static_cast, make sure that we're dealing with canonical types like the documentation say (yay, CanQualType). Alas, this is another instance where using getQualifiers() on a non-canonical QualType got us in trouble. Good news: with this fix, Clang can now parse all of its own headers! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88848 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
2229eb1f508961a5e9f31f1ece44ebf2e15249b8 |
15-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Don't gratuitously mark the default constructors of base or member initializers as used git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88847 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
c07a494b376f75f33759cf09ad188b11ef3fa9d5 |
15-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Don't gratuitously mark the default constructors of base or member initializers as used git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88847 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
1adb24e67c52abbe49f74893fc6bd990bbe98b4f |
15-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When adding the underlying declaration of a decl to a lookup-results set, expand overloaded function declarations. Long-term, this should actually be done by the name-lookup code rather than here, but this part of the code (involving using declarations) is getting a makeover now and the test-case is useful. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88846 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
|
891fdae811e991d15b26fc165724c4cf6b6737a6 |
15-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
When adding the underlying declaration of a decl to a lookup-results set, expand overloaded function declarations. Long-term, this should actually be done by the name-lookup code rather than here, but this part of the code (involving using declarations) is getting a makeover now and the test-case is useful. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88846 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
|
2f34cd0e4976bff76560f1ef060c81ea51bc1517 |
15-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When looking for operator() to type-check a call to an object of class type, use full qualified name lookup rather than the poking the declaration context directly. This makes sure that we see operator()'s in superclasses. Also, move the complete-type check before this name lookup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88842 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
593564ba94ff854b7a410a4ca17ad34a90c5b761 |
15-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
When looking for operator() to type-check a call to an object of class type, use full qualified name lookup rather than the poking the declaration context directly. This makes sure that we see operator()'s in superclasses. Also, move the complete-type check before this name lookup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88842 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
fed38a65e4874e60e8f5859610bbc7a6b5c95747 |
15-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
If any errors have occurred by the time we hit the end of a function body, clear out any remaining temporaries so they aren't seen later. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88834 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d5b57281cc3c652e9bbdbab45fbc199e29686377 |
15-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
If any errors have occurred by the time we hit the end of a function body, clear out any remaining temporaries so they aren't seen later. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88834 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
1fbaa24104fb427be6f1424e02a43dc11849e24b |
14-Nov-2009 |
Anders Carlsson <andersca@mac.com> |
Always build a builtin operator expression for the __extension__ unary operator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88811 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
a8a1e3da7cc741ab36be18041fafbebdc9be826b |
14-Nov-2009 |
Anders Carlsson <andersca@mac.com> |
Always build a builtin operator expression for the __extension__ unary operator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88811 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
50a7b36745151d4a16b0ca37aa56956787f51a2e |
14-Nov-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
- Have TryStaticImplicitCast set the cast kind to NoOp when binding a reference. CheckReferenceInit already inserts implicit casts to the necessary types. This fixes an assertion in CodeGen for some casts and brings a fix for PR5453 close, if I understand that bug correctly. - Also, perform calculated implicit cast sequences if they're determined to work. This finally diagnoses static_cast to ambiguous or implicit bases and fixes two long-standing fixmes in the test case. For the C-style cast, this requires propagating the access check suppression pretty deep into other functions. - Pass the expressions for TryStaticCast and TryStaticImplicitCast by reference. This should lead to a better AST being emitted for such casts, and also fixes a memory leak, because CheckReferenceInit and PerformImplicitConversion wrap the node passed to them. These wrappers were previously lost. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88809 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXCast.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaOverload.cpp
|
a82e4ae149168be47458f298371035911685370c |
14-Nov-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
- Have TryStaticImplicitCast set the cast kind to NoOp when binding a reference. CheckReferenceInit already inserts implicit casts to the necessary types. This fixes an assertion in CodeGen for some casts and brings a fix for PR5453 close, if I understand that bug correctly. - Also, perform calculated implicit cast sequences if they're determined to work. This finally diagnoses static_cast to ambiguous or implicit bases and fixes two long-standing fixmes in the test case. For the C-style cast, this requires propagating the access check suppression pretty deep into other functions. - Pass the expressions for TryStaticCast and TryStaticImplicitCast by reference. This should lead to a better AST being emitted for such casts, and also fixes a memory leak, because CheckReferenceInit and PerformImplicitConversion wrap the node passed to them. These wrappers were previously lost. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88809 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXCast.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaOverload.cpp
|
b1317f5a72748e29597528bd78d281cf4f3f131a |
14-Nov-2009 |
Eli Friedman <eli.friedman@gmail.com> |
PR5462: Don't run off the edge of the argument array for vararg handling when there are more parameters in the prototype than arguments to the call. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88759 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
3e42ffd3a848236413caa799f1f32a87fd6d702b |
14-Nov-2009 |
Eli Friedman <eli.friedman@gmail.com> |
PR5462: Don't run off the edge of the argument array for vararg handling when there are more parameters in the prototype than arguments to the call. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88759 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b9a5e7b267dfe86c874b80cff16d57bb308397d1 |
14-Nov-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix for PR5489: don't skip the complete type requrirement for variable definitions just because the type happens to be an array type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88752 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
49e2b8e2e5d096851b5135ea5aed222e8aa95bde |
14-Nov-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix for PR5489: don't skip the complete type requrirement for variable definitions just because the type happens to be an array type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88752 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
acf9d2088c559147bc72da47bb20cad85afe7a18 |
14-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When type-checking a static cast (or the static_cast part of a C-style cast) that is converting to a class type, enumerate its constructors as in any other direct initialization. This ensures that we get the proper conversion sequence. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88751 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXCast.cpp
emaDeclCXX.cpp
|
19aeac6ea4897c542b21c9f53a0a51762d8ddf83 |
14-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
When type-checking a static cast (or the static_cast part of a C-style cast) that is converting to a class type, enumerate its constructors as in any other direct initialization. This ensures that we get the proper conversion sequence. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88751 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXCast.cpp
emaDeclCXX.cpp
|
02e0d4b0e9408b39b7375c8f5c1200cf96d438bb |
14-Nov-2009 |
Anders Carlsson <andersca@mac.com> |
Diagnose ambiguity of operator delete and operator delete[]. Sebastian, please review. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88747 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
0ba63ea5be2c90ef62d1350ea4a0a0c415a785f1 |
14-Nov-2009 |
Anders Carlsson <andersca@mac.com> |
Diagnose ambiguity of operator delete and operator delete[]. Sebastian, please review. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88747 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
e0eb15e014e6d9d4f819cbfacb26a068d1421ee7 |
14-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
If we attempt to add a constructor template specialization that looks like a copy constructor to the overload set, just ignore it. This ensures that we don't try to use such a constructor as a copy constructor *without* triggering diagnostics at the point of declaration. Note that we *do* diagnose such copy constructors when explicitly written by the user (e.g., as an explicit specialization). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88733 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaOverload.cpp
emaStmt.cpp
emaTemplateInstantiateDecl.cpp
|
66724ea67d7d598b937d86fa66f03f09a1c758f3 |
14-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
If we attempt to add a constructor template specialization that looks like a copy constructor to the overload set, just ignore it. This ensures that we don't try to use such a constructor as a copy constructor *without* triggering diagnostics at the point of declaration. Note that we *do* diagnose such copy constructors when explicitly written by the user (e.g., as an explicit specialization). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88733 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaOverload.cpp
emaStmt.cpp
emaTemplateInstantiateDecl.cpp
|
36eeb3dcc70b38527b866045b673f3345056092f |
14-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Revert r88718, which does NOT solve the constructor-template-as-copy-constructor issue. Big thanks to John for finding this git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88724 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaOverload.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiateDecl.cpp
|
fd47648b5d351ff6d1a3e886e1c3d10712ba4675 |
14-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Revert r88718, which does NOT solve the constructor-template-as-copy-constructor issue. Big thanks to John for finding this git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88724 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaOverload.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiateDecl.cpp
|
86daf19063c787e5188a132784e6a005ac0bb1ac |
14-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Template argument deduction of a non-type template parameter from a template argument. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88722 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
15755cb8399afa702575a21915daf2f6e56b5ac1 |
14-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Template argument deduction of a non-type template parameter from a template argument. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88722 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
7f42c4ac73a969da3c4df93a1435f4f4cc32a1cd |
14-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
A constructor template cannot be instantiated to a copy constructor. Make sure that such declarations can never be formed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88718 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaOverload.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiateDecl.cpp
|
cad84b7c12564ff37feb66d6d004bb609bea8788 |
14-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
A constructor template cannot be instantiated to a copy constructor. Make sure that such declarations can never be formed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88718 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaOverload.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiateDecl.cpp
|
9c06a2ffa20c65e2c13fb3f1267771cb00b7e63b |
13-Nov-2009 |
Anders Carlsson <andersca@mac.com> |
Clear temporaries in more places. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88687 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
8db68da43086c4205b1df1c35a3778c0ea32b9cd |
13-Nov-2009 |
Anders Carlsson <andersca@mac.com> |
Clear temporaries in more places. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88687 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
586d3b052df92af8c2c2c0f17f60600f771e0328 |
13-Nov-2009 |
Anders Carlsson <andersca@mac.com> |
Fix bug Doug noticed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88679 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
f8a9a797a4328ca0422a3eff600e1a2074343bc9 |
13-Nov-2009 |
Anders Carlsson <andersca@mac.com> |
Fix bug Doug noticed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88679 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
567e44b7880ea69a4b786df69898f351faa3b63b |
13-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When performing copy initialization (= "implicit conversion", here) to a class type from itself or a derived class thereof, enumerate constructors and permit user-defined conversions to the arguments of those constructors. This fixes the wacky implicit conversion sequence used in std::auto_ptr's lame emulation of move semantics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88670 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
79b680ea869983d62b84a9175eeb6b6efb376326 |
13-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
When performing copy initialization (= "implicit conversion", here) to a class type from itself or a derived class thereof, enumerate constructors and permit user-defined conversions to the arguments of those constructors. This fixes the wacky implicit conversion sequence used in std::auto_ptr's lame emulation of move semantics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88670 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
a067286b691513901350f471f0b31fab28f5a572 |
13-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When transforming an expression statement (e.g., for template instantiation), be sure to finish the expression statement by providing a FullExprArg, making sure that temporaries get destroyed. Fixes an obscure failure when parsing llvm/LinkAllPasses.h. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88668 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
reeTransform.h
|
afe7ec28b1880335daba5f7310fe5191e14c4e76 |
13-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
When transforming an expression statement (e.g., for template instantiation), be sure to finish the expression statement by providing a FullExprArg, making sure that temporaries get destroyed. Fixes an obscure failure when parsing llvm/LinkAllPasses.h. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88668 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
reeTransform.h
|
cdfe6442720ebc2dd1f72947592d3a88cb0d5c12 |
13-Nov-2009 |
Anders Carlsson <andersca@mac.com> |
Don't bind arguments to temporaries if the argument has a reference type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88662 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
4b3cbeaea60a1a2d1adc73738123c24549b7ce2c |
13-Nov-2009 |
Anders Carlsson <andersca@mac.com> |
Don't bind arguments to temporaries if the argument has a reference type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88662 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
6e8ce9cc9d02c22a5a6a4657b5ca7a0fe55bd5b0 |
13-Nov-2009 |
Daniel Dunbar <daniel@zuster.org> |
Rework Sema code completion interface. - Provide Sema in callbacks, instead of requiring it in constructor. This eliminates the need for a factory function. Clients now just pass the object to consume the results in directly. - CodeCompleteConsumer is cheap to construct, so building it whenever we are doing code completion is reasonable. Doug, please review. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87099 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
arseAST.cpp
ema.cpp
ema.h
emaCodeComplete.cpp
|
3a2838d14251427089c39caec90c8abbc27f7a14 |
13-Nov-2009 |
Daniel Dunbar <daniel@zuster.org> |
Rework Sema code completion interface. - Provide Sema in callbacks, instead of requiring it in constructor. This eliminates the need for a factory function. Clients now just pass the object to consume the results in directly. - CodeCompleteConsumer is cheap to construct, so building it whenever we are doing code completion is reasonable. Doug, please review. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87099 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
arseAST.cpp
ema.cpp
ema.h
emaCodeComplete.cpp
|
b2ef7f62d3d139813349b2c041afd3510ab673c1 |
13-Nov-2009 |
Anders Carlsson <andersca@mac.com> |
Fix two bugs with temporaries: 1. For A f() { return A(); } we were incorrectly calling the A destructor on the returned object. 2. For void f(A); void g() { A a; f(a); } we were incorrectly not calling the copy constructor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87082 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
03d8ed439f55b692634f9c71721ecfabbe347c4d |
13-Nov-2009 |
Anders Carlsson <andersca@mac.com> |
Fix two bugs with temporaries: 1. For A f() { return A(); } we were incorrectly calling the A destructor on the returned object. 2. For void f(A); void g() { A a; f(a); } we were incorrectly not calling the copy constructor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87082 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
0e1bd10b5cf2002e337379a09bfbbcc869b557f6 |
12-Nov-2009 |
Daniel Dunbar <daniel@zuster.org> |
Spell empty StringRef correctly (0 is a null StringRef, which is not the same). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87011 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
|
ad5757f798b08f24942f093c4ac8b9fc2b527d39 |
12-Nov-2009 |
Daniel Dunbar <daniel@zuster.org> |
Spell empty StringRef correctly (0 is a null StringRef, which is not the same). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87011 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
|
a4f45e609763c65dc7cc667efc908f4ac995fd8d |
12-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Recognize (and check) pointer-to-member template arguments that are non-type template parameters or constants of pointer-to-member type. Once checked, be sure to retain those pointer-to-member constants as expressions if they are dependent, or as declarations if they are not dependent. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87010 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
|
caddba07f82096ee0d0a0312727d4418ee7a8d36 |
12-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Recognize (and check) pointer-to-member template arguments that are non-type template parameters or constants of pointer-to-member type. Once checked, be sure to retain those pointer-to-member constants as expressions if they are dependent, or as declarations if they are not dependent. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87010 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
|
65c7e943235dfe46306a4490018cf198aa4d6a65 |
12-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When instantiating a reference to a non-type template parameter of pointer to member type (e.g., T Class::*Member), build a pointer-to-member constant expression. Previously, we we just building a simple declaration reference expression, which meant that the expression was not treated as a pointer to member. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87000 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
231edff7907cf151f1d046f287d3ee4ad90037cc |
12-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
When instantiating a reference to a non-type template parameter of pointer to member type (e.g., T Class::*Member), build a pointer-to-member constant expression. Previously, we we just building a simple declaration reference expression, which meant that the expression was not treated as a pointer to member. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87000 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
4da51fb3888bd1ac89cf851737a8801fe204c67a |
12-Nov-2009 |
Anders Carlsson <andersca@mac.com> |
Set CK_BaseToDerived in TryStaticDowncast. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86996 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
95c5d8ac29ba3423e735a0732713907e484b800d |
12-Nov-2009 |
Anders Carlsson <andersca@mac.com> |
Set CK_BaseToDerived in TryStaticDowncast. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86996 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
b0b2636370c810d4140200d9b956dbcb510a7bce |
12-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Give CanQual<T> an implicit conversion to bool, so that it can be used in "if" statements like: if (CanQual<ReferenceType> RefType = T.getAs<ReferenceType>()) Thanks to Clang for pointing out this mistake :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86995 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
cffecd08f1974dc7cc328bd620b2f69daf442fda |
12-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Give CanQual<T> an implicit conversion to bool, so that it can be used in "if" statements like: if (CanQual<ReferenceType> RefType = T.getAs<ReferenceType>()) Thanks to Clang for pointing out this mistake :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86995 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
1a4349171dda651e1a070d817a250f5c47ac2015 |
12-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When comparing template parameter lists, distinguish between three cases: - Comparing template parameter lists to determine if we have a redeclaration - Comparing template parameter lists to determine if we have equivalent template template parameters - Comparing template parameter lists to determine whether a template template argument is valid for a given template template parameter. Previously, we did not distinguish between the last two cases, which got us into trouble when we were looking for exact type matches between the types of non-type template parameters that were dependent types. Now we do, so we properly delay checking of template template arguments until instantiation time. Also, fix an accidental fall-through in a case statement that was causing crashes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86992 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaOverload.cpp
emaTemplate.cpp
|
fb898e17cff919bd28b88e9d93301d6e2cc5cbd1 |
12-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
When comparing template parameter lists, distinguish between three cases: - Comparing template parameter lists to determine if we have a redeclaration - Comparing template parameter lists to determine if we have equivalent template template parameters - Comparing template parameter lists to determine whether a template template argument is valid for a given template template parameter. Previously, we did not distinguish between the last two cases, which got us into trouble when we were looking for exact type matches between the types of non-type template parameters that were dependent types. Now we do, so we properly delay checking of template template arguments until instantiation time. Also, fix an accidental fall-through in a case statement that was causing crashes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86992 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaOverload.cpp
emaTemplate.cpp
|
bff06d8fa05294f339620d8d9045064c3af4d04d |
12-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve source-location information for implicitly-generated member call expressions git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86989 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
00b98c229ef28a5e82943bb23d09fb46d24ca381 |
12-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Improve source-location information for implicitly-generated member call expressions git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86989 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
1845bc260fd7ffa3035c8c5fbeb86b4685b49938 |
12-Nov-2009 |
John McCall <rjmccall@apple.com> |
Random const correctness, and incidentally use computeDeclContext when building a using declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86942 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
af8e6ed61b5e80ab95632b63f583af79dcb62590 |
12-Nov-2009 |
John McCall <rjmccall@apple.com> |
Random const correctness, and incidentally use computeDeclContext when building a using declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86942 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
77832b55b4ff253fac0909e3626a05b4449b891c |
12-Nov-2009 |
John McCall <rjmccall@apple.com> |
Note to self: don't leave debugging statements in the code for four hours. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86931 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
a29e6b87bd53c883cb8ee62178879136a32e270e |
12-Nov-2009 |
John McCall <rjmccall@apple.com> |
Note to self: don't leave debugging statements in the code for four hours. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86931 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
8b2898a25909781809bedaaeb763ff4034832ad2 |
12-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve recovery in a wonky case where one tries to specialize a template template parameter. When building a template-id type, check whether the template-name itself is dependent (even if the template arguments are not!) and handle it as a template-id type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86913 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
8b13c08b1a181b290600814c765f9f199a74f414 |
12-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Improve recovery in a wonky case where one tries to specialize a template template parameter. When building a template-id type, check whether the template-name itself is dependent (even if the template arguments are not!) and handle it as a template-id type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86913 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
8d4b7f8f30088d62279ae1753a6dd804ba17b473 |
12-Nov-2009 |
John McCall <rjmccall@apple.com> |
Add <foo> = [<bar> nextObject] to the -Widiomatic-parentheses category, and give that category an explicit test. Generalize the internal diagnostic name. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86905 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
c8d8ac5f454311d0154d2d080196cc150edbb2d6 |
12-Nov-2009 |
John McCall <rjmccall@apple.com> |
Add <foo> = [<bar> nextObject] to the -Widiomatic-parentheses category, and give that category an explicit test. Generalize the internal diagnostic name. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86905 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
556a951c9cc08f486749e7e4c374a5e73bbc84bf |
12-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Template argument deduction for template template parameters. This permits, among other things, ripping apart and reconstructing templates via partial specialization: template<typename T> struct DeepRemoveConst { typedef T type; }; template<typename T> struct DeepRemoveConst<const T> { typedef typename DeepRemoveConst<T>::type type; }; template<template<typename> class TT, typename T> struct DeepRemoveConst<TT<T> > { typedef TT<typename DeepRemoveConst<T>::type> type; }; Also, fix a longstanding thinko in the code handling partial ordering of class template partial specializations. We were performing the second deduction without clearing out the results of the first deduction. It's amazing we got through so much code with such a horrendous error :( git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86893 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateDeduction.cpp
|
db0d4b751e83b8841b8f48f913f17e50467f13d4 |
12-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Template argument deduction for template template parameters. This permits, among other things, ripping apart and reconstructing templates via partial specialization: template<typename T> struct DeepRemoveConst { typedef T type; }; template<typename T> struct DeepRemoveConst<const T> { typedef typename DeepRemoveConst<T>::type type; }; template<template<typename> class TT, typename T> struct DeepRemoveConst<TT<T> > { typedef TT<typename DeepRemoveConst<T>::type> type; }; Also, fix a longstanding thinko in the code handling partial ordering of class template partial specializations. We were performing the second deduction without clearing out the results of the first deduction. It's amazing we got through so much code with such a horrendous error :( git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86893 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateDeduction.cpp
|
b9c142fd0ad32124fe670fc6455ec5229c49eaa6 |
11-Nov-2009 |
John McCall <rjmccall@apple.com> |
Fix PR 5422: handle lvalue results when evaluating 'based' ptrtoints as part of the -Wconversion check. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86891 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
8406aedf4782771e520614ee379594dc0a4f7d5f |
11-Nov-2009 |
John McCall <rjmccall@apple.com> |
Fix PR 5422: handle lvalue results when evaluating 'based' ptrtoints as part of the -Wconversion check. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86891 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
0100ae4aaad92864c029ebb1eac389823ee99023 |
11-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
writable atomic property's setter/getter must be in 'lock' step of either both synthesized or bith user defined. Implements radar 6557233. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86887 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
7ca8b0694840385d707689eba9ad965e7b28c8cb |
11-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
writable atomic property's setter/getter must be in 'lock' step of either both synthesized or bith user defined. Implements radar 6557233. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86887 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
a57c339c88bf248af2aba7f1bae1c284c69e82dd |
11-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve diagnostics when a default template argument does not match with its corresponding template parameter. This can happen when we performed some substitution into the default template argument and what we had doesn't match any more, e.g., template<int> struct A; template<typename T, template<T> class X = A> class B; B<long> b; Previously, we'd emit a pretty but disembodied diagnostic showing how the default argument didn't match the template parameter. The diagnostic was good, but nothing tied it to the *use* of the default argument in "B<long>". This commit fixes that. Also, tweak the counting of active template instantiations to avoid counting non-instantiation records, such as those we create for (surprise!) checking default arguments, instantiating default arguments, and performing substitutions as part of template argument deduction. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86884 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
f35f828f9883123772a9731af190a608f3236ef4 |
11-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Improve diagnostics when a default template argument does not match with its corresponding template parameter. This can happen when we performed some substitution into the default template argument and what we had doesn't match any more, e.g., template<int> struct A; template<typename T, template<T> class X = A> class B; B<long> b; Previously, we'd emit a pretty but disembodied diagnostic showing how the default argument didn't match the template parameter. The diagnostic was good, but nothing tied it to the *use* of the default argument in "B<long>". This commit fixes that. Also, tweak the counting of active template instantiations to avoid counting non-instantiation records, such as those we create for (surprise!) checking default arguments, instantiating default arguments, and performing substitutions as part of template argument deduction. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86884 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
413c5a533431eb8b928bcb91a3dbc1787db0ac78 |
11-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Move handling of template parameter packs out of the template-type-parameter specific template argument checking code and up to the template argument checking loop. In theory, this should make variadic templates work better; in practice, they don't well enough for us to care anyway (YET!), so this is mostly a re-organization to simplify CheckTemplateArgument. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86868 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
|
d9e1530ef3a2f4d1cc3af83995b603751de30c14 |
11-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Move handling of template parameter packs out of the template-type-parameter specific template argument checking code and up to the template argument checking loop. In theory, this should make variadic templates work better; in practice, they don't well enough for us to care anyway (YET!), so this is mostly a re-organization to simplify CheckTemplateArgument. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86868 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
|
a7777a5856f11941c8e7e3bca1d3236eec9e6138 |
11-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Refactoring of template-argument checking code to reduce nesting, increase sanity. No intended functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86866 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
|
e7526419a6edc188723a33983c338790f1f2cc2b |
11-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Refactoring of template-argument checking code to reduce nesting, increase sanity. No intended functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86866 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
|
ae0ff4efad2d004c7cddec80942e7583e7f2cb2c |
11-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Before checking a template template argument against its corresponding template template parameter, substitute any prior template arguments into the template template parameter. This, for example, allows us to properly check the template template argument for a class such as: template<typename T, template<T Value> class X> struct Foo; The actual implementation of this feature was trivial; most of the change is dedicated to giving decent diagnostics when this substitution goes horribly wrong. We now get a note like: note: while substituting prior template arguments into template template parameter 'X' [with T = float] As part of this change, enabled some very pedantic checking when comparing template template parameter lists, which shook out a bug in our overly-eager checking of default arguments of template template parameters. We now perform only minimal checking of such default arguments when they are initially parsed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86864 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
9148c3f5829f4d031249faeb1043e7be914539e8 |
11-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Before checking a template template argument against its corresponding template template parameter, substitute any prior template arguments into the template template parameter. This, for example, allows us to properly check the template template argument for a class such as: template<typename T, template<T Value> class X> struct Foo; The actual implementation of this feature was trivial; most of the change is dedicated to giving decent diagnostics when this substitution goes horribly wrong. We now get a note like: note: while substituting prior template arguments into template template parameter 'X' [with T = float] As part of this change, enabled some very pedantic checking when comparing template template parameter lists, which shook out a bug in our overly-eager checking of default arguments of template template parameters. We now perform only minimal checking of such default arguments when they are initially parsed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86864 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
f25b5906bca38bd62ea484c0d169daa39a877e36 |
11-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Instantiation of template template parameters for nested templates, e.g., template<typename T> struct X { template<template<T Value> class Y> struct Inner; }; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86844 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
9106ef78f8fcc9df1a60c7a5b64c7d967194207e |
11-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Instantiation of template template parameters for nested templates, e.g., template<typename T> struct X { template<template<T Value> class Y> struct Inner; }; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86844 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
89c397d3f01e4bf7b5eff5a478a8be8b783461ef |
11-Nov-2009 |
John McCall <rjmccall@apple.com> |
Preserve source locations when building offsetof expressions featuring anonymous members. Partial fix for PR 5390. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86796 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
09b6d0e7931bf72674e4d752bd66b566cc01fe05 |
11-Nov-2009 |
John McCall <rjmccall@apple.com> |
Preserve source locations when building offsetof expressions featuring anonymous members. Partial fix for PR 5390. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86796 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
58b8d15c4daf54f2d19e134a089dd8a8de4f1cd2 |
11-Nov-2009 |
John McCall <rjmccall@apple.com> |
Apparently the following idiom is specifically encouraged: if (self = [super init]) Recognize it and only warn if -Wparentheses is explicitly enabled. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86790 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
a52ef08b26420c8b7208c2fe7f3daf8802b22dd7 |
11-Nov-2009 |
John McCall <rjmccall@apple.com> |
Apparently the following idiom is specifically encouraged: if (self = [super init]) Recognize it and only warn if -Wparentheses is explicitly enabled. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86790 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
63c8e75e3df30caab2d7251514a0d7ddc9cb39a2 |
11-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Introduce a new representation for template template parameters. Rather than storing them as either declarations (for the non-dependent case) or expressions (for the dependent case), we now (always) store them as TemplateNames. The primary change here is to add a new kind of TemplateArgument, which stores a TemplateName. However, making that change ripples to every switch on a TemplateArgument's kind, also affecting TemplateArgumentLocInfo/TemplateArgumentLoc, default template arguments for template template parameters, type-checking of template template arguments, etc. This change is light on testing. It should fix several pre-existing problems with template template parameters, such as: - the inability to use dependent template names as template template arguments - template template parameter default arguments cannot be instantiation However, there are enough pieces missing that more implementation is required before we can adequately test template template parameters. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86777 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaLookup.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
reeTransform.h
|
788cd06cf8e868a67158aafec5de3a1f408d14f3 |
11-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Introduce a new representation for template template parameters. Rather than storing them as either declarations (for the non-dependent case) or expressions (for the dependent case), we now (always) store them as TemplateNames. The primary change here is to add a new kind of TemplateArgument, which stores a TemplateName. However, making that change ripples to every switch on a TemplateArgument's kind, also affecting TemplateArgumentLocInfo/TemplateArgumentLoc, default template arguments for template template parameters, type-checking of template template arguments, etc. This change is light on testing. It should fix several pre-existing problems with template template parameters, such as: - the inability to use dependent template names as template template arguments - template template parameter default arguments cannot be instantiation However, there are enough pieces missing that more implementation is required before we can adequately test template template parameters. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86777 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaLookup.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
reeTransform.h
|
5eda0df7b2eff874c67505f290bf660c92a2139a |
11-Nov-2009 |
John McCall <rjmccall@apple.com> |
Create a new Scope when parsing a declaration with a C++ scope specifier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86764 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
f7f3d0db754db0500b56d49ac19f795f13965912 |
11-Nov-2009 |
John McCall <rjmccall@apple.com> |
Create a new Scope when parsing a declaration with a C++ scope specifier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86764 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
8173cdeb026b9f4503618983f5de45dd36c8454d |
11-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Diagnose illegally typed operator new/new[]. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86755 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
b03bfa55d03ca38922ffedac19225d0832e8d911 |
11-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Diagnose illegally typed operator new/new[]. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86755 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
b226b2e8514db1c679ed27ebd6a241e0f4cacac6 |
10-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve parsing of template arguments to lay the foundation for handling template template parameters properly. This refactoring: - Parses template template arguments as id-expressions, representing the result of the parse as a template name (Action::TemplateTy) rather than as an expression (lame!). - Represents all parsed template arguments via a new parser-specific type, ParsedTemplateArgument, which stores the kind of template argument (type, non-type, template) along with all of the source information about the template argument. This replaces an ad hoc set of 3 vectors (one for a void*, which was either a type or an expression; one for a bit telling whether the first was a type or an expression; and one for a single source location pointing at the template argument). - Moves TemplateIdAnnotation into the new Parse/Template.h. It never belonged in the Basic library anyway. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86708 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaTemplate.cpp
|
314b97f8c564b465af605efaee23f91ec18a982b |
10-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Improve parsing of template arguments to lay the foundation for handling template template parameters properly. This refactoring: - Parses template template arguments as id-expressions, representing the result of the parse as a template name (Action::TemplateTy) rather than as an expression (lame!). - Represents all parsed template arguments via a new parser-specific type, ParsedTemplateArgument, which stores the kind of template argument (type, non-type, template) along with all of the source information about the template argument. This replaces an ad hoc set of 3 vectors (one for a void*, which was either a type or an expression; one for a bit telling whether the first was a type or an expression; and one for a single source location pointing at the template argument). - Moves TemplateIdAnnotation into the new Parse/Template.h. It never belonged in the Basic library anyway. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86708 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaTemplate.cpp
|
720c25ca0b2ac1b2e152ed65bfebf38af4ee5c93 |
10-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Changed a variable name to match what it represents (Ted's feedback). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86702 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
4770a4a3d4e55fa8ad691bf4c046fae519120a09 |
10-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Changed a variable name to match what it represents (Ted's feedback). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86702 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
a0ac8911efa482aa004c707cf1bb7d5cffc716bb |
10-Nov-2009 |
John McCall <rjmccall@apple.com> |
Fix a similar problem with qualified lookup through using directives, although in this case we probably just run a risk of duplicating work; I can't think of how this could cause a bug. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86680 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
d9f01d47dbede88fe557c8955ba2a855be859bc9 |
10-Nov-2009 |
John McCall <rjmccall@apple.com> |
Fix a similar problem with qualified lookup through using directives, although in this case we probably just run a risk of duplicating work; I can't think of how this could cause a bug. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86680 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
adf9faf3e1b76c94c848f79dac89b1bce47274bb |
10-Nov-2009 |
John McCall <rjmccall@apple.com> |
Make a somewhat more convincing test case for unqualified lookup through using directives, and fix a bug thereby exposed: since we're playing tricks with pointers, we need to make certain we're always using the same pointers for things. Also tweak an existing error message. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86679 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
12ea5780e7729de3fee009525e49468fd8d0b713 |
10-Nov-2009 |
John McCall <rjmccall@apple.com> |
Make a somewhat more convincing test case for unqualified lookup through using directives, and fix a bug thereby exposed: since we're playing tricks with pointers, we need to make certain we're always using the same pointers for things. Also tweak an existing error message. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86679 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
de488aea99349696f2a5ea79ca1693b297eb62ca |
10-Nov-2009 |
John McCall <rjmccall@apple.com> |
Fix unqualified lookup through using directives. This is a pretty minimal test case; I'll make a better one later. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86669 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
d7be78a0524251c30329359c9d92485c6d7ac424 |
10-Nov-2009 |
John McCall <rjmccall@apple.com> |
Fix unqualified lookup through using directives. This is a pretty minimal test case; I'll make a better one later. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86669 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
8234e6a8eae090fa0ff49d5fec0b4a8cfd03286c |
10-Nov-2009 |
Anders Carlsson <andersca@mac.com> |
When trying to assign a regular string literal to an Objective-C 'id' type or a pointer to an NSString, emit a code insertion hint that turns it into an Objective-C string. For example: @class NSString; @interface Test + (void)test:(NSString *)string; @end void g(NSString *a); void f() { NSString *a = "Foo"; g("Foo"); [Test test:"Foo"]; } will produce t.m:10:17: warning: incompatible pointer types initializing 'char [4]', expected 'NSString *' NSString *a = "Foo"; ^~~~~ @ t.m:11:5: warning: incompatible pointer types passing 'char [4]', expected 'NSString *' g("Foo"); ^~~~~ @ t.m:12:14: warning: incompatible pointer types sending 'char [4]', expected 'NSString *' [Test test:"Foo"]; ^~~~~ @ 3 diagnostics generated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86665 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b76cd3d0c166b2162c4709f2ef5da8d67d9844b7 |
10-Nov-2009 |
Anders Carlsson <andersca@mac.com> |
When trying to assign a regular string literal to an Objective-C 'id' type or a pointer to an NSString, emit a code insertion hint that turns it into an Objective-C string. For example: @class NSString; @interface Test + (void)test:(NSString *)string; @end void g(NSString *a); void f() { NSString *a = "Foo"; g("Foo"); [Test test:"Foo"]; } will produce t.m:10:17: warning: incompatible pointer types initializing 'char [4]', expected 'NSString *' NSString *a = "Foo"; ^~~~~ @ t.m:11:5: warning: incompatible pointer types passing 'char [4]', expected 'NSString *' g("Foo"); ^~~~~ @ t.m:12:14: warning: incompatible pointer types sending 'char [4]', expected 'NSString *' [Test test:"Foo"]; ^~~~~ @ 3 diagnostics generated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86665 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
81876936c0aeb2a167c51b1e8a4b264ac2961a22 |
10-Nov-2009 |
Anders Carlsson <andersca@mac.com> |
Use PP.getLocForEndOfToken as suggested by John. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86661 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
4881b99bc830d4432c171b0a00348711bb863eea |
10-Nov-2009 |
Anders Carlsson <andersca@mac.com> |
Use PP.getLocForEndOfToken as suggested by John. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86661 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
ac530e4e508dd8a93e35f5839db78a741b225054 |
10-Nov-2009 |
Anders Carlsson <andersca@mac.com> |
If a function with a default argument is redefined and the new function also has a defualt argument then add a fixit hint that removes the default argument. Fixes PR5444. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86659 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
ad26b7376b6fd71d14b9b893eaa1ba79e029c830 |
10-Nov-2009 |
Anders Carlsson <andersca@mac.com> |
If a function with a default argument is redefined and the new function also has a defualt argument then add a fixit hint that removes the default argument. Fixes PR5444. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86659 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
564d76cbba14a23bf32211b5d2fe87da634bd610 |
09-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Further change in a comment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86599 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
|
d288bafe2dbb7b43173950f23589b2586c537e02 |
09-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Further change in a comment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86599 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
|
d7bc7abc6eabfaedd4ec935daa7572ccd7e16844 |
09-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Removed a FIXME on nested type specifier warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86598 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
|
9aea0ce248a875f3c09186121b5cacc402174556 |
09-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Removed a FIXME on nested type specifier warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86598 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
|
183948c04cef998fda57c1a39b12e40f934ad031 |
09-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Changed error for nested type qualifier mismatch to warning, to match gcc. It used to be warning, so better keep it a warning (it broke a certain project). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86597 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
3451e9282a72f09e834486ce6f5aab803f491e97 |
09-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Changed error for nested type qualifier mismatch to warning, to match gcc. It used to be warning, so better keep it a warning (it broke a certain project). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86597 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
406b56a9a0ed38e9fbcea1f51ea28ee3719517d3 |
09-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Make sure that Type::getAs<ArrayType>() (or Type::getAs<subclass of ArrayType>()) does not instantiate. Update all callers that used this unsafe feature to use the appropriate ASTContext::getAs*ArrayType method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86596 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaOverload.cpp
emaType.cpp
|
89c49f09b0292dc7c03885f6c765d667a9837597 |
09-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Make sure that Type::getAs<ArrayType>() (or Type::getAs<subclass of ArrayType>()) does not instantiate. Update all callers that used this unsafe feature to use the appropriate ASTContext::getAs*ArrayType method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86596 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaOverload.cpp
emaType.cpp
|
60e7ac5778bfae023c6526c5ffd7e4f947f7cb4d |
09-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Make sure that we look into nested, transparent declaration contexts when looking for a name within a given DeclContext. Now enumerators will show up in code-completion results. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86591 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
ff4393c1cea81b94ac081bed5c49b8126f12fae8 |
09-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Make sure that we look into nested, transparent declaration contexts when looking for a name within a given DeclContext. Now enumerators will show up in code-completion results. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86591 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
01c596fdea2182128b2cf92aae2b8c9a6c49faaa |
09-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
For array pointee type, get its cvr qualifier from its element type. Fixes pr5432. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86587 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
d411b3f746e612294bd5f0843d83e8c215f7fe58 |
09-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
For array pointee type, get its cvr qualifier from its element type. Fixes pr5432. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86587 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
39bda42014c99be367804d2ae565a4e1e7bc29ba |
09-Nov-2009 |
Benjamin Kramer <benny.kra@googlemail.com> |
Fix build after r86579. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86584 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
|
3f17a373576e16c6d5269aa28ad212004ab38e54 |
09-Nov-2009 |
Benjamin Kramer <benny.kra@googlemail.com> |
Fix build after r86579. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86584 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
|
0980c38c56e45d75fb17323c01694edd92dd49e1 |
09-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Make sure that we instantiate default function arguments for an overloaded operator(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86581 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
d47c47d65e339ab1f28e9f9365159cf1047ac1df |
09-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Make sure that we instantiate default function arguments for an overloaded operator(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86581 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
94643353690615a5a531d5f2445f481d7aa13e77 |
09-Nov-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Add additional note to mark the cause of synthesized constructors. Mark declaration invalid if the constructor can't be properly built. Addresses remaining review comments from Fariborz for r86500. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86579 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
80c30dad6c6fca077293125a96f464b6c8857171 |
09-Nov-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Add additional note to mark the cause of synthesized constructors. Mark declaration invalid if the constructor can't be properly built. Addresses remaining review comments from Fariborz for r86500. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86579 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
a22fe56d9c01e3cf92ef9d3d1d9b3e6fc8f783fe |
09-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve instantiation of default template arguments for nested templates. The instantiation of these default arguments must be (and now, is) delayed until the template argument is actually used, at which point we substitute all levels of template arguments concurrently. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86578 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
0f8716b7bb25d61a82f699b3975167451f7b5a68 |
09-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Improve instantiation of default template arguments for nested templates. The instantiation of these default arguments must be (and now, is) delayed until the template argument is actually used, at which point we substitute all levels of template arguments concurrently. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86578 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
2c20fd833cd2e6a75e25e1203ebc80fe23a802ed |
09-Nov-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Add support for cdecl attribute. (As far as I know, it doesn't affect CodeGen unless we start implementing command-line switches which override the default calling convention, so the effect is mostly to silence unknown attribute warnings.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86571 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
8f4c59e912f08919bd051fbca3d0dd2b90382ab3 |
09-Nov-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Add support for cdecl attribute. (As far as I know, it doesn't affect CodeGen unless we start implementing command-line switches which override the default calling convention, so the effect is mostly to silence unknown attribute warnings.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86571 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
d6dea1d37fb03ec9bc45852887b6dd613ac858e9 |
09-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When transforming an InitListExpr, if we already computed a non-dependent type for the InitListExpr, keep it git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86559 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
e48319a8a901bc915d48d02b99c62e5f2589dbd9 |
09-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
When transforming an InitListExpr, if we already computed a non-dependent type for the InitListExpr, keep it git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86559 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
06cf0bdef27142084406404cf5c8e50bd6199061 |
09-Nov-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Add hack to make the given testcase work. As far as I can tell, this change is reasonably safe, but it doesn't seem like the right solution. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86508 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
bb4a33cdf6342110811ae16f7ca6accababf432f |
09-Nov-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Add hack to make the given testcase work. As far as I can tell, this change is reasonably safe, but it doesn't seem like the right solution. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86508 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
ec2595547929a1dd8148d9f82ffca80d76134a5a |
09-Nov-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Remove a useless variable that got left behind. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86501 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
f8db4771d4f61f4ecfbe202400e10e36e883191b |
09-Nov-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Remove a useless variable that got left behind. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86501 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
ff050356b5529b0745b3039453ad5016d42f515c |
09-Nov-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Unify the codepaths used to verify base and member initializers for explicitly and implicitly defined constructors. This has a number of benefits: 1. Less code. 2. Explicit and implicit constructors get the same diagnostics. 3. The AST explicitly contains constructor calls from implicit default constructors. This allows handing some cases that previously weren't handled correctly in IRGen without any additional code. Specifically, implicit default constructors containing calls to constructors with default arguments are now handled correctly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86500 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
49c16da71b9c95cc53b4af6de2833a022cb69b6a |
09-Nov-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Unify the codepaths used to verify base and member initializers for explicitly and implicitly defined constructors. This has a number of benefits: 1. Less code. 2. Explicit and implicit constructors get the same diagnostics. 3. The AST explicitly contains constructor calls from implicit default constructors. This allows handing some cases that previously weren't handled correctly in IRGen without any additional code. Specifically, implicit default constructors containing calls to constructors with default arguments are now handled correctly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86500 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
2aa3d30d8dc357f1604e498311e1bb0fa4872b60 |
08-Nov-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix use-after-free bug. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86485 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
a8ce9ecae8670fe8e189755b14d73fd84087e51f |
08-Nov-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix use-after-free bug. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86485 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
7bf09febdfa32977910378018c0d91a70158e49e |
08-Nov-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Special-case default argument expression in instantiation. This should fix PR4301. Doug, please double-check my assumptions. Read the PR for more details. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86465 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
a29e51bb9874bb9ce442efa271e87da237e4ce2c |
08-Nov-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Special-case default argument expression in instantiation. This should fix PR4301. Doug, please double-check my assumptions. Read the PR for more details. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86465 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
78d4b72f7e84120cbbd0ec70fc3d36a3f267d24d |
08-Nov-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
When checking the namespace of a redeclaration or definition, look through linkage specs. Fixes PR5430. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86461 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
9770ef0eea1dbebb9cad93b8a564bff789568e62 |
08-Nov-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
When checking the namespace of a redeclaration or definition, look through linkage specs. Fixes PR5430. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86461 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
8b3ae69f7f8267ca51a688defd45ba224c42734d |
08-Nov-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Don't reprocess non-dependent initializers of non-dependent VarDecls. Fixes PR5426. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86460 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
42dddbeadb82a918d83c14bdcce47ba8c0ed6fba |
08-Nov-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Don't reprocess non-dependent initializers of non-dependent VarDecls. Fixes PR5426. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86460 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
2aace57a73eef77967b28d19a2721033eaa3f85a |
08-Nov-2009 |
Sean Hunt <rideau3@gmail.com> |
Test commit - minor terminology change to my recent patch suggested by John McCall git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86442 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
c9132b697cff37f2918f9501b8ee2262b0bc6f03 |
08-Nov-2009 |
Sean Hunt <rideau3@gmail.com> |
Test commit - minor terminology change to my recent patch suggested by John McCall git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86442 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
6cee52799d56dd96d24a2b44d9d379169fe78467 |
08-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Always make sure we're using an unqualified type when building a constructor name. Fixes PR5418. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86441 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
3eaa9ffa176e5d240a0b140b35cc104ee3d63936 |
08-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Always make sure we're using an unqualified type when building a constructor name. Fixes PR5418. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86441 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
bfebffa3b92e064193e1c9b0a55fae424b4d8684 |
07-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to gives an error that at least points users in the direction of the error, rather than an error about incompatible types. Patch by Sean Hunt. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86402 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
36a862f1d6810e05121d5be1b6458bd11b69e495 |
07-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to gives an error that at least points users in the direction of the error, rather than an error about incompatible types. Patch by Sean Hunt. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86402 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
d301812deb28eae0e81a36cd35ea2823e87a79af |
07-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Cope with calls to operator() templates. Fixes PR5419. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86387 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
3734c21b603ec8546613557a0e8a9f566f424324 |
07-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Cope with calls to operator() templates. Fixes PR5419. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86387 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
2b0adf4958d3a49dd751a5522cca625e4ba673a9 |
07-Nov-2009 |
John McCall <rjmccall@apple.com> |
Support -Wshorten-64-to-32 for integer types only, which seems to satisfy the core requirements. Fixes rdar://problem/6389954 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86364 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
dc767a1f560ae936a08eeead8164be6f82b6b0f7 |
07-Nov-2009 |
John McCall <rjmccall@apple.com> |
Support -Wshorten-64-to-32 for integer types only, which seems to satisfy the core requirements. Fixes rdar://problem/6389954 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86364 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
2bc688b60cbca17554e184922169171079fee069 |
07-Nov-2009 |
John McCall <rjmccall@apple.com> |
Improve -Wconversion by permitting binary operations on values of the target type (or smaller) to stay "closed" within the type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86356 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
e8babd198c28bf1a443ef6a989dd2fe0ab58cc08 |
07-Nov-2009 |
John McCall <rjmccall@apple.com> |
Improve -Wconversion by permitting binary operations on values of the target type (or smaller) to stay "closed" within the type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86356 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
4325d1ed52ccd5d7ead92d398f395bc8b143befe |
07-Nov-2009 |
Anders Carlsson <andersca@mac.com> |
Don't treat variables with non-trivial ctors or dtors as unused. Fixes PR5407. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86352 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f7613d53619d11f46fb07ddb0ea90c9fb0cad027 |
07-Nov-2009 |
Anders Carlsson <andersca@mac.com> |
Don't treat variables with non-trivial ctors or dtors as unused. Fixes PR5407. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86352 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d915e2bba5f0eb8084206036354c4185600758e5 |
07-Nov-2009 |
Anders Carlsson <andersca@mac.com> |
Cleanup, no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86351 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
99a000e3ca7224cd70a2e87cc2751d78595c97f5 |
07-Nov-2009 |
Anders Carlsson <andersca@mac.com> |
Cleanup, no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86351 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
cb67b17f999ff3b77dfbbed46e955ccb14b4869b |
07-Nov-2009 |
Anders Carlsson <andersca@mac.com> |
When instantiating a field decl, make sure to clone its attributes. With this change FileCheck no longer crashes when it's run without any arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86344 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
d8fe2d56fb5463c9d109e8c6dab2e98b06bee186 |
07-Nov-2009 |
Anders Carlsson <andersca@mac.com> |
When instantiating a field decl, make sure to clone its attributes. With this change FileCheck no longer crashes when it's run without any arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86344 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
afcfd753e6c5d50edb13dd0b7f46fc40f6aa8fa0 |
07-Nov-2009 |
John McCall <rjmccall@apple.com> |
Implement -Wconversion. Off by default, in the non-gcc group. There's significant work left to be done to reduce the false-positive rate here. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86326 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
680523a91dd3351389667c8de17121ba7ae82673 |
07-Nov-2009 |
John McCall <rjmccall@apple.com> |
Implement -Wconversion. Off by default, in the non-gcc group. There's significant work left to be done to reduce the false-positive rate here. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86326 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
c2c78ec0b6acd3c5e3d82b58eb3197595d08c082 |
07-Nov-2009 |
Steve Naroff <snaroff@apple.com> |
Add basic code completion support for ObjC messages. Still a work in progress... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86323 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
|
c4df6d2c05c647a6a5770ba0c749782b6c023a3a |
07-Nov-2009 |
Steve Naroff <snaroff@apple.com> |
Add basic code completion support for ObjC messages. Still a work in progress... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86323 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
|
72923c67a05cdca1ff042668bf9ddbe4355d962f |
07-Nov-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Make sure isCopyAssignment is only true for actual copy assignment operators, instead of all assignment operators. The mistake messes up IRGen because it ends up assuming that the assignment operator is actually the implicit copy assignment operator, and therefore tries to emit the RHS as an lvalue. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86307 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
88fad6310d3104e3ac4ab685227beabaa76faf7b |
07-Nov-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Make sure isCopyAssignment is only true for actual copy assignment operators, instead of all assignment operators. The mistake messes up IRGen because it ends up assuming that the assignment operator is actually the implicit copy assignment operator, and therefore tries to emit the RHS as an lvalue. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86307 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
5117fe60743bb49f91f6e38bf56ff2fa8ecc2e18 |
07-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Various improvements to Clang's code-completion infrastructure: - Introduce more code-completion string "chunk" kinds that describe symbols, the actual text that the user is expected to type, etc. - Make the generation of macro results optional, since it can be slow - Make code-completion accessible through the C API, marshalling the code-completion results through a temporary file (ick) to maintain process separation. The last doesn't have tests yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86306 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
|
0c8296dfb495f41d6f0de6fe1d03014ffd063674 |
07-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Various improvements to Clang's code-completion infrastructure: - Introduce more code-completion string "chunk" kinds that describe symbols, the actual text that the user is expected to type, etc. - Make the generation of macro results optional, since it can be slow - Make code-completion accessible through the C API, marshalling the code-completion results through a temporary file (ick) to maintain process separation. The last doesn't have tests yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86306 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
|
571bed5da0083016c1a9eae754a42f506ae38aac |
06-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Since default writable attribute is 'assign', allow specification of 'assign' (no warning to be issued), when a continuation class makes a 'readonly' attribute 'readwrite' but also specifies the 'assign' attribute. (this matches gcc's behavior and prevents exessive warnings)/ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86297 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
d669be595aa3a9be05edffa56d0e713d58f80823 |
06-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Since default writable attribute is 'assign', allow specification of 'assign' (no warning to be issued), when a continuation class makes a 'readonly' attribute 'readwrite' but also specifies the 'assign' attribute. (this matches gcc's behavior and prevents exessive warnings)/ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86297 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
cc8201ab5d9944974be29d965111068d7b10f6c9 |
06-Nov-2009 |
John McCall <rjmccall@apple.com> |
Don't warn -Wsign-compare if we're in an unevaluated context, and fixed a typo pointed out by Fariborz. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86265 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
7d62a8f81f2f22e25c048edfb412b22e06c542ff |
06-Nov-2009 |
John McCall <rjmccall@apple.com> |
Don't warn -Wsign-compare if we're in an unevaluated context, and fixed a typo pointed out by Fariborz. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86265 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
fc0df6d53f068a361790306659a7a977294e05d1 |
06-Nov-2009 |
John McCall <rjmccall@apple.com> |
compare.c also needs a target triple now, and improve some comments while we're at it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86243 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
48f5e63aec3f2fda7f1e75565bcbba08a9d6a14f |
06-Nov-2009 |
John McCall <rjmccall@apple.com> |
compare.c also needs a target triple now, and improve some comments while we're at it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86243 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
12e15e195905e118048db25f6249992d3e5c71a3 |
06-Nov-2009 |
John McCall <rjmccall@apple.com> |
Improve the -Wsign-compare heuristics: * If the unsigned type is smaller than the signed type, never warn, because its value will not change when zero-extended to the larger type. * If we're testing for (in)equality, and the unsigned value is an integer constant whose sign bit is not set, never warn, because even though the signed value might change, it can't affect the result of the equality. Also make the comparison test cases much more rigorous, and have them expose the subtle differences between C and C++ here. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86242 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
5dbad3d46c43e8051dac0c3775bcbaf8f1a6b8fe |
06-Nov-2009 |
John McCall <rjmccall@apple.com> |
Improve the -Wsign-compare heuristics: * If the unsigned type is smaller than the signed type, never warn, because its value will not change when zero-extended to the larger type. * If we're testing for (in)equality, and the unsigned value is an integer constant whose sign bit is not set, never warn, because even though the signed value might change, it can't affect the result of the equality. Also make the comparison test cases much more rigorous, and have them expose the subtle differences between C and C++ here. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86242 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
8d825b261b61699d3312326e5d4140a3cb3cc113 |
06-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Rework the fix-it hint for code like get_origin->x where get_origin is actually a function and the user has forgotten the parentheses. Instead of giving a lame note for the fix-it, give a full-fledge error, early, then build the call expression to try to recover. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86238 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
3f0b5fd3a55baf1e3e768fe981bcc3ad5e209ec1 |
06-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Rework the fix-it hint for code like get_origin->x where get_origin is actually a function and the user has forgotten the parentheses. Instead of giving a lame note for the fix-it, give a full-fledge error, early, then build the call expression to try to recover. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86238 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e4e2366d6b7f57abd644e244361daa5248820dff |
06-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
If we have a C-style cast, functional cast, or a static_cast to a class type, don't perform the array-to-pointer or function-to-pointer conversions, because we may end up binding a reference to a function or array. With this change, FileCheck now passes -fsyntax-only! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86211 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
b653c52d9176a4faecf923f792758f4454f7f78c |
06-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
If we have a C-style cast, functional cast, or a static_cast to a class type, don't perform the array-to-pointer or function-to-pointer conversions, because we may end up binding a reference to a function or array. With this change, FileCheck now passes -fsyntax-only! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86211 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
42ded814541a5b6157eb1b5dc4fee5885d0b657d |
06-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When we encounter a derived-to-base conversion when performing an implicit conversion sequence, check the validity of this conversion and then perform it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86210 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
b7a86f5c5f9cdea126817247cc1fd3a7441388da |
06-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
When we encounter a derived-to-base conversion when performing an implicit conversion sequence, check the validity of this conversion and then perform it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86210 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
bb3c9bb93664f2d7e8aa1ad344469270bedd9261 |
06-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Minor cleanup of my last patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86209 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
4c0cea2d9e933195f3af4aaf7bb5c65de80bdefc |
06-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Minor cleanup of my last patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86209 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
f4e4d5f238cdcfd1847c09c936c34f4db616da54 |
06-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
This patch implements Sema for clause 13.3.3.1p4. It has to do with vararg constructors used as conversion functions. Code gen needs work. This is WIP. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86207 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExprCXX.cpp
emaOverload.cpp
emaOverload.h
|
966256afd49a4af0c002046a19bb0041a507909b |
06-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
This patch implements Sema for clause 13.3.3.1p4. It has to do with vararg constructors used as conversion functions. Code gen needs work. This is WIP. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86207 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExprCXX.cpp
emaOverload.cpp
emaOverload.h
|
b5da9e3ee99263f02e3ea270b8679f12078f5f06 |
06-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Make sure that EnumConstantDecls always get a type, even when they have type-dependent initializers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86197 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
4912c347ce83e908c8a1a585260a32072eaf4ec6 |
06-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Make sure that EnumConstantDecls always get a type, even when they have type-dependent initializers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86197 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
bfe1024fc0c727eaa4da3a56e017b798a66b81ed |
05-Nov-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
The signed/unsigned checker should not warn for value-dependent expressions, and should especially not try to evaluate them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86173 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
732429cfb1f77c1af61e239d0664e65962e488b3 |
05-Nov-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
The signed/unsigned checker should not warn for value-dependent expressions, and should especially not try to evaluate them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86173 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
bef5923f6e1dce25d25f87a0ae5221a74bdd1d74 |
05-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Be a little more careful when trying to extract a TypeDecl from a enum/class/struct/union specifier; in invalid code, we may also see ClassTemplateDecls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86171 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
c7621a64717203e1f7d5d79dbf548e590b32596c |
05-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Be a little more careful when trying to extract a TypeDecl from a enum/class/struct/union specifier; in invalid code, we may also see ClassTemplateDecls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86171 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
9c7ab14293ca026170bfa698aa5141dd136c2cd2 |
05-Nov-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Don't allow definitions of array variables without some size information in C++. Fixed PR5401 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86165 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
6e8247556807ecaaac470852222762db998a05b2 |
05-Nov-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Don't allow definitions of array variables without some size information in C++. Fixed PR5401 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86165 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
dac6742b8ae1203ba81978ee1f0c98524bc4b690 |
05-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Eliminate some false positives due to a thinko in the "'blah' is always zero in this context" warning logic. Also, make the diagnostic itself more precise when referring to pointer values ("NULL" vs. "zero"). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86143 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
9c4b838782132ec670fd7e48d1a7a7fd433fed06 |
05-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Eliminate some false positives due to a thinko in the "'blah' is always zero in this context" warning logic. Also, make the diagnostic itself more precise when referring to pointer values ("NULL" vs. "zero"). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86143 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
78ee223eddffb1b6fc2867b6ec6f011bc2cb626a |
05-Nov-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
When collecting types for built-in candidates, make arrays decay to pointers. Otherwise, subscripting an array leads to no candidates at all. Fixes PR5360. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86140 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
a65b55142bd8e8c94f371bb056d8f58f11de220f |
05-Nov-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
When collecting types for built-in candidates, make arrays decay to pointers. Otherwise, subscripting an array leads to no candidates at all. Fixes PR5360. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86140 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
66a430ad6a74eb79cd26cf589427a102f17f9cbe |
05-Nov-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Allow the element type of arrays to be incomplete in C++. This fixes PR5048. Also fix a bug where zero-sized arrays weren't warned about when the size was unsigned. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86136 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
923d56d436f750bc1f29db50e641078725558a1b |
05-Nov-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Allow the element type of arrays to be incomplete in C++. This fixes PR5048. Also fix a bug where zero-sized arrays weren't warned about when the size was unsigned. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86136 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
2a8d30fe3aecd2bea217a7925caa15a061a7e3f1 |
05-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Fixed two places where we needed to force completion of a type (without complaining if it fails) to get proper semantics: reference binding with a derived-to-base conversion and the enumeration of constructors for user-defined conversions. There are probably more cases to fix, but my prior attempt at statically ensuring that complete-type checking always happens failed. Perhaps I'll try again. With this change, Clang can parse include/llvm/*.h! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86129 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXCast.cpp
emaDeclCXX.cpp
emaOverload.cpp
|
393896f49d5248435cf203cf1de60a86dc507c44 |
05-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Fixed two places where we needed to force completion of a type (without complaining if it fails) to get proper semantics: reference binding with a derived-to-base conversion and the enumeration of constructors for user-defined conversions. There are probably more cases to fix, but my prior attempt at statically ensuring that complete-type checking always happens failed. Perhaps I'll try again. With this change, Clang can parse include/llvm/*.h! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86129 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXCast.cpp
emaDeclCXX.cpp
emaOverload.cpp
|
a93c19302a410443d4ec3d12f97a0b0ac178c40c |
05-Nov-2009 |
John McCall <rjmccall@apple.com> |
Implement the conditional-operator part of -Wsign-compare. Turn DiagnoseSignCompare into Sema::CheckSignCompare and call it from more places. Add some enumerator tests. These seem to expose some oddities in the types we're converting C++ enumerators to; in particular, they're converting to unsigned before int, which seems to contradict 4.5 [conv.prom] p2. Note to self: stop baiting Doug in my commit messages. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86128 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprCXX.cpp
|
b13c87f0c9705d91d5a3e134be9934c9ad531071 |
05-Nov-2009 |
John McCall <rjmccall@apple.com> |
Implement the conditional-operator part of -Wsign-compare. Turn DiagnoseSignCompare into Sema::CheckSignCompare and call it from more places. Add some enumerator tests. These seem to expose some oddities in the types we're converting C++ enumerators to; in particular, they're converting to unsigned before int, which seems to contradict 4.5 [conv.prom] p2. Note to self: stop baiting Doug in my commit messages. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86128 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprCXX.cpp
|
9fb7fccf291b276d0be80ff040326b55bc6519f8 |
05-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When instantiating a UnaryOperator, allow the resulting expression to still be dependent or invoke an overloaded operator. Previously, we only supported builtin operators. BinaryOperator/CompoundAssignOperator didn't have this issue because we always built a CXXOperatorCallExpr node, even when name lookup didn't find any functions to save until instantiation time. Now, that code builds a BinaryOperator or CompoundAssignOperator rather than a CXXOperatorCallExpr, to save some space. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86087 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaOverload.cpp
reeTransform.h
|
6ca7cfb3fbe4dc92e457fd303814d274176cf359 |
05-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
When instantiating a UnaryOperator, allow the resulting expression to still be dependent or invoke an overloaded operator. Previously, we only supported builtin operators. BinaryOperator/CompoundAssignOperator didn't have this issue because we always built a CXXOperatorCallExpr node, even when name lookup didn't find any functions to save until instantiation time. Now, that code builds a BinaryOperator or CompoundAssignOperator rather than a CXXOperatorCallExpr, to save some space. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86087 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaOverload.cpp
reeTransform.h
|
ea3fd09ae9d2c5eb51cdd626b329785546856fa8 |
05-Nov-2009 |
John McCall <rjmccall@apple.com> |
Implement -Wsign-compare, or at least the actual comparison part of it. Conditional operands are next. Fixes part of rdar://problem/7289584. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86083 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
45aa4557fe4210034e85f4a807ff637a9dd146d6 |
05-Nov-2009 |
John McCall <rjmccall@apple.com> |
Implement -Wsign-compare, or at least the actual comparison part of it. Conditional operands are next. Fixes part of rdar://problem/7289584. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86083 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
1f60eceeea48b31b33a8edfe24b78e7c70820cdf |
05-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Make sure to grab CVR qualifiers from the canonical type. ARGH! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86079 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
b1c2ea5dddc9188e2ea30de7f6546f640b85dead |
05-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Make sure to grab CVR qualifiers from the canonical type. ARGH! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86079 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
ca296d849863081ba48aeebb102c12a95a6c20b1 |
05-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When instantiating a MemberExpr, be sure to instantiate the explicitly-specified template arguments, too! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86066 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
8a4386b3634065b96d08f94736bc1f953e385f50 |
05-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
When instantiating a MemberExpr, be sure to instantiate the explicitly-specified template arguments, too! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86066 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
94458a4ed940c3b853b57d8c399dfab0e715a5fa |
05-Nov-2009 |
John McCall <rjmccall@apple.com> |
Comments, formatting. Based on patch by Brandon Pearcy! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86065 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
6aee62129150e5fbe34f8d6e8a2e89f03d000d92 |
05-Nov-2009 |
John McCall <rjmccall@apple.com> |
Comments, formatting. Based on patch by Brandon Pearcy! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86065 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
9a5062f947c83614745ee356083115b67ba78e8b |
05-Nov-2009 |
John McCall <rjmccall@apple.com> |
Diagnose using a field to initialize itself. Patch by Brandon Pearcy! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86061 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
b41900410fae8cba4bc02db2e3e44142e7f4c625 |
05-Nov-2009 |
John McCall <rjmccall@apple.com> |
Diagnose using a field to initialize itself. Patch by Brandon Pearcy! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86061 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
42a38578e94b1c695fe377f273a12b049d7b1a1e |
04-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When starting a C++ member access expression, make sure to compute the type of the object even when it is dependent. Specifically, this makes sure that we get the right type for "this->", which is important when performing name lookup into this scope to determine whether an identifier or operator-function-id is a template name. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86060 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
emaExprCXX.cpp
|
43d8863df9d02f81acdf5f73fbc288f285bf442e |
04-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
When starting a C++ member access expression, make sure to compute the type of the object even when it is dependent. Specifically, this makes sure that we get the right type for "this->", which is important when performing name lookup into this scope to determine whether an identifier or operator-function-id is a template name. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86060 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
emaExprCXX.cpp
|
5de0a7d12d192ceffbbb275fc6f4d0c0f9010513 |
04-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix a little canonical-types issue with non-type template arguments. Fixes PR5349. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86052 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
ff5243981e2f6fb4a11ab7b81bf7accc226f2647 |
04-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Fix a little canonical-types issue with non-type template arguments. Fixes PR5349. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86052 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
3545ea3c6bf670b0f824ecf79b53d36111b2b048 |
04-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Don't try to check the initialization of fields with dependent types. Fixes PR5352. Fariborz, please review. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86031 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
1fe6b919f70bed58bd8bd43de1a79530b0d55a53 |
04-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Don't try to check the initialization of fields with dependent types. Fixes PR5352. Fariborz, please review. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86031 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
d2c55c0e84cc1fd9a8f3e01adab452de2e63cfb9 |
04-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Store the unresolved class type in MemberPointerType's Class field, from Peter Collingbourne! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86030 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
87c12c4a4667279dacb3d4a93c64b49148a0ff79 |
04-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Store the unresolved class type in MemberPointerType's Class field, from Peter Collingbourne! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86030 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
a5f7cb98b31f09b1011a46a37643fc6e6f451674 |
04-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Switch parsing of using declarations over to ParseUnqualifiedId. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86027 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
12c118a8ff9f61a4d63146fe1a5c0d60987f99bb |
04-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Switch parsing of using declarations over to ParseUnqualifiedId. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86027 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
000f59548655c6a0f9dc69521406506de022f5c8 |
04-Nov-2009 |
John McCall <rjmccall@apple.com> |
Preserve type source information in sizeof/alignof expressions, and pass it through to indexing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86018 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
reeTransform.h
|
5ab75172051a6d2ea71a80a79e81c65519fd3462 |
04-Nov-2009 |
John McCall <rjmccall@apple.com> |
Preserve type source information in sizeof/alignof expressions, and pass it through to indexing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86018 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
reeTransform.h
|
a0c7c5076cff8ac45c8002ea19e5606a2ccbf39a |
04-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When performing template instantiation (transformation) of expressions, keep track of whether we are immediately taking the address of the expression. Pass this flag when building a declaration name expression so that we handle pointer-to-member constants properly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86017 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
reeTransform.h
|
c86a6e988184867b09aa17a619402d0e81d0fda0 |
04-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
When performing template instantiation (transformation) of expressions, keep track of whether we are immediately taking the address of the expression. Pass this flag when building a declaration name expression so that we handle pointer-to-member constants properly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86017 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
reeTransform.h
|
3cdeade697dbfcc60cf14c3f87b7d41f5aa0f7f4 |
04-Nov-2009 |
John McCall <rjmccall@apple.com> |
Diagnose the use of 'fastcall' on functions without prototypes or with varargs prototypes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86001 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
9112b93829da90b1612453bea4c491a1678272a4 |
04-Nov-2009 |
John McCall <rjmccall@apple.com> |
Diagnose the use of 'fastcall' on functions without prototypes or with varargs prototypes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86001 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
0ba3aff6166d24f3e6732c033e87bf3d33faad7b |
04-Nov-2009 |
John McCall <rjmccall@apple.com> |
Diagnose __builtin_offsetof on incomplete types. Fixes rdar://problem/7222956 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85999 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
d00f200f64994858492558b54c6f6f2b3d4b4310 |
04-Nov-2009 |
John McCall <rjmccall@apple.com> |
Diagnose __builtin_offsetof on incomplete types. Fixes rdar://problem/7222956 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85999 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
9701fea26fbbd52521d6fba23ff272edecb4108d |
04-Nov-2009 |
John McCall <rjmccall@apple.com> |
Change our basic strategy for avoiding deprecation warnings when the decl use appears in a deprecated context. In the new strategy, we emit the warnings as usual unless we're currently parsing a declaration, where "declaration" is restricted to mean a decl group or a few special cases in Objective C. If we *are* parsing a declaration, we queue up the deprecation warnings until the declaration has been completely parsed, and then emit them only if the decl is not deprecated. We also standardize the bookkeeping for deprecation so as to avoid special cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85998 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
emaDeclAttr.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaType.cpp
|
54abf7d4fa3123b8324c09d2a4dfb789fd818403 |
04-Nov-2009 |
John McCall <rjmccall@apple.com> |
Change our basic strategy for avoiding deprecation warnings when the decl use appears in a deprecated context. In the new strategy, we emit the warnings as usual unless we're currently parsing a declaration, where "declaration" is restricted to mean a decl group or a few special cases in Objective C. If we *are* parsing a declaration, we queue up the deprecation warnings until the declaration has been completely parsed, and then emit them only if the decl is not deprecated. We also standardize the bookkeeping for deprecation so as to avoid special cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85998 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
emaDeclAttr.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaType.cpp
|
d1319d2d62b108c7c24c92e73d4d101b035d1037 |
04-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement support for parsing dependent template-ids that refer to overloaded operators, e.g., p->template operator+<T>() git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85989 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaTemplate.cpp
reeTransform.h
|
ca1bdd7c269a2390d43c040a60511edd017ee130 |
04-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement support for parsing dependent template-ids that refer to overloaded operators, e.g., p->template operator+<T>() git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85989 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaTemplate.cpp
reeTransform.h
|
c9f5eac5c940cc542c7f26560653cfeecd264545 |
04-Nov-2009 |
Mike Stump <mrs@apple.com> |
Refine volatile handling, specifically, we must have the canonical type to look at the volatile specifier. I found these all from just hand auditing the code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85967 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
df317bf71653eeb235da8337b1e8e790f9653aa4 |
04-Nov-2009 |
Mike Stump <mrs@apple.com> |
Refine volatile handling, specifically, we must have the canonical type to look at the volatile specifier. I found these all from just hand auditing the code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85967 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
3bd3bc4796da157e94d39ba30154b2fc7bf8af0a |
04-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Parsing and semantic analysis for template-ids that name overloaded operators, e.g., operator+<int> which now works in declarators, id-expressions, and member access expressions. This commit only implements the non-dependent case, where we can resolve the template-id to an actual declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85966 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
reeTransform.h
|
014e88d94ff83e3aad4e33b16413a2d1817ec208 |
04-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Parsing and semantic analysis for template-ids that name overloaded operators, e.g., operator+<int> which now works in declarators, id-expressions, and member access expressions. This commit only implements the non-dependent case, where we can resolve the template-id to an actual declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85966 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
reeTransform.h
|
5494aac66b039ce687752b5585c4da1b94e017ff |
03-Nov-2009 |
Mike Stump <mrs@apple.com> |
We have to ensure we have the canonical type to do this. This is but one instance of a large problem. assert for non-canoical types would help track down these things. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85956 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
fbf6870f5931f7a4b6632b3594cde28b48cffb9d |
03-Nov-2009 |
Mike Stump <mrs@apple.com> |
We have to ensure we have the canonical type to do this. This is but one instance of a large problem. assert for non-canoical types would help track down these things. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85956 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
c0767b60c0606f72e5ff88d6392be26f14701e3b |
03-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Remove previous patch for pr5296 due to further clarification of value-initialization and trivial constructors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85935 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
6f26920dfa5020202016b18f52ccd120d9c7e518 |
03-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Remove previous patch for pr5296 due to further clarification of value-initialization and trivial constructors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85935 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
b14db815faa116fe0b183c8e916eb7b4259e6125 |
03-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Replace the code that parses member access expressions after "." or "->" with a use of ParseUnqualifiedId. Collapse ActOnMemberReferenceExpr, ActOnDestructorReferenceExpr (both of them), ActOnOverloadedOperatorReferenceExpr, ActOnConversionOperatorReferenceExpr, and ActOnMemberTemplateIdReferenceExpr into a single, new action ActOnMemberAccessExpr that does the same thing more cleanly (and can keep more source-location information). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85930 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprCXX.cpp
emaTemplate.cpp
reeTransform.h
|
2d1c21414199a7452f122598189363a3922605b1 |
03-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Replace the code that parses member access expressions after "." or "->" with a use of ParseUnqualifiedId. Collapse ActOnMemberReferenceExpr, ActOnDestructorReferenceExpr (both of them), ActOnOverloadedOperatorReferenceExpr, ActOnConversionOperatorReferenceExpr, and ActOnMemberTemplateIdReferenceExpr into a single, new action ActOnMemberAccessExpr that does the same thing more cleanly (and can keep more source-location information). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85930 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprCXX.cpp
emaTemplate.cpp
reeTransform.h
|
4d8e4fe646df7d12f08a9c2681e6b13b7185f72f |
03-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Use ParseUnqualifiedId when parsing id-expressions. This eliminates yet another copy of the unqualified-id parsing code. Also, use UnqualifiedId to simplify the Action interface for building id-expressions. ActOnIdentifierExpr, ActOnCXXOperatorFunctionIdExpr, ActOnCXXConversionFunctionExpr, and ActOnTemplateIdExpr have all been removed in favor of the new ActOnIdExpression action. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85904 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaExpr.cpp
emaExprCXX.cpp
|
02a24ee67c0a91bdb0db8a651d5748595652e670 |
03-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Use ParseUnqualifiedId when parsing id-expressions. This eliminates yet another copy of the unqualified-id parsing code. Also, use UnqualifiedId to simplify the Action interface for building id-expressions. ActOnIdentifierExpr, ActOnCXXOperatorFunctionIdExpr, ActOnCXXConversionFunctionExpr, and ActOnTemplateIdExpr have all been removed in favor of the new ActOnIdExpression action. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85904 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaExpr.cpp
emaExprCXX.cpp
|
d87f5a7a7cb050e9cec8b330f06d1f034eddb417 |
03-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Introduce a new class, UnqualifiedId, that provides a parsed representation of a C++ unqualified-id, along with a single parsing function (Parser::ParseUnqualifiedId) that will parse all of the various forms of unqualified-id in C++. Replace the representation of the declarator name in Declarator with the new UnqualifiedId class, simplifying declarator-id parsing considerably and providing more source-location information to Sema. In the future, I hope to migrate all of the other unqualified-id-parsing code over to this single representation, then begin to merge actions that are currently only different because we didn't have a unqualified notion of the name in the parser. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85851 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaTemplate.cpp
emaType.cpp
|
3f9a0566e6793151b99a65ab936220971cf96c1b |
03-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Introduce a new class, UnqualifiedId, that provides a parsed representation of a C++ unqualified-id, along with a single parsing function (Parser::ParseUnqualifiedId) that will parse all of the various forms of unqualified-id in C++. Replace the representation of the declarator name in Declarator with the new UnqualifiedId class, simplifying declarator-id parsing considerably and providing more source-location information to Sema. In the future, I hope to migrate all of the other unqualified-id-parsing code over to this single representation, then begin to merge actions that are currently only different because we didn't have a unqualified notion of the name in the parser. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85851 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaTemplate.cpp
emaType.cpp
|
1738b3275a2150cd4e3a198f8d7bf01ed4d060e4 |
03-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Assortment of property attributes declared in continuation class must match those of same property declared in its primary class. (Fixes radar 7352425) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85843 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
cc667e2bd2ed7aaf99bc52c58d127644b8ebbfc8 |
03-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Assortment of property attributes declared in continuation class must match those of same property declared in its primary class. (Fixes radar 7352425) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85843 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
ce45a081aec95156d0c3ab5ab9ca0d37ac268372 |
02-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Property declared in continuation class can only be used to change a readonly property declared in the class (and its inherited protocols) to writable property. (Fixes radar 7350645). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85836 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
a6f14e1a7ee3a9343a838297c73ca87fddb9ed4a |
02-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Property declared in continuation class can only be used to change a readonly property declared in the class (and its inherited protocols) to writable property. (Fixes radar 7350645). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85836 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
8ee2fc3918d6eaf8befcfd5d6fa11169987db203 |
02-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Diagnose implementation of a property declared in a category in its class implementation instead of crashing. Fixes radar 7350345. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85813 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
3684bd4c9518f6507d375ff8e4a4e32ce3bb51c3 |
02-Nov-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Diagnose implementation of a property declared in a category in its class implementation instead of crashing. Fixes radar 7350345. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85813 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
d27690df1ba4d032a5afe8a0178410539b0919c7 |
01-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When determining whether a reference to a static data member is an integral constant expression, make sure to find where the initializer was provided---inside or outside the class definition---since that can affect whether we have an integral constant expression (and, we need to see the initializer itself). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85741 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
cf3293eaeb3853d12cff47e648bbe835004e929f |
01-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
When determining whether a reference to a static data member is an integral constant expression, make sure to find where the initializer was provided---inside or outside the class definition---since that can affect whether we have an integral constant expression (and, we need to see the initializer itself). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85741 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
36a15ecf8f868cb8dcefa96986d445bdf437c677 |
01-Nov-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Within a template, qualified name lookup can refer to a non-dependent type that is not known to be a base class at template definition time due to some dependent base class. Treat qualified name lookup that refers to a non-static data member or function as implicit class member access when the "this" type would be dependent. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85718 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
7a343142901f7f6bd1965051a24ae6a12c6f2148 |
01-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Within a template, qualified name lookup can refer to a non-dependent type that is not known to be a base class at template definition time due to some dependent base class. Treat qualified name lookup that refers to a non-static data member or function as implicit class member access when the "this" type would be dependent. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85718 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
f1a3bff60d25be1ff1431d553f1ea713ae34d7be |
31-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement "incremental" template instantiation for non-type template parameters and template type parameters, which occurs when substituting into the declarations of member templates inside class templates. This eliminates errors about our inability to "reduce non-type template parameter depth", fixing PR5311. Also fixes a bug when instantiating a template type parameter declaration in a member template, where we weren't properly reducing the template parameter's depth. LLVM's StringSwitch header now parses. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85669 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
550d9b28fd586db541eb6dd36f3c10d114e483d8 |
31-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement "incremental" template instantiation for non-type template parameters and template type parameters, which occurs when substituting into the declarations of member templates inside class templates. This eliminates errors about our inability to "reduce non-type template parameter depth", fixing PR5311. Also fixes a bug when instantiating a template type parameter declaration in a member template, where we weren't properly reducing the template parameter's depth. LLVM's StringSwitch header now parses. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85669 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
a0fc50d095fc82f24aaf239f86400f688f529daa |
30-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When a friend is declared in a dependent context, don't even try to match it up with a declaration in the outer scope. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85628 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
259571e27e513cfaf691cc7447e09b31a47d5438 |
30-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
When a friend is declared in a dependent context, don't even try to match it up with a declaration in the outer scope. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85628 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
88dff5f420c1adb91b60e18defc4e732982df7bf |
30-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Instantiate class template friends better; fixes PR5332. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85612 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
e8c01bdb56549adcecd71ce39160eea54b2c51c8 |
30-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Instantiate class template friends better; fixes PR5332. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85612 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
12ceb217833981841c85c1231354369f8ee43272 |
30-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Include macros in code-completion results git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85594 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
|
3f7c7f48654230d8e379214cfe49fcf2fde0a2c6 |
30-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Include macros in code-completion results git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85594 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
|
a9a97de9a49a3937dbae5e366d48a56a6b4c5b3a |
30-Oct-2009 |
Chris Lattner <sabre@nondot.org> |
warn about returning the address of a label. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85576 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
9e6b37a9f1d499e7ca0950edacd0b6569e491d7f |
30-Oct-2009 |
Chris Lattner <sabre@nondot.org> |
warn about returning the address of a label. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85576 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
691c8c98e422ea1cfbcd14006b874c0fc1f90714 |
30-Oct-2009 |
Anders Carlsson <andersca@mac.com> |
Add a CK_DerivedToBaseMemberPointer cast kind and use it in Sema (Still no codegen). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85552 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
1a31a18db9d657751f38c724adc0d62e86852bd7 |
30-Oct-2009 |
Anders Carlsson <andersca@mac.com> |
Add a CK_DerivedToBaseMemberPointer cast kind and use it in Sema (Still no codegen). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85552 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
d6e6aa154f9dd6184e82950d1bda29e192b1a355 |
30-Oct-2009 |
John McCall <rjmccall@apple.com> |
Include pointee type information in the diagnostic for creating bad pointers or arrays. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85550 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
ac406052f7b980f8caa6b07b4a8d0867d53852c4 |
30-Oct-2009 |
John McCall <rjmccall@apple.com> |
Include pointee type information in the diagnostic for creating bad pointers or arrays. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85550 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
997b30eccf20a93658b692604a4c89848c098d9c |
30-Oct-2009 |
John McCall <rjmccall@apple.com> |
Report accurate source-location information when rebuilding types during template instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85545 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
85737a71fee8c737f7cfba79a0aca89298fe573b |
30-Oct-2009 |
John McCall <rjmccall@apple.com> |
Report accurate source-location information when rebuilding types during template instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85545 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
42fec04e1c19b6bc408050c22439d63f12a10842 |
30-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
We may need to instantiate a class template specialization as part of a derived-to-base pointer case git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85532 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
2685eab9d36a3568b5d58fba13f0ecef6a611cf9 |
30-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
We may need to instantiate a class template specialization as part of a derived-to-base pointer case git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85532 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
61fa504add0ad0478e5261f4890b7425829db42f |
29-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Slightly improve source-location information during template instantiation git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85529 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
fbf2c945f8f8bbfe0459d45c03f9ff34bb445c81 |
29-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Slightly improve source-location information during template instantiation git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85529 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
0f6881c4e0e499c9dfd2ebb1a1d59709e1f93181 |
29-Oct-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Properly instantiate usage of overloaded operator []. Fixes PR5345. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85524 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaOverload.cpp
reeTransform.h
|
f322ed6d39a30f509023cf88588c1e6514226127 |
29-Oct-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Properly instantiate usage of overloaded operator []. Fixes PR5345. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85524 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaOverload.cpp
reeTransform.h
|
9260ee905bf6adf1084464ae9abe6a68c2e59cd3 |
29-Oct-2009 |
John McCall <rjmccall@apple.com> |
A few TemplateArgumentLoc clean-ups. Try to remember the Expr for a declaration. Provide an API for getting the SourceRange of a TAL and use it judiciously. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85520 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
reeTransform.h
|
828bff2079b6a91ecd7ed5b842c59527d7682789 |
29-Oct-2009 |
John McCall <rjmccall@apple.com> |
A few TemplateArgumentLoc clean-ups. Try to remember the Expr for a declaration. Provide an API for getting the SourceRange of a TAL and use it judiciously. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85520 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
reeTransform.h
|
9fb087baadf42a4bc0ae37fc49c57686af193dc8 |
29-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Yet more instantiation-location information. Fixes PR5336. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85516 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
fd2300e1ee0eab6c51862a92d3f3c72540b36b23 |
29-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Yet more instantiation-location information. Fixes PR5336. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85516 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
4684861161d3bee064fb167ad9dd35970b7d04fc |
29-Oct-2009 |
Anders Carlsson <andersca@mac.com> |
Make sure to call CompleteConstructorCall for bases and members that are initialized implicitly in constructors so that default arguments etc are set correctly. Fixes PR5283. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85510 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
0ebb6d391d2e29ed48a880517e2ba919bf7016d9 |
29-Oct-2009 |
Anders Carlsson <andersca@mac.com> |
Make sure to call CompleteConstructorCall for bases and members that are initialized implicitly in constructors so that default arguments etc are set correctly. Fixes PR5283. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85510 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
588613178e3a10e2b840c8f4db9e058f2fec0005 |
29-Oct-2009 |
John McCall <rjmccall@apple.com> |
Track source information for template arguments and template specialization types. Preserve it through template instantiation. Preserve it through PCH, although TSTs themselves aren't serializable, so that's pretty much meaningless. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85500 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
emaDecl.cpp
emaExpr.cpp
emaExprCXX.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
reeTransform.h
|
833ca991c1bfc967f0995974ca86f66ba1f666b5 |
29-Oct-2009 |
John McCall <rjmccall@apple.com> |
Track source information for template arguments and template specialization types. Preserve it through template instantiation. Preserve it through PCH, although TSTs themselves aren't serializable, so that's pretty much meaningless. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85500 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
emaDecl.cpp
emaExpr.cpp
emaExprCXX.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
reeTransform.h
|
c55a11bb31cf885afdc8e62f560f356bc0fdd4a9 |
29-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement support for semantic checking and template instantiation of class template partial specializations of member templates. Also, fixes a silly little bug in the marking of "used" template parameters in member templates. Fixes PR5236. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85447 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
ed9c0f90b7e0811c209b95e39fe07c211c531285 |
29-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement support for semantic checking and template instantiation of class template partial specializations of member templates. Also, fixes a silly little bug in the marking of "used" template parameters in member templates. Fixes PR5236. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85447 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
01d688161c2019cbe53c05d2e3c9fe1cf7ebe6b9 |
28-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Use array's base element type in getting to its constructor. WIP. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85420 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
680a3f3581fe9f17802522eeafa403b9c9dfa34a |
28-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Use array's base element type in getting to its constructor. WIP. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85420 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
4e9575c62844f1c163c5e8276992240ff57e963b |
28-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Removed an unnecessary arguement passed to InitializeVarWithConstructor which should come from the variable and wasn't correct for arrays in any case. No change in functionality. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85415 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
c0fcce461435fb906fbc0352484d0011a3c2957c |
28-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Removed an unnecessary arguement passed to InitializeVarWithConstructor which should come from the variable and wasn't correct for arrays in any case. No change in functionality. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85415 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
cf1139eb3ee563ad410cc5f9d6b1ed30cf36ff5f |
28-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Diagnose use of data pointer member in a function call expression instead of crashing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85401 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
5de245058d411b166dc32622f39298716450fa1c |
28-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Diagnose use of data pointer member in a function call expression instead of crashing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85401 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
3a9c583656ea05c5cce90c0f2ea0d5b044824f44 |
28-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Slightly improve source location information during template instantiation git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85353 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
5557b25bdbd63536f687ebb63a0bab55aa227626 |
28-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Slightly improve source location information during template instantiation git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85353 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
7872ee90a6a7002574321da3fafb39ca9b035e30 |
28-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Type of a conditional expression with two distinct objective-c class pointer is the most derived common class of the two. This is <rdar://problem/7334235>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85337 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
db07b3f7cdcb505329c1280d7cf70791739a7cad |
28-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Type of a conditional expression with two distinct objective-c class pointer is the most derived common class of the two. This is <rdar://problem/7334235>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85337 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
8b43240c2af348312e8b5d5bcb53018a238879a5 |
27-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Introduce FunctionDecl::isInlined() to tell whether a function should be inlined. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85307 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
7ced9c8529b734e313f62a3b81189d6f402f6713 |
27-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Introduce FunctionDecl::isInlined() to tell whether a function should be inlined. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85307 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
21c878fe794911621478ec927e03d3c44866ca9b |
27-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Rename FunctionDecl::isInline/setInline to FunctionDecl::isInlineSpecified/setInlineSpecified. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85305 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
emaTemplateInstantiateDecl.cpp
|
0130f3cc4ccd5f46361c48d5fe94133d74619424 |
27-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Rename FunctionDecl::isInline/setInline to FunctionDecl::isInlineSpecified/setInlineSpecified. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85305 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
emaTemplateInstantiateDecl.cpp
|
df79222c1d35830ff1e38e82e01ef186bc52ede5 |
27-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Explicit instantiation suppresses the instantiation of non-inline function template specializations and member functions of class template specializations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85300 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaTemplateInstantiateDecl.cpp
|
3b846b6c252972a6f142aa226c1e65aebd0feeca |
27-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Explicit instantiation suppresses the instantiation of non-inline function template specializations and member functions of class template specializations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85300 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaTemplateInstantiateDecl.cpp
|
cc04c7d8f91caa9fabeda99728c18407f2ba68c8 |
27-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
An explicit instantiation definition only instantiations those class members that have a definition. Also, use CheckSpecializationInstantiationRedecl as part of this instantiation to make sure that we diagnose the various kinds of problems that can occur with explicit instantiations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85270 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
0d03514da06dffb39a260a1228ea3fd01d196fa4 |
27-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
An explicit instantiation definition only instantiations those class members that have a definition. Also, use CheckSpecializationInstantiationRedecl as part of this instantiation to make sure that we diagnose the various kinds of problems that can occur with explicit instantiations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85270 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
49dd59feaea833864901540a0ff7d29e036ee62b |
27-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Generate constructor for value-initialization cases, even if the implementation technique doesn't call the constructor at that point. DR302. Fixes pr5296. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85249 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
6c813e1cb719a328f01619c3d44910be4e79e4d5 |
27-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Generate constructor for value-initialization cases, even if the implementation technique doesn't call the constructor at that point. DR302. Fixes pr5296. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85249 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
3ea917bf3bdf43c4dd8d1aa3469295d4ba2b8a5a |
27-Oct-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implement Chris's suggestions for the precendence warnings. Reformat the code a bit. Test the fixits. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85231 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
aee3c9375f97a49edef2a36f15df6abd9748e2a1 |
27-Oct-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implement Chris's suggestions for the precendence warnings. Reformat the code a bit. Test the fixits. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85231 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
c53fcc59005f84f05d99977ee005d09aa14555a9 |
27-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Only set the point of instantiation for an implicit or explicit instantiation once we have committed to performing the instantiation. As part of this, make our makeshift template-instantiation location information suck slightly less. Fixes PR5264. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85209 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaType.cpp
reeTransform.h
|
972e6ce33c7e307f4b0da12bd6079bbd6ef76948 |
27-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Only set the point of instantiation for an implicit or explicit instantiation once we have committed to performing the instantiation. As part of this, make our makeshift template-instantiation location information suck slightly less. Fixes PR5264. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85209 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaType.cpp
reeTransform.h
|
9d8865d6cea47fd7de87b0e1e109a48379489a3a |
27-Oct-2009 |
Mike Stump <mrs@apple.com> |
Almost missed this one... Doc update for last change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85196 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
cf57d615259debd91b649c939468b2d6be299ebc |
27-Oct-2009 |
Mike Stump <mrs@apple.com> |
Almost missed this one... Doc update for last change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85196 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
37f55c4efd4603ae0a9206d19d6568d2aec57442 |
27-Oct-2009 |
Mike Stump <mrs@apple.com> |
Refine noreturn handling. Fixes -Wmissing-noreturn so that it doesn't complain that functions that have a return statement should be declared noreturn. Fixed PR5286. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85195 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
1d7e767dc8700724b7534a8640596c6a13baf3a7 |
27-Oct-2009 |
Mike Stump <mrs@apple.com> |
Refine noreturn handling. Fixes -Wmissing-noreturn so that it doesn't complain that functions that have a return statement should be declared noreturn. Fixed PR5286. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85195 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
556f00822afc85dd8346f7600c70db26f66475c3 |
27-Oct-2009 |
Ted Kremenek <kremenek@apple.com> |
Use a pred_iterator instead of a succ_iterator (wrong typedef). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85193 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
776229180339d9e91246cefa0fa324d7ab0304e4 |
27-Oct-2009 |
Ted Kremenek <kremenek@apple.com> |
Use a pred_iterator instead of a succ_iterator (wrong typedef). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85193 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
69758ae2c2c58cad1df3530f4442a75c98757a67 |
26-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Add 'fixit' hint on mis-use of pointer-to-member binary operators. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85153 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
ef78ac60136dc694ed383b3d0109224d97791d2f |
26-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Add 'fixit' hint on mis-use of pointer-to-member binary operators. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85153 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
4b4153e445952585fb2ffec00987149c0a276b3d |
26-Oct-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Add fixit hint to bitwise precedence warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85129 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
6b169accbb182d328ad41746c4071d8e7f90a628 |
26-Oct-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Add fixit hint to bitwise precedence warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85129 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
1d2ce5a06cd25bf3e6de3cbcea9341c3e9adeb9a |
26-Oct-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implement a warning for mixing bitwise logical with comparison ops. Fixes PR5297. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85117 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
9e1d29bb369530c15230e4c92aa67239c283ece2 |
26-Oct-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implement a warning for mixing bitwise logical with comparison ops. Fixes PR5297. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85117 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ed178cf565b43cd3ba368a9b97eb43674a0394d7 |
25-Oct-2009 |
Chris Lattner <sabre@nondot.org> |
Fix PR5298 - -Wmissing-noreturn shouldn't warn if the function is already declared noreturn. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85075 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
7a128e84006fdabfda4b8bd04f09c2739ed7f824 |
25-Oct-2009 |
Chris Lattner <sabre@nondot.org> |
Fix PR5298 - -Wmissing-noreturn shouldn't warn if the function is already declared noreturn. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85075 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
a840ec56a85ca4bfbd716f7a94dc4ccf3f28cfab |
25-Oct-2009 |
Chris Lattner <sabre@nondot.org> |
Implement rdar://6756623 - use of deprecated type in deprecated typedef should not warn git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85073 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaType.cpp
|
523382640e9b099dd64ba0875a60a9356845b068 |
25-Oct-2009 |
Chris Lattner <sabre@nondot.org> |
Implement rdar://6756623 - use of deprecated type in deprecated typedef should not warn git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85073 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaType.cpp
|
649e2ded48027f02662d0d1da2f8eecd620442bb |
25-Oct-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Make sure we actually have a definition before asking if it is implicit. Fixes PR4674. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85072 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
38fd4d001182b0b125a42c3b7e83e9dbac50e8a5 |
25-Oct-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Make sure we actually have a definition before asking if it is implicit. Fixes PR4674. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85072 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
660630bc454625c186610e97e9525d5cc11a2f6d |
25-Oct-2009 |
Chris Lattner <sabre@nondot.org> |
When parsing a top level struct declaration, make sure to process decl attributes instead of dropping them on the floor. This allows us to diagnose cases like the testcase. Also don't diagnose deprecated stuff in ActOnTag: not all uses of tags may be 'uses', and SemaType does this now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85071 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d451f836be2d2839f6ac87181c5a52f4f6be397e |
25-Oct-2009 |
Chris Lattner <sabre@nondot.org> |
When parsing a top level struct declaration, make sure to process decl attributes instead of dropping them on the floor. This allows us to diagnose cases like the testcase. Also don't diagnose deprecated stuff in ActOnTag: not all uses of tags may be 'uses', and SemaType does this now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85071 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
9040d2e05feff2ed0fe1b883424c680191800a0d |
25-Oct-2009 |
Chris Lattner <sabre@nondot.org> |
move calls to DiagnoseUseOfDecl (which warns about deprecated/unavailable types) out of Sema::getTypeName into ConvertDeclSpecToType. getTypeName is sometimes used as a predicate in the parser, so it could cause redundant diags to be emitted. This is also needed by two upcoming enhancements. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85070 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaType.cpp
|
a64ef0ab5cb6ac9cfb7d40661a9152c4aa488386 |
25-Oct-2009 |
Chris Lattner <sabre@nondot.org> |
move calls to DiagnoseUseOfDecl (which warns about deprecated/unavailable types) out of Sema::getTypeName into ConvertDeclSpecToType. getTypeName is sometimes used as a predicate in the parser, so it could cause redundant diags to be emitted. This is also needed by two upcoming enhancements. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85070 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaType.cpp
|
f6d3e11497fbae115d58e7d4e47051e098b945e1 |
25-Oct-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Remove the Skip parameter from GetTypeForDeclarator and dependents. Take the opportunity to improve an error message and fix PR4498. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85068 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaExprCXX.cpp
emaType.cpp
|
8ce35b095e8fca45e04c1bda14ed0548ce7536ad |
25-Oct-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Remove the Skip parameter from GetTypeForDeclarator and dependents. Take the opportunity to improve an error message and fix PR4498. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85068 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaExprCXX.cpp
emaType.cpp
|
371d0d54c8b8e537ca75f1d4f2fd1f361df1d233 |
25-Oct-2009 |
Chris Lattner <sabre@nondot.org> |
remove a nonsensical todo git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85067 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
5a597a9d1c5ad409eb48b821e1ceb95057701214 |
25-Oct-2009 |
Chris Lattner <sabre@nondot.org> |
remove a nonsensical todo git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85067 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
b95faf5b7275f7d3d87f89f4e8bf840d7764af7a |
25-Oct-2009 |
Chris Lattner <sabre@nondot.org> |
move the extwarn about using long long out of the entry of GetTypeForDeclarator and into the code that handles long long already. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85063 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
311157fa6be96e2769bf317390dc9fb85087d5fa |
25-Oct-2009 |
Chris Lattner <sabre@nondot.org> |
move the extwarn about using long long out of the entry of GetTypeForDeclarator and into the code that handles long long already. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85063 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
cd5086086023db8aadbbcee5bacae0014be2a62c |
25-Oct-2009 |
Chris Lattner <sabre@nondot.org> |
simplify interface to ConvertDeclSpecToType, check for inferred block return types only when a TST isn't specified, not every time through GetTypeForDeclarator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85062 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
5db2bb1cb0c040dcbca1b5000f091d6d225b4bfe |
25-Oct-2009 |
Chris Lattner <sabre@nondot.org> |
simplify interface to ConvertDeclSpecToType, check for inferred block return types only when a TST isn't specified, not every time through GetTypeForDeclarator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85062 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
09785aafaaefe605e2c4a5e57643df1394d2e526 |
25-Oct-2009 |
Chris Lattner <sabre@nondot.org> |
change ConvertDeclSpecToType to be a static function in SemaType.cpp git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85061 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaType.cpp
|
1564e3906cad604a42bd131e584751a75589a9c4 |
25-Oct-2009 |
Chris Lattner <sabre@nondot.org> |
change ConvertDeclSpecToType to be a static function in SemaType.cpp git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85061 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaType.cpp
|
1ea45c2dc05470e81c857750bbe6ed82c4fabcc0 |
25-Oct-2009 |
Chris Lattner <sabre@nondot.org> |
change Sema::ActOnFriendTypeDecl to use GetTypeForDeclarator instead of ConvertDeclSpecToType, which I'd like to keep private to SemaType.cpp. We do this by cons'ing up a trivial Declarator for the type. John, please review. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85060 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
c7f1904474600aa74f5f014941d2ed5c4cf462aa |
25-Oct-2009 |
Chris Lattner <sabre@nondot.org> |
change Sema::ActOnFriendTypeDecl to use GetTypeForDeclarator instead of ConvertDeclSpecToType, which I'd like to keep private to SemaType.cpp. We do this by cons'ing up a trivial Declarator for the type. John, please review. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85060 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
58716d617334d0c0050f9ff249b7393199be56cf |
25-Oct-2009 |
Chris Lattner <sabre@nondot.org> |
various cleanups for SemaType.cpp git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85059 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
778ed741de8ada0049b89608af0abdb5ae6e106e |
25-Oct-2009 |
Chris Lattner <sabre@nondot.org> |
various cleanups for SemaType.cpp git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85059 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
e5519657badccdacc4ef0441a9b3e2bb0e35f645 |
25-Oct-2009 |
Chris Lattner <sabre@nondot.org> |
minor reorg: check both attributes before decl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85058 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ffb936801529d767699847f0107f6abaa99c0c26 |
25-Oct-2009 |
Chris Lattner <sabre@nondot.org> |
minor reorg: check both attributes before decl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85058 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
020762869df71eae91dfd4a8ccf62cc775a660ee |
25-Oct-2009 |
Chris Lattner <sabre@nondot.org> |
simplify Sema::getTypeName a bit: if control gets out of the switch, IIDecl cannot be null. There is no need to check for both C++ mode and presence of CXXRecordDecl. ObjC interfaces can't have ScopeSpecs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85057 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
10ca337b1e3684547bd21021a23a566f30fa83b4 |
25-Oct-2009 |
Chris Lattner <sabre@nondot.org> |
simplify Sema::getTypeName a bit: if control gets out of the switch, IIDecl cannot be null. There is no need to check for both C++ mode and presence of CXXRecordDecl. ObjC interfaces can't have ScopeSpecs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85057 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
0627d19a4caf3246f1f5948cf754146fc6165cbc |
25-Oct-2009 |
Chris Lattner <sabre@nondot.org> |
In objc mode, every identifier in a cast expression was using doing a type looking using getTypeName() and every property access was using NextToken() to do lookahead to see if the identifier is followed by a '.'. Rearrange this code to not need lookahead and only do the type lookup if we have "identifier." in the token stream. Also improve a diagnostic a bit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85056 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
b7c3fd7b493329550c29dec11d31aca4d537e23e |
25-Oct-2009 |
Chris Lattner <sabre@nondot.org> |
In objc mode, every identifier in a cast expression was using doing a type looking using getTypeName() and every property access was using NextToken() to do lookahead to see if the identifier is followed by a '.'. Rearrange this code to not need lookahead and only do the type lookup if we have "identifier." in the token stream. Also improve a diagnostic a bit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85056 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
11cb5fb202107a6beb7c86ff7e94ecb04e0ed423 |
25-Oct-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Audit the code for places where it is assumed that every base specifier refers to a RecordType. Add assertions or conditions as appropriate. This fixes another crash in the Apache stdlib vector. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85055 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaOverload.cpp
emaTemplateDeduction.cpp
|
9994a34f6cf842721ba7723edc0b9036229fe387 |
25-Oct-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Audit the code for places where it is assumed that every base specifier refers to a RecordType. Add assertions or conditions as appropriate. This fixes another crash in the Apache stdlib vector. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85055 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaOverload.cpp
emaTemplateDeduction.cpp
|
b05df31ad4fc4f7b5fcb48fe09a6312f89085519 |
25-Oct-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Ignore dependent bases in ADL. Fixes PR5271. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85054 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
bbc1cc5757d0ef068bef583ee4eda108dece806c |
25-Oct-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Ignore dependent bases in ADL. Fixes PR5271. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85054 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
bcdfb9a9ac1bf52f709b6bb5755a76aa8059795e |
25-Oct-2009 |
Nate Begeman <natebegeman@mac.com> |
Add support for vector shifts, pretty straight forward. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85033 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
2207d79204559baa15fc1f342f813d1bcdb6db5b |
25-Oct-2009 |
Nate Begeman <natebegeman@mac.com> |
Add support for vector shifts, pretty straight forward. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85033 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
7f96d1fe90385d6477dbff418408a5563c3022e3 |
24-Oct-2009 |
John McCall <rjmccall@apple.com> |
Preserve type source information in TypedefDecls. Preserve it across template instantiation. Preserve it through PCH. Show it off to the indexer. I'm healthily ignoring the vector type cases because we don't have a sensible TypeLoc implementation for them anyway. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84994 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
emaDeclAttr.cpp
emaTemplateInstantiateDecl.cpp
|
ba6a9bd384df475780be636ca45bcef5c5bbd19f |
24-Oct-2009 |
John McCall <rjmccall@apple.com> |
Preserve type source information in TypedefDecls. Preserve it across template instantiation. Preserve it through PCH. Show it off to the indexer. I'm healthily ignoring the vector type cases because we don't have a sensible TypeLoc implementation for them anyway. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84994 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
emaDeclAttr.cpp
emaTemplateInstantiateDecl.cpp
|
b9624abdd8c4ab492413153adb468d648457b2ab |
24-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix overload resolution when calling a member template or taking the address of a member template when explicit template arguments are provided. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84991 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaOverload.cpp
|
3eefb1c4bd2c562e43f25e0dba657bb32361dd14 |
24-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Fix overload resolution when calling a member template or taking the address of a member template when explicit template arguments are provided. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84991 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaOverload.cpp
|
e6ce0921969df786dc35625317a1692bea2644ee |
24-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement template instantiation for non-type template parameters. Fixes PR5103. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84979 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
33642df30088f2ddb0b22c609523ab8df9dff595 |
24-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement template instantiation for non-type template parameters. Fixes PR5103. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84979 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
b57ab7949f6b2ec0dd49f750843fab093592cacd |
24-Oct-2009 |
John McCall <rjmccall@apple.com> |
Store the builtin types as CanQualTypes. Expand a bit on the CanQual API, but also remove some methods that cause ambiguities, and generally make CanQual<blah> more analogous to QualType. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84976 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
e27ec8ad56dbf1efb2de004b90fbbb86f740e3f1 |
24-Oct-2009 |
John McCall <rjmccall@apple.com> |
Store the builtin types as CanQualTypes. Expand a bit on the CanQual API, but also remove some methods that cause ambiguities, and generally make CanQual<blah> more analogous to QualType. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84976 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
38c121d1858505bad37e632ba2eaf94970af9afa |
24-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Migrate Sema::ActOnCallExpr to Sema::FixOverloadedFunctionReference, so that we maintain better source information after template argument deduction and overloading resolves down to a specific declaration. Found and dealt with a few more cases that FixOverloadedFunctionReference didn't cope with. (Finally) added a test case that puts together this change with the DeclRefExpr change to (optionally) include nested-name-specifiers and explicit template argument lists. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84974 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaOverload.cpp
|
097bfb11759be2187732329ecf4c0849609cdf57 |
24-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Migrate Sema::ActOnCallExpr to Sema::FixOverloadedFunctionReference, so that we maintain better source information after template argument deduction and overloading resolves down to a specific declaration. Found and dealt with a few more cases that FixOverloadedFunctionReference didn't cope with. (Finally) added a test case that puts together this change with the DeclRefExpr change to (optionally) include nested-name-specifiers and explicit template argument lists. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84974 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaOverload.cpp
|
54d2596d47cc4ae9067d3b05f533d2176ef8492a |
23-Oct-2009 |
John McCall <rjmccall@apple.com> |
Remove OriginalTypeParmDecl; the original type is the one specified in the DeclaratorInfo, if one is present. Preserve source information through template instantiation. This is made more complicated by the possibility that ParmVarDecls don't have DIs, which is possibly worth fixing in the future. Also preserve source information for function parameters in ObjC method declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84971 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclObjC.cpp
emaTemplateInstantiateDecl.cpp
|
58e4677a948e80c92deeebbcd3bdd9266adda798 |
23-Oct-2009 |
John McCall <rjmccall@apple.com> |
Remove OriginalTypeParmDecl; the original type is the one specified in the DeclaratorInfo, if one is present. Preserve source information through template instantiation. This is made more complicated by the possibility that ParmVarDecls don't have DIs, which is possibly worth fixing in the future. Also preserve source information for function parameters in ObjC method declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84971 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclObjC.cpp
emaTemplateInstantiateDecl.cpp
|
c5117f73bbc42ccc149fdd447af0e7ff60e5f95f |
23-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Diagnose misuse of '.*' and '->*' operators during parse instead of crashing in code gen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84968 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
f071e9b173dbaf97b00849c309a97c5aa3c49ae9 |
23-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Diagnose misuse of '.*' and '->*' operators during parse instead of crashing in code gen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84968 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
182c07396c4d85f208d2c92dcc54869fba2f0b53 |
23-Oct-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Apply the special enum restrictions from [over.match.oper]p3b2 in argument-dependent lookup too. This fixes PR5244. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84963 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaLookup.cpp
emaOverload.cpp
reeTransform.h
|
644be853b87cae94fcabaf309a5e482a8c291fb9 |
23-Oct-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Apply the special enum restrictions from [over.match.oper]p3b2 in argument-dependent lookup too. This fixes PR5244. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84963 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaLookup.cpp
emaOverload.cpp
reeTransform.h
|
1d5d81452d1e5f93f0fd6537a5909b1fcf94bb73 |
23-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Eliminate QualifiedDeclRefExpr, which captured the notion of a qualified reference to a declaration that is not a non-static data member or non-static member function, e.g., namespace N { int i; } int j = N::i; Instead, extend DeclRefExpr to optionally store the qualifier. Most clients won't see or care about the difference (since QualifierDeclRefExpr inherited DeclRefExpr). However, this reduces the number of top-level expression types that clients need to cope with, brings the implementation of DeclRefExpr into line with MemberExpr, and simplifies and unifies our handling of declaration references. Extended DeclRefExpr to (optionally) store explicitly-specified template arguments. This occurs when naming a declaration via a template-id (which will be stored in a TemplateIdRefExpr) that, following template argument deduction and (possibly) overload resolution, is replaced with a DeclRefExpr that refers to a template specialization but maintains the template arguments as written. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84962 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaCodeComplete.cpp
emaExpr.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
reeTransform.h
|
a2813cec2605ce7878d1b13471d685f689b251af |
23-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Eliminate QualifiedDeclRefExpr, which captured the notion of a qualified reference to a declaration that is not a non-static data member or non-static member function, e.g., namespace N { int i; } int j = N::i; Instead, extend DeclRefExpr to optionally store the qualifier. Most clients won't see or care about the difference (since QualifierDeclRefExpr inherited DeclRefExpr). However, this reduces the number of top-level expression types that clients need to cope with, brings the implementation of DeclRefExpr into line with MemberExpr, and simplifies and unifies our handling of declaration references. Extended DeclRefExpr to (optionally) store explicitly-specified template arguments. This occurs when naming a declaration via a template-id (which will be stored in a TemplateIdRefExpr) that, following template argument deduction and (possibly) overload resolution, is replaced with a DeclRefExpr that refers to a template specialization but maintains the template arguments as written. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84962 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaCodeComplete.cpp
emaExpr.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
reeTransform.h
|
fa6c951dc6cd9b98ad255497726acb3282430a98 |
23-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Fixed a code gen bug (by fixing the AST) involving user-defined pointer-to-member type conversion follwed by a pointer-to-member standard conversion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84955 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
7a1f4cc8d5ce5813d8def23d6ec9783cb2f4450b |
23-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Fixed a code gen bug (by fixing the AST) involving user-defined pointer-to-member type conversion follwed by a pointer-to-member standard conversion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84955 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
bff3f6b04642b1c982fd60de42c395b83e18ba51 |
23-Oct-2009 |
John McCall <rjmccall@apple.com> |
Rebuild dependently-sized ext vectors if either the element type or the size changed under the transform. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84953 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
eee91c3efbfc6a1509b42f39beb5533a9636fd70 |
23-Oct-2009 |
John McCall <rjmccall@apple.com> |
Rebuild dependently-sized ext vectors if either the element type or the size changed under the transform. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84953 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
3c3c3f3c0a4f5df614502edf1a01ca47c28554f3 |
23-Oct-2009 |
Benjamin Kramer <benny.kra@googlemail.com> |
Silence GCC 4.3 warning. TreeTransform.h:2333: warning: suggest parentheses around && within || git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84949 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
38caf910aa1fbf3953bf05506b1e49577f46ab42 |
23-Oct-2009 |
Benjamin Kramer <benny.kra@googlemail.com> |
Silence GCC 4.3 warning. TreeTransform.h:2333: warning: suggest parentheses around && within || git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84949 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
740d0f8f141fb32f68bb7d7a3fe0e3e4a02771fb |
23-Oct-2009 |
John McCall <rjmccall@apple.com> |
Preserve type source information when substituting into FieldDecls. Just r84734 now that some fundamental work has been completed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84914 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
07fb6bef6242c0f2ab47f059583edbdef924823e |
23-Oct-2009 |
John McCall <rjmccall@apple.com> |
Preserve type source information when substituting into FieldDecls. Just r84734 now that some fundamental work has been completed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84914 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
1e4ad7cf7515980fca225749aa0d865061eb4941 |
23-Oct-2009 |
John McCall <rjmccall@apple.com> |
Preserve source information for anonymous struct/union declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84913 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
eb692e07c71be22d06d38c83ad081a3808bd7f2a |
23-Oct-2009 |
John McCall <rjmccall@apple.com> |
Preserve source information for anonymous struct/union declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84913 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
4ea8425c9601895fa137f877bc784f75f20adac6 |
23-Oct-2009 |
John McCall <rjmccall@apple.com> |
When building types from declarators, instead of building two types (one for the DeclaratorInfo, one for semantic analysis), just build a single type whose canonical type will reflect the semantic analysis (assuming the type is well-formed, of course). To make that work, make a few changes to the type system: * allow the nominal pointee type of a reference type to be a (possibly sugared) reference type. Also, preserve the original spelling of the reference type. Both of these can be ignored on canonical reference types. * Remove ObjCProtocolListType and preserve the associated source information on the various ObjC TypeLocs. Preserve the spelling of protocol lists except in the canonical form. * Preserve some level of source type structure on parameter types, but canonicalize on the canonical function type. This is still a WIP. Drops code size, makes strides towards accurate source location representation, slight (~1.7%) progression on Cocoa.h because of complexity drop. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84907 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaType.cpp
reeTransform.h
|
54e14c4db764c0636160d26c5bbf491637c83a76 |
23-Oct-2009 |
John McCall <rjmccall@apple.com> |
When building types from declarators, instead of building two types (one for the DeclaratorInfo, one for semantic analysis), just build a single type whose canonical type will reflect the semantic analysis (assuming the type is well-formed, of course). To make that work, make a few changes to the type system: * allow the nominal pointee type of a reference type to be a (possibly sugared) reference type. Also, preserve the original spelling of the reference type. Both of these can be ignored on canonical reference types. * Remove ObjCProtocolListType and preserve the associated source information on the various ObjC TypeLocs. Preserve the spelling of protocol lists except in the canonical form. * Preserve some level of source type structure on parameter types, but canonicalize on the canonical function type. This is still a WIP. Drops code size, makes strides towards accurate source location representation, slight (~1.7%) progression on Cocoa.h because of complexity drop. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84907 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaType.cpp
reeTransform.h
|
7480534aa1979f5c8a6c1d59ede223ba21f280e5 |
22-Oct-2009 |
John McCall <rjmccall@apple.com> |
Canonicality is a property of qualified types, not unqualified types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84891 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
467b27b9a24bdc823218ad1ad0e37673b6cc1e83 |
22-Oct-2009 |
John McCall <rjmccall@apple.com> |
Canonicality is a property of qualified types, not unqualified types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84891 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
9dd3f959d1c82f95cb2022f2ab5e7bc983e46fd9 |
22-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When replacing a template-id expression with a declaration reference expression after overloading completes, make sure to keep the qualifier. Still not ready with that test-case... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84880 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
423a4e0c853be8f312de9f91a4809eb3a753f824 |
22-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
When replacing a template-id expression with a declaration reference expression after overloading completes, make sure to keep the qualifier. Still not ready with that test-case... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84880 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
1af8faf20679db29c525f3c3f06e9dd7b6830874 |
22-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When building and instantiating a template-id reference expression, such as N::f<int> keep track of the full nested-name-specifier. This is mainly QoI and relatively hard to test; will try to come up with a printing-based test once we also retain the explicit template arguments past overload resolution. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84869 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
reeTransform.h
|
f17bb74e74aca9bb0525d2249041ab65c7d1fd48 |
22-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
When building and instantiating a template-id reference expression, such as N::f<int> keep track of the full nested-name-specifier. This is mainly QoI and relatively hard to test; will try to come up with a printing-based test once we also retain the explicit template arguments past overload resolution. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84869 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
reeTransform.h
|
1fbfcfa73e3a501a71a4d25694f053698c407b95 |
22-Oct-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Try to instantiate templates before doing hierarchy checks in static_cast. Fixes PR5261. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84860 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
5ed66f709126b60e88631bf86d7e2d59e774686f |
22-Oct-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Try to instantiate templates before doing hierarchy checks in static_cast. Fixes PR5261. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84860 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
352efd0893f033006333114e77ce137ac8298a33 |
22-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When a template-id expression refers to a member function template, turn it into an (implicit) member access expression. Fixes PR5220 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84848 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
a9e29aa4b1e5042a763240899d8b8cf1267c3ec5 |
22-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
When a template-id expression refers to a member function template, turn it into an (implicit) member access expression. Fixes PR5220 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84848 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
4008673ad7151930b632af021f47823f41b12739 |
22-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Refactor our handling of implicit member reference expressions to get most of the logic out of BuildDeclarationNameExpr git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84847 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprCXX.cpp
|
e961afbf3f5604b043773192de77effa207cbe8c |
22-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Refactor our handling of implicit member reference expressions to get most of the logic out of BuildDeclarationNameExpr git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84847 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprCXX.cpp
|
0fe3bb4641bfe1403102ceafdd6742a13f4e8a1e |
22-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Don't (directly) call RequireCompleteType with an invalid source location. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84793 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExprCXX.cpp
emaOverload.cpp
emaType.cpp
|
573d9c325279b6e156c7fde163ffe3629c62d596 |
22-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Don't (directly) call RequireCompleteType with an invalid source location. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84793 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExprCXX.cpp
emaOverload.cpp
emaType.cpp
|
efa78d637410b07c4c25ffbe25fc428ef99044b7 |
22-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Don't generate pointer types for void or base classes when finding conversion types for builtin overloaded operator candidates; I misread this section in the standard the first time around. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84788 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
652371ad0427b2310ff01ea22fdc37f02d19abe8 |
22-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Don't generate pointer types for void or base classes when finding conversion types for builtin overloaded operator candidates; I misread this section in the standard the first time around. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84788 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
336eed634306d43d5ced92ef472ecc79e766ea09 |
21-Oct-2009 |
Anders Carlsson <andersca@mac.com> |
Change FixOverloadedFunctionReference to return a (possibly new) expression. Substitute TemplateIdRefExprs with DeclRefExprs. Doug, plz review :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84763 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExprCXX.cpp
emaOverload.cpp
emaTemplate.cpp
|
96ad5337a4949523ce9df617dad8ca10d3ab9788 |
21-Oct-2009 |
Anders Carlsson <andersca@mac.com> |
Change FixOverloadedFunctionReference to return a (possibly new) expression. Substitute TemplateIdRefExprs with DeclRefExprs. Doug, plz review :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84763 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExprCXX.cpp
emaOverload.cpp
emaTemplate.cpp
|
57d23a991e94b32b2ce78b7c8c301c48687f7281 |
21-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve diagnostics and template instantiation behavior when calling an overloaded function call operator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84745 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
4a27d7061ee2fe0e2b71aa470c323e76afb95917 |
21-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Improve diagnostics and template instantiation behavior when calling an overloaded function call operator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84745 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
f77b3803d8d13470f7a35775f243a91c9450e714 |
21-Oct-2009 |
John McCall <rjmccall@apple.com> |
Revert those last two commits. Beware the treacherous semicolon. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84736 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
3c50bfe3d9d4bda4183a541d97ec5b32bbae7aab |
21-Oct-2009 |
John McCall <rjmccall@apple.com> |
Revert those last two commits. Beware the treacherous semicolon. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84736 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
f1573a23f8810f2a9c0290f9e8df2b75bda6287d |
21-Oct-2009 |
John McCall <rjmccall@apple.com> |
Preserve type source information when substituting into ParmVarDecls. Apparently I'm grinding my commit count. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84735 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
1dc9acdb06dbd5f0a5747dd0ffa7ede680d7ca08 |
21-Oct-2009 |
John McCall <rjmccall@apple.com> |
Preserve type source information when substituting into ParmVarDecls. Apparently I'm grinding my commit count. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84735 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
dc2e3d7e5ca0fd57121cd7680825565de704ef31 |
21-Oct-2009 |
John McCall <rjmccall@apple.com> |
Preserve type source information when substituting into FieldDecls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84734 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
71e2bf960105daeb3b6f7005e73885b790b2a1b1 |
21-Oct-2009 |
John McCall <rjmccall@apple.com> |
Preserve type source information when substituting into FieldDecls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84734 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
196fa81f35a1e6dc7e88d2324068e431bf15eae6 |
21-Oct-2009 |
John McCall <rjmccall@apple.com> |
Preserve source information when substituting into VarDecls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84733 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
0a5fa06a688e1086ea553a24b42b9915996ed1f7 |
21-Oct-2009 |
John McCall <rjmccall@apple.com> |
Preserve source information when substituting into VarDecls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84733 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
dd41da9a2b74de24ef09f56cc5bb92be99787415 |
21-Oct-2009 |
John McCall <rjmccall@apple.com> |
Clone Sema::SubstType for DeclaratorInfos. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84724 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateInstantiate.cpp
|
cd7ba1c183bbe09a4c9ca5b58a35ef5374ec0882 |
21-Oct-2009 |
John McCall <rjmccall@apple.com> |
Clone Sema::SubstType for DeclaratorInfos. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84724 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateInstantiate.cpp
|
97e9d548309e177269cd14359882d973ede805dd |
21-Oct-2009 |
John McCall <rjmccall@apple.com> |
Initialize using the base location provided by the derived implementation, not the default one (which is always empty). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84721 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
4802a311f402836f1f226a3d7a87e6a3088f9704 |
21-Oct-2009 |
John McCall <rjmccall@apple.com> |
Initialize using the base location provided by the derived implementation, not the default one (which is always empty). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84721 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
567ad994314c7b19cd94aa738e7a344d2f4629e9 |
21-Oct-2009 |
John McCall <rjmccall@apple.com> |
Rewrite TreeTransform to transform types as DeclaratorInfos rather than as bare QualTypes. Don't actually exploit this yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84716 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateInstantiate.cpp
reeTransform.h
|
a2becad14a0eb19cde2f441ced588b975433d2ed |
21-Oct-2009 |
John McCall <rjmccall@apple.com> |
Rewrite TreeTransform to transform types as DeclaratorInfos rather than as bare QualTypes. Don't actually exploit this yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84716 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateInstantiate.cpp
reeTransform.h
|
5c19238f3e96f9d267f8683fe4e34bacfd8ead27 |
21-Oct-2009 |
Ted Kremenek <kremenek@apple.com> |
Add FIXME. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84696 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
cd6cdeb7d15af731d1d06d9aee4190713f59e8d7 |
21-Oct-2009 |
Ted Kremenek <kremenek@apple.com> |
Add FIXME. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84696 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
c8a331d483eee979a577f4cd044faee8332e467e |
21-Oct-2009 |
Anders Carlsson <andersca@mac.com> |
Change ResolveAddressOfOverloadedFunction to support TemplateIdRefExpr. No testcase yet because FixOverloadedFunctionReference needs to be updated too. Doug, plz review. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84693 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
705348544cdf9db2b88ebfa60966b62a5be1f3f1 |
21-Oct-2009 |
Anders Carlsson <andersca@mac.com> |
Change ResolveAddressOfOverloadedFunction to support TemplateIdRefExpr. No testcase yet because FixOverloadedFunctionReference needs to be updated too. Doug, plz review. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84693 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
60095fbee65d50c0d1150be917b8e4d1f522023c |
20-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Moved comment to its proper place in my last patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84662 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
2357da088fdefea1df083a6816f8553c3f53e0d3 |
20-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Moved comment to its proper place in my last patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84662 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
5856e3523778f654175a7ce3ba77a699bf20bf6a |
20-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch implements ranking conversions between member pointers [over.ics.rank] git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84660 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
8577c98a679d69fe1254e57c67bb3e1d5eaf92be |
20-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch implements ranking conversions between member pointers [over.ics.rank] git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84660 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
294b199e9bae5088f24bc9f71dc5cf5a561d9e58 |
20-Oct-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Remove default argument for ImpCastExprToType. Add appropriate argument to all callers. Switch a few other users of CK_Unknown to proper cast kinds. Note that there are still some situations where we end up with CK_Unknown; they're pretty easy to find with grep. There are still a few missing conversion kinds, specifically pointer/int/float->bool and the various combinations of real/complex float/int->real/complex float/int. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84623 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
emaDecl.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaOverload.cpp
emaStmt.cpp
emaTemplate.cpp
|
73c39abdbb79927605d740c93dd9629e3e4f9bfe |
20-Oct-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Remove default argument for ImpCastExprToType. Add appropriate argument to all callers. Switch a few other users of CK_Unknown to proper cast kinds. Note that there are still some situations where we end up with CK_Unknown; they're pretty easy to find with grep. There are still a few missing conversion kinds, specifically pointer/int/float->bool and the various combinations of real/complex float/int->real/complex float/int. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84623 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
emaDecl.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaOverload.cpp
emaStmt.cpp
emaTemplate.cpp
|
6742e383f9e2728d2c8cd7c21afef4d66993be63 |
20-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Handle substitutions into the "first qualifier in scope" of a qualified member access expression (e.g., t->U::member) when that first qualifier refers to a template parameters. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84612 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
reeTransform.h
|
6cd219879ffce00920189ec1dcea927a42602961 |
20-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Handle substitutions into the "first qualifier in scope" of a qualified member access expression (e.g., t->U::member) when that first qualifier refers to a template parameters. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84612 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
reeTransform.h
|
33015b1bfe10f536b6810ab63efa3b1809e4fa46 |
20-Oct-2009 |
Chris Lattner <sabre@nondot.org> |
Implement PR5242: don't desugar a type more than once in a diagnostic. This implements a framework that allows us to use information about previously substituted values to simplify subsequent ones. Maybe this would be useful for C++'y stuff, who knows. We now get: t.c:4:21: error: invalid operands to binary expression ('size_t' (aka 'unsigned long *') and 'size_t') return (size_t) 0 + (size_t) 0; ~~~~~~~~~~ ^ ~~~~~~~~~~ on the testcase. Note that size_t is only aka'd once. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84604 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
0a026af6deb4a9e9f30ff047e04db56eb4333741 |
20-Oct-2009 |
Chris Lattner <sabre@nondot.org> |
Implement PR5242: don't desugar a type more than once in a diagnostic. This implements a framework that allows us to use information about previously substituted values to simplify subsequent ones. Maybe this would be useful for C++'y stuff, who knows. We now get: t.c:4:21: error: invalid operands to binary expression ('size_t' (aka 'unsigned long *') and 'size_t') return (size_t) 0 + (size_t) 0; ~~~~~~~~~~ ^ ~~~~~~~~~~ on the testcase. Note that size_t is only aka'd once. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84604 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
f170dc1c5113bb1749cb77f15609e961688e8c6d |
20-Oct-2009 |
Chris Lattner <sabre@nondot.org> |
teach FormatDiagnostic to aggregate previously formatted arguments and pass them down into the ArgToStringFn implementation. This allows redundancy across operands to a diagnostic to be eliminated. This isn't used yet, so no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84602 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
b54d8af9a66cc20a6a9a9219c7eaea8df7ee7fd4 |
20-Oct-2009 |
Chris Lattner <sabre@nondot.org> |
teach FormatDiagnostic to aggregate previously formatted arguments and pass them down into the ArgToStringFn implementation. This allows redundancy across operands to a diagnostic to be eliminated. This isn't used yet, so no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84602 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
3a6940960b1e0c8f5460345acc34bdfc8ccfe328 |
20-Oct-2009 |
Chris Lattner <sabre@nondot.org> |
code cleanup, convert if tree to switch etc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84599 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
9cf9f868a5a39099d6a9cf57d5d5693c30486d8d |
20-Oct-2009 |
Chris Lattner <sabre@nondot.org> |
code cleanup, convert if tree to switch etc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84599 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
4f9b56cb1dbfffa7c7e3e5fb9c5c81e1f4ac4aec |
20-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Builtin candidate minimization for <<=, >>= and the rest. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84568 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
035c46fee8dd0a4e5a21fc29674297d41da9ec96 |
20-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Builtin candidate minimization for <<=, >>= and the rest. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84568 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
5de26c359e36b84c7c7a926d75f5e0fe837d1f78 |
20-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Parse a simple-template-id following a '~' when calling a destructor, e.g., t->~T<A0, A1>() Fixes PR5213. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84545 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
reeTransform.h
|
dd62b15665a4144c45c1f7c53665414ad5f7f4f2 |
20-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Parse a simple-template-id following a '~' when calling a destructor, e.g., t->~T<A0, A1>() Fixes PR5213. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84545 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
reeTransform.h
|
f607b9af0947e93ae20c5952143dcbef66937460 |
19-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Add the built-in candidate set reduction hueristic to '+=', '-=', '*=' and '/=' builtin operators and fixes a logic bug exposed by doing this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84538 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
8621d01b253e3f36976d75dd999bdc0f21d9e5d9 |
19-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Add the built-in candidate set reduction hueristic to '+=', '-=', '*=' and '/=' builtin operators and fixes a logic bug exposed by doing this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84538 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
114089c09511e937a1009cbe7d89f6557aa91597 |
19-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Copy conversion of an expression to its base class is a standard convesion and not a user-defined conversion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84525 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
3759a0361ec00e03584cb6f9ce64fb1f1c947336 |
19-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Copy conversion of an expression to its base class is a standard convesion and not a user-defined conversion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84525 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
3eb9e447e1739d7cab4314606eb34fbb372a6bab |
19-Oct-2009 |
Anders Carlsson <andersca@mac.com> |
Set the cast kind to CK_NoOp for C-style casts that are really const casts. Fixes PR5248. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84514 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
da921fd19fd496494365f9f2325c338e66216709 |
19-Oct-2009 |
Anders Carlsson <andersca@mac.com> |
Set the cast kind to CK_NoOp for C-style casts that are really const casts. Fixes PR5248. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84514 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
53aa6499e0ad608cf0bdfbb2f176786efb926bed |
18-Oct-2009 |
Anders Carlsson <andersca@mac.com> |
When building a cast argument, make sure to bind the result to a temporary. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84448 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
4fa26848acfbec29a748df4b58d6d654027b49c7 |
18-Oct-2009 |
Anders Carlsson <andersca@mac.com> |
When building a cast argument, make sure to bind the result to a temporary. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84448 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
1ed2bb804102b54d62426d8aa4f60bcd6f2a6cb0 |
18-Oct-2009 |
Daniel Dunbar <daniel@zuster.org> |
PR5218: Replace IdentifierInfo::getName with StringRef version, now that clients are updated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84447 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
|
01eb9b9683535d8a65c704ad2c545903409e2d36 |
18-Oct-2009 |
Daniel Dunbar <daniel@zuster.org> |
PR5218: Replace IdentifierInfo::getName with StringRef version, now that clients are updated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84447 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
|
b209eea3eeb63a566754271ac42d11bd5aa47663 |
18-Oct-2009 |
Anders Carlsson <andersca@mac.com> |
Use CK_BitCast for member function pointer casts. Fixes PR5138. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84438 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
bb378cbf04e343fb15ae3611a153dde60671b514 |
18-Oct-2009 |
Anders Carlsson <andersca@mac.com> |
Use CK_BitCast for member function pointer casts. Fixes PR5138. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84438 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
b816548812c8dcfe9080b86b900ec94396fdcdc8 |
18-Oct-2009 |
Daniel Dunbar <daniel@zuster.org> |
Move misc clients to IdentifierInfo StringRef API. - strcmp -> == - OS.write(II->getName() ...) -> OS << II->getNameStr() - Avoid std::string concatenation - Use getNameStr().str() when an std::string is really needed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84437 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
5ffe14ca96bd662de7820f6875d3f04789a640c1 |
18-Oct-2009 |
Daniel Dunbar <daniel@zuster.org> |
Move misc clients to IdentifierInfo StringRef API. - strcmp -> == - OS.write(II->getName() ...) -> OS << II->getNameStr() - Avoid std::string concatenation - Use getNameStr().str() when an std::string is really needed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84437 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
03b6887fba9685a66992650252b2af29759de4cf |
18-Oct-2009 |
Daniel Dunbar <daniel@zuster.org> |
Move clients to use IdentifierInfo::getNameStart() instead of getName() git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84436 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
emaExpr.cpp
|
e013d685c6689ac7ae103ee88acf573422d1ed6a |
18-Oct-2009 |
Daniel Dunbar <daniel@zuster.org> |
Move clients to use IdentifierInfo::getNameStart() instead of getName() git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84436 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
emaExpr.cpp
|
908929b9f8be9d469f53424d4cd2bb9c438e7ba6 |
18-Oct-2009 |
Anders Carlsson <andersca@mac.com> |
It's OK for a pure virtual function to override another pure virtual function. Fixes PR5222. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84428 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
2782302961b6f57316b1ece494c7135b65e18b30 |
18-Oct-2009 |
Anders Carlsson <andersca@mac.com> |
It's OK for a pure virtual function to override another pure virtual function. Fixes PR5222. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84428 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
ac892b549fb25b82a60a28309837b823b45083f5 |
18-Oct-2009 |
Anders Carlsson <andersca@mac.com> |
Add some more cast kinds. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84423 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
82debc7d282e723e58d183bfa89ddc2500a8daaf |
18-Oct-2009 |
Anders Carlsson <andersca@mac.com> |
Add some more cast kinds. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84423 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
5cc4b067c9a94ff7a98c34b4a8b14f2643980c79 |
18-Oct-2009 |
John McCall <rjmccall@apple.com> |
When performing template-substitution into a type, don't just replace the TemplateTypeParmType with the substituted type directly; instead, replace it with a SubstTemplateTypeParmType which will note that the type was originally written as a template type parameter. This makes it reasonable to preserve source information even through template substitution. Also define the new SubstTemplateTypeParmType class, obviously. For consistency with current behavior, we stringize these types as if they were the underlying type. I'm not sure this is the right thing to do. At any rate, I paled at adding yet another clause to the don't-desugar 'if' statement, so I extracted a function to do it. The new function also does The Right Thing more often, I think: e.g. if we have a chain of typedefs leading to a vector type, we will now desugar all but the last one. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84412 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaTemplateInstantiate.cpp
reeTransform.h
|
49a832bd499d6f61c23655f1fac99f0dd229756e |
18-Oct-2009 |
John McCall <rjmccall@apple.com> |
When performing template-substitution into a type, don't just replace the TemplateTypeParmType with the substituted type directly; instead, replace it with a SubstTemplateTypeParmType which will note that the type was originally written as a template type parameter. This makes it reasonable to preserve source information even through template substitution. Also define the new SubstTemplateTypeParmType class, obviously. For consistency with current behavior, we stringize these types as if they were the underlying type. I'm not sure this is the right thing to do. At any rate, I paled at adding yet another clause to the don't-desugar 'if' statement, so I extracted a function to do it. The new function also does The Right Thing more often, I think: e.g. if we have a chain of typedefs leading to a vector type, we will now desugar all but the last one. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84412 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaTemplateInstantiate.cpp
reeTransform.h
|
c4714c1b7577dc7bc89fdbc3ff23c89116e6020d |
18-Oct-2009 |
Daniel Dunbar <daniel@zuster.org> |
Add another two ExtVectorComponent FIXMEs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84393 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
2ad3289fffc95399c6e1bae36e2abbee00d3d9b9 |
18-Oct-2009 |
Daniel Dunbar <daniel@zuster.org> |
Add another two ExtVectorComponent FIXMEs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84393 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
1a6e60f1ae687fa477bf25b27bcc6fb1373f7584 |
18-Oct-2009 |
Daniel Dunbar <daniel@zuster.org> |
Simplify HandleModeAttr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84391 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
210ae989a51dcb115b928829abd7c4c4ae0c01bd |
18-Oct-2009 |
Daniel Dunbar <daniel@zuster.org> |
Simplify HandleModeAttr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84391 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
febfdad71955625e21a8413a18d40e784298f8d3 |
18-Oct-2009 |
Daniel Dunbar <daniel@zuster.org> |
Simplify HandleFormatAttr. - I have this crazy dream that one day someone will invent a miraculous tool so that developers, instead of hand optimizing their source code to obscure its intent and decrease its maleability, will instead write what they mean, and this strange and wonderful tool -- which I imagine would be called something fancy sounding like "an optimizing compiler" -- will make their code fast *for* them. With all the saved time, developers could maybe even focus on making the magic "optimizing compiler" better!! - No intended functionality change, all though I expect the universe to mock me for snarkiness. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84390 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
2b0d9a247ab375ca316bf04feede73de6672fc31 |
18-Oct-2009 |
Daniel Dunbar <daniel@zuster.org> |
Simplify HandleFormatAttr. - I have this crazy dream that one day someone will invent a miraculous tool so that developers, instead of hand optimizing their source code to obscure its intent and decrease its maleability, will instead write what they mean, and this strange and wonderful tool -- which I imagine would be called something fancy sounding like "an optimizing compiler" -- will make their code fast *for* them. With all the saved time, developers could maybe even focus on making the magic "optimizing compiler" better!! - No intended functionality change, all though I expect the universe to mock me for snarkiness. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84390 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
14c3221c184cd7305ee9c7d4514caa5c13265b78 |
18-Oct-2009 |
John McCall <rjmccall@apple.com> |
Clone the full Type hierarchy into the TypeLoc hierarchy. Normalize TypeLoc class names to be $(Type classname)Loc. Rewrite the visitor. Provide skeleton implementations for all the new TypeLocs. Handle all cases in PCH. Handle a few more cases when inserting location information in SemaType. It should be extremely straightforward to add new location information to existing TypeLoc objects now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84386 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
51bd803fbdade51d674598ed45da3d54190a656c |
18-Oct-2009 |
John McCall <rjmccall@apple.com> |
Clone the full Type hierarchy into the TypeLoc hierarchy. Normalize TypeLoc class names to be $(Type classname)Loc. Rewrite the visitor. Provide skeleton implementations for all the new TypeLocs. Handle all cases in PCH. Handle a few more cases when inserting location information in SemaType. It should be extremely straightforward to add new location information to existing TypeLoc objects now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84386 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
d74e88ea1b5f86f16b3cb281893da8e774bebdf6 |
18-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix a crash with qualified member access into a non-type, from Sean Hunt! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84370 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
8d1c9ae5d27c5190a7793f7ac1224a70cd3df33f |
18-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Fix a crash with qualified member access into a non-type, from Sean Hunt! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84370 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
8dca9d5ab574d0a2ce3d16546eaff0e5f3dfe2d1 |
17-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When type-checking a C++ "new" expression, don't type-check the actual initialization if any of the constructor/initialization arguments are type-dependent. Fixes PR5224. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84365 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
089407be3fb616fb1246f2aee29b8a9c58ec7807 |
17-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
When type-checking a C++ "new" expression, don't type-check the actual initialization if any of the constructor/initialization arguments are type-dependent. Fixes PR5224. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84365 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
26458dcf41839e616dd88f9d8c81c4edc24fd0eb |
17-Oct-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
When resolving the address of an overloaded function or function template, mark the result as referenced. The most important effect of this is that function templates only referenced by address expressions now get instantiated. This, in turn, means that Hello World compiles with the Apache stdcxx library even when using endl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84363 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
07ab20203fb4254f6152c9a7176732fe199adccd |
17-Oct-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
When resolving the address of an overloaded function or function template, mark the result as referenced. The most important effect of this is that function templates only referenced by address expressions now get instantiated. This, in turn, means that Hello World compiles with the Apache stdcxx library even when using endl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84363 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
9353b486ed4a45a11630b31c82e6dcd59fd6a411 |
17-Oct-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Don't add implicit casts of explicit address-taking of overloaded functions. Taking the address of an overloaded function with an explicit address-of operator wrapped the operator in an implicit cast that added yet another pointer level, leaving us with a corrupted AST, which crashed CodeGen in the test case I've added. Fix this by making FixOverloadedFunctionReference return whether there was an address-of operator and not adding the implicit cast in that case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84362 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
emaOverload.cpp
|
759986e85990281ea741820822809ac57fd28c40 |
17-Oct-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Don't add implicit casts of explicit address-taking of overloaded functions. Taking the address of an overloaded function with an explicit address-of operator wrapped the operator in an implicit cast that added yet another pointer level, leaving us with a corrupted AST, which crashed CodeGen in the test case I've added. Fix this by making FixOverloadedFunctionReference return whether there was an address-of operator and not adding the implicit cast in that case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84362 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
emaOverload.cpp
|
fe3b81fccf046092da96e00568865fe4045e5913 |
17-Oct-2009 |
Chris Lattner <sabre@nondot.org> |
teach getCorrespondingUnsignedType how to handle vectors of integers, fixing PR4838. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84353 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
6a2b9261bf9c973c7122d9d1febce24a38fa862d |
17-Oct-2009 |
Chris Lattner <sabre@nondot.org> |
teach getCorrespondingUnsignedType how to handle vectors of integers, fixing PR4838. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84353 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
0da1ddf99b96c189eced3b3cd415ee7331161fe9 |
17-Oct-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
In some dependent contexts, incomplete array types persist into FinalizeDeclaratorGroup. Don't require them to have a complete type. This allows us to compile Hello World with the Apache stdcxx library. If you don't use endl, it even links and runs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84347 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d75191f0d100b596281f99ea8f2f0a0d0560d969 |
17-Oct-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
In some dependent contexts, incomplete array types persist into FinalizeDeclaratorGroup. Don't require them to have a complete type. This allows us to compile Hello World with the Apache stdcxx library. If you don't use endl, it even links and runs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84347 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
511628ef6364ddd4212c50f01b37ad013a75d2c7 |
17-Oct-2009 |
Edward O'Callaghan <eocallaghan@auroraux.org> |
Fix for PR5190, Credit to Zhanyong Wan. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84346 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
12356b119032edd64e9c32f9f01920d12c2acc57 |
17-Oct-2009 |
Edward O'Callaghan <eocallaghan@auroraux.org> |
Fix for PR5190, Credit to Zhanyong Wan. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84346 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
378c486e6287ff2d108f2b7e874fab3960244204 |
17-Oct-2009 |
Daniel Dunbar <daniel@zuster.org> |
Simplify. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84307 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
5460d2b51965a53c5db537d432988f5e1d20af6f |
17-Oct-2009 |
Daniel Dunbar <daniel@zuster.org> |
Simplify. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84307 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
a93c909080d28e87c22dd6e8766bb8b7750db80b |
17-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to clean up and improve visual display of builtin function ambiguity. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84289 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
866b2744ffe66294c8791cc8407b918f3bb81b2c |
17-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to clean up and improve visual display of builtin function ambiguity. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84289 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
ca3939515bd3087b01029874115b6d2b699c930d |
17-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Use VisibleQuals to control setting of Volatile/Restrict qualifiers on candidate types in BuiltinCandidateTypeSet::AddPointerWithMoreQualifiedTypeVariants further trimming the overload candidate set. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84281 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
1cad602ee0283947dbf103f13d9a7c098649dfe3 |
17-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Use VisibleQuals to control setting of Volatile/Restrict qualifiers on candidate types in BuiltinCandidateTypeSet::AddPointerWithMoreQualifiedTypeVariants further trimming the overload candidate set. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84281 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
e835ef0ef9e8a33039f9fbd12b5374585fa80e0e |
16-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Implement derived-to-base AST/code gen. There is a FIXME in CGCXX.cpp that I would like Anders to take a look at. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84265 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
|
93034ca3d025e948ddfcdd78868957efc70741a7 |
16-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Implement derived-to-base AST/code gen. There is a FIXME in CGCXX.cpp that I would like Anders to take a look at. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84265 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
|
4b6b19388eccd8098440ed73ec98b5c7e7466cfd |
16-Oct-2009 |
Chris Lattner <sabre@nondot.org> |
Implement PR4407 - missing warnings on case value overflow, patch by Zhanyong Wan! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84259 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
5f04881eb025f61396d0555d8173730fe2759e0a |
16-Oct-2009 |
Chris Lattner <sabre@nondot.org> |
Implement PR4407 - missing warnings on case value overflow, patch by Zhanyong Wan! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84259 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
551bc1f4cd792579735f79e935d07e1a26e34d81 |
16-Oct-2009 |
Anders Carlsson <andersca@mac.com> |
Add CK_VectorSplat and use it for casting non-pointer scalars to ExtVectors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84245 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
16a8904f3f5ed19158657e1da95e5902fbee66f7 |
16-Oct-2009 |
Anders Carlsson <andersca@mac.com> |
Add CK_VectorSplat and use it for casting non-pointer scalars to ExtVectors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84245 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
58f7fd4b11c59d762e334ebee884fcdacc07e8ca |
16-Oct-2009 |
Anders Carlsson <andersca@mac.com> |
Make CheckVectorCast return a CastKind. Reduce nesting of if statements in CheckCastTypes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84242 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
c351632d489c31bb7b7e4f9370714434116a1fe4 |
16-Oct-2009 |
Anders Carlsson <andersca@mac.com> |
Make CheckVectorCast return a CastKind. Reduce nesting of if statements in CheckCastTypes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84242 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
5e564fd5a07022a4603e0b4d0856ad06196a1730 |
16-Oct-2009 |
Anders Carlsson <andersca@mac.com> |
Add a ToVoid cast kind and start using it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84241 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ebeaf2031c968143c531bfe232d7507f20c57347 |
16-Oct-2009 |
Anders Carlsson <andersca@mac.com> |
Add a ToVoid cast kind and start using it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84241 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
c9a07f03ac6816414f9513ff006620b486dc99d8 |
16-Oct-2009 |
Anders Carlsson <andersca@mac.com> |
The result type of logical || and && is bool in C++. Fixes PR5206. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84231 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
04905014fd854979ac12fc31a2b25fca37a93eb4 |
16-Oct-2009 |
Anders Carlsson <andersca@mac.com> |
The result type of logical || and && is bool in C++. Fixes PR5206. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84231 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
32b25ab7d4b3355b804e367c90f5cd55f4c9187e |
16-Oct-2009 |
John McCall <rjmccall@apple.com> |
Remove the ConstantArrayType subtypes. This information is preserved in the TypeLoc records for declarations; it should not be necessary to represent it directly in the type system. Please complain if you were using these classes and feel you can't replicate previous functionality using the TypeLoc API. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84222 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDecl.cpp
emaInit.cpp
emaType.cpp
reeTransform.h
|
46a617a792bfab0d9b1e057371ea3b9540802226 |
16-Oct-2009 |
John McCall <rjmccall@apple.com> |
Remove the ConstantArrayType subtypes. This information is preserved in the TypeLoc records for declarations; it should not be necessary to represent it directly in the type system. Please complain if you were using these classes and feel you can't replicate previous functionality using the TypeLoc API. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84222 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDecl.cpp
emaInit.cpp
emaType.cpp
reeTransform.h
|
31b07d3fc85edc7e7248433123da24bd39bdc25d |
16-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve point-of-instantiation location information for members of class templates git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84217 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
86035ae9d9fdb91f1af528835a6d89d6beb49393 |
16-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Improve point-of-instantiation location information for members of class templates git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84217 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
39be4c0f81f33749d07936b1fe64311c85c4c92f |
16-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Make the remaining explicit-instantiation semantic action use CheckSpecializationInstantiationRedecl to check for redeclarations/instantiations. Also fixes a longstanding issue where our explicit-instantiation location information wasn't as good as it could have been. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84216 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
89a5bea02115795752475d985301ef83045bb577 |
16-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Make the remaining explicit-instantiation semantic action use CheckSpecializationInstantiationRedecl to check for redeclarations/instantiations. Also fixes a longstanding issue where our explicit-instantiation location information wasn't as good as it could have been. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84216 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
dd9bd316581059c094fc030058ba762d348e9059 |
15-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Make sure that we're diagnosing duplicate explicit instantiation definitions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84189 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
583f33b8a9227bace1a77a15404b4c64dc619d69 |
15-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Make sure that we're diagnosing duplicate explicit instantiation definitions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84189 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
f445d2d26b272f4180b5c08a5c335077f594492c |
15-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Simplify checking of explicit template specialization/explicit instantiation redeclaration semantics for function template specializations and member functions of class template specializations. Also, record the point of instantiation for explicit-instantiated functions and static data members. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84188 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
0a897e32a09d290aa5b375444fe33928e47168bb |
15-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Simplify checking of explicit template specialization/explicit instantiation redeclaration semantics for function template specializations and member functions of class template specializations. Also, record the point of instantiation for explicit-instantiated functions and static data members. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84188 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
c96d0479aa712b2a6a6ad4a5e6fc988935b62b6e |
15-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Apply heuristics to cut back on number of candidate sets of builtin operators. Currently, it is applied to '++' and '->*' operators. I need to apply it to others as well. Also, heuristics need be applied to BuiltinCandidateTypeSet::AddPointerWithMoreQualifiedTypeVariants. This is WIP. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84187 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
a9cca896d5f3e871d92d4448e2fe1668c43230a8 |
15-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Apply heuristics to cut back on number of candidate sets of builtin operators. Currently, it is applied to '++' and '->*' operators. I need to apply it to others as well. Also, heuristics need be applied to BuiltinCandidateTypeSet::AddPointerWithMoreQualifiedTypeVariants. This is WIP. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84187 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
193c2422457a7cd1cbe94450d1119a8d724601eb |
15-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Check the interactions between explicit instantiations and template specializations. Work in progress; there's more cleanup required to actually use the new CheckSpecializationInstantiationRedecl checker uniformly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84185 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateInstantiate.cpp
|
454885ec4f59959a01a2c7861b88abdea8617147 |
15-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Check the interactions between explicit instantiations and template specializations. Work in progress; there's more cleanup required to actually use the new CheckSpecializationInstantiationRedecl checker uniformly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84185 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateInstantiate.cpp
|
e44e62ba4163f0da137ff736cb5bd040ac0a54a5 |
15-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Diagnose explicit instantiations of function templates and member functions/static data members of class template specializations that do not have definitions. This is the latter part of [temp.explicit]p4; the former part still needs more testing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84182 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
e2d3a3de71b2fa35614cb732a6da95a41fa38ad9 |
15-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Diagnose explicit instantiations of function templates and member functions/static data members of class template specializations that do not have definitions. This is the latter part of [temp.explicit]p4; the former part still needs more testing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84182 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
79c0657c022ff95b8fecfc48c5eeff35796ce40f |
15-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
More explicit template instantiation. Now we're checking for more cases where an explicit instantiation requires a definition; the remainder of these checks will come with the implementation of paragraph 4 of [temp.explicit]. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84181 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
bf7643e7966cd9acd797a84870018034112e49d3 |
15-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
More explicit template instantiation. Now we're checking for more cases where an explicit instantiation requires a definition; the remainder of these checks will come with the implementation of paragraph 4 of [temp.explicit]. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84181 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
6816472475db68c155dc71a0a4402b5a0f2cfb0c |
15-Oct-2009 |
John McCall <rjmccall@apple.com> |
Better living through metaprogramming. Create a base class which abstracts most of the unsafe boilerplate out of TypeLoc. Create a QualifiedLoc class to represent the idea that we *might* start representing source locations of qualifiers. Dealing with qualifiers explicitly like this also lets us efficiently ignore them in all the concrete cases. This should make it obvious and easy to add new TypeLoc subclasses. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84168 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
34a0447b8072e0da14c0980597da9d03a1495662 |
15-Oct-2009 |
John McCall <rjmccall@apple.com> |
Better living through metaprogramming. Create a base class which abstracts most of the unsafe boilerplate out of TypeLoc. Create a QualifiedLoc class to represent the idea that we *might* start representing source locations of qualifiers. Dealing with qualifiers explicitly like this also lets us efficiently ignore them in all the concrete cases. This should make it obvious and easy to add new TypeLoc subclasses. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84168 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
808b4771732a33694db93d5567c49cb1057c9223 |
15-Oct-2009 |
Anders Carlsson <andersca@mac.com> |
Check the return type when calling pointer to member functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84161 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
8d6d90d5499d4248761251811ebed0ae77665ed7 |
15-Oct-2009 |
Anders Carlsson <andersca@mac.com> |
Check the return type when calling pointer to member functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84161 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
46709fd0c6e48a27f6abc31b04bf59fce446799f |
15-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
CheckTemplateSpecializationScope isn't going to be used for explicit instantiations, since the requirements are too different from those for template specializations. Simplify it slightly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84156 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
9302da67eabe2e9ad27433994b6727d670839476 |
15-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
CheckTemplateSpecializationScope isn't going to be used for explicit instantiations, since the requirements are too different from those for template specializations. Simplify it slightly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84156 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
49628d8472551b062b7c1d4368f9516c9f577986 |
15-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Additional semantic checking for explicit template instantiations, focusing on the scope- and qualifier-related semantic requirements in C++ [temp.explicit]p2. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84154 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
558c03222c77873a934b002073667a3c971fe8a9 |
15-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Additional semantic checking for explicit template instantiations, focusing on the scope- and qualifier-related semantic requirements in C++ [temp.explicit]p2. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84154 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
2bb32d7186ba3a9e34b3582a50b0b6b36084335d |
14-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Reuse some code for checking the scope of an explicit instantiation git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84148 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
a74bbe2c9fb8f83db393a584e8a1da8c40182542 |
14-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Reuse some code for checking the scope of an explicit instantiation git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84148 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
89f408a6b2d78c18b79163415ba155c1029fab63 |
14-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Give explicit and implicit instantiations of static data members of class templates the proper linkage. Daniel, please look over the CodeGenModule bits. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84140 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
1028c9f0afc1cc5f4951b39b7067fa57c1fea07b |
14-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Give explicit and implicit instantiations of static data members of class templates the proper linkage. Daniel, please look over the CodeGenModule bits. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84140 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
3377acc532d272744e956203abb45b6862336bcd |
14-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Testing and some minor fixes for explicit template instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84129 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
663b5a0be7261c29bc4c526a71cffcfa02d4153e |
14-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Testing and some minor fixes for explicit template instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84129 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
b14e2481786cbd7f69da9a8ad2b9de48ff0fb716 |
14-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When mapping from an injected-class-name to its corresponding template, make sure to get the template that corresponds to *this* declaration of the class template or specialization, rather than the canonical specialization. Fixes PR5187. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84119 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
542b548e041a6fab0fe06601ccc6b91a81bc217a |
14-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
When mapping from an injected-class-name to its corresponding template, make sure to get the template that corresponds to *this* declaration of the class template or specialization, rather than the canonical specialization. Fixes PR5187. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84119 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
dc3582fcc150050728ad0d0961fab808fc022284 |
14-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement support for overloaded operator uses that result to a call to a member operator template. We missed updating this call site when adding support for function templates; bug exposed by a test for PR5072. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84111 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
d9842d0e6da0e28b6913b464e37d9a4dc5ec73b9 |
14-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement support for overloaded operator uses that result to a call to a member operator template. We missed updating this call site when adding support for function templates; bug exposed by a test for PR5072. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84111 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
1cfff33985f932c3145835d3d8d8a27c4e3344a0 |
14-Oct-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Have the exception specification checkers take partial diagnostics. Use this to merge two diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84105 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExceptionSpec.cpp
|
37c38ec5f1c155886929739338110a0b70ac3362 |
14-Oct-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Have the exception specification checkers take partial diagnostics. Use this to merge two diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84105 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExceptionSpec.cpp
|
6fa02cf13fa72c836449edfc61c48948d01739ed |
14-Oct-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Use CanQualType in the exception specification verification type sets. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84101 91177308-0d34-0410-b5e6-96231b3b80d8
emaExceptionSpec.cpp
|
1219d150aff23d19ba988e12602db5f3b70e404d |
14-Oct-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Use CanQualType in the exception specification verification type sets. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84101 91177308-0d34-0410-b5e6-96231b3b80d8
emaExceptionSpec.cpp
|
3e15f36d74a85df70045d25232df9e0d746308af |
14-Oct-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Use partial diagnostics properly in call to RequireCompleteType. Among other things, this means we get a note on the declaration of the incomplete type when it is used in an exception specification. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84099 91177308-0d34-0410-b5e6-96231b3b80d8
emaExceptionSpec.cpp
|
491b84c062ead1c69911a8d5f0d57826afacc099 |
14-Oct-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Use partial diagnostics properly in call to RequireCompleteType. Among other things, this means we get a note on the declaration of the incomplete type when it is used in an exception specification. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84099 91177308-0d34-0410-b5e6-96231b3b80d8
emaExceptionSpec.cpp
|
ba3948047f0d104e52e6705f3306f41633a3225d |
14-Oct-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Do exception spec compatibility tests for member pointers, too. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84098 91177308-0d34-0410-b5e6-96231b3b80d8
emaExceptionSpec.cpp
|
c3a3b7b38440384944614ea6e93cf8d238d3d5f2 |
14-Oct-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Do exception spec compatibility tests for member pointers, too. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84098 91177308-0d34-0410-b5e6-96231b3b80d8
emaExceptionSpec.cpp
|
d417f4491ec35c2bccb0d852ce4d6eab80a35af3 |
14-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Handle ambiguity of reference initialization. Removes a FIXME. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84068 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
d9290cb5ad9eae8d10487cea5392331cf6a47142 |
14-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Handle ambiguity of reference initialization. Removes a FIXME. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84068 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
661606c8848bb33d9c7c5126735a4f8c4469cd84 |
14-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Remove some non-ASCII characters git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84058 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
8c638ab9e76e92674a3f415248326d3c5ffc8216 |
14-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Remove some non-ASCII characters git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84058 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
65365455dc48e8382aab5079aa2e23ed5ab65eb3 |
14-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve diagnostics when the parser encounters a declarator with an unknown type name, e.g., foo::bar x; when "bar" does not refer to a type in "foo". With this change, the parser now calls into the action to perform diagnostics and can try to recover by substituting in an appropriate type. For example, this allows us to easily diagnose some missing "typename" specifiers, which we now do: test/SemaCXX/unknown-type-name.cpp:29:1: error: missing 'typename' prior to dependent type name 'A<T>::type' A<T>::type A<T>::f() { return type(); } ^~~~~~~~~~ typename Fixes PR3990. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84053 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
|
a786fdbf6c1d8ff08c3e61c7eb6bf2872895e2b4 |
14-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Improve diagnostics when the parser encounters a declarator with an unknown type name, e.g., foo::bar x; when "bar" does not refer to a type in "foo". With this change, the parser now calls into the action to perform diagnostics and can try to recover by substituting in an appropriate type. For example, this allows us to easily diagnose some missing "typename" specifiers, which we now do: test/SemaCXX/unknown-type-name.cpp:29:1: error: missing 'typename' prior to dependent type name 'A<T>::type' A<T>::type A<T>::f() { return type(); } ^~~~~~~~~~ typename Fixes PR3990. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84053 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
|
939b3f2b1aa17908fdcfbbadd7331848f2e2a8be |
14-Oct-2009 |
Edward O'Callaghan <eocallaghan@auroraux.org> |
Fix for PR 5181. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84051 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
15934f92c3b56aa8275d3d77d7b884088ff5d4a7 |
14-Oct-2009 |
Edward O'Callaghan <eocallaghan@auroraux.org> |
Fix for PR 5181. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84051 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
fa1b63680c7771c45f1e23a7c8b90a3ecd730f93 |
14-Oct-2009 |
Anders Carlsson <andersca@mac.com> |
The operator loc points to the operator, not the function decl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84048 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
de699e551062f2b20e66decd4de87ee0804b67cc |
14-Oct-2009 |
Anders Carlsson <andersca@mac.com> |
The operator loc points to the operator, not the function decl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84048 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
014c5caf797ca82e49686568daf3df4bc6fb548a |
14-Oct-2009 |
Anders Carlsson <andersca@mac.com> |
Check the return type of binary operators and the arrow operator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84043 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaOverload.cpp
|
15ea378083ee4d9e4838076e4a310177da3d46c4 |
14-Oct-2009 |
Anders Carlsson <andersca@mac.com> |
Check the return type of binary operators and the arrow operator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84043 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaOverload.cpp
|
5b12d7b3314636a6de2b723240322dd2a4df919b |
14-Oct-2009 |
Anders Carlsson <andersca@mac.com> |
Check the return type of operator[]() and fix a thinko that lead to a crash in SemaCXX/overloaded-operator.cpp. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84041 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
3a9439f3b55a018a149953074801921fc1df63b7 |
14-Oct-2009 |
Anders Carlsson <andersca@mac.com> |
Check the return type of operator[]() and fix a thinko that lead to a crash in SemaCXX/overloaded-operator.cpp. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84041 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
af00e332b497f5b224de77c5d228c44a8328828e |
13-Oct-2009 |
Anders Carlsson <andersca@mac.com> |
More return type checking. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84034 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaOverload.cpp
|
07d68f1f0760110d430c4b849abd49f12777f09c |
13-Oct-2009 |
Anders Carlsson <andersca@mac.com> |
More return type checking. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84034 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaOverload.cpp
|
0e037af2ed9dcbabefbd1df39c299abfcc3e7ae5 |
13-Oct-2009 |
Anders Carlsson <andersca@mac.com> |
Diagnose invalid return types for unary operators. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84030 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
26a2a07acfacc06406e6a48c6d22e4b26bcd6382 |
13-Oct-2009 |
Anders Carlsson <andersca@mac.com> |
Diagnose invalid return types for unary operators. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84030 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
f1aa12fb490a02785a57140f0af5163be5f24619 |
13-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Unify our diagnostic printing for errors of the form, "we didn't like what we found when we looked into <blah>", where <blah> is a DeclContext*. We can now format DeclContext*'s in nice ways, e.g., "namespace N", "the global namespace", "'class Foo'". This is part of PR3990, but we're not quite there yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84028 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaTemplate.cpp
|
3f09327b26033d0a9676d52d80cf92c48f581aff |
13-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Unify our diagnostic printing for errors of the form, "we didn't like what we found when we looked into <blah>", where <blah> is a DeclContext*. We can now format DeclContext*'s in nice ways, e.g., "namespace N", "the global namespace", "'class Foo'". This is part of PR3990, but we're not quite there yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84028 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaTemplate.cpp
|
33316b8add2209c6af2336373c92856dc5638942 |
13-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Diagnose attempts to add default function arguments to a specialization. This completes C++ [temp.expl.spec]! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83980 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
096ebfda90b35a5cd6e399920fca7d9b5b0859f3 |
13-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Diagnose attempts to add default function arguments to a specialization. This completes C++ [temp.expl.spec]! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83980 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
db056de08969d15cbc275de3e955db2f375ff8ae |
13-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When explicitly specializing a member that is a template, mark the template as a specialization. For example, this occurs with: template<typename T> struct X { template<typename U> struct Inner { /* ... */ }; }; template<> template<typename T> struct X<int>::Inner { T member; }; We need to treat templates that are member specializations as special in two contexts: - When looking for a definition of a member template, we look through the instantiation chain until we hit the primary template *or a member specialization*. This allows us to distinguish between the primary "Inner" definition and the X<int>::Inner definition, above. - When computing all of the levels of template arguments needed to instantiate a member template, don't add template arguments from contexts outside of the instantiation of a member specialization, since the user has already manually substituted those arguments. Fix up the existing test for p18, which was actually wrong (but we didn't diagnose it because of our poor handling of member specializations of templates), and add a new test for member specializations of templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83974 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
fd056bc86a8b22a9421b5d921bbca276d0f9d0f7 |
13-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
When explicitly specializing a member that is a template, mark the template as a specialization. For example, this occurs with: template<typename T> struct X { template<typename U> struct Inner { /* ... */ }; }; template<> template<typename T> struct X<int>::Inner { T member; }; We need to treat templates that are member specializations as special in two contexts: - When looking for a definition of a member template, we look through the instantiation chain until we hit the primary template *or a member specialization*. This allows us to distinguish between the primary "Inner" definition and the X<int>::Inner definition, above. - When computing all of the levels of template arguments needed to instantiate a member template, don't add template arguments from contexts outside of the instantiation of a member specialization, since the user has already manually substituted those arguments. Fix up the existing test for p18, which was actually wrong (but we didn't diagnose it because of our poor handling of member specializations of templates), and add a new test for member specializations of templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83974 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
85fef1d87e35b508bf0ca18e89e42eedcef22af3 |
13-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve the internal representation and semantic analysis of friend function templates. This commit ensures that friend function templates are constructed as FunctionTemplateDecls rather than partial FunctionDecls (as they previously were). It then implements template instantiation for friend function templates, injecting the friend function template only when no previous declaration exists at the time of instantiation. Oh, and make sure that explicit specialization declarations are not friends. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83970 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
a735b206fdb5c15767a45289e1ffb3b568f70f2b |
13-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Improve the internal representation and semantic analysis of friend function templates. This commit ensures that friend function templates are constructed as FunctionTemplateDecls rather than partial FunctionDecls (as they previously were). It then implements template instantiation for friend function templates, injecting the friend function template only when no previous declaration exists at the time of instantiation. Oh, and make sure that explicit specialization declarations are not friends. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83970 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
128121838edc20d691df3eff6506d88dbf28d81c |
13-Oct-2009 |
Chris Lattner <sabre@nondot.org> |
make the diagnostic in the 'unused result' warning more precise about the reason, rdar://7186119. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83940 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
bc8d42c6f1565c0b2f93ad524edebfd7a4e6cac6 |
13-Oct-2009 |
Chris Lattner <sabre@nondot.org> |
make the diagnostic in the 'unused result' warning more precise about the reason, rdar://7186119. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83940 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
14802eaed7052dbc311c8f06669e029c7d126dba |
13-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When declaring a class template whose name is qualified, make sure that the scope in which it is being declared is complete. Also, when instantiating a member class template's ClassTemplateDecl, be sure to delay type creation so that the resulting type is dependent. Ick. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83923 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
f0510d49a6985e9284d30cfc36a0df2a6292a638 |
13-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
When declaring a class template whose name is qualified, make sure that the scope in which it is being declared is complete. Also, when instantiating a member class template's ClassTemplateDecl, be sure to delay type creation so that the resulting type is dependent. Ick. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83923 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
9e35add60b9bc9f84ea14133eee34f7914ccd3cb |
13-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Permit explicit specialization of member functions of class templates that are declarations (rather than definitions). Also, be sure to set the access specifiers properly when instantiating the declarations of member function templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83911 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplateInstantiateDecl.cpp
|
37d68185088947322a97eabdc1c0714b0debd929 |
13-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Permit explicit specialization of member functions of class templates that are declarations (rather than definitions). Also, be sure to set the access specifiers properly when instantiating the declarations of member function templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83911 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplateInstantiateDecl.cpp
|
06f6779924615e6968996cdce5389c07765d7b27 |
13-Oct-2009 |
John McCall <rjmccall@apple.com> |
More appropriate API usage. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83910 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
2d15215844eaf6391ad566c44dcf420c18c6b773 |
13-Oct-2009 |
John McCall <rjmccall@apple.com> |
More appropriate API usage. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83910 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
17cfb461d4d8d0d40dcd740df1c0ad8c6f0d88cc |
12-Oct-2009 |
John McCall <rjmccall@apple.com> |
Implement -Wparentheses: warn about using assignments in contexts that require conditions. Add a fixit to insert the parentheses. Also fix a very minor possible memory leak in 'for' conditions. Fixes PR 4876 and rdar://problem/7289172 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83907 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaStmt.cpp
|
5a881bb09928b7ade891efc680088aaad276f8d6 |
12-Oct-2009 |
John McCall <rjmccall@apple.com> |
Implement -Wparentheses: warn about using assignments in contexts that require conditions. Add a fixit to insert the parentheses. Also fix a very minor possible memory leak in 'for' conditions. Fixes PR 4876 and rdar://problem/7289172 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83907 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaStmt.cpp
|
c176c0af307cfcd6cd9d9069ac7fb29d8da1d4bf |
12-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Diagnose the declaration of explicit specializations after an implicit instantiation has already been required. To do so, keep track of the point of instantiation for anything that can be instantiated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83890 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
emaTemplate.cpp
emaType.cpp
|
b3ae4fcd4314a9c1c46d41b200883599c32025b4 |
12-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Diagnose the declaration of explicit specializations after an implicit instantiation has already been required. To do so, keep track of the point of instantiation for anything that can be instantiated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83890 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
emaTemplate.cpp
emaType.cpp
|
e8385e054e1b35df057af080fb5ed69d1b5ad923 |
12-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Handle built-in unary operators when reporting ambiguities. wip - To prune excessive reporting. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83889 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaOverload.cpp
|
2ebe7ebb1d6149a1845dd3169009f99b78e91bc9 |
12-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Handle built-in unary operators when reporting ambiguities. wip - To prune excessive reporting. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83889 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaOverload.cpp
|
e4cb91964a91bd5bbaae5a556b8df0ebc821279f |
12-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
If built-in operators could not be selected because of ambiguity in user-defined type conversions, issue list of ambiguites in addition to the diagnostic. So, clang now issues the following: b.cpp:19:19: error: left hand operand to ->* must be a pointer to class compatible with the right hand operand, but is 'struct C1' int i = c1->*pmf; ~~^ b.cpp:19:19: note: because of ambiguity in conversion of 'struct C1' to 'struct E *' b.cpp:5:5: note: candidate function operator E*(); ^ b.cpp:11:5: note: candidate function operator E*(); ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83862 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
27687cf7f6fea50e592f653549a33f07bf5c0667 |
12-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
If built-in operators could not be selected because of ambiguity in user-defined type conversions, issue list of ambiguites in addition to the diagnostic. So, clang now issues the following: b.cpp:19:19: error: left hand operand to ->* must be a pointer to class compatible with the right hand operand, but is 'struct C1' int i = c1->*pmf; ~~^ b.cpp:19:19: note: because of ambiguity in conversion of 'struct C1' to 'struct E *' b.cpp:5:5: note: candidate function operator E*(); ^ b.cpp:11:5: note: candidate function operator E*(); ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83862 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
7a699700d0477833c495c6755ec296213fd01ef4 |
11-Oct-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Types appearing more than once in a spec shouldn't matter. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83766 91177308-0d34-0410-b5e6-96231b3b80d8
emaExceptionSpec.cpp
|
5db4d908308576b0fc574138d4aa410c529785a6 |
11-Oct-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Types appearing more than once in a spec shouldn't matter. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83766 91177308-0d34-0410-b5e6-96231b3b80d8
emaExceptionSpec.cpp
|
0368a85c12e24c008960c9b73c8f79343bec38c0 |
11-Oct-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Test exception spec compatibility on return type and parameters. Along the way, use RequireCompleteType when testing exception spec types. Separate all the ugly spec stuff into its own file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83764 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
ema.h
emaDeclCXX.cpp
emaExceptionSpec.cpp
emaExprCXX.cpp
emaType.cpp
|
dced226e37f7c2c31c25d06c514f29b610fe2a54 |
11-Oct-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Test exception spec compatibility on return type and parameters. Along the way, use RequireCompleteType when testing exception spec types. Separate all the ugly spec stuff into its own file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83764 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
ema.h
emaDeclCXX.cpp
emaExceptionSpec.cpp
emaExprCXX.cpp
emaType.cpp
|
798d96a85399a9f99a6f43ef4b11cb554445909f |
10-Oct-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implement the core checking for compatible exception specifications in assignment and initialization. The exception specification of the assignee must be the same or a subset of the target. In addition, exception specifications on arguments and return types must be equivalent, but this is not implemented yet. This currently produces two diagnostics for every invalid assignment/initialization, due to the diagnostic produced outside PerformImplicitConversion, e.g. in CheckSingleInitializer. I don't know how to suppress this; in any case I think it is the wrong place for a diagnostic, since there are other diagnostics produced inside the function. So I'm leaving it as it is for the moment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83710 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExprCXX.cpp
emaType.cpp
|
2c7588f1260c6655cfb73126b695d2f79ae170bb |
10-Oct-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implement the core checking for compatible exception specifications in assignment and initialization. The exception specification of the assignee must be the same or a subset of the target. In addition, exception specifications on arguments and return types must be equivalent, but this is not implemented yet. This currently produces two diagnostics for every invalid assignment/initialization, due to the diagnostic produced outside PerformImplicitConversion, e.g. in CheckSingleInitializer. I don't know how to suppress this; in any case I think it is the wrong place for a diagnostic, since there are other diagnostics produced inside the function. So I'm leaving it as it is for the moment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83710 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExprCXX.cpp
emaType.cpp
|
9399940fd9562dd693525bcdcdb81cb89ae63cef |
10-Oct-2009 |
John McCall <rjmccall@apple.com> |
Qualified lookup through using declarations. Diagnose a new type of ambiguity. Split the various ambiguous result enumerators into their own enum. Tests for most of C++ [namespace.qual]. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83700 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaLookup.cpp
emaTemplate.cpp
emaType.cpp
|
6e24726524c2b51b31bb4b622aa678a46b024f42 |
10-Oct-2009 |
John McCall <rjmccall@apple.com> |
Qualified lookup through using declarations. Diagnose a new type of ambiguity. Split the various ambiguous result enumerators into their own enum. Tests for most of C++ [namespace.qual]. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83700 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaLookup.cpp
emaTemplate.cpp
emaType.cpp
|
486069d080ebbd7a1af74c1d153e9bf60f322477 |
10-Oct-2009 |
Anders Carlsson <andersca@mac.com> |
Check that the return type is complete when calling a member function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83694 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
eed3e699b581ad9e17f8147f26b882d20d65a317 |
10-Oct-2009 |
Anders Carlsson <andersca@mac.com> |
Check that the return type is complete when calling a member function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83694 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
bb78b8e78e76cce6453774bb4c1f2dfe6c69fd6b |
10-Oct-2009 |
Anders Carlsson <andersca@mac.com> |
Add CheckCallReturnType and start using it for regular call expressions. This will improve error messages. For struct B; B f(); void g() { f(); } We now get t.cpp:6:3: error: calling 'f' with incomplete return type 'struct B' f(); ^~~ t.cpp:3:3: note: 'f' declared here B f(); ^ t.cpp:1:8: note: forward declaration of 'struct B' struct B; ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83692 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaOverload.cpp
emaType.cpp
|
8c8d91917c307dc3ba4f60661377c745f2a6bef2 |
10-Oct-2009 |
Anders Carlsson <andersca@mac.com> |
Add CheckCallReturnType and start using it for regular call expressions. This will improve error messages. For struct B; B f(); void g() { f(); } We now get t.cpp:6:3: error: calling 'f' with incomplete return type 'struct B' f(); ^~~ t.cpp:3:3: note: 'f' declared here B f(); ^ t.cpp:1:8: note: forward declaration of 'struct B' struct B; ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83692 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaOverload.cpp
emaType.cpp
|
74164d6eb1c011df7e4e6d6676efbd47524bbefd |
10-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Dead Code Elimination git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83686 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaLookup.cpp
|
3135df59cbe140923d9e81c09e3e324c01418bb6 |
10-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Dead Code Elimination git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83686 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaLookup.cpp
|
576b28e5efb0808ace2f465a53890631a3f59c33 |
10-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Add some FIXMEs git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83685 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
f11e6b24ee5acf95536b94a1d0b20dd04aeca2c4 |
10-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Add some FIXMEs git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83685 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
f35ee555a564f5a1c4c972d90bd721e2a592c81e |
10-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Minor tweaks for code-completion: - Filter out unnamed declarations - Filter out declarations whose names are reserved for the implementation (e.g., __bar, _Foo) - Place OVERLOAD: or COMPLETION: at the beginning of each code-completion result, so we can easily separate them from other compilation results. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83680 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
|
f52cedee8701dca77bcbba5c705b6e388680ae56 |
10-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Minor tweaks for code-completion: - Filter out unnamed declarations - Filter out declarations whose names are reserved for the implementation (e.g., __bar, _Foo) - Place OVERLOAD: or COMPLETION: at the beginning of each code-completion result, so we can easily separate them from other compilation results. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83680 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
|
de974e4207c428f0953af0e2c05d66a7b6c394a5 |
09-Oct-2009 |
John McCall <rjmccall@apple.com> |
Refactor the LookupResult API to simplify most common operations. Require users to pass a LookupResult reference to lookup routines. Call out uses which assume a single result. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83674 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaAttr.cpp
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaLookup.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
f36e02d4aff98bf2e52e342e0038d4172fbb5e64 |
09-Oct-2009 |
John McCall <rjmccall@apple.com> |
Refactor the LookupResult API to simplify most common operations. Require users to pass a LookupResult reference to lookup routines. Call out uses which assume a single result. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83674 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaAttr.cpp
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaLookup.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
9829784ba1b190a92d0d8b4c2c43d5283d93e9f7 |
09-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When declaring a friend class template, we may end up finding an injected-class-name (e.g., when we're referring to other specializations of the current class template). Make sure that we see the template rather than the injected-class-name. Fixes PR4768. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83672 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
d7e5bdb23c6ba2786cf94788c9af555e2c1276ce |
09-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
When declaring a friend class template, we may end up finding an injected-class-name (e.g., when we're referring to other specializations of the current class template). Make sure that we see the template rather than the injected-class-name. Fixes PR4768. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83672 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
3ef7e3242f4a4c489fc8a1aaa9f5f72dd837f5ea |
09-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Produce good looking diagnostics on ambiguous built-in operators. Now we produce things like: bug1.cpp:21:11: error: use of overloaded operator '->*' is ambiguous int i = c->*pmf; // expected-error {{use of overloaded operator '->*' is ambiguous}} \ ~^ ~~~ bug1.cpp:21:11: note: built-in candidate operator ->* ('struct A volatile *', 'int const struct A::*') bug1.cpp:21:11: note: built-in candidate operator ->* ('struct A volatile *', 'int restrict struct A::*') ... Still need to look at an issue (indicated as FIXME in the test case). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83650 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
ad3607da8ad626c408d8e6d804bf1359977b200a |
09-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Produce good looking diagnostics on ambiguous built-in operators. Now we produce things like: bug1.cpp:21:11: error: use of overloaded operator '->*' is ambiguous int i = c->*pmf; // expected-error {{use of overloaded operator '->*' is ambiguous}} \ ~^ ~~~ bug1.cpp:21:11: note: built-in candidate operator ->* ('struct A volatile *', 'int const struct A::*') bug1.cpp:21:11: note: built-in candidate operator ->* ('struct A volatile *', 'int restrict struct A::*') ... Still need to look at an issue (indicated as FIXME in the test case). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83650 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
7d7e6083ab801eaa52590a4fcb20708f291a63c1 |
09-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Use the new API for applying the qualifiers on built-in '->*' operator's types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83648 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
5ecd5399421799892a2b3dc5456e816bd6d827ab |
09-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Use the new API for applying the qualifiers on built-in '->*' operator's types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83648 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
6ac11c8e90789d2b101cbde272a75d623f4d035e |
09-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Improve on reporting ambiguity involving built-in candidates. I still don't like it but it is improvement over what we had. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83603 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaOverload.cpp
|
16a5eac559730f4a7ec5ffdab3f236f51df85b63 |
09-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Improve on reporting ambiguity involving built-in candidates. I still don't like it but it is improvement over what we had. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83603 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaOverload.cpp
|
67408c099f8c29305ba2e67cde7f5ae1bd89a84b |
09-Oct-2009 |
Steve Naroff <snaroff@apple.com> |
- Fixup SortCodeCompleteResult() to properly sort keywords on Mac OS (compare was system dependent). Worked on Linux, failed on Mac OS (which caused the recently added testcase to fail on Linux). - Sort results in testcase. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83597 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
7f5111212f1b11f894a2cae11a39311989111fbf |
09-Oct-2009 |
Steve Naroff <snaroff@apple.com> |
- Fixup SortCodeCompleteResult() to properly sort keywords on Mac OS (compare was system dependent). Worked on Linux, failed on Mac OS (which caused the recently added testcase to fail on Linux). - Sort results in testcase. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83597 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
0d05afc49b3ad3f82835eb758d6f98ae8223d257 |
09-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Fix up error reporting when object cannot be constructed because of missing default constructor of a member. Fixes pr5154. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83583 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
0c728f1eb2e8e6e5adc2501c6fdcd87105b34d5c |
09-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Fix up error reporting when object cannot be constructed because of missing default constructor of a member. Fixes pr5154. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83583 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
ec0240c63cbf1e94db49fc2dd03c33988925ba53 |
09-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Installation of Clang libraries and headers, from Axel Naumann! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83582 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
|
14ea5696417a8e8d244a07091284cdeba57c6d4d |
09-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Installation of Clang libraries and headers, from Axel Naumann! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83582 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
|
6cd088ae0272f34c202bf7b67fd55de43b287582 |
08-Oct-2009 |
Steve Naroff <snaroff@apple.com> |
Add code completion support for ObjC property declarations/attributes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83579 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
|
ece8e71d12b6f4cb2dc501297afef126dab8ad74 |
08-Oct-2009 |
Steve Naroff <snaroff@apple.com> |
Add code completion support for ObjC property declarations/attributes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83579 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
|
1dac9df4db4cc39667df05bf306178f521a32f04 |
08-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement support for -Wunused-variable, from Oscar Bonilla! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83577 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
|
b5352cf949898cd42c8c5bc96a17a831b61ac2e5 |
08-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement support for -Wunused-variable, from Oscar Bonilla! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83577 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
|
ea07186725fb2890baf27d35130d838267f303f6 |
08-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Add more testing for the properties of explicit specialization. Also, eliminate a redundant diagnostic by marking a variable declared with incomplete type as an invalid declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83553 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
9916a047c55ea18845d706bf95e7517b646933d0 |
08-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Add more testing for the properties of explicit specialization. Also, eliminate a redundant diagnostic by marking a variable declared with incomplete type as an invalid declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83553 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
29b1a806f104479759d467cabd3b9791cce20db3 |
08-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Don't complain about out-of-line explicit specializations of member function and member function templates that are not definitions. Add more tests to ensure that explicit specializations of member function templates prevent instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83550 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
741fab61570f145a52b808a6824841c41e892c28 |
08-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Don't complain about out-of-line explicit specializations of member function and member function templates that are not definitions. Add more tests to ensure that explicit specializations of member function templates prevent instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83550 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
89f31cf5d2248186424147302dc1bfeadcd3528c |
08-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve checking for specializations of member classes of class templates, and keep track of how those member classes were instantiated or specialized. Make sure that we don't try to instantiate an explicitly-specialized member class of a class template, when that explicit specialization was a declaration rather than a definition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83547 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
|
f6b1185f0a8a209c06dfc1efdb6a59cc851e970c |
08-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Improve checking for specializations of member classes of class templates, and keep track of how those member classes were instantiated or specialized. Make sure that we don't try to instantiate an explicitly-specialized member class of a class template, when that explicit specialization was a declaration rather than a definition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83547 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
|
f044bb1ea8e4a0d6840a7638ae8e8fd054c6917b |
08-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
For instantiations of static data members of class templates, keep track of the kind of specialization or instantiation. Also, check the scope of the specialization and ensure that a specialization declaration without an initializer is not a definition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83533 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaExpr.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
251b4ff2578e26959a4c036140ccd61c5e9292f2 |
08-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
For instantiations of static data members of class templates, keep track of the kind of specialization or instantiation. Also, check the scope of the specialization and ensure that a specialization declaration without an initializer is not a definition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83533 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaExpr.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
25abb46063f89a4b6296ea4da4e97fd27b651afd |
08-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Make sure to set the template specialization kind of an explicit template instantiation of a member function of a class template. FIXME -= 2; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83520 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateInstantiate.cpp
|
e9374d5e2c0915bd883dfa988db2451b844390d8 |
08-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Make sure to set the template specialization kind of an explicit template instantiation of a member function of a class template. FIXME -= 2; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83520 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateInstantiate.cpp
|
bc89dbbe82084c28bca228ac2fde77edb60d3df2 |
08-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Only perform an implicit instantiation of a function if its template specialization kind is TSK_ImplicitInstantiation. Previously, we would end up implicitly instantiating functions that had explicit specialization declarations or explicit instantiation declarations (with no corresponding definitions). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83511 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
63e5e64a49ef936383ad93ea283b2b07f115e78c |
08-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Only perform an implicit instantiation of a function if its template specialization kind is TSK_ImplicitInstantiation. Previously, we would end up implicitly instantiating functions that had explicit specialization declarations or explicit instantiation declarations (with no corresponding definitions). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83511 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
193fb2be18e531ad344bf02099a72fd05b17d846 |
08-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Keep track of whether a member function instantiated from a member function of a class template was implicitly instantiated, explicitly instantiated (declaration or definition), or explicitly specialized. The same MemberSpecializationInfo structure will be used for static data members and member classes as well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83509 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
2db323294ac02296125e1e0beb4c3595992e75bb |
08-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Keep track of whether a member function instantiated from a member function of a class template was implicitly instantiated, explicitly instantiated (declaration or definition), or explicitly specialized. The same MemberSpecializationInfo structure will be used for static data members and member classes as well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83509 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
af2cbe1ec5e4b07df78c70f5f57a111d735d356e |
08-Oct-2009 |
John McCall <rjmccall@apple.com> |
Refactoring around friend class templates. Better error message for friend enums. Don't create a new declaration for friend classes if a declaration already exists. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83505 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
e3af0235ce6548e221e04c2ae5aeb0fb413ba736 |
08-Oct-2009 |
John McCall <rjmccall@apple.com> |
Refactoring around friend class templates. Better error message for friend enums. Don't create a new declaration for friend classes if a declaration already exists. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83505 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
9e639362fc5f5cf4016bf83355917c8614f95ed5 |
08-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Type checking for specializations of member functions of class templates. Previously, these weren't handled as specializations at all. The AST for representing these as specializations is still a work in progress. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83498 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplate.cpp
|
1fef4e60e7e884803977a8376c172ea584f8a5d1 |
08-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Type checking for specializations of member functions of class templates. Previously, these weren't handled as specializations at all. The AST for representing these as specializations is still a work in progress. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83498 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplate.cpp
|
b8201777f4ede0195520008a1ca5495e8ecdffef |
08-Oct-2009 |
Anders Carlsson <andersca@mac.com> |
Handle MemberExprs in ResolveAddressOfOverloadedFunction. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83495 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
6e8f550439c09f3f044d651354e297518b553712 |
08-Oct-2009 |
Anders Carlsson <andersca@mac.com> |
Handle MemberExprs in ResolveAddressOfOverloadedFunction. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83495 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
ad3a0f8189d6e7810087b41d2ec4544e3d175594 |
08-Oct-2009 |
John McCall <rjmccall@apple.com> |
Dead code elimination. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83492 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
71fdaf4c5e33bed9b9133a5c3bbdbd930a702a6c |
08-Oct-2009 |
John McCall <rjmccall@apple.com> |
Dead code elimination. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83492 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
bea479409a94af5abf202739e5688fdb452f9aa9 |
07-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Diagnose explicit instantiations and specializations that occur in class scope git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83473 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
0a4074768a6ecd81513f0db02bfb0e96ab3e56a0 |
07-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Diagnose explicit instantiations and specializations that occur in class scope git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83473 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
1ffd905fa95234261a5f1ef73de9690dd07e6ade |
07-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
When building candidate set for built-ins; when looking for convesion functions, look in base classes to. (Removes a FIXME). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83472 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
ca4fb04b5c43f866c095a3bcc14e02a150da2568 |
07-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
When building candidate set for built-ins; when looking for convesion functions, look in base classes to. (Removes a FIXME). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83472 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
d909756aa3da61a79dbaf3592e565278b12041c3 |
07-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Class template partial specializations can be declared anywhere that its definition may be defined, including in a class. Also, put in an assertion when trying to instantiate a class template partial specialization of a member template, which is not yet implemented. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83469 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
7974c3b7062f85bb7c0ada34526cdefe1d30f89b |
07-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Class template partial specializations can be declared anywhere that its definition may be defined, including in a class. Also, put in an assertion when trying to instantiate a class template partial specialization of a member template, which is not yet implemented. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83469 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
3c243e979c99b1e19988d8b1eeccc19a4e7deaac |
07-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Removed couple of unnecessary canonicalization per Doug's obsevation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83464 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
4303697cbcf1b56ea9387185d6625db2025d56ee |
07-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Removed couple of unnecessary canonicalization per Doug's obsevation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83464 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
f70acbff9a538f988571af4980262424c0dac6a0 |
07-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Refactor checking of the scope of explicit template specialization declarations and explicit template instantiations, improving diagnostics and making the code usable for function template specializations (as well as class template specializations and partial specializations). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83436 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
|
d5cb8765ad3841ead8eaacb0360ac385f2f0e080 |
07-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Refactor checking of the scope of explicit template specialization declarations and explicit template instantiations, improving diagnostics and making the code usable for function template specializations (as well as class template specializations and partial specializations). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83436 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
|
0aec50f2b39c580a54be9499ce8c9f4a927ff0df |
07-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to implement C++ [over.built]p11 of overload resolution. Doug, please review. There is a FIXME in the test case with a question which is unrelated to this patch (that is, error is issued before set of builtins are added to the candidate list). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83429 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
4657a992742862639a356352c26b4e88f995b578 |
07-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to implement C++ [over.built]p11 of overload resolution. Doug, please review. There is a FIXME in the test case with a question which is unrelated to this patch (that is, error is issued before set of builtins are added to the candidate list). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83429 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
8277fbdb9515ba4f5905673c47820620f33bfd0c |
06-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
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
emaTemplate.cpp
|
13d2d6cfd6a0032402c98b4fa237526c5b40e3fb |
06-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
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
emaTemplate.cpp
|
c54f652cb72837e087f396dfbcf6dbeaa500c08d |
06-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
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
MakeLists.txt
ema.h
emaAccess.cpp
emaCXXCast.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaInherit.cpp
emaInherit.h
emaLookup.cpp
emaOverload.cpp
emaType.cpp
|
a8f32e0965ee19ecc53cd796e34268377a20357c |
06-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
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
MakeLists.txt
ema.h
emaAccess.cpp
emaCXXCast.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaInherit.cpp
emaInherit.h
emaLookup.cpp
emaOverload.cpp
emaType.cpp
|
9e7f9b017f7b6d4072c7d7f3ada980ec822a34c7 |
06-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
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
emaOverload.cpp
|
56fc0d18caf9c829647a5e3ce35197f0d7e0feee |
06-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
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
emaOverload.cpp
|
bf61958d1d40c54ab73946acf3c0f1baa10054b6 |
05-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
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
emaDeclObjC.cpp
|
b106fc635b1523952332131785b700453a936e49 |
05-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
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
emaDeclObjC.cpp
|
7eb9e2e342729219ed2dc0c39b80710db97f5547 |
05-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
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
emaDeclObjC.cpp
|
339798eae1eb61c50ca68766ed028c0a16d0a284 |
05-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
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
emaDeclObjC.cpp
|
708a405a2e6f6cf1d8354eeaa55ea955672e16d5 |
03-Oct-2009 |
Anders Carlsson <andersca@mac.com> |
Create CXXMemberCallExpr for pointer-to-member calls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83268 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
83ccfc3cf035fae158358776910b617a188471c7 |
03-Oct-2009 |
Anders Carlsson <andersca@mac.com> |
Create CXXMemberCallExpr for pointer-to-member calls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83268 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
0c6d1f94a45dcb3f83adf9fb44461ea9b55dfd85 |
02-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
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
emaTemplate.cpp
|
b2f81cf7f8445e0c65c0428f4fbb0442566916b8 |
02-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
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
emaTemplate.cpp
|
b36cf1c496192714a73be212156f9215d35276bd |
02-Oct-2009 |
Steve Naroff <snaroff@apple.com> |
- 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
ema.h
emaExpr.cpp
|
d789d3d985e28c9404e62157af46dcb7331920e0 |
02-Oct-2009 |
Steve Naroff <snaroff@apple.com> |
- 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
ema.h
emaExpr.cpp
|
0620f4068d2f9f60cc39464f555313b4f0f51401 |
02-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
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
emaDecl.cpp
emaStmt.cpp
|
1be8aee8745e8b814ad2f151aa214b0ef07833db |
02-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
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
emaDecl.cpp
emaStmt.cpp
|
f6ccda4f9603e966126b3abf71f515d3ed8647a1 |
02-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
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
emaOverload.cpp
|
f8c3ad7653697ae91634bda56cb0e3d6eac2ef45 |
02-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
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
emaOverload.cpp
|
0800d5ca6d0f627a215203e62d3361bebcd81f98 |
01-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
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
ema.h
emaCXXCast.cpp
emaOverload.cpp
|
249ceade4942a2a5d7888541c547abeda5bb85b4 |
01-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
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
ema.h
emaCXXCast.cpp
emaOverload.cpp
|
df41c4d4174d9d12829544508c9786d9e2290915 |
01-Oct-2009 |
John McCall <rjmccall@apple.com> |
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
emaDeclCXX.cpp
|
9aeed32282fe8a775c24c01c923717ca86695685 |
01-Oct-2009 |
John McCall <rjmccall@apple.com> |
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
emaDeclCXX.cpp
|
08f0ad9ede278c834667b1b61d7b001818fc0a9a |
01-Oct-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
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
emaTemplateDeduction.cpp
|
4a5c15f75f76b95e1c2ceb6fa2737dcadd5f4be1 |
01-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
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
emaTemplateDeduction.cpp
|
dca0d4b1eeb0c42da52a691d9be18f82692d7346 |
30-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
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
emaExpr.cpp
emaOverload.cpp
|
3307475eb0dd6e5d88be9392ea8247d0b6b812df |
30-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
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
emaExpr.cpp
emaOverload.cpp
|
91d6427d55572d892fdc2d9e67c898f63af5be6d |
30-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
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
emaDeclCXX.cpp
|
893f955321cdf49dd0ceaf4ff821632e9b265000 |
30-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
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
emaDeclCXX.cpp
|
c5bd24265e5a0b38a3c2149d2b11dbf064a2b243 |
30-Sep-2009 |
Tanya Lattner <tonic@nondot.org> |
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
emaDecl.cpp
|
27a84d01614609c094029a49f7a86f0f7f8fe7f1 |
30-Sep-2009 |
Tanya Lattner <tonic@nondot.org> |
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
emaDecl.cpp
|
95bc53f248aceebccfac326a6f6d43c21ac812da |
30-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Note location of operators caused the circularity. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83153 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaOverload.cpp
|
7a8233a69103a6eeb6602bd4a17fb5d9b7bacaad |
30-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Note location of operators caused the circularity. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83153 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaOverload.cpp
|
335c9fcb4c5072357c67155e9b36eff342748d91 |
30-Sep-2009 |
John McCall <rjmccall@apple.com> |
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
emaExprCXX.cpp
|
432887fadd6bf87a6985906d6cef356b1f617d84 |
30-Sep-2009 |
John McCall <rjmccall@apple.com> |
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
emaExprCXX.cpp
|
46fc8f9e400efd66a91296ebf27e77e8f633d284 |
30-Sep-2009 |
John McCall <rjmccall@apple.com> |
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
emaExprCXX.cpp
|
c4e8321deb2bd83f734a09749460050f40ec51d1 |
30-Sep-2009 |
John McCall <rjmccall@apple.com> |
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
emaExprCXX.cpp
|
be568a229d8947727a49a4719cd08d237a2db5fa |
30-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
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
emaExprCXX.cpp
|
4a4e345a8bf749b5462a127ecfb1f90d4a9d6ba7 |
30-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
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
emaExprCXX.cpp
|
28b74e660d3e3afb8e8b3e792aad95cf8a4c2c3b |
30-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
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
emaExprCXX.cpp
|
5d64e5b6bc03462e8b7d0cd804565829afb1b508 |
30-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
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
emaExprCXX.cpp
|
0afd9f4ac27a7cef40c7a879f4b3fac0c612a218 |
30-Sep-2009 |
John McCall <rjmccall@apple.com> |
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
ema.cpp
emaDeclCXX.cpp
|
bf1cc05907ceb2081e8158b26f3d3f48b31caad3 |
30-Sep-2009 |
John McCall <rjmccall@apple.com> |
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
ema.cpp
emaDeclCXX.cpp
|
5ac665b75456d9452a4466e7927512ddffd7bd46 |
29-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
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
emaExprCXX.cpp
|
1070c9f7acc889336be6f80c70dc1b32622cc83d |
29-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
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
emaExprCXX.cpp
|
07475cfe68efce6aa79d4abfb7c6f45a9452e095 |
29-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
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
ema.h
|
7605618e3b0e7c3855ca804dbe0692a89835c71a |
29-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
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
ema.h
|
96eac694184d88ab34e621e7d44f3dc526927398 |
29-Sep-2009 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
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
emaType.cpp
|
eb66759e9a1d7c041354d132a14674b2d948059b |
29-Sep-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
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
emaType.cpp
|
225d6ca735de81dfb9bdc95645e30c6ba9514f43 |
29-Sep-2009 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
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
ema.h
emaDeclCXX.cpp
emaType.cpp
|
f352bddf015e537350416c296dd2963524f554f9 |
29-Sep-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
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
ema.h
emaDeclCXX.cpp
emaType.cpp
|
3921aa9c84f6876fdf2b7feb596ccb94fb83989e |
29-Sep-2009 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
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
reeTransform.h
|
24fab41057e4b67ed69a6b4027d5ae0f2f6934dc |
29-Sep-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
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
reeTransform.h
|
b532d84f56b8cce3c92b8a0e4fe1d929c1d067cf |
29-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Handle C++ delete expressions when the overloaded delete operator is a "usual deallocation function" with two arguments. CodeGen will have to handle this case specifically, since the value for the second argument (the size of the allocated object) may have to be computed at run time. Fixes the Sema part of PR4782. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83080 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
9091656e423f2354e53b2b3baa95b3eb5510badc |
29-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Handle C++ delete expressions when the overloaded delete operator is a "usual deallocation function" with two arguments. CodeGen will have to handle this case specifically, since the value for the second argument (the size of the allocated object) may have to be computed at run time. Fixes the Sema part of PR4782. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83080 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
edbf16767c895d9073c2904bce98d75b2039ed82 |
29-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Fixes a nasty bug which only turned up in 32bit build of clang and had to do with an initialized field when multiple type conversions are ambiguous but must be treated as user defined conversion for overload resolution purposes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83079 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
4a6a2b80c1771a2688a6349f8302263a3ebf4659 |
29-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Fixes a nasty bug which only turned up in 32bit build of clang and had to do with an initialized field when multiple type conversions are ambiguous but must be treated as user defined conversion for overload resolution purposes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83079 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
dab882650c662e819715da6ebbc25ae3f7657306 |
29-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Make sure to flush raw_string_ostream, from John Thompson git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83066 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
|
e2b7eea99c0e20fd4712e374c4094a957c236953 |
29-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Make sure to flush raw_string_ostream, from John Thompson git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83066 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
|
3395938e6e35025b5e9c74181ea37b0c716cd97a |
29-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Slightly improve the semantics of extern templates for member functions of class templates git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83063 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
483168227946f70e9dd7d12e7bf72bb1d76e0740 |
29-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Slightly improve the semantics of extern templates for member functions of class templates git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83063 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
48fcb48383929fcaaac1066be1c65caa72ddfab1 |
29-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Define and use a helper method to call a type conversion function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83027 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
emaOverload.cpp
|
b74002395520cff5933e16e06ba3f470b627bfb2 |
29-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Define and use a helper method to call a type conversion function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83027 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
emaOverload.cpp
|
e5a2e443a2f1ca692854da0e96f3d7c9aa5dac28 |
29-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Minor API change. No change in functionality. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83022 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaOverload.cpp
|
82ad87b872b4c75b5e47f5b3514cc7ab082150d6 |
29-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Minor API change. No change in functionality. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83022 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaOverload.cpp
|
9a56fc75142846a3130910c5eb0806ca920fc123 |
28-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Provide a custom diagnostic when code tries to use an unknown builtin git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83014 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
9a8c9a2eacd80437f18edb339a37516ab7e773cd |
28-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Provide a custom diagnostic when code tries to use an unknown builtin git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83014 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
14bf53f1d4160fdbcf1d15907642d72a4d01c9cc |
28-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Multiple conversions to the same type are ambiguous but for the purpose of overload resolution is to be treated as a uner-defined conversion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83004 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
99d6c445cc968bdf08c53a6bd4e9044bde43bdd1 |
28-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Multiple conversions to the same type are ambiguous but for the purpose of overload resolution is to be treated as a uner-defined conversion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83004 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
f7306d7435ca4f99ccf262abbb8ec93479bb778e |
28-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Make sure that out-of-line function and variable definitions are not pushed into scope. Fixes PR5056. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83003 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d04b1be7d3015a307f93eea0b9ab0ecce612951e |
28-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Make sure that out-of-line function and variable definitions are not pushed into scope. Fixes PR5056. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83003 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
5e00c29ef0bd16740b1f0ec2ccdf80fae12fd4c2 |
28-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch for AST representation for the implicit conversion to a function reference/pointer. And a test case for code gen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83000 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
d8307b1033ef52a1ae640691bc45052fddb07a69 |
28-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch for AST representation for the implicit conversion to a function reference/pointer. And a test case for code gen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83000 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
bda88f7cc5c8444d5900d8b403f42df98c76e966 |
28-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Properly match instantiations of member function templates to the function templates from which they were instantiated git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82969 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
0d696533420fca4cf32694621e3edf582ad4d06e |
28-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Properly match instantiations of member function templates to the function templates from which they were instantiated git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82969 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
0c5846ad6b4d9e2b507df0b39ad206df6ffcb31b |
28-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Don't allow the same function to enter the overload candidate set multiple times. This requires to be more careful about re-adding candidates cached from the function template definition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82967 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaOverload.h
|
3f396029a502fdec8c12d02d8c405d6097d8b417 |
28-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Don't allow the same function to enter the overload candidate set multiple times. This requires to be more careful about re-adding candidates cached from the function template definition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82967 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaOverload.h
|
b5055bd648c76b7beb8cdca1c36d61d58d3f5603 |
28-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Determinism is for wimps. <Wimper> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82962 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
6a6840326e9b4ac8e81a5a212165f33743847ab8 |
28-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Determinism is for wimps. <Wimper> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82962 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
398ef8c771c74ed620b321f237da916bc2b61446 |
28-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Teach Sema::isDeclInScope to handle overload sets constructed from functions that occur in multiple declaration contexts, e.g., because some were found via using declarations. Now, isDeclInScope will build a new overload set (when needed) containing only those declarations that are actually in scope. This eliminates a problem found with libstdc++'s <iostream>, where the presence of using In the longer term, I'd like to eliminate Sema::isDeclInScope in favor of better handling of the RedeclarationOnly flag in the name-lookup routines. That way, name lookup only returns the entities that matter, rather than taking the current two-pass approach of producing too many results and then filtering our the wrong results. It's not efficient, and I'm sure that we aren't filtering everywhere we should be. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82954 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
2531c2d2f1e8ce35f2ce8e9539738ddf8dccb7cc |
28-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Teach Sema::isDeclInScope to handle overload sets constructed from functions that occur in multiple declaration contexts, e.g., because some were found via using declarations. Now, isDeclInScope will build a new overload set (when needed) containing only those declarations that are actually in scope. This eliminates a problem found with libstdc++'s <iostream>, where the presence of using In the longer term, I'd like to eliminate Sema::isDeclInScope in favor of better handling of the RedeclarationOnly flag in the name-lookup routines. That way, name lookup only returns the entities that matter, rather than taking the current two-pass approach of producing too many results and then filtering our the wrong results. It's not efficient, and I'm sure that we aren't filtering everywhere we should be. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82954 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
3fe1470d4b644bd849262b84186a250836e1a891 |
28-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve handling of friend function templates somewhat git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82950 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
182ddf0e5dc5667e6683a58b483a2e52564f4303 |
28-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Improve handling of friend function templates somewhat git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82950 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
2c530be2f8aefeee06f92371a20f6634fd789851 |
26-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Simplify the handling of non-dependent friend class template specializations such as: friend class std::vector<int>; by using the same code path as explicit specializations, customized to reference an existing ClassTemplateSpecializationDecl (or build a new "undeclared" one). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82875 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
fc9cd61f2372cd8f43f0d92be14fa75778de6be6 |
26-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Simplify the handling of non-dependent friend class template specializations such as: friend class std::vector<int>; by using the same code path as explicit specializations, customized to reference an existing ClassTemplateSpecializationDecl (or build a new "undeclared" one). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82875 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
32564ed7d110bfb87e45ebd23e5211d867725fd8 |
26-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix name lookup for friend class templates to consider anything in a scope *up to and including* the innermost namespace scope, rather than just searching in the innermost namespace scope. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82849 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
6102d98f3b806cc3f4a66cec27f5560b25ddd675 |
26-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Fix name lookup for friend class templates to consider anything in a scope *up to and including* the innermost namespace scope, rather than just searching in the innermost namespace scope. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82849 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
6d716e4336f0cb7ff537bda8d25ee33c22aa4d5f |
26-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Rework the Parse-Sema interaction for friends to better support friend class templates. We now treat friend class templates much more like normal class templates, except that they still get special name lookup rules. Fixes PR5057 and eliminates a bunch of spurious diagnostics in <iostream>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82848 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaTemplate.cpp
|
d85bea2affdd59d83d1be7d24b97f436484c3625 |
26-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Rework the Parse-Sema interaction for friends to better support friend class templates. We now treat friend class templates much more like normal class templates, except that they still get special name lookup rules. Fixes PR5057 and eliminates a bunch of spurious diagnostics in <iostream>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82848 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaTemplate.cpp
|
f46ef15cc6a5ed0157fad0f9b8c5e78e0d808717 |
26-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Yet another simplifying use of Sema::getMostSpecialized git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82844 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
312a20241871b81a672a5f08dfb52a5674246cd0 |
26-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Yet another simplifying use of Sema::getMostSpecialized git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82844 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
902b8dead30d1b00a43ce529b9189538a39f204f |
26-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Use Sema::getMostSpecialized to eliminate a redundant implementation of the most-specialized function template git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82840 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
c5df30fe345613bacd6810f3d7ec02e4b9ac853f |
26-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Use Sema::getMostSpecialized to eliminate a redundant implementation of the most-specialized function template git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82840 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
c0359633b5398e8bbad82a48cbe4042d56641a42 |
26-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Cast cleanup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82826 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
3c31a39af925fca4a5bb48f03594dba4190e93e6 |
26-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Cast cleanup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82826 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
2a5d2c4ce951afc0e6cecfad4508778392ae9caf |
26-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Use explicitly-specified template argument lists to help naming explicit template specializations, when available. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82824 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplate.cpp
|
0b60d9e0097e2d6a1a5e62396967e207c4a772f2 |
26-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Use explicitly-specified template argument lists to help naming explicit template specializations, when available. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82824 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplate.cpp
|
d9e25cd62162910982a8f4335438ef493b6d9696 |
25-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Declarators can now properly represent template-ids, e.g., for template void f<int>(int); ~~~~~~ Previously, we silently dropped the template arguments. With this change, we now use the template arguments (when available) as the explicitly-specified template arguments used to aid template argument deduction for explicit template instantiations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82806 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplate.cpp
emaType.cpp
|
db422dffb720ff41d0b60e228f45c685600ffa9e |
25-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Declarators can now properly represent template-ids, e.g., for template void f<int>(int); ~~~~~~ Previously, we silently dropped the template arguments. With this change, we now use the template arguments (when available) as the explicitly-specified template arguments used to aid template argument deduction for explicit template instantiations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82806 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplate.cpp
emaType.cpp
|
fb79fb613ed160be4857148c3222a8fe8136ad73 |
25-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Refixed pr5050 per Anders comment. Test case enhanced per Doug's comment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82791 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
b3c477415f49668be7a770c8f44c217b42e3ccd3 |
25-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Refixed pr5050 per Anders comment. Test case enhanced per Doug's comment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82791 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
06c13d6e31ba05d4a0bb31274aecce4544571673 |
25-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
WIP implementation of explicit instantiation of function templates, member functions of class template specializations, and static data members. The mechanics are (mostly) present, but the semantic analysis is very weak. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82789 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaTemplateDeduction.cpp
|
d5a423b279e787e9fdd8309fe52cb515388c54ea |
25-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
WIP implementation of explicit instantiation of function templates, member functions of class template specializations, and static data members. The mechanics are (mostly) present, but the semantic analysis is very weak. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82789 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaTemplateDeduction.cpp
|
ab12a1062f717a793070121b01a008feb3641953 |
25-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Fix the AST tree so ir-gen can do the conversion via copy construction. Fixed pr5050. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82783 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
7498e50aea92276fdd8aceb7076b4156ee6dbab4 |
25-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Fix the AST tree so ir-gen can do the conversion via copy construction. Fixed pr5050. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82783 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
0b5a4153437fd6e8d76adf8fa105126cd67c06f1 |
25-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Sigh. Be *really* careful when copying a default function argument during template instantiation git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82761 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
0ed093069ae9b000278a2df01f372438d9c63ec1 |
25-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Sigh. Be *really* careful when copying a default function argument during template instantiation git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82761 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
3e651580153a30cdb7c6dcb18633f624320f6567 |
25-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Be careful about copying uninstantiated default arguments during template instantiation git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82760 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
f43d0b37c1d3f529d0f206e786ae6de61c5f364a |
25-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Be careful about copying uninstantiated default arguments during template instantiation git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82760 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
eadb1e8ff5a7d778576df4c4d7ce0eadc3fd867e |
25-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix checking for a null pointer constant when the expression itself is value-dependent. Audit (and fixed) all calls to Expr::isNullPointerConstant() to provide the correct behavior with value-dependent expressions. Fixes PR5041 and a crash in libstdc++ <locale>. In the same vein, properly compute value- and type-dependence for ChooseExpr. Fixes PR4996. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82748 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
emaExpr.cpp
emaExprCXX.cpp
emaOverload.cpp
|
ce94049b69f75b44c18584fe79cd238978b6b0d5 |
25-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Fix checking for a null pointer constant when the expression itself is value-dependent. Audit (and fixed) all calls to Expr::isNullPointerConstant() to provide the correct behavior with value-dependent expressions. Fixes PR5041 and a crash in libstdc++ <locale>. In the same vein, properly compute value- and type-dependence for ChooseExpr. Fixes PR4996. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82748 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
emaExpr.cpp
emaExprCXX.cpp
emaOverload.cpp
|
25fe73ffe15ec725db0642d95138f305dfab4148 |
25-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When entering the scope of a declarator, make sure that the scope is complete (or, possibly causing template instantiation). Test this via some explicit specializations of member functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82732 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
|
7dfd0fb08300b60a9657748bda7d8b3ceb07babe |
25-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
When entering the scope of a declarator, make sure that the scope is complete (or, possibly causing template instantiation). Test this via some explicit specializations of member functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82732 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
|
04f30d3ffeaf87f6db1cc6664901b73569f9753f |
25-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
WIP implementation of explicit function template specialization. This first implementation recognizes when a function declaration is an explicit function template specialization (based on the presence of a template<> header), performs template argument deduction + ambiguity resolution to determine which template is being specialized, and hooks There are many caveats here: - We completely and totally drop any explicitly-specified template arguments on the floor - We don't diagnose any of the extra semantic things that we should diagnose. - I haven't looked to see that we're getting the right linkage for explicit specializations On a happy note, this silences a bunch of errors that show up in libstdc++'s <iostream>, although Clang still can't get through the entire header. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82728 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
|
b9aa6b214c8fbc3e081dde575eef1f0913d48bdc |
25-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
WIP implementation of explicit function template specialization. This first implementation recognizes when a function declaration is an explicit function template specialization (based on the presence of a template<> header), performs template argument deduction + ambiguity resolution to determine which template is being specialized, and hooks There are many caveats here: - We completely and totally drop any explicitly-specified template arguments on the floor - We don't diagnose any of the extra semantic things that we should diagnose. - I haven't looked to see that we're getting the right linkage for explicit specializations On a happy note, this silences a bunch of errors that show up in libstdc++'s <iostream>, although Clang still can't get through the entire header. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82728 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
|
3ddc81456e4ee7e1017f17860053f3eec505a50e |
24-Sep-2009 |
John McCall <rjmccall@apple.com> |
Refactor the representation of qualifiers to bring ExtQualType out of the Type hierarchy. Demote 'volatile' to extended-qualifier status. Audit our use of qualifiers and fix a few places that weren't dealing with qualifiers quite right; many more remain. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82705 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaCXXCast.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInherit.cpp
emaOverload.cpp
emaStmt.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaType.cpp
reeTransform.h
|
0953e767ff7817f97b3ab20896b229891eeff45b |
24-Sep-2009 |
John McCall <rjmccall@apple.com> |
Refactor the representation of qualifiers to bring ExtQualType out of the Type hierarchy. Demote 'volatile' to extended-qualifier status. Audit our use of qualifiers and fix a few places that weren't dealing with qualifiers quite right; many more remain. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82705 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaCXXCast.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInherit.cpp
emaOverload.cpp
emaStmt.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaType.cpp
reeTransform.h
|
e4876d73fe7ead2e8363d021bbe6a0d582c4cab1 |
24-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Use Doug's DeclLoc to pinpoint location of the declaration in a reference initialization diagnostic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82671 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
7ad2d562e8423f71143c33d63e11ce77b2117643 |
24-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Use Doug's DeclLoc to pinpoint location of the declaration in a reference initialization diagnostic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82671 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
9fbc9c810b9186191aec0a01731be9c5bdb85d87 |
24-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve diagnostic location information when checking the initialization of a reference git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82666 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXCast.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
|
739d8283149d999f598a7514c6ec2b42598f51d3 |
24-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Improve diagnostic location information when checking the initialization of a reference git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82666 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXCast.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
|
1c0da44b18e4b7d6af13736b6cdfcf8ea06eb90b |
24-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
patch to ir-gen conversion function call used in initializing a reference class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82664 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
8f489d692fedeafbb572103d6edca71d7762e83d |
24-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
patch to ir-gen conversion function call used in initializing a reference class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82664 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
c8c661481d7437961afe5a3c66a4612e69a4e313 |
24-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
For code completion, note that injected-class-names found as part of lookup in a member access expression always start a nested-name-specifier. Additionally, rank names that start nested-name-specifiers after other names. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82663 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
eb5758bbfdc5088cd63748451000ec6983ad9bb8 |
24-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
For code completion, note that injected-class-names found as part of lookup in a member access expression always start a nested-name-specifier. Additionally, rank names that start nested-name-specifiers after other names. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82663 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
66052366de430f50dd8177992c7d56651e00a851 |
23-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Remove the FIXME as I said. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82650 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
2b51138433969b163e6899836bba6c14ec2397cb |
23-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Remove the FIXME as I said. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82650 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
ad10374fde0659fd4388aa51973f2869de5b9ff2 |
23-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
This patch addresses a few issues related to 8.5.3 [dcl.init.ref] It uses a recent API to find inherited conversion functions to do the initializer to reference lvalue conversion (and removes a FIXME). It issues the ambiguity diagnostics when multiple conversions are found. WIP. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82649 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExprCXX.cpp
|
51bebc83e74001ed0412d82aadae9eb247fee2d4 |
23-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
This patch addresses a few issues related to 8.5.3 [dcl.init.ref] It uses a recent API to find inherited conversion functions to do the initializer to reference lvalue conversion (and removes a FIXME). It issues the ambiguity diagnostics when multiple conversions are found. WIP. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82649 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExprCXX.cpp
|
3de2898793aa80c0e7c0eba9ef0839f1bda85f72 |
23-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When code-completion after a "," is building an overload set, note that there is one more argument (the one following the comma) and make the candidate non-viable if the function cannot accept any argument in that position. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82625 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
5bd1a1151f5da8236c5b60f4e8a6135627a8130a |
23-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
When code-completion after a "," is building an overload set, note that there is one more argument (the one following the comma) and make the candidate non-viable if the function cannot accept any argument in that position. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82625 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
aa339184940ceb3aa0cac0b5cb45262796aa3341 |
23-Sep-2009 |
Chris Lattner <sabre@nondot.org> |
implement support for __builtin_eh_return_data_regno on x86-32 and x86-64. This implements PR5034 and rdar://6836445. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82614 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
|
21fb98ee003e992b0c4e204d98a19e0ef544cae3 |
23-Sep-2009 |
Chris Lattner <sabre@nondot.org> |
implement support for __builtin_eh_return_data_regno on x86-32 and x86-64. This implements PR5034 and rdar://6836445. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82614 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
|
1575c954eec7015c93aff49b57b52cf9f9d732f3 |
23-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Produce detailed diagnostics when overload resolution failed to select a candidate due to ambiguity in type conversion function selection. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82596 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaOverload.h
|
b1663d050744ab3a4987df2d3a394f3ae0468435 |
23-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Produce detailed diagnostics when overload resolution failed to select a candidate due to ambiguity in type conversion function selection. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82596 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaOverload.h
|
1b93f99619e0fcea0c8927038e9df6943276022b |
23-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Cast the array size expr to a size_t git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82594 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
ac18b2e3af8d0c5304f74e362a1d4207363e4c94 |
23-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Cast the array size expr to a size_t git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82594 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
cc47e57e3421542eb343394bfc45ec568716a26c |
23-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Print the results of code-completion for overloading by displaying the signature of the function with the current parameter highlighted as a placeholder. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82593 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
|
86d802e03a267af79663990c39865c67e0645238 |
23-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Print the results of code-completion for overloading by displaying the signature of the function with the current parameter highlighted as a placeholder. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82593 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
|
bbc18cb67a198b42a0e20d6f4a57eae050438330 |
23-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Separate the code-completion results for call completion from the results for other, textual completion. For call completion, we now produce enough information to show the function call argument that we are currently on. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82592 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
|
0594438e06f58ab3798416324780ab39ca9c8f54 |
23-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Separate the code-completion results for call completion from the results for other, textual completion. For call completion, we now produce enough information to show the function call argument that we are currently on. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82592 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
|
ab994a561c0a941a0a3fa11b715640540fe7b452 |
23-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Make sure we don't try to add code-completion results without an active shadow map. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82588 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
8e0a0e4e4554ab31d793413e0fb4d9532872a53a |
23-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Make sure we don't try to add code-completion results without an active shadow map. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82588 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
3d2491e8c664a3ffe39921fa442a28d524dcc631 |
23-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When code-completion finds a declaration only because it is usable as the start of a nested-name-specifier, add the "::" after the nested-name-specifier to the code-completion string. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82587 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
3e7253f155e1e40542a6815689adef5abc65b17b |
23-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
When code-completion finds a declaration only because it is usable as the start of a nested-name-specifier, add the "::" after the nested-name-specifier to the code-completion string. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82587 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
29e94efa938bf9d27f9d0a18d9214a4c0ca92d9b |
23-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Tweak the code-completion results ranking and formation, so that members found in base classes have the same ranking as members found in derived classes. However, we will introduce an informative note for members found in base classes, showing (as a nested-name-specifier) the qualification to name the base class, to make it clear which members are from bases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82586 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
|
0563c2677cfc20c9450342ddc53aa96971671c71 |
23-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Tweak the code-completion results ranking and formation, so that members found in base classes have the same ranking as members found in derived classes. However, we will introduce an informative note for members found in base classes, showing (as a nested-name-specifier) the qualification to name the base class, to make it clear which members are from bases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82586 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
emaCodeComplete.cpp
|
e9d0925b3ed13423a61a3c17d10b4855e4c6e564 |
22-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Teach code-completion to introduce a ", ..." placeholder for variadic functions git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82577 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
b3d4525c65cf456d3f1f4338afdcac83afc7be02 |
22-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Teach code-completion to introduce a ", ..." placeholder for variadic functions git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82577 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
aaf2e535b57a3cf7a55874be842db2c9bf9f88d7 |
22-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Code refactoring and cleanup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82566 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaOverload.cpp
|
17c7a5d7ae8c818696e10a62bbcf19fa6cb90755 |
22-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Code refactoring and cleanup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82566 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaOverload.cpp
|
a1234addb02a8789b63c82db4c660874778a6a19 |
22-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Issue good ambiguity diagnostic when convesion fails. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82565 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
455acd9452f5b2a69d7ab8e53f733e46b500473a |
22-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Issue good ambiguity diagnostic when convesion fails. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82565 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
e04b312e68e47d7bb21a5410ebbe2316774286cc |
22-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
(With Doug's help) fix a crash in the code completion code that lead to a test failure. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82558 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
90756300f3c8beea14b7ae0c229405981e2870c2 |
22-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
(With Doug's help) fix a crash in the code completion code that lead to a test failure. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82558 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
0662bb276a2cbc779cff6bdd8bb967f3c6150490 |
22-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Fix a regression in accessing class getter using the dot-syntax notation. There is still an issue accessing field of a 'Class''s isa in legacy code using dot field access notation (as noted in the test case) but unrelated to this patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82555 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b2ef1beb812988ce45804d655c9a72bc523d5014 |
22-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Fix a regression in accessing class getter using the dot-syntax notation. There is still an issue accessing field of a 'Class''s isa in legacy code using dot field access notation (as noted in the test case) but unrelated to this patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82555 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
7bc38e309657a5b406c2a66addc6bd1806f2e8a9 |
22-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement code completion within a function call, triggered after the opening parentheses and after each comma. We gather the set of visible overloaded functions, perform "partial" overloading based on the set of arguments that we have thus far, and return the still-viable results sorted by the likelihood that they will be the best candidate. Most of the changes in this patch are a refactoring of the overloading routines for a function call, since we needed to separate out the notion of building an overload set (common to code-completion and normal semantic analysis) and then what to do with that overload set. As part of this change, I've pushed explicit template arguments into a few more subroutines. There is still much more work to do in this area. Function templates won't be handled well (unless we happen to deduce all of the template arguments before we hit the completion point), nor will overloaded function-call operators or calls to member functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82549 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
emaExpr.cpp
emaOverload.cpp
|
9c6a0e92dbf89897eae6106b24bfd017f269bfd0 |
22-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement code completion within a function call, triggered after the opening parentheses and after each comma. We gather the set of visible overloaded functions, perform "partial" overloading based on the set of arguments that we have thus far, and return the still-viable results sorted by the likelihood that they will be the best candidate. Most of the changes in this patch are a refactoring of the overloading routines for a function call, since we needed to separate out the notion of building an overload set (common to code-completion and normal semantic analysis) and then what to do with that overload set. As part of this change, I've pushed explicit template arguments into a few more subroutines. There is still much more work to do in this area. Function templates won't be handled well (unless we happen to deduce all of the template arguments before we hit the completion point), nor will overloaded function-call operators or calls to member functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82549 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
emaExpr.cpp
emaOverload.cpp
|
b4e0bb9b13133eefecf17005e93d55f401fa5e48 |
22-Sep-2009 |
Daniel Dunbar <daniel@zuster.org> |
Spell function pointer correctly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82543 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
|
e119e84ea5ea66eb2090aec05310c23e9d6f63fc |
22-Sep-2009 |
Daniel Dunbar <daniel@zuster.org> |
Spell function pointer correctly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82543 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
|
e9cf475532e5ec11c23413a2ab4829064d56fd5b |
22-Sep-2009 |
Daniel Dunbar <daniel@zuster.org> |
Revert "Switch a few clients over to StringLiteral::getString.", this is breaking some projects, but I don't have a test case yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82539 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
f015b034159d40e7033309e50036804eb1971787 |
22-Sep-2009 |
Daniel Dunbar <daniel@zuster.org> |
Revert "Switch a few clients over to StringLiteral::getString.", this is breaking some projects, but I don't have a test case yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82539 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
286e7fdc93f1e40abe133dfee24eedf3c730fb80 |
22-Sep-2009 |
Daniel Dunbar <daniel@zuster.org> |
Switch a few clients over to StringLiteral::getString. - Switching all of them out-of-my-current-scope-of-interest, sorry. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82515 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
df4eee9b035cc4b95b1ea72635e7429d06b0ecc8 |
22-Sep-2009 |
Daniel Dunbar <daniel@zuster.org> |
Switch a few clients over to StringLiteral::getString. - Switching all of them out-of-my-current-scope-of-interest, sorry. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82515 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
cac0eaf6caa1035b6a971b32adeea895ba14715c |
22-Sep-2009 |
John McCall <rjmccall@apple.com> |
Change all the Type::getAsFoo() methods to specializations of Type::getAs(). Several of the existing methods were identical to their respective specializations, and so have been removed entirely. Several more 'leaf' optimizations were introduced. The getAsFoo() methods which imposed extra conditions, like getAsObjCInterfacePointerType(), have been left in place. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82501 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaInit.cpp
emaLookup.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
|
183700f494ec9b6701b6efe82bcb25f4c79ba561 |
22-Sep-2009 |
John McCall <rjmccall@apple.com> |
Change all the Type::getAsFoo() methods to specializations of Type::getAs(). Several of the existing methods were identical to their respective specializations, and so have been removed entirely. Several more 'leaf' optimizations were introduced. The getAsFoo() methods which imposed extra conditions, like getAsObjCInterfacePointerType(), have been left in place. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82501 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaInit.cpp
emaLookup.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
|
7c559f33215453ee80f0c36857b6845858e1a9a0 |
21-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Code completion for ordinary names when we're starting a declaration, expression, or statement git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82481 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
|
791215b7a24666912c0b71175d2ca5ba082f666e |
21-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Code completion for ordinary names when we're starting a declaration, expression, or statement git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82481 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
|
d7ce4febe129ba30fc10e20724f590f672a7f624 |
21-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When providing a code-completion suggestion for a hidden name, include a nested-name-specifier that describes how to refer to that name. For example, given: struct Base { int member; }; struct Derived : Base { int member; }; the code-completion result for a member access into "Derived" will provide both "member" to refer to Derived::member (no qualification needed) and "Base::member" to refer to Base::member (qualification included). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82476 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
456c4a17f4f02d660188dc9b2619c160dfbe3b68 |
21-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
When providing a code-completion suggestion for a hidden name, include a nested-name-specifier that describes how to refer to that name. For example, given: struct Base { int member; }; struct Derived : Base { int member; }; the code-completion result for a member access into "Derived" will provide both "member" to refer to Derived::member (no qualification needed) and "Base::member" to refer to Base::member (qualification included). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82476 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
a51a7ad10bb5d1c8df03c7da637188638921b5b3 |
21-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Enhance "case" code completion in C++ to suggest qualified names for enumerators when either the user intentionally wrote a qualified name (in which case we just use that nested-name-specifier to match the user's code) or when this is the first "case" statement and we need a qualified name to refer to an enumerator in a different scope. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82474 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
b9d0ef76347574a147b8456b018fe94dc1e2be26 |
21-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Enhance "case" code completion in C++ to suggest qualified names for enumerators when either the user intentionally wrote a qualified name (in which case we just use that nested-name-specifier to match the user's code) or when this is the first "case" statement and we need a qualified name to refer to an enumerator in a different scope. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82474 91177308-0d34-0410-b5e6-96231b3b80d8
emaCodeComplete.cpp
|
fbf10cd4af8d30d49f616492be227b85d5363c7e |
21-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Code completion for "case" statements within a switch on an expression of enumeration type, providing the various unused enumerators as options. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82467 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
|
3e1005f085006dfb3545f0c54ac5e22483137c7d |
21-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Code completion for "case" statements within a switch on an expression of enumeration type, providing the various unused enumerators as options. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82467 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCodeComplete.cpp
|
78bfefe6d1c9a17d51581167150187a9b7905082 |
21-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Refactor and simplify the CodeCompleteConsumer, so that all of the real work is performed within Sema. Addresses Chris's comments, but still retains the heavyweight list-of-multimaps data structure. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82459 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
arseAST.cpp
ema.h
emaCodeComplete.cpp
|
86d9a52c24d390631a888d4ff812e1b15445e0a0 |
21-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Refactor and simplify the CodeCompleteConsumer, so that all of the real work is performed within Sema. Addresses Chris's comments, but still retains the heavyweight list-of-multimaps data structure. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82459 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
arseAST.cpp
ema.h
emaCodeComplete.cpp
|
78d6ae80f2c1eeb9817a9ca1a87052505450fcad |
19-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
In C++ code completion, only suggest the "template" keyword after ".", "->", or "::" if we will be looking into a dependent context. It's not wrong to use the "template" keyword, but it's to needed, either. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82307 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
|
ff360b64a63ebaf3c42ee75b6cf1aae8972c6280 |
19-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
In C++ code completion, only suggest the "template" keyword after ".", "->", or "::" if we will be looking into a dependent context. It's not wrong to use the "template" keyword, but it's to needed, either. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82307 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
|
756583729a28b0287b7df202ae0b1213718595b2 |
19-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Make the construction of the code-completion string for a function template smarter, by taking into account which function template parameters are deducible from the call arguments. For example, template<typename RandomAccessIterator> void sort(RandomAccessIterator first, RandomAccessIterator last); will have a code-completion string like sort({RandomAccessIterator first}, {RandomAccessIterator last}) since the template argument for its template parameter is deducible. On the other hand, template<class X, class Y> X* dyn_cast(Y *Val); will have a code-completion string like dyn_cast<{class X}>({Y *Val}) since the template type parameter X is not deducible from the function call. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82306 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
ema.h
emaTemplateDeduction.cpp
|
63f07c55d58951574afe9bbb9f7cb3f92eecdd9b |
19-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Make the construction of the code-completion string for a function template smarter, by taking into account which function template parameters are deducible from the call arguments. For example, template<typename RandomAccessIterator> void sort(RandomAccessIterator first, RandomAccessIterator last); will have a code-completion string like sort({RandomAccessIterator first}, {RandomAccessIterator last}) since the template argument for its template parameter is deducible. On the other hand, template<class X, class Y> X* dyn_cast(Y *Val); will have a code-completion string like dyn_cast<{class X}>({Y *Val}) since the template type parameter X is not deducible from the function call. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82306 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
ema.h
emaTemplateDeduction.cpp
|
abc2064e25768a2d5035a8d5a699d7bc29a642af |
19-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Introduce code completion patterns for templates, which provide the angle brackets < > along with placeholder template arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82304 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
|
56ff871ae74b1edccff44efe296f3167d694ce48 |
19-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Introduce code completion patterns for templates, which provide the angle brackets < > along with placeholder template arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82304 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
|
ac547d56ba6725811c9f09c241785bc230ce5345 |
19-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Introduce code completion strings, which describe how to *use* the results of code completion, e.g., by providing function call syntax with placeholders for each of the parameters. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82293 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
|
e6e0361984b077d205e9a45d64257d41d2c788c8 |
19-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Introduce code completion strings, which describe how to *use* the results of code completion, e.g., by providing function call syntax with placeholders for each of the parameters. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82293 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
|
270f5b6882bd9746bac5eefab4dec5b17744e35c |
18-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
C++ code completion after the "operator" keyword. Provide overloaded operators, type specifiers, type names, and nested-name-specifiers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82264 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
ema.h
emaCodeComplete.cpp
|
ed8d322b4086b8b1e1f78b21389cabb23457dcb3 |
18-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
C++ code completion after the "operator" keyword. Provide overloaded operators, type specifiers, type names, and nested-name-specifiers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82264 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
ema.h
emaCodeComplete.cpp
|
7b7274e575c184d8c0841063f8bf6428f5522ade |
18-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Introduce four new code-completion hooks for C++: - after "using", show anything that can be a nested-name-specifier. - after "using namespace", show any visible namespaces or namespace aliases - after "namespace", show any namespace definitions in the current scope - after "namespace identifier = ", show any visible namespaces or namespace aliases git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82251 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
ema.h
emaCodeComplete.cpp
|
49f40bd0c9c9de5e74727774fec429b47d36303a |
18-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Introduce four new code-completion hooks for C++: - after "using", show anything that can be a nested-name-specifier. - after "using namespace", show any visible namespaces or namespace aliases - after "namespace", show any namespace definitions in the current scope - after "namespace identifier = ", show any visible namespaces or namespace aliases git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82251 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
ema.h
emaCodeComplete.cpp
|
23f40faeea7911e5f0fb1e37e8f357e29487f76e |
18-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Don't perform name lookup into a given declaration context more than once during code completion git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82234 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
|
5836b010d0a74c8b7be3f2616332cd70d3c87f83 |
18-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Don't perform name lookup into a given declaration context more than once during code completion git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82234 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
|
7fc55509ad43340b3ec932f33e533ae342fc6dec |
18-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Handle using declarations and overload sets in code completion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82233 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
|
75b7128e93d736331bde659b05cd176f9dd6d047 |
18-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Handle using declarations and overload sets in code completion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82233 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
|
03546f72ab350b0181d20a9e95da6b451401cc00 |
18-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
For code completion in C++ member access expressions and tag names, look into the current scope for anything that could start a nested-names-specifier. These results are ranked worse than any of the results actually found in the lexical scope. Perform a little more pruning of the result set, eliminating constructors, __va_list_tag, and any duplication of declarations in the result set. For the latter, implemented NamespaceDecl::getCanonicalDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82231 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
|
33224e61bfca370850abae89bbd415a4dabe07fa |
18-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
For code completion in C++ member access expressions and tag names, look into the current scope for anything that could start a nested-names-specifier. These results are ranked worse than any of the results actually found in the lexical scope. Perform a little more pruning of the result set, eliminating constructors, __va_list_tag, and any duplication of declarations in the result set. For the latter, implemented NamespaceDecl::getCanonicalDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82231 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
|
9437430d8dde6c1f4273bb2f7600c44abd5fd621 |
18-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When gathering results for code completion, only include hidden results when there is some way to refer to them in the language, such as with a qualified name in C++. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82223 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
|
b1c28a1f7ef3bd3616df6ddcdb503f4b480a8df6 |
18-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
When gathering results for code completion, only include hidden results when there is some way to refer to them in the language, such as with a qualified name in C++. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82223 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
|
d143259608d01ca37a3172ce31e725b3167ef4f1 |
18-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement code completion for tags, e.g., code completion after "enum" will provide the names of various enumerations currently visible. Introduced filtering of code-completion results when we build the result set, so that we can identify just the kinds of declarations we want. This implementation is incomplete for C++, since we don't consider that the token after the tag keyword could start a nested-name-specifier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82222 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
ema.h
emaCXXScopeSpec.cpp
emaCodeComplete.cpp
|
374929f7e88f6c7a96382b3eb4201b721c418372 |
18-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement code completion for tags, e.g., code completion after "enum" will provide the names of various enumerations currently visible. Introduced filtering of code-completion results when we build the result set, so that we can identify just the kinds of declarations we want. This implementation is incomplete for C++, since we don't consider that the token after the tag keyword could start a nested-name-specifier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82222 91177308-0d34-0410-b5e6-96231b3b80d8
odeCompleteConsumer.cpp
ema.h
emaCXXScopeSpec.cpp
emaCodeComplete.cpp
|
70aa572f9b5ebb13221f2062f40459a58bc59497 |
17-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Initial implementation of a code-completion interface in Clang. In essence, code completion is triggered by a magic "code completion" token produced by the lexer [*], which the parser recognizes at certain points in the grammar. The parser then calls into the Action object with the appropriate CodeCompletionXXX action. Sema implements the CodeCompletionXXX callbacks by performing minimal translation, then forwarding them to a CodeCompletionConsumer subclass, which uses the results of semantic analysis to provide code-completion results. At present, only a single, "printing" code completion consumer is available, for regression testing and debugging. However, the design is meant to permit other code-completion consumers. This initial commit contains two code-completion actions: one for member access, e.g., "x." or "p->", and one for nested-name-specifiers, e.g., "std::". More code-completion actions will follow, along with improved gathering of code-completion results for the various contexts. [*] In the current -code-completion-dump testing/debugging mode, the file is truncated at the completion point and EOF is translated into "code completion". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82166 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
odeCompleteConsumer.cpp
arseAST.cpp
ema.cpp
ema.h
emaCodeComplete.cpp
|
81b747b7fcc91c2fba9a3183d8fac80adbfc1d3e |
17-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Initial implementation of a code-completion interface in Clang. In essence, code completion is triggered by a magic "code completion" token produced by the lexer [*], which the parser recognizes at certain points in the grammar. The parser then calls into the Action object with the appropriate CodeCompletionXXX action. Sema implements the CodeCompletionXXX callbacks by performing minimal translation, then forwarding them to a CodeCompletionConsumer subclass, which uses the results of semantic analysis to provide code-completion results. At present, only a single, "printing" code completion consumer is available, for regression testing and debugging. However, the design is meant to permit other code-completion consumers. This initial commit contains two code-completion actions: one for member access, e.g., "x." or "p->", and one for nested-name-specifiers, e.g., "std::". More code-completion actions will follow, along with improved gathering of code-completion results for the various contexts. [*] In the current -code-completion-dump testing/debugging mode, the file is truncated at the completion point and EOF is translated into "code completion". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82166 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
odeCompleteConsumer.cpp
arseAST.cpp
ema.cpp
ema.h
emaCodeComplete.cpp
|
8091a0c7ffa1997f246bfa1b10202a546a0b8e11 |
17-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Merge uninstantiated default arguments more carefully, and try not to complain about specializations of member functions that are not definitions. Fixes PR4995. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82159 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
d85cef5a54074a5f647f45c2218675f7774a909d |
17-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Merge uninstantiated default arguments more carefully, and try not to complain about specializations of member functions that are not definitions. Fixes PR4995. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82159 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
197ab4b0517d53bc8ac274adf14c2504a268f00c |
17-Sep-2009 |
Daniel Dunbar <daniel@zuster.org> |
Fix two crashes on value dependent expressions (shift and null-pointer check). - Doug, please check. - PR4940. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82129 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
3f180c618970d1369726b9229c0370617e05c7cb |
17-Sep-2009 |
Daniel Dunbar <daniel@zuster.org> |
Fix two crashes on value dependent expressions (shift and null-pointer check). - Doug, please check. - PR4940. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82129 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
20e67548173bd3c35c233939dcf7a1fe51b34a17 |
17-Sep-2009 |
Daniel Dunbar <daniel@zuster.org> |
Remove trailing whitespace. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82128 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
7e88a60d38b36695520e4f8d9279766ef111a662 |
17-Sep-2009 |
Daniel Dunbar <daniel@zuster.org> |
Remove trailing whitespace. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82128 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
d3752bb8f625553c35705edcd125a511162043a5 |
17-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
When creating function types, remove any top-level CVR qualifications in the function type argument types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82093 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaType.cpp
|
83913e36c847052966d9ff60d760ea7231ed8b6b |
17-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
When creating function types, remove any top-level CVR qualifications in the function type argument types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82093 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaType.cpp
|
d3ad986df2a0accecb98f83881ce20c3874e9d76 |
17-Sep-2009 |
John McCall <rjmccall@apple.com> |
Improved representation and support for friend class templates. Angst about same. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82088 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
dd4a3b0065b9a7e7b00073df415a798886c090f3 |
17-Sep-2009 |
John McCall <rjmccall@apple.com> |
Improved representation and support for friend class templates. Angst about same. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82088 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
6115803d4017efcda82aef639a3254be4d3698f3 |
16-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Improve handling of vector casts in C++. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82072 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
0de51bc6122f6cee0e8081d65dfcc7d500da1c6f |
16-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Improve handling of vector casts in C++. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82072 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
28ad0858d8fe320bd9c1a1bbbf00c5d4554fed60 |
16-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Teach Sema::FindInstantiatedDecl to find instantiated RecordDecls even when we are not instantiating the corresponding "current instantiation." This happens, e.g., when we are instantiating a declaration reference that refers into the "current instantiation" but occurs in a default function argument. The libstdc++ vector default constructor now instantiates properly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82069 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
e95b40961302c2130968ddfc3ba162e138f2118e |
16-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Teach Sema::FindInstantiatedDecl to find instantiated RecordDecls even when we are not instantiating the corresponding "current instantiation." This happens, e.g., when we are instantiating a declaration reference that refers into the "current instantiation" but occurs in a default function argument. The libstdc++ vector default constructor now instantiates properly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82069 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
1b3d12e2353ab6265b99b329a0685e89151effc7 |
16-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix a typo in a FIXME git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81960 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
861d0e846e53eedc70e0224e429d064fe7410399 |
16-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Fix a typo in a FIXME git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81960 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
631f3b3618ef6e50fde7e24d0217604a0e95460f |
16-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When implicitly declaring operators new, new[], delete, and delete[], give them the appropriate exception specifications. This, unfortunately, requires us to maintain and/or implicitly generate handles to namespace "std" and the class "std::bad_alloc". However, every other approach I've come up with was more hackish, and this standard requirement itself is quite the hack. Fixes PR4829. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81939 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
|
7adb10fa317cd7eacb0959f775e77353d4f24ad1 |
16-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
When implicitly declaring operators new, new[], delete, and delete[], give them the appropriate exception specifications. This, unfortunately, requires us to maintain and/or implicitly generate handles to namespace "std" and the class "std::bad_alloc". However, every other approach I've come up with was more hackish, and this standard requirement itself is quite the hack. Fixes PR4829. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81939 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
|
97eecea84f314e390f2f5c19948f063b25d4896c |
16-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
1) don't do overload resolution in selecting conversion to pointer function for delete expression. 2) Treat type conversion function and its 'const' version as identical in building the visible conversion list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81930 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
8b915e7048b20b0feb60ec90c365a8eb68360cd4 |
16-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
1) don't do overload resolution in selecting conversion to pointer function for delete expression. 2) Treat type conversion function and its 'const' version as identical in building the visible conversion list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81930 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
d844f2f83c34fb2ed0b6a4c55f93bde60ffa8a40 |
15-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Add back the workaround since it lead to constructor conversion bugs :( git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81917 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
71710113531a828679ce9b7deaca8d8df08c88da |
15-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Add back the workaround since it lead to constructor conversion bugs :( git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81917 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
38c42b40321aacf18da8a70b1d5d5131ab922a5c |
15-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When printing an overload candidate that is a function template specialization, point at the template and print out its template arguments, e.g., ambiguous-ovl-print.cpp:5:8: note: candidate function template specialization [with T = int] void f(T*, long); git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81907 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
1fdd89ba1d14ee11fda5b9e1c171db428b1acb23 |
15-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
When printing an overload candidate that is a function template specialization, point at the template and print out its template arguments, e.g., ambiguous-ovl-print.cpp:5:8: note: candidate function template specialization [with T = int] void f(T*, long); git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81907 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
3fa04998b1be7a53e60d121b40c3dd86a9346266 |
15-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Issue good diagnostics when initialization failes due to ambiguity in type conversion function selection. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81898 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaInit.cpp
emaOverload.cpp
|
34acd3e62c4ca3a2904f2515ff2a1a94c7d27b01 |
15-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Issue good diagnostics when initialization failes due to ambiguity in type conversion function selection. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81898 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaInit.cpp
emaOverload.cpp
|
088fc2495ca5387e2288db3aae812e4ba13ae371 |
15-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Add an assertion and a test case, in a fruitless attempt to track down an existing bug git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81885 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
f882574cf640d5c8355965e1c486f9d8d8ffcf47 |
15-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Add an assertion and a test case, in a fruitless attempt to track down an existing bug git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81885 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
f3adbe0eac82acf2213ea2623d47b8cb7887cf4c |
15-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Perform overload resolution when selecting a pointer conversion function for delete of a class expression and issue good diagnostic when result is ambiguous. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81870 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
f652793d4d32cc71b5ee2167069cbd363baa75de |
15-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Perform overload resolution when selecting a pointer conversion function for delete of a class expression and issue good diagnostic when result is ambiguous. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81870 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
3ed6a19a755648139350636ffbac7278b7cabdfe |
15-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Slightly improved template argument deduction for use in partial ordering, along with another test case for partial ordering of partial specializations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81869 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
|
9eea08ba72f8b1e7faf38e43376b9157fc4a2af2 |
15-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Slightly improved template argument deduction for use in partial ordering, along with another test case for partial ordering of partial specializations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81869 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
|
cebb824cf2fb8701a7e4a744de1ab064375e1c5e |
15-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement partial ordering of class template partial specializations (C++ [temp.class.order]). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81866 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
bf4ea56cdc376cef5a12abf6bf18dc34805c2226 |
15-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement partial ordering of class template partial specializations (C++ [temp.class.order]). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81866 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
84c540b3ac0403702d3f440ea8580a884d518663 |
15-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Use getTrueExpr/getFalseExpr as suggested by Doug. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81863 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
474e102639653482328404020cfdeb9a0a44943d |
15-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Use getTrueExpr/getFalseExpr as suggested by Doug. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81863 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
7d6ffed0c44c613b13415ad0d11849dfe7f112bd |
15-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
If a conversion operator exists in a base class, make sure to cast the object to that base class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81852 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
aac6e3a6bbca5952263648e70cbd56d9f89cf4a2 |
15-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
If a conversion operator exists in a base class, make sure to cast the object to that base class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81852 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
9cb0f0869e2e7803ce860892160c02719d6cdc81 |
15-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
When performing an user defined conversion sequence, perform the initial standard conversion sequence. This lets us remove a workaround in SemaCompleteConstructorCall. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81847 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExprCXX.cpp
|
f6c213a931f8eedf91531f3204cc828f18466fd5 |
15-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
When performing an user defined conversion sequence, perform the initial standard conversion sequence. This lets us remove a workaround in SemaCompleteConstructorCall. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81847 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExprCXX.cpp
|
e672d5bf6c04c3f24599f49c323ee774815d12ac |
15-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Revert for real. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81844 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
626c2d6bc8fe57078dec2a8974994bc92ee0e1e5 |
15-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Revert for real. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81844 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
fa1a6754357e8c33a19a5e780fa63cd9548323bb |
15-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Whoops, didn't mean to commit this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81842 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
7f5d03a9bec7488290209f5a1077fbce56f4206f |
15-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Whoops, didn't mean to commit this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81842 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
0c1e36092385610b9348b237f86e2eae5cba8c68 |
15-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Only reuse an already existing ImplicitCastExpr if the cast kinds are the same. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81841 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaExprCXX.cpp
|
4c5fad3f73957420b0410f7370cbd63b09f32a1c |
15-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Only reuse an already existing ImplicitCastExpr if the cast kinds are the same. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81841 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaExprCXX.cpp
|
75f48e16726933b75d77737f4af43620e21bfdcd |
15-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Get rid of the CastInfo struct. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81839 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
|
c0a2fd8f092722c8f78b566ac4506a21437040e9 |
15-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Get rid of the CastInfo struct. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81839 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
|
e3ffcdc86649d032d1d928653a3e0807653d0931 |
15-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Handle reinterpret_cast between integral types and pointer types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81837 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
7f9e646b7ed47bc8e9a60031ad0c2b55031e2077 |
15-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Handle reinterpret_cast between integral types and pointer types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81837 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
2d9010f78bf1c83d5b97ca237cf5ea4375db2a08 |
15-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Issue a good diagnostics when attempt to select a type convesion function results in ambiguity. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81812 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaOverload.cpp
|
78cf9a26d27349a7b9ae83a0b7d5451571b9b41e |
15-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Issue a good diagnostics when attempt to select a type convesion function results in ambiguity. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81812 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaOverload.cpp
|
d8aa2ccaa6ef78b140997be2d1fd50e18a56584a |
15-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Diagnose taking the address of a bit-field inside a conditional operator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81808 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
1d524c3dde58e4402aab4165e85e9ae6f15f5023 |
15-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Diagnose taking the address of a bit-field inside a conditional operator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81808 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b0c6c3247560830a03b2d46bda0a024ee9d11a22 |
15-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement partial ordering of function templates when calling a conversion function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81807 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
5d7d37506319d432f8f5e3952b7427e1e4aacd2e |
15-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement partial ordering of function templates when calling a conversion function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81807 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
3e2ba4ea50b8e0135d9995becf8eccf10ff392b9 |
15-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Test function template partial ordering when resolving the address of an overloaded function (template). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81804 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
d173b207a032b39d35727877fc794aa2f52dc290 |
15-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Test function template partial ordering when resolving the address of an overloaded function (template). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81804 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
c927d7e282394200e6fc1cb82576ad6a17c64f53 |
14-Sep-2009 |
John McCall <rjmccall@apple.com> |
Skeletal support for friend class templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81801 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaTemplate.cpp
|
05b23ea2119b4c411719bd6631e5d679ba5e7ef1 |
14-Sep-2009 |
John McCall <rjmccall@apple.com> |
Skeletal support for friend class templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81801 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaTemplate.cpp
|
fada6dc64d3e5681960191a40e4d05bbd84674c5 |
14-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Refactor MarkDeductedTemplateParameters into MarkUsedTemplateParameters, which is able to mark template parameters used within non-deduced contexts as well as deduced contexts. Use this to finish the implementation of [temp.deduct.partial]p11. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81794 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaTemplateDeduction.cpp
|
e73bb60de3c7c60453a86e097fc428d1cd367a42 |
14-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Refactor MarkDeductedTemplateParameters into MarkUsedTemplateParameters, which is able to mark template parameters used within non-deduced contexts as well as deduced contexts. Use this to finish the implementation of [temp.deduct.partial]p11. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81794 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaTemplateDeduction.cpp
|
22ab6d12167f6ceb50aff3bd75522072169b2f65 |
14-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Used visible conversion function api to do overload resolution of type conversion functions in base and current class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81784 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
b191e2dda9f4dc033cb21f9625a78fe80d4ac105 |
14-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Used visible conversion function api to do overload resolution of type conversion functions in base and current class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81784 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
0f59d782f1dcfd0a52fa08e653b20844c059cec2 |
14-Sep-2009 |
Sam Weinig <sam.weinig@gmail.com> |
-Wchar-subscripts should not warn for explicit signed char subscripts either. Another fix for PR4978. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81780 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
0f9a5b5be561c2ec42399c1b466d1f3e792de191 |
14-Sep-2009 |
Sam Weinig <sam.weinig@gmail.com> |
-Wchar-subscripts should not warn for explicit signed char subscripts either. Another fix for PR4978. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81780 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
c1fdf721dfcd9484f2e9c72c9cf01e12a9923e6b |
14-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Tighten up checking of non-dependent arguments as part of template argument deduction. This fixes the new test case (since partial ordering does not have a "verify the results of deduction" step), and will allow failed template argument deductions to return more quickly for, e.g., matching class template partial specializations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81779 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
1282029f3d37f482bbba3c38ea9da17a78d11d40 |
14-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Tighten up checking of non-dependent arguments as part of template argument deduction. This fixes the new test case (since partial ordering does not have a "verify the results of deduction" step), and will allow failed template argument deductions to return more quickly for, e.g., matching class template partial specializations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81779 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
e3bc121ad330c2e4e178fbca54edda07d0004d88 |
14-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement partial ordering of function template specializations (C++ [temp.func.order]). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81777 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaOverload.cpp
emaTemplate.h
emaTemplateDeduction.cpp
|
8a51491d936d8c50480f3c3ca6647be12a7ad51f |
14-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement partial ordering of function template specializations (C++ [temp.func.order]). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81777 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaOverload.cpp
emaTemplate.h
emaTemplateDeduction.cpp
|
62e8676ce94d29cbb14b5f14321d4c75fe620caa |
14-Sep-2009 |
Sam Weinig <sam.weinig@gmail.com> |
-Wchar-subscripts should not warn for unsigned char subscripts. Fixes PR4978. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81776 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b0a22903c3c45065c03ce2c904802d01fd67e170 |
14-Sep-2009 |
Sam Weinig <sam.weinig@gmail.com> |
-Wchar-subscripts should not warn for unsigned char subscripts. Fixes PR4978. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81776 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
d4f0283ca56ac6229e552cba4be4c5eec0b66f03 |
14-Sep-2009 |
Sam Weinig <sam.weinig@gmail.com> |
Add support for -Wchar-subscripts. Fixes PR4801. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81747 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
76e2b710a92bceb9575a81db181109664946986e |
14-Sep-2009 |
Sam Weinig <sam.weinig@gmail.com> |
Add support for -Wchar-subscripts. Fixes PR4801. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81747 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
1d48a1b95fad002b701ba1fced7288564e49359d |
14-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
If a function call returns a reference, don't bind it to a temporary. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81743 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
283e4d59b8fe63e93f20b6ffb3a623a4f60a85ea |
14-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
If a function call returns a reference, don't bind it to a temporary. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81743 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
bf153abd56ec68e280c5cf32ea9ba7ff48c3c3cb |
13-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Perform the C++ specific semantic checks of a function declaration after it's been merged with the previous declaration. This ensures that getPreviousDecl() will have the right value when ActOnConversionDeclarator is called. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81720 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
2c59d3c19715cb318a0a5939c735b8345d14d281 |
13-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Perform the C++ specific semantic checks of a function declaration after it's been merged with the previous declaration. This ensures that getPreviousDecl() will have the right value when ActOnConversionDeclarator is called. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81720 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d7e072a022193d8fab49a31e5875025661e8c4fa |
13-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Rework the way we determine whether an externally visible symbol is generated for an inline function definition, taking into account C99 and GNU inline/extern inline semantics. This solution is simpler, cleaner, and fixes PR4536. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81670 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
1fc09a92d0bffda20e06fa882388c01e192e2069 |
13-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Rework the way we determine whether an externally visible symbol is generated for an inline function definition, taking into account C99 and GNU inline/extern inline semantics. This solution is simpler, cleaner, and fixes PR4536. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81670 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
21ded519fdd8f9bf08d7f85e35920ba32d81626a |
12-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Removed Context argument from couple of methods which don't need them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81621 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
debc629300e4c6c774b7d2a1d3c665c2c719e803 |
12-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Removed Context argument from couple of methods which don't need them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81621 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
3b3f5749ef24073d20a9d235540ddd540bb38110 |
12-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
More work toward having an access method for visible conversion functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81618 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
6250921cc5bd3493a0d99fa2c32ec9716767a965 |
12-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
More work toward having an access method for visible conversion functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81618 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
84f110f0aacf0a4521f3c8b4f755aafeaa9dec5d |
12-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Use the correct CastKind for derived-to-base pointer conversions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81608 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
emaOverload.cpp
|
61faec1e9cd1ddaaae9e7216c4b751681af271e4 |
12-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Use the correct CastKind for derived-to-base pointer conversions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81608 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
emaOverload.cpp
|
a51c20938769d33ad75db6dfe7f7e9082999d8c7 |
12-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Remove unnecessary ASTContext parameter from FunctionDecl::isBuiltinID git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81590 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDecl.cpp
emaExpr.cpp
|
7814e6d6645d587891293d59ecf6576defcfac92 |
12-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Remove unnecessary ASTContext parameter from FunctionDecl::isBuiltinID git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81590 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDecl.cpp
emaExpr.cpp
|
4c7050d630d296460793c5dddccd09b823e0ca27 |
12-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Remove unnecessary ASTContext parameters from isMain and isExternC git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81589 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
48a83b5e7ae4051c7c11680ac00c1fa02d610a62 |
12-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Remove unnecessary ASTContext parameters from isMain and isExternC git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81589 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
41a998c514958e5efa81afbff5d3519fe983d671 |
12-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When performing name lookup within a class template or class template partial specialization, make sure we look into non-dependent base classes (but not dependent base classes). Fixes PR4951. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81584 91177308-0d34-0410-b5e6-96231b3b80d8
emaInherit.cpp
emaLookup.cpp
|
4719f4e86a84dec6f5a45771ae51d4ec72e4617a |
12-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
When performing name lookup within a class template or class template partial specialization, make sure we look into non-dependent base classes (but not dependent base classes). Fixes PR4951. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81584 91177308-0d34-0410-b5e6-96231b3b80d8
emaInherit.cpp
emaLookup.cpp
|
b0abe0316f62bd3175cc7e34dc54ce1c27769867 |
11-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to build visible conversion function list lazily and make its first use in calling the conversion function on delete statements. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81576 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
5346278f81930e7fd0545bbbb2fc217c6921b109 |
11-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to build visible conversion function list lazily and make its first use in calling the conversion function on delete statements. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81576 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
16220a12f6aa5bdacf647625e88cda9f7715e1f8 |
11-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Slight improvement for extern templates, so that an explicit instantiation definition can follow an explicit instantiation declaration. This is as far as I want to go with extern templates now, but they will still need quite a bit more work to get all of the C++0x semantics right. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81573 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
52604ab71a74b8ec481255dfeea7dc9dba63b1a5 |
11-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Slight improvement for extern templates, so that an explicit instantiation definition can follow an explicit instantiation declaration. This is as far as I want to go with extern templates now, but they will still need quite a bit more work to get all of the C++0x semantics right. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81573 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
e9bd85c32d6c8c66fa648b3a0f54783abb3b20fe |
11-Sep-2009 |
John McCall <rjmccall@apple.com> |
Alter Action's friend interface to prepare for templated friend declarations and to stop making promises we can't currently keep. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81571 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
bbbcdd9cc06b6078939129330ecc9bda3310984d |
11-Sep-2009 |
John McCall <rjmccall@apple.com> |
Alter Action's friend interface to prepare for templated friend declarations and to stop making promises we can't currently keep. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81571 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
9b273e280465a97cdee4f1afd9ea7dfadc664350 |
11-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Undid my yesterday patch which is not needed with an upcoming patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81549 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaOverload.cpp
|
8664ad5cbdf01ac9878c8f762cc91f4bb7196098 |
11-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Undid my yesterday patch which is not needed with an upcoming patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81549 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaOverload.cpp
|
f40d6390380632f6cc7964074fe97744c765c256 |
11-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Cleanup and test C++ default arguments. Improvements include: - Diagnose attempts to add default arguments to templates (or member functions of templates) after the initial declaration (DR217). - Improve diagnostics when a default argument is redefined. Now, the note will always point at the place where the default argument was previously defined, rather than pointing to the most recent declaration of the function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81548 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
6cc1518b9f15ca846b8c35518eeae9557935678d |
11-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Cleanup and test C++ default arguments. Improvements include: - Diagnose attempts to add default arguments to templates (or member functions of templates) after the initial declaration (DR217). - Improve diagnostics when a default argument is redefined. Now, the note will always point at the place where the default argument was previously defined, rather than pointing to the most recent declaration of the function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81548 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
93c4d4d481fde4024e734e19551d2de0e8555ba0 |
11-Sep-2009 |
John McCall <rjmccall@apple.com> |
Track a class template specialization's point of instantiation separately from its location. Initialize appropriately. When implicitly creating a declaration of a class template specialization after encountering the first reference to it, use the pattern class's location instead of the location of the first reference. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81515 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaType.cpp
|
9cc7807e1622c2f945b607bdd39dd283df5e7bb5 |
11-Sep-2009 |
John McCall <rjmccall@apple.com> |
Track a class template specialization's point of instantiation separately from its location. Initialize appropriately. When implicitly creating a declaration of a class template specialization after encountering the first reference to it, use the pattern class's location instead of the location of the first reference. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81515 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaType.cpp
|
541ebfb9469f442190f1d21f093a1279f6ec0a1a |
11-Sep-2009 |
John McCall <rjmccall@apple.com> |
When stringizing a NamedDecl for a diagnostic, treat the template specialization types differently. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81512 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
136a6988960ac3aeb96f298da7a1a182db7217cd |
11-Sep-2009 |
John McCall <rjmccall@apple.com> |
When stringizing a NamedDecl for a diagnostic, treat the template specialization types differently. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81512 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
7702fa4cb600df41651f685537defda955f764a5 |
11-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Fix PR4878 for real. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81507 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ed90c4ee8cfed90be92741313e1715d308ed2fe3 |
11-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Fix PR4878 for real. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81507 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
c090f84847510c1cc210010e89ba7b51c453c6f2 |
11-Sep-2009 |
John McCall <rjmccall@apple.com> |
Support elaborated dependent types and diagnose tag mismatches. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81504 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
|
c4e7019d5c9034a2d84ee4695f8e98dc025ac131 |
11-Sep-2009 |
John McCall <rjmccall@apple.com> |
Support elaborated dependent types and diagnose tag mismatches. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81504 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
|
7d2326b31c20bea66ed0bf3426f9d62d360134de |
11-Sep-2009 |
Sam Weinig <sam.weinig@gmail.com> |
Test commit git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81500 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
cce6ebc4edde2a9468daabc2b5d18bd2e9b6219e |
11-Sep-2009 |
Sam Weinig <sam.weinig@gmail.com> |
Test commit git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81500 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
73cf66ee8e3e654e21345bc1303b60f28d298eac |
11-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Instantiate PredefinedExprs correctly. Patch by Sam Weinig! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81498 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaTemplateInstantiate.cpp
|
773f3973cf5e2b6b8788e895967dcb3c1e6ffe79 |
11-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Instantiate PredefinedExprs correctly. Patch by Sam Weinig! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81498 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaTemplateInstantiate.cpp
|
dfdfcb0e3aa078285da702e458c88387a703afd0 |
11-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Diagnose VLAs as an error in C++. Also, treat the GNU __null as an integral constant expression to match GCC's behavior. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81490 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaType.cpp
|
043cad21b78c6b02597cdc7b6ead32388e27ebc7 |
11-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Diagnose VLAs as an error in C++. Also, treat the GNU __null as an integral constant expression to match GCC's behavior. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81490 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaType.cpp
|
ec18c62a5a104fe6b03b66b5946370341ea58076 |
11-Sep-2009 |
Steve Naroff <snaroff@apple.com> |
Make sure ObjCInterfaceDecl's that are forward declared always contain a valid location. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81487 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
8b26cbd4e4c01cb7a06ec2f794f2fce3b58cf4d0 |
11-Sep-2009 |
Steve Naroff <snaroff@apple.com> |
Make sure ObjCInterfaceDecl's that are forward declared always contain a valid location. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81487 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
515f441bbba643cf37764d60d0b88ac162dd038d |
11-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Look for overloaded arrow operators in base classes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81475 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
e30572ae31b4b1875d7a6d4375b5c6b3a1caf9e3 |
11-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Look for overloaded arrow operators in base classes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81475 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
323e420e0e3228aa068416f4afc209cd9f0131c2 |
11-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to collect conversion methods in base(s) and derived class into a candidate set. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81467 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaOverload.cpp
|
417292c8d7370644f2ec60dae0371442444ee893 |
11-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to collect conversion methods in base(s) and derived class into a candidate set. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81467 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaOverload.cpp
|
c6bb8e70a27f878cc7a60b0ad1a8209f53cf1df1 |
10-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Don't check use of a member function declaration used if the member function is virtual and the member reference expression doesn't explicitly qualify it. Fixes PR4878. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81460 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
0f728566b9fc1a013be3c0f3ca43a074307dc081 |
10-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Don't check use of a member function declaration used if the member function is virtual and the member reference expression doesn't explicitly qualify it. Fixes PR4878. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81460 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
4ed32e95d2de203884ed4af3d254d252137f20ba |
10-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When performing unqualified name lookup into a DeclContext, also look into all of the parent DeclContexts that aren't represented within the Scope chain. This fixes some name-lookup problems in out-of-line definitions of members of nested classes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81451 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
e942bbe02b6fb332d1f13d38c6e1980b416cf89a |
10-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
When performing unqualified name lookup into a DeclContext, also look into all of the parent DeclContexts that aren't represented within the Scope chain. This fixes some name-lookup problems in out-of-line definitions of members of nested classes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81451 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
e48aab59782061a3377fdf31f95bc1713d064362 |
10-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When re-entering a template scope, we may be entering a class template partial specialization rather than a subclass of TemplateDecl. Fixes a crash in libstdc++ 4.2's <map>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81407 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
1cdcc579df30dba1b2e1e9909125bb9c61898e05 |
10-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
When re-entering a template scope, we may be entering a class template partial specialization rather than a subclass of TemplateDecl. Fixes a crash in libstdc++ 4.2's <map>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81407 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
4a8207267a4324703aa631a374dd2044476f6c0e |
10-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Don't bother to perform any initialization for a variable declaration of class type whose default constructor is trivial. Should un-break testing on x86_64-pc-linux-gnu. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81405 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f8d8d1a99b802b8e9f2e7da441b64096b89f133d |
10-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Don't bother to perform any initialization for a variable declaration of class type whose default constructor is trivial. Should un-break testing on x86_64-pc-linux-gnu. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81405 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
2c3f8fc4fa83d304676f1561805baca7c9c2c7cb |
10-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
For a C++ delete expression where the operand is of class type that has a single conversion to pointer-to-object type, implicitly convert to that pointer-to-object type (C++ [expr.delete]p1). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81401 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
9cd9f3f55d22f34f1d69db8bfc2735c4e1e082c3 |
10-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
For a C++ delete expression where the operand is of class type that has a single conversion to pointer-to-object type, implicitly convert to that pointer-to-object type (C++ [expr.delete]p1). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81401 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
343aad6b139537dc285f667a406ccdf63da7a8d4 |
10-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve handling of initialization by constructor, by ensuring that such initializations properly convert constructor arguments and fill in default arguments where necessary. This also makes the ownership model more clear. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81394 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaInit.cpp
|
39da0b8145eaec7da7004f9b3645c5c9f4f63b1d |
10-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Improve handling of initialization by constructor, by ensuring that such initializations properly convert constructor arguments and fill in default arguments where necessary. This also makes the ownership model more clear. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81394 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaInit.cpp
|
0c6215978605dfde5ba2c4fdea8fb3c11ec67f81 |
09-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
If a cast expression needs either a conversion function or a constructor to be called, generate implicit child expressions that call them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81383 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXCast.cpp
emaExpr.cpp
emaExprCXX.cpp
|
0aebc81e02397a5987aaa8e8c7acbdb01a31d7c3 |
09-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
If a cast expression needs either a conversion function or a constructor to be called, generate implicit child expressions that call them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81383 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXCast.cpp
emaExpr.cpp
emaExprCXX.cpp
|
25cf760b54d3b88633827501013bc51a29b28aba |
09-Sep-2009 |
Mike Stump <mrs@apple.com> |
Remove tabs, and whitespace cleanups. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81346 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
dentifierResolver.h
umpDiagnostics.cpp
arseAST.cpp
ema.cpp
ema.h
emaAccess.cpp
emaAttr.cpp
emaCXXCast.cpp
emaCXXScopeSpec.cpp
emaChecking.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaInherit.cpp
emaInherit.h
emaInit.cpp
emaLookup.cpp
emaOverload.cpp
emaOverload.h
emaStmt.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
reeTransform.h
|
1eb4433ac451dc16f4133a88af2d002ac26c58ef |
09-Sep-2009 |
Mike Stump <mrs@apple.com> |
Remove tabs, and whitespace cleanups. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81346 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
dentifierResolver.h
umpDiagnostics.cpp
arseAST.cpp
ema.cpp
ema.h
emaAccess.cpp
emaAttr.cpp
emaCXXCast.cpp
emaCXXScopeSpec.cpp
emaChecking.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaInherit.cpp
emaInherit.h
emaInit.cpp
emaLookup.cpp
emaOverload.cpp
emaOverload.h
emaStmt.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
reeTransform.h
|
6acf4532cf9767078373ad131404ad08636da5e3 |
09-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix a thinko git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81317 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
8dfb7ec475ae0f3bdb631b426d981b328b38e470 |
09-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Fix a thinko git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81317 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
1fda9fe13161e07aa92e344f8ba55e6b3870736c |
09-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Allow a declaration of an array to complete a prior, incomplete declaration of that array in C++. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81309 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
3dab34a7cb5e2ad9c2311fc44b3d3b7ebb540992 |
09-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Allow a declaration of an array to complete a prior, incomplete declaration of that array in C++. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81309 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
cc00fc02fb26921c2f1f99632ea1d96aa5d4d183 |
09-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Initial stab at implement dependent member references to member templates, e.g., x.template get<T> We can now parse these, represent them within an UnresolvedMemberExpr expression, then instantiate that expression node in simple cases. This allows us to stumble through parsing LLVM's Casting.h. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81300 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaTemplate.cpp
reeTransform.h
|
3b6afbb99a1c44b4076f8e15fb7311405941b306 |
09-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Initial stab at implement dependent member references to member templates, e.g., x.template get<T> We can now parse these, represent them within an UnresolvedMemberExpr expression, then instantiate that expression node in simple cases. This allows us to stumble through parsing LLVM's Casting.h. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81300 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaTemplate.cpp
reeTransform.h
|
2c087d5956b1921cdb4015a493453526aa06c487 |
08-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Vastly improve PredefinedExpr output, both in Sema and CodeGen. Patch by Sam Weinig! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81237 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
3a082d81006e7a2e01a6e431a22e21c78490ff8f |
08-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Vastly improve PredefinedExpr output, both in Sema and CodeGen. Patch by Sam Weinig! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81237 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
814b425c612032e4484084bc879f9d8cf821efea |
08-Sep-2009 |
Chris Lattner <sabre@nondot.org> |
Fix PR4922, where Sema would complete tentative definitions in nondeterminstic order because it was doing so while iterating over a densemap. There are still similar problems in other places, for example WeakUndeclaredIdentifiers is still written to the PCH file in a nondeterminstic order, and we emit warnings about #pragma weak in nondeterminstic order. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81236 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
|
63d65f873fdfcb04b216ea9c648d1df5992aed1c |
08-Sep-2009 |
Chris Lattner <sabre@nondot.org> |
Fix PR4922, where Sema would complete tentative definitions in nondeterminstic order because it was doing so while iterating over a densemap. There are still similar problems in other places, for example WeakUndeclaredIdentifiers is still written to the PCH file in a nondeterminstic order, and we emit warnings about #pragma weak in nondeterminstic order. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81236 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
|
89eec0e9ea2de26dfa202d5eac68e7cb3edea67b |
08-Sep-2009 |
Chris Lattner <sabre@nondot.org> |
reduce indentation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81234 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
c4f1fb125d4fe2c8879030d6f6e8b2f75cb681f1 |
08-Sep-2009 |
Chris Lattner <sabre@nondot.org> |
reduce indentation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81234 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
d321d4999177cb0267a54a2b1903411ba6996ceb |
08-Sep-2009 |
John McCall <rjmccall@apple.com> |
Support templateids in friend declarations. Fixes bug 4859. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81233 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaTemplate.cpp
|
6b2becfc434b0bdced8560802c4d0e03148c61b8 |
08-Sep-2009 |
John McCall <rjmccall@apple.com> |
Support templateids in friend declarations. Fixes bug 4859. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81233 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaTemplate.cpp
|
e4f848ca6fadd15fd47fe10dee94766a8094188c |
08-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Handle variadic constructors better. Share code between BuildCXXConstructExpr and BuildCXXTemporaryObjectExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81181 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
d74d4149f759b8abec15fb8163a4206e8c7068c8 |
08-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Handle variadic constructors better. Share code between BuildCXXConstructExpr and BuildCXXTemporaryObjectExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81181 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
e58511a26c9fd9a285be8d52ce0f062ee16a38e5 |
08-Sep-2009 |
Chris Lattner <sabre@nondot.org> |
reject returning a block expr even when it has parens and casts in the way. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81176 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
4ca606e898293ae58f1793f988500e2218c7a9be |
08-Sep-2009 |
Chris Lattner <sabre@nondot.org> |
reject returning a block expr even when it has parens and casts in the way. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81176 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
0d49ba63b473d83a44d6429d60fc212c1bcd1762 |
08-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
BuildCXXConstructExpr now takes a MultiExprArg. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81160 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaInit.cpp
reeTransform.h
|
f47511ab0575b8c4752e33cdc4b82a84dcc4d263 |
08-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
BuildCXXConstructExpr now takes a MultiExprArg. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81160 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaInit.cpp
reeTransform.h
|
d23693c609ddebadca0cbbf3d9ec489c0678786c |
07-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Check that the destination type of a static_cast expression is a complete type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81151 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
d851b37a331a7bc0047922ea9244aff85470987e |
07-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Check that the destination type of a static_cast expression is a complete type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81151 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
eb2d9903919ab0e200639cfa38cb4cbc7f95a06d |
06-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Reapply 81096, now with a fix. Spot the bug: for (unsigned i = numargs; i < NumArgs; ++i) Args[0] = 0; ;) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81123 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
21e1c4ea0a96bcecfe5976304d84779949058648 |
06-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Reapply 81096, now with a fix. Spot the bug: for (unsigned i = numargs; i < NumArgs; ++i) Args[0] = 0; ;) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81123 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
f8aa664d57e8b14d130f0b4172e82e68f82d2400 |
06-Sep-2009 |
Daniel Dunbar <daniel@zuster.org> |
Revert "Initialize default CXXConstructExpr arguments to 0. Fixes a crash when destroying the CXXConstructExpr.", this is causing test failures across the board. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81100 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
4355be0758856cf7645e264d4813831dc27ce78c |
06-Sep-2009 |
Daniel Dunbar <daniel@zuster.org> |
Revert "Initialize default CXXConstructExpr arguments to 0. Fixes a crash when destroying the CXXConstructExpr.", this is causing test failures across the board. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81100 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
0629ba100635769496d5b050b39fe5bea35ea36e |
06-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Initialize default CXXConstructExpr arguments to 0. Fixes a crash when destroying the CXXConstructExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81096 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
657bff7ff399d08812a3b3324dbbebf68b0df07d |
06-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Initialize default CXXConstructExpr arguments to 0. Fixes a crash when destroying the CXXConstructExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81096 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
bf2dfb18ae5d2a387f6d3499a2f83751d1e79b80 |
05-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Pass the ConstructLoc to BuildCXXConstructExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81068 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExprCXX.cpp
emaInit.cpp
reeTransform.h
|
ec8e5ea799412a9d2aac4814c9c62cc32b3faad5 |
05-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Pass the ConstructLoc to BuildCXXConstructExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81068 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExprCXX.cpp
emaInit.cpp
reeTransform.h
|
fbec6a92f5bf5cbae1ea922f8ec04d6a6d18682f |
05-Sep-2009 |
John McCall <rjmccall@apple.com> |
Start emitting ElaboratedTypes in C++ mode. Support the effort in various ways: remove elab types during desugaring, enhance pretty-printing to allow tags to be suppressed without suppressing scopes, look through elab types when associating a typedef name with an anonymous record type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81065 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDecl.cpp
emaType.cpp
|
2191b20bfb31fc0e22a158f6b4204cd0b7dbd0fd |
05-Sep-2009 |
John McCall <rjmccall@apple.com> |
Start emitting ElaboratedTypes in C++ mode. Support the effort in various ways: remove elab types during desugaring, enhance pretty-printing to allow tags to be suppressed without suppressing scopes, look through elab types when associating a typedef name with an anonymous record type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81065 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDecl.cpp
emaType.cpp
|
f608ead7de135a3d5495d605d18e3007c922751e |
05-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Report errors for member functions correctly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81063 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
6bc107b49862418bf3f64f74f17e472b4c13aa71 |
05-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Report errors for member functions correctly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81063 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
21d18f2893c38398e147708d48ceb5d4c9c1290f |
05-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Use a separate diagnostic for default function argument expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81062 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaTemplateInstantiate.cpp
|
25cae7f4b1155b1a6ca959ea5143ea39eae656cd |
05-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Use a separate diagnostic for default function argument expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81062 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaTemplateInstantiate.cpp
|
379448fc7bc91bba33e3d2df073f6cf011960b96 |
05-Sep-2009 |
John McCall <rjmccall@apple.com> |
Basic support for representing elaborated type specifiers directly in the AST. The current thinking is to create these only in C++ mode for efficiency. But for now, they're not being created at all; patch to follow. This will let us do things like verify that tags match during template instantation, as well as signal that an elaborated type specifier was used for clients that actually care. Optimally, the TypeLoc hierarchy should be adjusted to carry tag location information as well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81057 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
7da2431c23ef1ee8acb114e39692246e1801afc2 |
05-Sep-2009 |
John McCall <rjmccall@apple.com> |
Basic support for representing elaborated type specifiers directly in the AST. The current thinking is to create these only in C++ mode for efficiency. But for now, they're not being created at all; patch to follow. This will let us do things like verify that tags match during template instantation, as well as signal that an elaborated type specifier was used for clients that actually care. Optimally, the TypeLoc hierarchy should be adjusted to carry tag location information as well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81057 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
8e7e4609012900d1a0eafafb49b5089acddf5b7a |
05-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve the AST representation and semantic analysis for extern templates. We now distinguish between an explicit instantiation declaration and an explicit instantiation definition, and know not to instantiate explicit instantiation declarations. Unfortunately, there is some remaining confusion w.r.t. instantiation of out-of-line member function definitions that causes trouble here. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81053 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
|
d0e3daf2b980b505e535d35b432c938c6d0208ef |
05-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Improve the AST representation and semantic analysis for extern templates. We now distinguish between an explicit instantiation declaration and an explicit instantiation definition, and know not to instantiate explicit instantiation declarations. Unfortunately, there is some remaining confusion w.r.t. instantiation of out-of-line member function definitions that causes trouble here. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81053 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
|
6ccc6f3f2044286d82ad46e726d4696c6673cfa8 |
04-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Don't generate any code for an explicit call to a trivial destructor. Now that parsing, semantic analysis, and (I think) code generation of pseudo-destructor expressions and explicit destructor calls works, update the example-dynarray.cpp test to destroy the objects it allocates and update the test to actually compile + link. The code seems correct, but the Clang-compiled version dies with a malloc error. Time to debug! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81025 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
4fe95f99a2693f1145785ea5835ba6937e49c730 |
04-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Don't generate any code for an explicit call to a trivial destructor. Now that parsing, semantic analysis, and (I think) code generation of pseudo-destructor expressions and explicit destructor calls works, update the example-dynarray.cpp test to destroy the objects it allocates and update the test to actually compile + link. The code seems correct, but the Clang-compiled version dies with a malloc error. Time to debug! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81025 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
e89a0af97237fb82f3c709e2e8e6264bd38c2d7b |
04-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
If a destructor is referenced or a pseudo-destructor expression is formed without a trailing '(', diagnose the error (these expressions must be immediately called), emit a fix-it hint, and fix the code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81015 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
|
a78c5c34fbd20fde02261c3f3e21933cd58fcc04 |
04-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
If a destructor is referenced or a pseudo-destructor expression is formed without a trailing '(', diagnose the error (these expressions must be immediately called), emit a fix-it hint, and fix the code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81015 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
|
3e36851cc872a3e8461234e69642852d46b545ce |
04-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement AST, semantics, and CodeGen for C++ pseudo-destructor expressions, e.g., p->~T() when p is a pointer to a scalar type. We don't currently diagnose errors when pseudo-destructor expressions are used in any way other than by forming a call. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81009 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprCXX.cpp
reeTransform.h
|
a71d819bb8f50c28938db0f2867d3fb6e2ce5910 |
04-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement AST, semantics, and CodeGen for C++ pseudo-destructor expressions, e.g., p->~T() when p is a pointer to a scalar type. We don't currently diagnose errors when pseudo-destructor expressions are used in any way other than by forming a call. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81009 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprCXX.cpp
reeTransform.h
|
7a3747265a26b68d1b9f2b55d11ef38b262e50eb |
04-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Parse extern templates, pass that information all the way to Sema, then drop it on the floor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80989 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
|
45f965581935791a018df829a14dff53c1dd8f47 |
04-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Parse extern templates, pass that information all the way to Sema, then drop it on the floor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80989 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
|
fd02518096d78c6d4ccf1156e64cd4dd34221444 |
04-Sep-2009 |
John McCall <rjmccall@apple.com> |
Correctly handle elaborated template ids. Still not handled properly for friends. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80977 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplate.cpp
|
f1bbbb49f06a7462476cd88166fccda5feb15cab |
04-Sep-2009 |
John McCall <rjmccall@apple.com> |
Correctly handle elaborated template ids. Still not handled properly for friends. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80977 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplate.cpp
|
d4b30098043a0f4273818c5a6cec4b7ca629d22b |
04-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to instantiate destructors used to destruct base and data members when they are needed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80967 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
|
34374e6ce5710a91c478f69379220ff20c3e7f15 |
04-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to instantiate destructors used to destruct base and data members when they are needed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80967 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
|
a065105bb85843c25b8c74c94ae916984742d37b |
04-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement tree transformations for DeclarationNames. Among other things, this means that we can properly cope with member access expressions such as t->operator T() where T is a template parameter (or other dependent type). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80957 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
81499bbeb2bd157a77b60364676ac434aca7a4df |
04-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement tree transformations for DeclarationNames. Among other things, this means that we can properly cope with member access expressions such as t->operator T() where T is a template parameter (or other dependent type). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80957 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
bc2fb7fd319e8beaf899395ffa5b44ea833a648e |
03-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve template instantiation for member access expressions that involve qualified names, e.g., x->Base::f. We now maintain enough information in the AST to compare the results of the name lookup of "Base" in the scope of the postfix-expression (determined at template definition time) and in the type of the object expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80953 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaExpr.cpp
emaExprCXX.cpp
emaTemplateInstantiate.cpp
reeTransform.h
|
c68afe2cbe7f875a9243c411077602fb5f5dc74b |
03-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Improve template instantiation for member access expressions that involve qualified names, e.g., x->Base::f. We now maintain enough information in the AST to compare the results of the name lookup of "Base" in the scope of the postfix-expression (determined at template definition time) and in the type of the object expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80953 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaExpr.cpp
emaExprCXX.cpp
emaTemplateInstantiate.cpp
reeTransform.h
|
5da2f99219f94dee4c3c3243950460c7755368d1 |
03-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Mark constructors used in initialization of base(s) and fields as referecned with location where they are used. Still need to look at destructor aspects of them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80950 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
9d436205be3e4c05854530134be61b46b13136ff |
03-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Mark constructors used in initialization of base(s) and fields as referecned with location where they are used. Still need to look at destructor aspects of them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80950 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
f988e2228fd3d7a78ee4ad03be58bb919e7c918e |
03-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Issue diagnostics in variety of situations involving reference/const data members when user has declared the constructor. This necessitated some non-minor refactoring. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80934 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
80545ad0f9b8e52177a8c37bd140bae0ffbd0cc6 |
03-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Issue diagnostics in variety of situations involving reference/const data members when user has declared the constructor. This necessitated some non-minor refactoring. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80934 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
0f927cf843bfe5a54ad059ab17d0beeffeec2275 |
03-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Improved handling for dependent, qualified member access expressions, e.g., t->Base::f where t has a dependent type. We save the nested-name-specifier in the CXXUnresolvedMemberExpr then, during instantiation, substitute into the nested-name-specifier with the (transformed) object type of t, so that we get name lookup into the type of the object expression. Note that we do not yet retain information about name lookup into the lexical scope of the member access expression, so several regression tests are still disabled. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80925 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
reeTransform.h
|
a38c687ef5354678b9d76a7b29354159f2b83736 |
03-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Improved handling for dependent, qualified member access expressions, e.g., t->Base::f where t has a dependent type. We save the nested-name-specifier in the CXXUnresolvedMemberExpr then, during instantiation, substitute into the nested-name-specifier with the (transformed) object type of t, so that we get name lookup into the type of the object expression. Note that we do not yet retain information about name lookup into the lexical scope of the member access expression, so several regression tests are still disabled. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80925 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
reeTransform.h
|
81699d95c5924301824c3ff5ebff984c17063726 |
03-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
This patch does the following. 1) Issue digsnostics in non-fragile ABI, when an expression evaluates to an interface type (except when it is used to access a non-fragile ivar). 2) Issue unsupported error in fragile ABI when an expression evaluates to an interface type (except when it is used to access a fragile ivar). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80860 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaStmt.cpp
|
16b10378a93e8644008289fd86c1caf737d1395c |
03-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
This patch does the following. 1) Issue digsnostics in non-fragile ABI, when an expression evaluates to an interface type (except when it is used to access a non-fragile ivar). 2) Issue unsupported error in fragile ABI when an expression evaluates to an interface type (except when it is used to access a fragile ivar). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80860 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaStmt.cpp
|
ad979bd99b8a3afa145e78d66bd8eac8d249a9c5 |
03-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Add a wicked little test-case that illustrates what we have to deal with to properly support member access expressions in templates. This test is XFAIL'd, because we get it completely wrong, but I've made the minimal changes to the representation to at least avoid a crash. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80856 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
|
2700dcde044893642b9b77638e052aa90be7cd51 |
03-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Add a wicked little test-case that illustrates what we have to deal with to properly support member access expressions in templates. This test is XFAIL'd, because we get it completely wrong, but I've made the minimal changes to the representation to at least avoid a crash. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80856 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
|
cba32048a027de647a157b4fb5899c77ec95e172 |
03-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Minor refactoring of my last patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80847 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
916a5ed560c015f6399909b1672ebe90d7f65635 |
03-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Minor refactoring of my last patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80847 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
a14163880827bd654cd4b37f639624858dc2cf09 |
03-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Referenced instatiated default constructors must be defined. Fixed pr4853. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80846 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
cf1b9c790ad9c944131e7150ef13e2d421f79e88 |
03-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Referenced instatiated default constructors must be defined. Fixed pr4853. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80846 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
681d31d4185cfa8a5378440dee12fc1535e3de99 |
03-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Rewrite of our handling of name lookup in C++ member access expressions, e.g., x->Base::f We no longer try to "enter" the context of the type that "x" points to. Instead, we drag that object type through the parser and pass it into the Sema routines that need to know how to perform lookup within member access expressions. We now implement most of the crazy name lookup rules in C++ [basic.lookup.classref] for non-templated code, including performing lookup both in the context of the type referred to by the member access and in the scope of the member access itself and then detecting ambiguities when the two lookups collide (p1 and p4; p3 and p7 are still TODO). This change also corrects our handling of name lookup within template arguments of template-ids inside the nested-name-specifier (p6; we used to look into the scope of the object expression for them) and fixes PR4703. I have disabled some tests that involve member access expressions where the object expression has dependent type, because we don't yet have the ability to describe dependent nested-name-specifiers starting with an identifier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80843 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaExprCXX.cpp
emaLookup.cpp
emaTemplate.cpp
reeTransform.h
|
2dd078ae50ff7be1fb25ebeedde45e9ab691a4f0 |
03-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Rewrite of our handling of name lookup in C++ member access expressions, e.g., x->Base::f We no longer try to "enter" the context of the type that "x" points to. Instead, we drag that object type through the parser and pass it into the Sema routines that need to know how to perform lookup within member access expressions. We now implement most of the crazy name lookup rules in C++ [basic.lookup.classref] for non-templated code, including performing lookup both in the context of the type referred to by the member access and in the scope of the member access itself and then detecting ambiguities when the two lookups collide (p1 and p4; p3 and p7 are still TODO). This change also corrects our handling of name lookup within template arguments of template-ids inside the nested-name-specifier (p6; we used to look into the scope of the object expression for them) and fixes PR4703. I have disabled some tests that involve member access expressions where the object expression has dependent type, because we don't yet have the ability to describe dependent nested-name-specifiers starting with an identifier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80843 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaExprCXX.cpp
emaLookup.cpp
emaTemplate.cpp
reeTransform.h
|
97b0de067b70f0ff1f1a0518aa1a138e86295112 |
02-Sep-2009 |
John McCall <rjmccall@apple.com> |
Borrow a friend class's previous declaration's access specifier regardless of whether the current context is dependent. Thanks to Anders for pointing this out. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80828 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
82b9fb8e7a05066e690670d2eb386a624b04f684 |
02-Sep-2009 |
John McCall <rjmccall@apple.com> |
Borrow a friend class's previous declaration's access specifier regardless of whether the current context is dependent. Thanks to Anders for pointing this out. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80828 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
67c0543aecc650026fd24f278e1f953671a80fbc |
02-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Fix a codegen crash when a class template has a constructor that does member initialization of an anonymous union. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80826 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
f4b5f5c6a1487317aab9aa30d97bccfd57c82c98 |
02-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Fix a codegen crash when a class template has a constructor that does member initialization of an anonymous union. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80826 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
7c9f7838d0aaf96d6cdd3b0c4d2bd15fe0a14935 |
02-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Allow null initialization of scalara data members in constructors's initializer list. pr4854 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80802 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
636a0ffbd2bda998236ddc9bb14b9222f7b49359 |
02-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Allow null initialization of scalara data members in constructors's initializer list. pr4854 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80802 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
ab241c3e4ec4d3b285c5da55422d3f4528dac76f |
02-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Document how we intepret C++ DR 382 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80785 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
de18d1264ea01234ca864606a8717272b2c7c5fb |
02-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Document how we intepret C++ DR 382 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80785 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
faa28fb5d0a3267b330425a8eee40eb9199f468a |
02-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When parsing typename specifiers (with either the identifier or simple-template-id form), check whether the scope specifier is computable as a declaration context rather than checking whether it is dependent, so that we properly cope with members of the current instantiation. Improve testing for typename specifiers that terminate in a simpe-template-id. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80783 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
6946baf3542dcb1ed0d98d0fdda451d1c39a49c2 |
02-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
When parsing typename specifiers (with either the identifier or simple-template-id form), check whether the scope specifier is computable as a declaration context rather than checking whether it is dependent, so that we properly cope with members of the current instantiation. Improve testing for typename specifiers that terminate in a simpe-template-id. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80783 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
27d1de3a006a4fd7b4d5bcbab7e43c2c06c8d652 |
02-Sep-2009 |
John McCall <rjmccall@apple.com> |
When adding a friend class declaration to the lookup tables, use the access specifier of any previous declaration in case we replace it in a class's declaration table. Fixes bug 4858. This sort of thing makes me reconsider putting friend declarations in declaration lists. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80750 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
53489322f6574413d906f6a4c66033223e6b1e3f |
02-Sep-2009 |
John McCall <rjmccall@apple.com> |
When adding a friend class declaration to the lookup tables, use the access specifier of any previous declaration in case we replace it in a class's declaration table. Fixes bug 4858. This sort of thing makes me reconsider putting friend declarations in declaration lists. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80750 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
839a7e280e8c00c1b52267ae8aca238c245ba29a |
02-Sep-2009 |
John McCall <rjmccall@apple.com> |
Fix a little crasher in friend decls. Thanks again to Eli for finding this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80748 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
|
1a26c27eba32f8766c0eeec73fe43634cd814825 |
02-Sep-2009 |
John McCall <rjmccall@apple.com> |
Fix a little crasher in friend decls. Thanks again to Eli for finding this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80748 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
|
31812be8a6ad32139a8837b61461f8ddc29d214c |
02-Sep-2009 |
John McCall <rjmccall@apple.com> |
Ensure that the tag decls of friend decls aren't added to the friending class's decl list, and remove some workarounds that were due to this. Thanks to Eli for pointing this out and providing the test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80745 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d7eff68dbbbc6b3f8dfd44f6a833c2b320a96e9a |
02-Sep-2009 |
John McCall <rjmccall@apple.com> |
Ensure that the tag decls of friend decls aren't added to the friending class's decl list, and remove some workarounds that were due to this. Thanks to Eli for pointing this out and providing the test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80745 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
b98cc63ed75cc49f8b8853564779d81eaebea093 |
02-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
It is illegal to derefrercne to an interface in objc's non-fragile ABI. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80739 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ce8827a4941fb966e3f6c32fbe97a7bbb7da5840 |
02-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
It is illegal to derefrercne to an interface in objc's non-fragile ABI. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80739 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
80f0075a200e7c7cec5a986723955a4285dcd82b |
01-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
In CXXBaseOrMemberInitializer, don't confuse CtorTocall with AnonUnionMember. Fixes PR4826. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80721 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
72f6d678c8de9f3a770e8ae5fc4979abf3940668 |
01-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
In CXXBaseOrMemberInitializer, don't confuse CtorTocall with AnonUnionMember. Fixes PR4826. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80721 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
f1957c8e4159dc84772ad919b552429e3c552816 |
01-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Use the correct cast kinds for bit casts and function to pointer decay. Fixes PR4827. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80720 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
cb3c308ef0e63b2902911b985517309c26f975dc |
01-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Use the correct cast kinds for bit casts and function to pointer decay. Fixes PR4827. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80720 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
b6feaf3f96a6f93e4afcc103a058f63c78f105b3 |
01-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Add a CK_FunctionToPointerDecay cast kind. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80719 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprCXX.cpp
|
b633c4ee622df81d4572ef57dac54ebed69bb9bf |
01-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Add a CK_FunctionToPointerDecay cast kind. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80719 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprCXX.cpp
|
464fa061a15708f985cb83c59ea0dae86d7cf240 |
01-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement proper substitution for OverloadedFunctionDecls, but substituting each of the functions in the overload set git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80692 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
44c73848d5d5bd34c05582dc8398a20bea7cd971 |
01-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement proper substitution for OverloadedFunctionDecls, but substituting each of the functions in the overload set git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80692 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
f02d2aefb7a9b3d186de72b0109ea00f74bd459d |
01-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Add DeclContext::Equals to compare declaration contexts based on their primary context. Use this instead of pointer comparisons git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80690 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
|
61481dad22ebca3fba3fe4fb67a3b926d0895e9c |
01-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Add DeclContext::Equals to compare declaration contexts based on their primary context. Use this instead of pointer comparisons git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80690 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
|
23026c84139c97017f9eaa148a39ff346fc0e42d |
01-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix a crasher involving template instantiation of non-dependent expressions making use of an overloaded operator. Thanks for the test case, Anders! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80679 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
8f1d89e40ac853903916b88b850fb9638609173d |
01-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Fix a crasher involving template instantiation of non-dependent expressions making use of an overloaded operator. Thanks for the test case, Anders! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80679 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
bc5aff5f2d85c0c276aa621100f5a554200fb6e4 |
01-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Don't assume that a base is always a RecordType, it can also be a TemplateSpecializationType. Also, make sure to get the instantiated union member. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80662 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
|
cdc83c777973fa56b6f828bfe88210290ca58d62 |
01-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Don't assume that a base is always a RecordType, it can also be a TemplateSpecializationType. Also, make sure to get the instantiated union member. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80662 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
|
a1fc3888586c254dd6aa6fb4345a25085c39074e |
01-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Add pretty stack traces when instantiating functions and static data members. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80661 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
c17fb7bd9a06b027c792c7dfad7e9fa430277aff |
01-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Add pretty stack traces when instantiating functions and static data members. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80661 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
6bdedaf95b49988ae385836568b306e8e4e15813 |
01-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Handle member initializers that point to fields in anonymous structs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80659 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
9988d5d9ad0850e455bd413b03ba7dc8ecee5999 |
01-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Handle member initializers that point to fields in anonymous structs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80659 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
20c55141395e22b6002b42ef30fcf4238402e48c |
01-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Don't assert when instantiating member references to fields in anonymous structs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80657 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
d8b285fee4471f393da8ee30f552ceacdc362afa |
01-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Don't assert when instantiating member references to fields in anonymous structs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80657 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
reeTransform.h
|
d33e328e84080d75879182f882b578ffa7db52ab |
01-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Preliminary AST representation and semantic analysis for explicitly-specified template argument lists in member reference expressions, e.g., x->f<int>() git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80646 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprCXX.cpp
emaOverload.cpp
emaTemplate.cpp
reeTransform.h
|
c4bf26fbdff42967d660f505a83f75a4df2cc752 |
01-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Preliminary AST representation and semantic analysis for explicitly-specified template argument lists in member reference expressions, e.g., x->f<int>() git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80646 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprCXX.cpp
emaOverload.cpp
emaTemplate.cpp
reeTransform.h
|
c1991bf37685134f7a139f22883a6c7448aa0f62 |
01-Sep-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Eliminate CXXAdornedMemberExpr entirely. Instead, optionally allocate space within the MemberExpr for the nested-name-specifier and its source range. We'll do the same thing with explicitly-specified template arguments, assuming I don't flip-flop again. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80642 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExpr.cpp
reeTransform.h
|
83f6faf37d9bf58986bedc9bc0ea897a56b4dbad |
01-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Eliminate CXXAdornedMemberExpr entirely. Instead, optionally allocate space within the MemberExpr for the nested-name-specifier and its source range. We'll do the same thing with explicitly-specified template arguments, assuming I don't flip-flop again. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80642 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExpr.cpp
reeTransform.h
|
ea7c7ce3586b1a1774fe41c53267bc7c5dfad6bf |
01-Sep-2009 |
John McCall <rjmccall@apple.com> |
Fix bug 4784 and allow friend declarations to properly extend existing declaration chains. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80636 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
|
ab88d97734f1260402a0c6a8f6b77bed7ed4e295 |
01-Sep-2009 |
John McCall <rjmccall@apple.com> |
Fix bug 4784 and allow friend declarations to properly extend existing declaration chains. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80636 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
|
efccbec93fa2bc73800857b0208b583cb3d68d78 |
31-Aug-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Rename CXXQualifiedMemberExpr -> CXXAdornedMemberExpr, since we will also be adding explicit template arguments as an additional "adornment". No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80628 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExpr.cpp
reeTransform.h
|
0979c805475d1ba49b5d6ef93c4d2ce6d2eab6ed |
31-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
Rename CXXQualifiedMemberExpr -> CXXAdornedMemberExpr, since we will also be adding explicit template arguments as an additional "adornment". No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80628 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExpr.cpp
reeTransform.h
|
cfa0a63ebe696ba691ffad4963c6945d3d13fa84 |
31-Aug-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Add parsing for references to member function templates with explicit template argument lists, e.g., x.f<int>(). Semantic analysis will be a separate commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80624 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprCXX.cpp
|
f328a2857d6dc397ec7a304b07d40893891f7f98 |
31-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
Add parsing for references to member function templates with explicit template argument lists, e.g., x.f<int>(). Semantic analysis will be a separate commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80624 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprCXX.cpp
|
9841cdf19fd7601b35e1a42c679d87b6cfdbd7f6 |
31-Aug-2009 |
Eli Friedman <eli.friedman@gmail.com> |
PR4836, part 1: add Sema support for __builtin_isnan and friends; they are apparently used by Solaris libc despite the fact that clang claims to be compatible with gcc 4.2, which doesn't support them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80610 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
|
9ac6f62a77be5b281a7ddc24a16669b457ac47c2 |
31-Aug-2009 |
Eli Friedman <eli.friedman@gmail.com> |
PR4836, part 1: add Sema support for __builtin_isnan and friends; they are apparently used by Solaris libc despite the fact that clang claims to be compatible with gcc 4.2, which doesn't support them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80610 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
|
3b4dc7c723dd16a3c02a73f40204da6953dc0094 |
31-Aug-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement template instantiation for member operator access. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80609 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
017dde547d359a66ec38b80a098a5ddbef087048 |
31-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement template instantiation for member operator access. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80609 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
04b3aa87d282f222719838ccb7b236cc960b6c0c |
31-Aug-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Support explicit C++ member operator syntax, from James Porter! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80608 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
|
a6f0f9d589a06737707fe914e06bd6d4bfae0997 |
31-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
Support explicit C++ member operator syntax, from James Porter! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80608 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
|
e8576dc9d8e2fb21fb614f9d6564d9ca53a66d6c |
30-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
More missing member goodness. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80491 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
|
a31d5f70e02d89631d07be162796a2d6bd74e561 |
30-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
More missing member goodness. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80491 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
|
f1cb83539bb1ec38bae49a189e107b298e360df8 |
30-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Improve missing error messages as suggested by Doug. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80489 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
639bfc7b1e55e01dd38d2ef399366b5efa55a9a7 |
30-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Improve missing error messages as suggested by Doug. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80489 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
8c463c5eeb7a108b9c146337ba8cef8f7918be30 |
30-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Use DiagnoseMissingMember for UsingDecls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80470 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
05180afbf4b55c8ee8894df0bb77ac41ea3a41fa |
30-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Use DiagnoseMissingMember for UsingDecls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80470 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
4355a39424035ba0bcdfa3f89bda6eff5ec6de3b |
30-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Improve diagnostics for missing members. This renames the err_typecheck_no_member to err_typecheck_no_member_deprecated. The idea is that err_typecheck_no_member_deprecated should be phased out and any call sites that reference it should call DiagnoseMissingMember instead. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80469 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
|
f4d84b663ef7dda959cbe45561d90e59760cbb74 |
30-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Improve diagnostics for missing members. This renames the err_typecheck_no_member to err_typecheck_no_member_deprecated. The idea is that err_typecheck_no_member_deprecated should be phased out and any call sites that reference it should call DiagnoseMissingMember instead. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80469 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
|
4a4010ee517a28989287989f8e68921bee33f7c3 |
30-Aug-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Unbreak tests. I'll look into why this is necessary later. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80468 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
af496acbae62ad51bf42b40eea8ea8ebe48c5dbb |
30-Aug-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Unbreak tests. I'll look into why this is necessary later. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80468 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
b0122d35342da4971618e8f9cd713d6ccd5d7b5d |
30-Aug-2009 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Fix the start source location for type-specs like long, short, etc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80448 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
31590f929eec2c4fbd09276b5f3a7038d5f3b3e2 |
30-Aug-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Fix the start source location for type-specs like long, short, etc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80448 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
495ec1c2fb604a861bc6b7e83916c4deb14e8c81 |
30-Aug-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Make instantiating initializers for classes with a dependent base type work correctly. The change in lib/AST/DeclCXX.cpp is mostly a large reindentation; I couldn't figure out a good way to avoid it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80446 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
c5573a81a83c4173c92c7e91b01371b7223d88c4 |
30-Aug-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Make instantiating initializers for classes with a dependent base type work correctly. The change in lib/AST/DeclCXX.cpp is mostly a large reindentation; I couldn't figure out a good way to avoid it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80446 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
e16b4fe4afe3b13b013d2b0a092c80932fddddee |
29-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Set the access specifier for using decls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80435 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
595adc1795cc2c079ef5876100e01acd10a0504a |
29-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Set the access specifier for using decls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80435 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
8197c48a5bedf9418f8616ee4b6ed98e4bfd2ed3 |
29-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Improve instantiation of UnresolvedUsingDecls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80434 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
0d8df780aef1acda5962347a32591efc629b6748 |
29-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Improve instantiation of UnresolvedUsingDecls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80434 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
ec172132c867db117dc0d0584587151e848e3998 |
29-Aug-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch for code gen. for c-style cast which ends in using class's conversion functions [12.3.2-p2] git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80433 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprCXX.cpp
|
31976591dee494994f2546c72c23e1e35a9c1555 |
29-Aug-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch for code gen. for c-style cast which ends in using class's conversion functions [12.3.2-p2] git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80433 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprCXX.cpp
|
a903eb4de66320b25f766fdf6bdd505283a8fd1d |
29-Aug-2009 |
John McCall <rjmccall@apple.com> |
Fix the breakage by handling indirect instantiations. This would be much improved if there were a consistent name for getInstantiatedFromMemberX() across all classes. Cheap refactor if someone wants to do it, but let's get the buildbots happy first. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80425 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
52a575a5ce7b27b6612357cdba5aa4ec1574ad5e |
29-Aug-2009 |
John McCall <rjmccall@apple.com> |
Fix the breakage by handling indirect instantiations. This would be much improved if there were a consistent name for getInstantiatedFromMemberX() across all classes. Cheap refactor if someone wants to do it, but let's get the buildbots happy first. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80425 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
139a43f76114f3b83533400c757688b9d0301247 |
29-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Instantiate member and base initializers. Patch by Anders Johnsen! (tweaked slightly by me) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80422 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateInstantiateDecl.cpp
|
090253155017b7eec031bbd7bf07824a448e1d7a |
29-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Instantiate member and base initializers. Patch by Anders Johnsen! (tweaked slightly by me) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80422 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateInstantiateDecl.cpp
|
73e4dbc233044fd5ad7a9efd3053275a99d540e9 |
29-Aug-2009 |
John McCall <rjmccall@apple.com> |
For consistency, just make friend declarations AS_public. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80420 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
|
5fee110ac106370f75592df024001de73edced2a |
29-Aug-2009 |
John McCall <rjmccall@apple.com> |
For consistency, just make friend declarations AS_public. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80420 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
|
178664cc27f33fdf8c3ed7419649c7b4286fc018 |
29-Aug-2009 |
John McCall <rjmccall@apple.com> |
Ensure code generation for friend declarations in class templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80418 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
f181d8a44f5837213eeaee6d71f584b1ab2849cd |
29-Aug-2009 |
John McCall <rjmccall@apple.com> |
Ensure code generation for friend declarations in class templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80418 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
6d68ad4556299aea1408c20fffc9c3e9444313a7 |
29-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Store the SourceLocation of right parentheses in member initializers. Patch by Anders Johnsen! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80416 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
8c57a66a2aa59939a902ffa8c4ad0ddd5b949a21 |
29-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Store the SourceLocation of right parentheses in member initializers. Patch by Anders Johnsen! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80416 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
899085471eed4d5248984608689543c95dc90761 |
29-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
CreateDeclRefExprs that point to UnresolvedUsingDecls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80413 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
598da5b01fa9e205f55db8b3b5cb20abec2d74cf |
29-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
CreateDeclRefExprs that point to UnresolvedUsingDecls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80413 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
88fa0b1bdcd6df40630a36beb69c2ec7d7c67037 |
29-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Add another check for UnresolvedUsingDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80412 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
203cb71998a39a9d01a29db135454a9e7f402235 |
29-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Add another check for UnresolvedUsingDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80412 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d0493ce16254ea5c92ba63aa494255638d4eeebb |
29-Aug-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Make sure we actually found a redeclaration before complaining about attributes added to a redeclaration in C++ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80403 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
fdc39199c91e6246ac3f4da10eee96a369ce3e1a |
29-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
Make sure we actually found a redeclaration before complaining about attributes added to a redeclaration in C++ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80403 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
fe15f0d82c93f28c8162babf1dcd7003efd3194e |
29-Aug-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Remove #if 0'd code that is clearly not needed git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80399 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
ed656469895ab77177669abe1611dbef8d33b90f |
29-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
Remove #if 0'd code that is clearly not needed git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80399 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
cc6b85d68cdcb334790e64fb1cfc0b016e759b3a |
29-Aug-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
path to ir-gen 12.3.1 Conversion by constructor git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80398 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
7fe5d72fbc8605b60d42d32394248ea76cf763a0 |
29-Aug-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
path to ir-gen 12.3.1 Conversion by constructor git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80398 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
d9949ab53dd70232e49496df174253b3eb2ecf9c |
29-Aug-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Don't crash when instantiating templates containing anonymous structs/unions git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80397 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
a5bf7f13d7772b164750997f95ab18487bbc4114 |
29-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
Don't crash when instantiating templates containing anonymous structs/unions git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80397 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
266adfe457cee157c4a64f371e4a42ad7cdc47af |
28-Aug-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Test instantiation of static data members that live within nested member templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80396 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
3cd4d1ece34d36317ec5352855d86e256cb6aa27 |
28-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
Test instantiation of static data members that live within nested member templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80396 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
ea2f70f10f7ef7467432537bdba9244267fd7e9a |
28-Aug-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix and test template instantiation for nested member templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80394 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
5ec178ff237d77e7acf5e747c19bf4f2de77a779 |
28-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
Fix and test template instantiation for nested member templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80394 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
01b7a1cbc3db8c881a2a565de4ec68340dbe3f4a |
28-Aug-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Tighten up the conversion from a single-level template argument list to a multi-level template argument list by making it explicit. The forced auditing of callers found a bug in the instantiation of member classes inside member templates. I *love* static type systems. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80391 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplate.h
emaTemplateDeduction.cpp
emaType.cpp
|
357bbd022c1d340c8e255aea7a684ddb34bc76e5 |
28-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
Tighten up the conversion from a single-level template argument list to a multi-level template argument list by making it explicit. The forced auditing of callers found a bug in the instantiation of member classes inside member templates. I *love* static type systems. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80391 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplate.h
emaTemplateDeduction.cpp
emaType.cpp
|
840b52d90deef86d138ffc633464c22652148ccb |
28-Aug-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Remove the conversion from a multi-level template argument list back to a single template argument list. We no longer need this crutch git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80390 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.h
|
c18faf67c366f79035e364944d7df7f281ddf5a4 |
28-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
Remove the conversion from a multi-level template argument list back to a single template argument list. We no longer need this crutch git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80390 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.h
|
8dbd038b11a5d8e761be57f57ee2f0338a48ae5e |
28-Aug-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement template instantiation for member class templates. When performing template instantiation of the definitions of member templates (or members thereof), we build a data structure containing the template arguments from each "level" of template instantiation. During template instantiation, we substitute all levels of template arguments simultaneously. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80389 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaTemplate.cpp
emaTemplate.h
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
d6350aefb1396b299e199c7f1fe51bb40c12e75e |
28-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement template instantiation for member class templates. When performing template instantiation of the definitions of member templates (or members thereof), we build a data structure containing the template arguments from each "level" of template instantiation. During template instantiation, we substitute all levels of template arguments simultaneously. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80389 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaTemplate.cpp
emaTemplate.h
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
2dc22b4a4afe6b36a6c50c8699ae73fd59094356 |
28-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Check for UnresolvedUsingDecl when determining if a declaration is a redeclaration or not. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80383 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
36ef0787532ef3ecfc8ecd5e9661f5b2f87a280f |
28-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Check for UnresolvedUsingDecl when determining if a declaration is a redeclaration or not. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80383 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
01ba75a75a543402a152387e1e863dcb23b6e811 |
28-Aug-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
patch to prevent crash in hopelessly incorrect method definition with labels. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80381 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
32844b35f61e04b23618e19c5ea41d57b975f9ac |
28-Aug-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
patch to prevent crash in hopelessly incorrect method definition with labels. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80381 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
5b8beb3444a77118b1b508a3a87f03c9682011e3 |
28-Aug-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Collect multiple levels of template arguments into a new type, MultiLevelTemplateArgumentList. This is a baby step toward instantiating member templates; no intended functionality change yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80380 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.h
emaTemplateInstantiate.cpp
|
d1102433214bd33b5bef5b493944292a1e82c2fb |
28-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
Collect multiple levels of template arguments into a new type, MultiLevelTemplateArgumentList. This is a baby step toward instantiating member templates; no intended functionality change yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80380 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.h
emaTemplateInstantiate.cpp
|
948945747bcd09eabe2504c1798d41edcefdf92b |
28-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Fix this for real. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80377 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaOverload.cpp
|
faccd72e2448b552f17992eaba6cfe12ec497e58 |
28-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Fix this for real. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80377 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaOverload.cpp
|
ca468500caaf0531cb0c4c693240044b0e4213f9 |
28-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Allow explicit ctors for casts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80374 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
83b534cb4329a49e265776dba3e87dc7032174be |
28-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Allow explicit ctors for casts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80374 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
1e90155b90c4c236b627d5a0997a91c7a0df1a30 |
28-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
When doing overload resolution, expressions that are value dependent but not type dependent and of integral type should not be treated as null pointer constants. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80369 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
bbf306bd1d3e674edf40c692a5693a475e961a57 |
28-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
When doing overload resolution, expressions that are value dependent but not type dependent and of integral type should not be treated as null pointer constants. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80369 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
8e4c169379d2bfb16a54ac2d2ad29a8088fc60a3 |
28-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Pass InOverloadResolution all the way down to IsPointerConversion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80368 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXCast.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaOverload.cpp
|
08972924fadafeadcee25ecf52c5fa6cfc729332 |
28-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Pass InOverloadResolution all the way down to IsPointerConversion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80368 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXCast.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaOverload.cpp
|
6145173144dc3a03dcfcc021df08cbcd76af91c4 |
28-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Instantiate unresolved using declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80366 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
|
0dde18e5a713bc186062ca1ebc9967500b07faee |
28-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Instantiate unresolved using declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80366 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
|
795a3fd05ce06bf185a7fbaa7fe521abf25e99e9 |
28-Aug-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
ir-gen related patch for type conversion with class type conversion methods. WIP. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80365 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaExprCXX.cpp
|
4fc7ab364110d6ad1c10dd38dbeb0597fed7e2f5 |
28-Aug-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
ir-gen related patch for type conversion with class type conversion methods. WIP. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80365 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaExprCXX.cpp
|
7de15913bed5143cebaf1ea32eba3d26a9e4ae83 |
28-Aug-2009 |
John McCall <rjmccall@apple.com> |
Omnibus friend decl refactoring. Instead of cloning AST classes for friend declarations of same, introduce a single AST class and add appropriate bits (encoded in the namespace) for whether a decl is "real" or not. Much hackery about previously-declared / not-previously-declared, but it's essentially mandated by the standard that friends alter lookup, and this is at least fairly non-intrusive. Refactor the Sema methods specific to friends for cleaner flow and less nesting. Incidentally solve a few bugs, but I remain confident that we can put them back. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80353 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaLookup.cpp
emaTemplateInstantiateDecl.cpp
|
02cace78cf48cc26686bd5b07c78606abca13bcd |
28-Aug-2009 |
John McCall <rjmccall@apple.com> |
Omnibus friend decl refactoring. Instead of cloning AST classes for friend declarations of same, introduce a single AST class and add appropriate bits (encoded in the namespace) for whether a decl is "real" or not. Much hackery about previously-declared / not-previously-declared, but it's essentially mandated by the standard that friends alter lookup, and this is at least fairly non-intrusive. Refactor the Sema methods specific to friends for cleaner flow and less nesting. Incidentally solve a few bugs, but I remain confident that we can put them back. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80353 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaLookup.cpp
emaTemplateInstantiateDecl.cpp
|
50bc7088e5d8534dfac0fbb91bb267c6da8f3071 |
28-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Create UnresolvedUsingDecls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80346 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
550b14b410eaed037c9b791806194e6cea1ebe90 |
28-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Create UnresolvedUsingDecls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80346 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
348af3223b533c8301c77711893f9778c437d8c7 |
28-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Factor declaration building out to Sema::BuildUsingDeclaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80337 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
c72160ba4ce3f82784888aa64415b9ef72bf44ea |
28-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Factor declaration building out to Sema::BuildUsingDeclaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80337 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
66b082afa97af35fa317529ec3c4f9be73380889 |
28-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
More work on using declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80333 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
73b39cf02eaa346c6d7a76c32bf13759de7516db |
28-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
More work on using declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80333 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
b49f1bd5691c6e04b84f6aa365853bf49688c82e |
28-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Many improvements to using declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80332 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
cf9f921268e67703d9cddcf9f2d6ac057c4c3cc8 |
28-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Many improvements to using declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80332 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
2993eddf5716775128f10b731a0627daab97bacc |
28-Aug-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When looking for overloaded member operators, make sure to instantiate class template specializations (when possible) and look into base classes. Thanks to Eli for the test case! FIXME -=1. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80302 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
8a5ae2401645788144c0ae769a2fb899866801f5 |
28-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
When looking for overloaded member operators, make sure to instantiate class template specializations (when possible) and look into base classes. Thanks to Eli for the test case! FIXME -=1. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80302 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
feb022e569e673c181207e5c799c7add6886e290 |
27-Aug-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix for PR4794 (instantiating friend class decl); this version shouldn't cause any regressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80277 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
eaba1af8529c381d7bfd4dd0a8b48d2c01647972 |
27-Aug-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix for PR4794 (instantiating friend class decl); this version shouldn't cause any regressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80277 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
3af0734acc78f293ff0fc6251eb47e84040c2191 |
27-Aug-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Back out bad piece of r80272. Will look at fixing this a different way. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80273 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
56bea43ac127367e34a4732b20f4c8a4c6a5fe05 |
27-Aug-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Back out bad piece of r80272. Will look at fixing this a different way. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80273 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
97e6f32c59748dbf8272c3af3873852f10afb5cf |
27-Aug-2009 |
Eli Friedman <eli.friedman@gmail.com> |
PR4794: Make instantiating friend class decls not crash. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80272 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplateInstantiateDecl.cpp
|
c5c54f2c7bbc000dbcaee5e0acec2dbb0c0f0cf8 |
27-Aug-2009 |
Eli Friedman <eli.friedman@gmail.com> |
PR4794: Make instantiating friend class decls not crash. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80272 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplateInstantiateDecl.cpp
|
e0f3ee673abd72405fd3a10b9395d891bf4b4918 |
27-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Add an InOverloadResolution flag to TryCopyInitialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80261 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
|
7b361b588031483658c4364e02026ffb06e78c26 |
27-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Add an InOverloadResolution flag to TryCopyInitialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80261 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
|
8f809f91678d689ac7b71213de48c34c1745cca0 |
27-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Remove more default arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80260 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXCast.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
|
2de3aced4c4373d8a078604c8e61e267a323853a |
27-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Remove more default arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80260 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXCast.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
|
6ed4a61242f65a831feee6a8607b053668f27fc8 |
27-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Remove default arguments from TryImplicitConversion and fix a bug found in the process. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80258 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXCast.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaOverload.cpp
|
da7a18be8f139e1176e457d81c275c0e7ae0ced7 |
27-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Remove default arguments from TryImplicitConversion and fix a bug found in the process. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80258 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXCast.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaOverload.cpp
|
063865576cac07f65384ef73453e2ffdbf06023c |
27-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Remove default argument from TryCopyInitialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80256 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
|
d28b42862bc627f4fc1430b4a1919b304800dc1c |
27-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Remove default argument from TryCopyInitialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80256 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
|
fcc530320fd26e07625292a46b01e01fb17c4930 |
27-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Revert the flags change for now, I have a better idea for this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80255 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExprCXX.cpp
emaOverload.cpp
|
2974b5cd2669877139e45439084de540d082127a |
27-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Revert the flags change for now, I have a better idea for this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80255 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExprCXX.cpp
emaOverload.cpp
|
3b896451923635c7d82f943dbaba1c03e6bb7c1f |
27-Aug-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement instantiation of the declarations of member function templates within class templates, producing a member function template of a class template specialization. If you can parse that, I'm sorry. Example: template<typename T> struct X { template<typename U> void f(T, U); }; When we instantiate X<int>, we now instantiate the declaration X<int>::f, which looks like this: template<typename U> void X<int>::f(int, U); The path this takes through TemplateDeclInstantiator::VisitCXXMethodDecl is convoluted and ugly, but I don't know how to improve it yet. I'm resting my hopes on the multi-level substitution required to instantiate definitions of nested templates, which may simplify this code as well. More testing to come... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80252 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplateInstantiateDecl.cpp
|
d60e105e6d1624da647ef7dd35a9cf6fad1b763e |
27-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement instantiation of the declarations of member function templates within class templates, producing a member function template of a class template specialization. If you can parse that, I'm sorry. Example: template<typename T> struct X { template<typename U> void f(T, U); }; When we instantiate X<int>, we now instantiate the declaration X<int>::f, which looks like this: template<typename U> void X<int>::f(int, U); The path this takes through TemplateDeclInstantiator::VisitCXXMethodDecl is convoluted and ugly, but I don't know how to improve it yet. I'm resting my hopes on the multi-level substitution required to instantiate definitions of nested templates, which may simplify this code as well. More testing to come... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80252 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplateInstantiateDecl.cpp
|
f4a6509204986e324be17c0ca8d1735ef864a458 |
27-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Add a OverloadResolutionFlags and start converting some of the overload methods over to using it instead of bools arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80248 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExprCXX.cpp
emaOverload.cpp
|
19377389530101d583955537729e8889d487d59e |
27-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Add a OverloadResolutionFlags and start converting some of the overload methods over to using it instead of bools arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80248 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExprCXX.cpp
emaOverload.cpp
|
897bb094b8019308030399b4226dcc1bfad49d4b |
27-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Don't check member and base initializers if the constructor is dependent. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80211 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
8d4c5ea0ee899d3e916d79cde98f16fb47810c4f |
27-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Don't check member and base initializers if the constructor is dependent. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80211 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
82b3fd2553354c886e0e6b57fde1c315d00d3661 |
27-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Use early returns to avoid indentation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80209 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
5c36fb22d9984c74855e8049ae0bd15d3a3080b8 |
27-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Use early returns to avoid indentation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80209 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
b30f1c83501f3d6526cefa39a62f236352503bce |
27-Aug-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Stub out an error so we don't crash. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80207 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
2a16a138812f2f725f645cca95c41e6bd12ad14f |
27-Aug-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Stub out an error so we don't crash. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80207 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
ef8fd086af176ffa48d21a505eb64b09e0b7a47c |
27-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Add a BuildCXXTemporaryObjectExpr and use it so default arguments will be instantiated correctly for temporary object expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80206 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExprCXX.cpp
|
e7624a75b74633ff9c54d1c60ace2707fe298008 |
27-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Add a BuildCXXTemporaryObjectExpr and use it so default arguments will be instantiated correctly for temporary object expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80206 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExprCXX.cpp
|
3a4fed165ad3b46aee9ac07e25474fe98d5a13f2 |
27-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
In ActOnCXXTypeConstructExpr, check that the type is complete and non-abstract before creating any expressions. This assures that any templates are instantiated if necessary. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80200 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
bb60a509f47a95a4ed9366ec1fc65850da654d38 |
27-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
In ActOnCXXTypeConstructExpr, check that the type is complete and non-abstract before creating any expressions. This assures that any templates are instantiated if necessary. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80200 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
62ce58301ea9dfb179993943fa96a590b7c07516 |
27-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
New RequireNonAbstractType function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80183 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
a6ec7ad25a137fd42d84e6b6d44b32976cae440c |
27-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
New RequireNonAbstractType function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80183 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
a21e78731fa6942555b667e765070509a92b41dd |
27-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Bye-bye old RequireCompleteType. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80182 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXCast.cpp
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaOverload.cpp
emaType.cpp
|
b790661a15d93941d2c33a0ea328254277b3d7e3 |
27-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Bye-bye old RequireCompleteType. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80182 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXCast.cpp
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaOverload.cpp
emaType.cpp
|
c8a336f3596523fed0178cf1c8fa999dc1152c83 |
27-Aug-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
ir-gen for type convesion of class objects. WIP. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80178 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
64e690ecf7ba7ad560b0af631bb6f323c38f6da4 |
27-Aug-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
ir-gen for type convesion of class objects. WIP. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80178 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
c84ca3ac72c0fee79ef5e30ce3a58a707e93d5ff |
27-Aug-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Make sure to bump the reference count of the last element in the ParenListExpr representing the direct initializer of a declaration git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80177 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
e9f8eb64ed2d41c23db4a9774768613d4e07a865 |
27-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
Make sure to bump the reference count of the last element in the ParenListExpr representing the direct initializer of a declaration git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80177 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
3f69b7a7353927a0338b1e02672548404f379627 |
27-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Remove another unused argument. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80175 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaType.cpp
|
c56642301eaa6335ea9ad210ff923080f841464b |
27-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Remove another unused argument. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80175 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaType.cpp
|
b5247af8e8d1912c06b9c459fa4034a7d6270d6e |
27-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Remove the PrintType argument from RequireCompleteType. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80174 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprCXX.cpp
emaType.cpp
|
d497ba7ca5e52cd4523822055abd5e89dfec1800 |
27-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Remove the PrintType argument from RequireCompleteType. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80174 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprCXX.cpp
emaType.cpp
|
e399ad4e75a7cb3e0abd0b8210f66393711d1360 |
27-Aug-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When a member reference expression includes a qualifier on the member name, e.g., x->Base::f() retain the qualifier (and its source range information) in a new subclass of MemberExpr called CXXQualifiedMemberExpr. Provide construction, transformation, profiling, printing, etc., for this new expression type. When a virtual function is called via a qualified name, don't emit a virtual call. Instead, call that function directly. Mike, could you add a CodeGen test for this, too? git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80167 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExpr.cpp
reeTransform.h
|
bd4c4aebe6035e7a7125470cc9f0f92511230ee3 |
27-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
When a member reference expression includes a qualifier on the member name, e.g., x->Base::f() retain the qualifier (and its source range information) in a new subclass of MemberExpr called CXXQualifiedMemberExpr. Provide construction, transformation, profiling, printing, etc., for this new expression type. When a virtual function is called via a qualified name, don't emit a virtual call. Instead, call that function directly. Mike, could you add a CodeGen test for this, too? git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80167 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExpr.cpp
reeTransform.h
|
9454a9d481b9fc250d5b212f85ddd17f4bc0bd5e |
27-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Add a RequireCompleteType variant that takes a PartialDiagnostic. The old RequireCompleteType now creates a PartialDiagnostic and calls the new function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80165 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaType.cpp
|
91a0cc913ecc5619b76d2e40742fd09725be8c56 |
27-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Add a RequireCompleteType variant that takes a PartialDiagnostic. The old RequireCompleteType now creates a PartialDiagnostic and calls the new function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80165 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaType.cpp
|
9c71db1d83b6c08e92f0dd69fd0e23bc0aeaf6d2 |
27-Aug-2009 |
Mike Stump <mrs@apple.com> |
Regularize the case and sort. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80163 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
1feade8e520be483293dbf55eb57a51720899589 |
27-Aug-2009 |
Mike Stump <mrs@apple.com> |
Regularize the case and sort. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80163 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
52be1ca6972aae4d4bc4e4293b2b49cb05272b4c |
26-Aug-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement support for C++ direct initializers that involve dependent types or type-dependent expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80143 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
|
83ddad3ab513f5d73698cf9fbeb4ed3f011bc3b9 |
26-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement support for C++ direct initializers that involve dependent types or type-dependent expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80143 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
|
c3e811318b81d07db4b2a4f8aca7e83298e4366c |
26-Aug-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
AST for conversion by conversion functions. WIP. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80135 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
9099ff0cf91ac9e0b2d5a142807fa384ce842fc4 |
26-Aug-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
AST for conversion by conversion functions. WIP. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80135 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
3d56748bff1454d33f1f5a9ae1644f4c54c37b44 |
26-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
More support for pseudo dtors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80129 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
2cf738f1944d1cc724ea7561b84440a3a1059e45 |
26-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
More support for pseudo dtors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80129 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
cf13d4ad85bceb69c8dfb2fc9f2b4276ccd3a130 |
26-Aug-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
update to CXXFunctionalCastExpr to support ir-gen for type convesions of class objects [class.conv]. WIP. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80127 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXCast.cpp
emaChecking.cpp
emaExpr.cpp
emaExprCXX.cpp
|
e9f42087aabfdb6b2afc35c7e38ac65da063b409 |
26-Aug-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
update to CXXFunctionalCastExpr to support ir-gen for type convesions of class objects [class.conv]. WIP. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80127 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXCast.cpp
emaChecking.cpp
emaExpr.cpp
emaExprCXX.cpp
|
7a33bc8d629e4ff2c66569db0474af24c56eadbb |
26-Aug-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Make sure to compare primary declaration contexts when determining whether a declaration is in scope git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80126 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
|
db3a0f543e9a120d37823c6f2a2f1c693b69f2a1 |
26-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
Make sure to compare primary declaration contexts when determining whether a declaration is in scope git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80126 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
|
64037c8170f3c38f7946558be14085bb392bc9f1 |
26-Aug-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When we know that we are parsing a class-name, implicitly construct a TypenameType if getTypeName is looking at a member of an unknown specialization. This allows us to properly parse class templates that derived from type that could only otherwise be described by a typename type, e.g., template<class T> struct X {}; template<typename T> struct Y : public X<T>::X { }; Fixes PR4381. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80123 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
42c39f39184c5ce9d7f489e5dcb7eec770728a9a |
26-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
When we know that we are parsing a class-name, implicitly construct a TypenameType if getTypeName is looking at a member of an unknown specialization. This allows us to properly parse class templates that derived from type that could only otherwise be described by a typename type, e.g., template<class T> struct X {}; template<typename T> struct Y : public X<T>::X { }; Fixes PR4381. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80123 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
9935ab9b20945641efc42ac4cab5c696cee2a5e4 |
26-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Add Sema::BuildMemberReferenceExpr and have Sema::ActOnMemberReferenceExpr call it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80122 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
8f28f99019e86ae2841d17668811c6a94f5c44f8 |
26-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Add Sema::BuildMemberReferenceExpr and have Sema::ActOnMemberReferenceExpr call it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80122 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
691e04e82d51364fe3c2a68cf6fd902a7ba30e06 |
26-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Address some of Doug's comments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80114 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
|
3aa4ca439da54bc71def778126c9cf10c7d910ed |
26-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Address some of Doug's comments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80114 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
|
114c6195b48ed2fa5c1f2208010482c0f0e073ef |
26-Aug-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix for overloaded binary operators whose operands need implicit conversions, from Sylvere Teissier! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80112 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
c3384cba391f9140a46db0caa061649b633f65bc |
26-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
Fix for overloaded binary operators whose operands need implicit conversions, from Sylvere Teissier! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80112 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
346198721c8f96f8ab2f0fcf1fe129170ad2394f |
26-Aug-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Source location information for ? and : in a ConditionalOperator, from Enea Zaffanella git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80097 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
reeTransform.h
|
47e1f7c68bf375cac470fdb2b599ddbb395aeb52 |
26-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
Source location information for ? and : in a ConditionalOperator, from Enea Zaffanella git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80097 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
reeTransform.h
|
3e208d820f141072cfbb82bee660850654932e66 |
26-Aug-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve diagnostics and recovery when the nested-name-specifier of a qualified name does not actually refer into a class/class template/class template partial specialization. Improve printing of nested-name-specifiers to eliminate redudant qualifiers. Also, make it possible to output a nested-name-specifier through a DiagnosticBuilder, although there are relatively few places that will use this leeway. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80056 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaCXXScopeSpec.cpp
emaDecl.cpp
|
dacd434c49658286c380c7b4c357d76d53cb4aa1 |
26-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
Improve diagnostics and recovery when the nested-name-specifier of a qualified name does not actually refer into a class/class template/class template partial specialization. Improve printing of nested-name-specifiers to eliminate redudant qualifiers. Also, make it possible to output a nested-name-specifier through a DiagnosticBuilder, although there are relatively few places that will use this leeway. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80056 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaCXXScopeSpec.cpp
emaDecl.cpp
|
093ba8b2ac7f6fae34282b88dd142c2eb5ea062f |
26-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Parsing of pseudo-destructors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80055 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprCXX.cpp
|
ec7738776ba68576db5d8316af399d1f983245ee |
26-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Parsing of pseudo-destructors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80055 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprCXX.cpp
|
c03d3303fb298ae86bf5d5d6c98755928fdbde00 |
26-Aug-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve support for out-of-line definitions of nested templates and their members, including member class template, member function templates, and member classes and functions of member templates. To actually parse the nested-name-specifiers that qualify the name of an out-of-line definition of a member template, e.g., template<typename X> template<typename Y> X Outer<X>::Inner1<Y>::foo(Y) { return X(); } we need to look for the template names (e.g., "Inner1") as a member of the current instantiation (Outer<X>), even before we have entered the scope of the current instantiation. Since we can't do this in general (i.e., we should not be looking into all dependent nested-name-specifiers as if they were the current instantiation), we rely on the parser to tell us when it is parsing a declaration specifier sequence, and, therefore, when we should consider the current scope specifier to be a current instantiation. Printing of complicated, dependent nested-name-specifiers may be somewhat broken by this commit; I'll add tests for this issue and fix the problem (if it still exists) in a subsequent commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80044 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaDecl.cpp
emaLookup.cpp
emaTemplate.cpp
reeTransform.h
|
495c35d291da48c4f5655bbb54d15128ddde0d4d |
26-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
Improve support for out-of-line definitions of nested templates and their members, including member class template, member function templates, and member classes and functions of member templates. To actually parse the nested-name-specifiers that qualify the name of an out-of-line definition of a member template, e.g., template<typename X> template<typename Y> X Outer<X>::Inner1<Y>::foo(Y) { return X(); } we need to look for the template names (e.g., "Inner1") as a member of the current instantiation (Outer<X>), even before we have entered the scope of the current instantiation. Since we can't do this in general (i.e., we should not be looking into all dependent nested-name-specifiers as if they were the current instantiation), we rely on the parser to tell us when it is parsing a declaration specifier sequence, and, therefore, when we should consider the current scope specifier to be a current instantiation. Printing of complicated, dependent nested-name-specifiers may be somewhat broken by this commit; I'll add tests for this issue and fix the problem (if it still exists) in a subsequent commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80044 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaDecl.cpp
emaLookup.cpp
emaTemplate.cpp
reeTransform.h
|
0ba26ee598384d669c66b883480b7bf882ab0eca |
26-Aug-2009 |
John McCall <rjmccall@apple.com> |
Clarify the difference between substitution and instantiation by renaming functions that don't instantiate definitions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80037 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
ce3ff2bd3a3386dbc209d3cba4b8769173b274c1 |
26-Aug-2009 |
John McCall <rjmccall@apple.com> |
Clarify the difference between substitution and instantiation by renaming functions that don't instantiate definitions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80037 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
e8773040a1eb95ad7cf2eaac504a45945ea171a8 |
25-Aug-2009 |
John McCall <rjmccall@apple.com> |
Modify an assert to capture the restriction on friend declarations more accurately. Prevents the assert from triggering incorrectly when friending functions first declared in extern "C" contexts. Fixes bug 4757. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80016 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
91cf4199cca311ea9c3b3a4e2b3984d508c9e5e3 |
25-Aug-2009 |
John McCall <rjmccall@apple.com> |
Modify an assert to capture the restriction on friend declarations more accurately. Prevents the assert from triggering incorrectly when friending functions first declared in extern "C" contexts. Fixes bug 4757. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80016 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
e305ae312f1d8d90759da641ccfde45a02d5a00e |
25-Aug-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement out-of-line definitions of nested class templates. Most of the logic is there for out-of-line definitions with multiple levels of nested templates, but this is still a work-in-progress: we're having trouble determining when we should look into a dependent nested-name-specifier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80003 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplate.cpp
|
05396e20d68535612f58c84e0dfc7647c75a7da1 |
25-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement out-of-line definitions of nested class templates. Most of the logic is there for out-of-line definitions with multiple levels of nested templates, but this is still a work-in-progress: we're having trouble determining when we should look into a dependent nested-name-specifier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80003 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplate.cpp
|
5d08ee6e8febc361c3bcf1468dabf749a6e2c584 |
25-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Handle the implicit 'this' parameter for format attributes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79987 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
4fb77202ceef22a572cf4357f380b08f6bcc5c36 |
25-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Handle the implicit 'this' parameter for format attributes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79987 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
ec92687ea8f84fcd267a5c2e44c09df02a2bfe81 |
25-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
If a parameter has a default argument expression, make sure to instantiate the parameter type before checking that the expression is a valid initializer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79986 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
5653ca5088b799ada71b5043a0a2cd71c727da83 |
25-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
If a parameter has a default argument expression, make sure to instantiate the parameter type before checking that the expression is a valid initializer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79986 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
3e03d83be64d564e767a996e2cd795f62b15bc5c |
25-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Improved support for default arguments in constructors for class templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79984 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
8644aecd4383ce829d1eed81e96399904a948362 |
25-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Improved support for default arguments in constructors for class templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79984 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
baa8a31923d4c248fd71163dc6c28a0e85d2b784 |
25-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
InitializeVarWithConstructor now returns true on failure. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79976 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
fe2de492d00c9698e2f98568bbb72964d50ed467 |
25-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
InitializeVarWithConstructor now returns true on failure. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79976 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
665e4699310d5933ebd0548687da779a1b691e16 |
25-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
BuildCXXConstructExpr now returns an OwningExprResult. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79975 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExprCXX.cpp
emaInit.cpp
reeTransform.h
|
da3f4e2dd5938145f132be237a2ed5914cc86702 |
25-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
BuildCXXConstructExpr now returns an OwningExprResult. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79975 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExprCXX.cpp
emaInit.cpp
reeTransform.h
|
0ab9db286be4b875e317b81ba00118629590e631 |
25-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Factor building of CXXDefaultArgExpr expressions out into a separate function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79974 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
56c5e33460cb6672590075818bcc555aacb3f6bb |
25-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Factor building of CXXDefaultArgExpr expressions out into a separate function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79974 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
92936c42efc554161341bd8169117cf4b1b0ec5c |
25-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Basic support for default argument expressions for function templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79972 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExpr.cpp
emaTemplateInstantiateDecl.cpp
|
9351c173cd538f7f7c28af1494ac7e68b815b0e8 |
25-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Basic support for default argument expressions for function templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79972 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExpr.cpp
emaTemplateInstantiateDecl.cpp
|
60eb3be08d6c61c36747ffbb6fc55ec4052d25bd |
25-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Factor setting default arguments out into SetParamDefaultArgument. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79970 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExpr.cpp
|
ed961f989e7153733d352505f239f0de4e060629 |
25-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Factor setting default arguments out into SetParamDefaultArgument. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79970 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExpr.cpp
|
73af519edb4c871adddceb62c64949cf5305cbea |
25-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Use hasDefaultArg instead of getDefaultArg. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79967 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
5f49a0c693188a4d9c4165bd5227399475a31426 |
25-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Use hasDefaultArg instead of getDefaultArg. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79967 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
e049819ca45adaf7f11236eac83a9a26df5f8890 |
25-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Check that the default argument is well-formed before checking the initializer types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79964 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
66e3067d9821c75f3119e07f087cfb0d30f9c2ed |
25-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Check that the default argument is well-formed before checking the initializer types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79964 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
29b47fc85dc863cff50c9a0752d5cd9ba87fc471 |
24-Aug-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Skip transparent contexts when performing C++ name lookup git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79931 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
a24eb4ef63d5860a5a02f7532e56e84283782984 |
24-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
Skip transparent contexts when performing C++ name lookup git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79931 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
9a38552bb9542598fdf240eeaa702dbbfcf73b4e |
24-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Use the right cast kind when comparing null to member pointers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79927 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
26ba8507089ec8ea37804c32f78e2e1f8bc2a4f2 |
24-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Use the right cast kind when comparing null to member pointers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79927 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
70be4dba458f2870791654cd83b6b97567f94e2e |
24-Aug-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement support for equality comparisons (!=, ==) of member pointers, by extending the "composite pointer type" logic to include member pointer types. Introduce test cases for member pointer comparisons, including those that involve the builtin operator candidates implemented earlier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79925 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprCXX.cpp
|
20b3e9918cf7d7845c920baabc4fb2f1ac0ee1d2 |
24-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement support for equality comparisons (!=, ==) of member pointers, by extending the "composite pointer type" logic to include member pointer types. Introduce test cases for member pointer comparisons, including those that involve the builtin operator candidates implemented earlier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79925 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprCXX.cpp
|
b35c799aeb381f5e4e8a61e839a1bea9cc21a68e |
24-Aug-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Try to complete a type before looking for conversion functions within that type. Note that we do not produce a diagnostic if the type is incomplete; rather, we just don't look for conversion functions. Fixes PR4660. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79919 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaOverload.cpp
emaTemplateInstantiate.cpp
emaType.cpp
|
5842ba9fd482bb2fe5198b32c2ae549cd5474e6d |
24-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
Try to complete a type before looking for conversion functions within that type. Note that we do not produce a diagnostic if the type is incomplete; rather, we just don't look for conversion functions. Fixes PR4660. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79919 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaOverload.cpp
emaTemplateInstantiate.cpp
emaType.cpp
|
9a37594784517ea6c191a893313c010256e44356 |
24-Aug-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Refactor the template-instantiation logic for expressions into a generic tree transformation (also used for recanonicalization) and a small amount of template-instantiation-specific logic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79917 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
19b7b158699983e70693c73f3b982fd16c056585 |
24-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
Refactor the template-instantiation logic for expressions into a generic tree transformation (also used for recanonicalization) and a small amount of template-instantiation-specific logic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79917 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
0fbc71c858f622540711ca91a6cc58bc96b2935f |
24-Aug-2009 |
Edwin Török <edwintorok@gmail.com> |
Fix build of clang with gcc-4.4: #include <cstdio> was missing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79916 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
emaOverload.cpp
|
f42e4a6e089e8413247400fe58ad299193371f9c |
24-Aug-2009 |
Torok Edwin <edwintorok@gmail.com> |
Fix build of clang with gcc-4.4: #include <cstdio> was missing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79916 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
emaOverload.cpp
|
84164f0720f3c0a529f38f89663eda97e49fcdfd |
24-Aug-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Make sure to adjust function template declarations to their templated declarations (e.g., FunctionTemplateDecl -> CXXConstructorDecl) before performing semantic analysis on the declarations. Fixes PR4761. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79911 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
efd5bdad3c2b746db46452c6b13bd3c462dd761d |
24-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
Make sure to adjust function template declarations to their templated declarations (e.g., FunctionTemplateDecl -> CXXConstructorDecl) before performing semantic analysis on the declarations. Fixes PR4761. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79911 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
cf9d6a0f68fb6465974b47188cd5e9d74feb7674 |
24-Aug-2009 |
Chris Lattner <sabre@nondot.org> |
fix a GCC type punning warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79895 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
88650c371187e5a1eed0f05abc4019f93938ff79 |
24-Aug-2009 |
Chris Lattner <sabre@nondot.org> |
fix a GCC type punning warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79895 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
50353f11e6421455826f76023b745df8284938c9 |
23-Aug-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Don't install Clang libraries. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79824 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
|
7ebe97166a4d720a187ab08ba927027e0d32274c |
23-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
Don't install Clang libraries. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79824 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
|
02fdbfe99a5648dbca42720198f420acccaf5ac5 |
23-Aug-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Catch a few more cases of illegal comparisons. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79793 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
3075e760ceb73b6fafc2fb4977ad68552d83aef8 |
23-Aug-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Catch a few more cases of illegal comparisons. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79793 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
124569f192b4c4cc6d5d0bcaa310d618fe4456e0 |
23-Aug-2009 |
Chris Lattner <sabre@nondot.org> |
Eli points out that we really must diagnose "void* > 0" as an extension. Explicitly add it as an EXTENSION instead of an EXTWARN so that it only comes out with -pedantic. Thanks Eli! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79791 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
06c0f5b1bb1623a93a2bc4c345fb3be52a2b22a7 |
23-Aug-2009 |
Chris Lattner <sabre@nondot.org> |
Eli points out that we really must diagnose "void* > 0" as an extension. Explicitly add it as an EXTENSION instead of an EXTWARN so that it only comes out with -pedantic. Thanks Eli! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79791 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
512f4ba8728430f8b7c015123fe12eecd8991dc0 |
23-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Add CK_NullToMemberPointer and CK_BaseToDerivedMemberPointer cast kinds. Make -ast-dump print out the cast kinds of cast expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79787 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
emaOverload.cpp
|
27a5b9b9babd1e4f8a19c5c9c0736c4b311c79b2 |
23-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Add CK_NullToMemberPointer and CK_BaseToDerivedMemberPointer cast kinds. Make -ast-dump print out the cast kinds of cast expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79787 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
emaOverload.cpp
|
2e006d2fb6300a00bac983791c3659129417e9db |
23-Aug-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Type of a ?: expression whose either expression is a built-in 'id' type is 'id' type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79781 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
9ec22a37a22218c4a73430c614d3540b076baa14 |
23-Aug-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Type of a ?: expression whose either expression is a built-in 'id' type is 'id' type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79781 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
5253dd8f289bbe972a35607243da29f9764fb895 |
22-Aug-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Don't issue warning on multiple selector found when selector name is for a @selector expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79776 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
emaExprObjC.cpp
|
835ed7f15bd8a89226fd7976d96be19995f1c1c8 |
22-Aug-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Don't issue warning on multiple selector found when selector name is for a @selector expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79776 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
emaExprObjC.cpp
|
8b88b14afec29b61447bb07efc3782f9210ab889 |
22-Aug-2009 |
Chris Lattner <sabre@nondot.org> |
tweak some pointer sema checking stuff (which was added to implement PR4175) to avoid emitting a warning on "someptr > 0". This is obviously questionable (they could use != instead) but is reasonable, and the warning "ordered comparison between pointer and integer" didn't make a ton of sense because 0 is a valid null pointer constant. Just silence the warning in this case, it is unlikely to indicate a bug. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79743 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
6365e3e22bcec4b95c5b1ed47d501134b375a75a |
22-Aug-2009 |
Chris Lattner <sabre@nondot.org> |
tweak some pointer sema checking stuff (which was added to implement PR4175) to avoid emitting a warning on "someptr > 0". This is obviously questionable (they could use != instead) but is reasonable, and the warning "ordered comparison between pointer and integer" didn't make a ton of sense because 0 is a valid null pointer constant. Just silence the warning in this case, it is unlikely to indicate a bug. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79743 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
6ee3505754a995ce47e91de424cab07631a64248 |
22-Aug-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement delayed parsing for member function templates. Fixes PR4608. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79709 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d83d04041f64a2c89123d227fa8003b482391279 |
22-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement delayed parsing for member function templates. Fixes PR4608. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79709 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
8c860df7de4a8e2e56020ad1907b81d1c242738a |
22-Aug-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement conversion function templates, along with the ability to use template argument deduction from a conversion function (C++ [temp.deduct.conv]) with implicit conversions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79693 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaOverload.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiateDecl.cpp
|
65ec1fda479688d143fe2403242cd9c730c800a1 |
22-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement conversion function templates, along with the ability to use template argument deduction from a conversion function (C++ [temp.deduct.conv]) with implicit conversions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79693 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaOverload.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiateDecl.cpp
|
56ca71bc8555c36e4f7fcaeb2a07e81c12522f2a |
22-Aug-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Refactor instantiation of destructors to use the common CXXMethodDecl code, fixing a problem where instantiations of out-of-line destructor definitions would had the wrong lexical context. Introduce tests for out-of-line definitions of the constructors, destructors, and conversion functions of a class template partial specialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79682 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
17e32f30e2d1eaf6639d3d4e2196a8d7c709fbac |
22-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
Refactor instantiation of destructors to use the common CXXMethodDecl code, fixing a problem where instantiations of out-of-line destructor definitions would had the wrong lexical context. Introduce tests for out-of-line definitions of the constructors, destructors, and conversion functions of a class template partial specialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79682 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
0c3c9d0004eab7120c34736f2854e1aedbee6f14 |
22-Aug-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix parsing for out-of-line definitions of constructors and destructors of class templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79678 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
ac373c4ca596a144d906570f284d46d702e10719 |
22-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
Fix parsing for out-of-line definitions of constructors and destructors of class templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79678 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
050cabf8b5ba0448c07fca099f3bcfceb1ad77a1 |
21-Aug-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Introduce support for constructor templates, which can now be declared and will participate in overload resolution. Unify the instantiation of CXXMethodDecls and CXXConstructorDecls, which had already gotten out-of-sync. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79658 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaOverload.cpp
emaTemplateInstantiateDecl.cpp
|
dec06664a1c4d8984251083db2215875aea1c80d |
21-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
Introduce support for constructor templates, which can now be declared and will participate in overload resolution. Unify the instantiation of CXXMethodDecls and CXXConstructorDecls, which had already gotten out-of-sync. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79658 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaOverload.cpp
emaTemplateInstantiateDecl.cpp
|
1bb733a956ff4d1d0841794cd96d9294988e0458 |
21-Aug-2009 |
Sanjiv Gupta <sanjiv.gupta@microchip.com> |
Reversing part of 79544. Need to find a new way to do target specific semanitc checking. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79596 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f6d6a228b0faafdfd1cdffe865f47616b6cab7a8 |
21-Aug-2009 |
Sanjiv Gupta <sanjiv.gupta@microchip.com> |
Reversing part of 79544. Need to find a new way to do target specific semanitc checking. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79596 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
ce9a12dd66bdf40c3b71e725964170f192b30a71 |
21-Aug-2009 |
Daniel Dunbar <daniel@zuster.org> |
gcc told me to add these. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79589 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
641f7d196069926f55c63fa7d32db08eb2a21559 |
21-Aug-2009 |
Daniel Dunbar <daniel@zuster.org> |
gcc told me to add these. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79589 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
42556e426eaf5b19971c2dd15c0564657fcdd235 |
21-Aug-2009 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Remove TypeSpecStartLocation from VarDecl/FunctionDecl/FieldDecl, and use DeclaratorInfo to get this information. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79584 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaTemplateInstantiateDecl.cpp
|
a5d82000f7b173a0a5ce34dc8c09a03f98d9e439 |
21-Aug-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Remove TypeSpecStartLocation from VarDecl/FunctionDecl/FieldDecl, and use DeclaratorInfo to get this information. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79584 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaTemplateInstantiateDecl.cpp
|
4fdcdda2862ac8c818184ca593ef43ff11469eac |
21-Aug-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement support for calling member function templates, which involves: - Allowing one to name a member function template within a class template and on the right-hand side of a member access expression. - Template argument deduction for calls to member function templates. - Registering specializations of member function templates (and finding them later). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79581 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaOverload.cpp
emaTemplateInstantiateDecl.cpp
|
6b906869527be40b0d38d755e9ef51b331b88162 |
21-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement support for calling member function templates, which involves: - Allowing one to name a member function template within a class template and on the right-hand side of a member access expression. - Template argument deduction for calls to member function templates. - Registering specializations of member function templates (and finding them later). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79581 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaOverload.cpp
emaTemplateInstantiateDecl.cpp
|
398a801c9b914b01c4f6222c8338448314dd6f4f |
21-Aug-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Initial support for parsing and representation of member function templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79570 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
37b372b76a3fafe77186d7e6079e5642e2017478 |
21-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
Initial support for parsing and representation of member function templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79570 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
9e2b9e01aeaf38e474da3acce29f2f751b727ad7 |
20-Aug-2009 |
Sanjiv Gupta <sanjiv.gupta@microchip.com> |
Issue an error if the user specifies parameters in a function marked as ISR. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79544 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
da3e03ec5d7161135bd90c0786421e8994bcc2f8 |
20-Aug-2009 |
Sanjiv Gupta <sanjiv.gupta@microchip.com> |
Issue an error if the user specifies parameters in a function marked as ISR. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79544 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
128cdc592c93af458ae89032d83dc75242eac52d |
20-Aug-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Using "ObjCImplicitSetterGetterRefExpr" instead of "ObjCImplctSetterGetterRefExpr". A field rename and more comments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79537 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprObjC.cpp
emaStmt.cpp
reeTransform.h
|
09105f52b1f28cbb1374c27c3c70f5517e2c465d |
20-Aug-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Using "ObjCImplicitSetterGetterRefExpr" instead of "ObjCImplctSetterGetterRefExpr". A field rename and more comments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79537 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprObjC.cpp
emaStmt.cpp
reeTransform.h
|
627c055b81f90ad8af138615887af68a55bd1383 |
20-Aug-2009 |
John McCall <rjmccall@apple.com> |
Add syntax examples for the friend declaration types. Remove an assert trivialized by dominating code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79520 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
f18970d1dd3a88b7a50e9abd4fd4ceef675a8a2e |
20-Aug-2009 |
John McCall <rjmccall@apple.com> |
Add syntax examples for the friend declaration types. Remove an assert trivialized by dominating code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79520 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
23a44be7335f40576a66f8d7886f92515cd48b57 |
20-Aug-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Refactor the instantiation of statements into a generic tree transformation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79519 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
ema.h
emaTemplateInstantiate.cpp
emaTemplateInstantiateStmt.cpp
reeTransform.h
|
43959a93c6aba8b03b09116fe077f4ce8e80005e |
20-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
Refactor the instantiation of statements into a generic tree transformation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79519 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
ema.h
emaTemplateInstantiate.cpp
emaTemplateInstantiateStmt.cpp
reeTransform.h
|
1931cc820eeece9852582c3c3896c8e548f698a8 |
20-Aug-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix bit-field promotion to be a bit closer to the behavior of gcc. Patch by Enea Zaffanella, with some simplifications/corrections to isPromotableBitField by me. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79510 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
04e8357f6801e9ff52673e7e899a67bbabf9de93 |
20-Aug-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix bit-field promotion to be a bit closer to the behavior of gcc. Patch by Enea Zaffanella, with some simplifications/corrections to isPromotableBitField by me. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79510 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
d64b41e7dda166fef72cb25b2c26f28c0c22a425 |
20-Aug-2009 |
John McCall <rjmccall@apple.com> |
Basic nested-template implementation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79504 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
e29ba20148e9b7835ad463b39cd4ee9223eafbbf |
20-Aug-2009 |
John McCall <rjmccall@apple.com> |
Basic nested-template implementation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79504 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
d2b7f00ad3841b701ab46f0319b45dd0698542da |
20-Aug-2009 |
Ted Kremenek <kremenek@apple.com> |
Enhance diagnostics concerning attribute 'ns_returns_retained' and 'cf_returns_retained' to present the range of the attribute and have the diagnostic location be the declaration that the attribute was falsely attached to. This solves the problem where these diagnostics were being suppressed when these attributes were wrapped in a macro that was defined in a system header. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79496 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
21531fa592cd76e5d3df839ce469bea918404ac8 |
20-Aug-2009 |
Ted Kremenek <kremenek@apple.com> |
Enhance diagnostics concerning attribute 'ns_returns_retained' and 'cf_returns_retained' to present the range of the attribute and have the diagnostic location be the declaration that the attribute was falsely attached to. This solves the problem where these diagnostics were being suppressed when these attributes were wrapped in a macro that was defined in a system header. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79496 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
ba47c2f0e888abadd4cbaaee049f04b8c9a60229 |
20-Aug-2009 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Keep track of the right paren ')' source location in a function declarator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79489 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
82bf01061b97404fed8c422fc0eda0a380689cc9 |
20-Aug-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Keep track of the right paren ')' source location in a function declarator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79489 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
0433a02f13f468188837dfe7e084acabb8c9d562 |
19-Aug-2009 |
Daniel Dunbar <daniel@zuster.org> |
Switch to SmallString::str from SmallString::c_str. - Several FIXMEs due to non-Twinification of IRBuilder. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79455 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
7765934ad7e157b5fcf925792a38e01b1edbcf8a |
19-Aug-2009 |
Daniel Dunbar <daniel@zuster.org> |
Switch to SmallString::str from SmallString::c_str. - Several FIXMEs due to non-Twinification of IRBuilder. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79455 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
6ae7d117d878330ed52c8c50265168678b348cae |
19-Aug-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Make integer promotions work correctly on PIC16 and other platforms where sizeof(short) == sizeof(int). Move UsualArithmeticConversionsType out of Sema, since it was only there as a historical artifact. Patch by Enea Zaffanella. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79412 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaOverload.cpp
emaType.cpp
|
a95d75769edae299816ec7fd9bbcdf1ef617c5c9 |
19-Aug-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Make integer promotions work correctly on PIC16 and other platforms where sizeof(short) == sizeof(int). Move UsualArithmeticConversionsType out of Sema, since it was only there as a historical artifact. Patch by Enea Zaffanella. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79412 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaOverload.cpp
emaType.cpp
|
ed671d3605c7f5f7798c4c728a69c013c9ed5471 |
19-Aug-2009 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Fix a comment and improve an assert message. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79399 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
35d44e5673e772d1cc7eab66818de8d9796b89ca |
19-Aug-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Fix a comment and improve an assert message. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79399 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
d6802baf62618c4fd22b02c94e4cd206de08b40e |
19-Aug-2009 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Use Sema's LocInfoType to pass and preserve type source info through the Parser. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79395 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXCast.cpp
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaTemplate.cpp
emaType.cpp
|
e8661906d49ef6c9694a9cc845ca62a85dbc016d |
19-Aug-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Use Sema's LocInfoType to pass and preserve type source info through the Parser. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79395 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXCast.cpp
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaTemplate.cpp
emaType.cpp
|
fd3d5fdac0d25464e1b9c36bc646965494d44f66 |
19-Aug-2009 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Introduce LocInfoType which is a Sema-specific implementation detail. This is a Type subclass that can hold a DeclaratorInfo* when we have type source info coming out of a declarator that we want to preserve. This is used only at the "border" of Parser/Sema for passing/getting QualTypes, it does not participate in the type system semantics in any way. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79394 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaType.cpp
reeTransform.h
|
1bb8a45f7386a23871598d05141a07af03067925 |
19-Aug-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Introduce LocInfoType which is a Sema-specific implementation detail. This is a Type subclass that can hold a DeclaratorInfo* when we have type source info coming out of a declarator that we want to preserve. This is used only at the "border" of Parser/Sema for passing/getting QualTypes, it does not participate in the type system semantics in any way. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79394 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaType.cpp
reeTransform.h
|
53fac3a1c7824e965820713c6870b58929984f35 |
19-Aug-2009 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Create and instantiate a DeclaratorInfo using a newly introduced Sema::GetDeclaratorInfoForDeclarator(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79393 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaType.cpp
|
4adab7fcb4cb1e23622f4849f7ef7981ff169616 |
19-Aug-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Create and instantiate a DeclaratorInfo using a newly introduced Sema::GetDeclaratorInfoForDeclarator(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79393 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaType.cpp
|
b17120c5d87b1b078891071188b89ec4fe6857bf |
19-Aug-2009 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Introduce DeclaratorDecl and pass DeclaratorInfo through the Decl/Sema interfaces. DeclaratorDecl contains a DeclaratorInfo* to keep type source info. Subclasses of DeclaratorDecl are FieldDecl, FunctionDecl, and VarDecl. EnumConstantDecl still inherits from ValueDecl since it has no need for DeclaratorInfo. Decl/Sema interfaces accept a DeclaratorInfo as parameter but no DeclaratorInfo is created yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79392 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExprCXX.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
emaTemplateInstantiateStmt.cpp
emaType.cpp
|
a1d5662d96465f0fddf8819d245da4d19b892eff |
19-Aug-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Introduce DeclaratorDecl and pass DeclaratorInfo through the Decl/Sema interfaces. DeclaratorDecl contains a DeclaratorInfo* to keep type source info. Subclasses of DeclaratorDecl are FieldDecl, FunctionDecl, and VarDecl. EnumConstantDecl still inherits from ValueDecl since it has no need for DeclaratorInfo. Decl/Sema interfaces accept a DeclaratorInfo as parameter but no DeclaratorInfo is created yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79392 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExprCXX.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
emaTemplateInstantiateStmt.cpp
emaType.cpp
|
1c4da457d434b07b67f4d7dbb0b31351142de64d |
18-Aug-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Renamed ObjCKVCRefExpr to ObjCImplctSetterGetterRefExpr. Removed an unnecessary loop to get to setters incoming argument. Added DoxyGen comments. Still more work to do in this area (WIP). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79365 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprObjC.cpp
emaStmt.cpp
reeTransform.h
|
154440e6a8fa6ac5bca395876d79b530b39a2c1c |
18-Aug-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Renamed ObjCKVCRefExpr to ObjCImplctSetterGetterRefExpr. Removed an unnecessary loop to get to setters incoming argument. Added DoxyGen comments. Still more work to do in this area (WIP). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79365 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprObjC.cpp
emaStmt.cpp
reeTransform.h
|
e9835e137aeb9eb377f86cda52942c5acf279185 |
18-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Change ActOnReturnStmt to not take a FullExprArg. Instead, Sema will wrap the return expr inside a CXXExprWithTemporaries if needed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79342 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaStmt.cpp
emaTemplateInstantiateStmt.cpp
|
f53b4433abb7a3bc14c0329d3175cbc291280137 |
18-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Change ActOnReturnStmt to not take a FullExprArg. Instead, Sema will wrap the return expr inside a CXXExprWithTemporaries if needed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79342 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaStmt.cpp
emaTemplateInstantiateStmt.cpp
|
bcee927080361aa2a9608c7bdb4b26f4c4ced339 |
18-Aug-2009 |
John McCall <rjmccall@apple.com> |
Teach Sema how to pop out of friend function definitions in nested classes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79291 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
88232aadbe3e9b6dde2a9b0d7c91e677305de06a |
18-Aug-2009 |
John McCall <rjmccall@apple.com> |
Teach Sema how to pop out of friend function definitions in nested classes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79291 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
44663db1b5b82107ccb94fe1cc08de2b1adf3fac |
17-Aug-2009 |
David Chisnall <csdavec@swan.ac.uk> |
Initial patch to support definitions of id and Class from headers in Objective-C code. This currently breaks test/SemaObjC/id-isa-ref.m and issues some spurious warnings when you attempt to assign a struct objc_class* value to a Class variable. The test case probably should fail as it's written, because without the definition of Class the compiler should not assume struct objc_class* is a valid receiver type, but it's left broken because it would be nice if we could get that passing too for the special case of isa. Approved by snaroff. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79248 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaChecking.cpp
emaDecl.cpp
emaExpr.cpp
|
0f436560640a1cff5b6d96f80f540770f139453f |
17-Aug-2009 |
David Chisnall <csdavec@swan.ac.uk> |
Initial patch to support definitions of id and Class from headers in Objective-C code. This currently breaks test/SemaObjC/id-isa-ref.m and issues some spurious warnings when you attempt to assign a struct objc_class* value to a Class variable. The test case probably should fail as it's written, because without the definition of Class the compiler should not assume struct objc_class* is a valid receiver type, but it's left broken because it would be nice if we could get that passing too for the special case of isa. Approved by snaroff. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79248 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaChecking.cpp
emaDecl.cpp
emaExpr.cpp
|
44443f80d350affe79eac9cfafcfabc6ab61b4da |
16-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Store the delete operator for delete expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79200 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
d67c4c31a83773a4280bdf8d8b5097a1ce92488e |
16-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Store the delete operator for delete expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79200 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
b2df16619b7395f44d53800d60182cd5da4cef02 |
16-Aug-2009 |
Chris Lattner <sabre@nondot.org> |
Improve the diagnostic emitted when an unused ObjC property getter is found. Instead of complaining about a generic "unused expr", emit: t.m:7:3: warning: property access result unused - getters should not have side effects While objc property getters *could* have side effects, according to the language best practices, they *shouldn't*. Hopefully the diagnostic now gets this across. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79192 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
419cfb318cd69b6c717019288d5a3822be18d8f9 |
16-Aug-2009 |
Chris Lattner <sabre@nondot.org> |
Improve the diagnostic emitted when an unused ObjC property getter is found. Instead of complaining about a generic "unused expr", emit: t.m:7:3: warning: property access result unused - getters should not have side effects While objc property getters *could* have side effects, according to the language best practices, they *shouldn't*. Hopefully the diagnostic now gets this across. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79192 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
bd9f51a0eb90a9be5e1394231d5e2925c546d527 |
16-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
AddInitializerToDecl can't take a FullExprArg. Make it take an ExprArg, and create the CXXExprWithTemporaries before setting the initializer on the VarDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79176 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaInit.cpp
|
9abf2aedae7538cfd85f3ff0898a6d14385c8e36 |
16-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
AddInitializerToDecl can't take a FullExprArg. Make it take an ExprArg, and create the CXXExprWithTemporaries before setting the initializer on the VarDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79176 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaInit.cpp
|
16497746dd3a8c97feedabd36be912844d45eb17 |
16-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Call MaybeBindToTemporary for overloaded binary and unary operators. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79173 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
2d46eb21eb2c904831b0e9f75ab3523384c70e66 |
16-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Call MaybeBindToTemporary for overloaded binary and unary operators. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79173 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
422a5fee040511780db00011fa27d761eb1623d7 |
16-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Call MaybeBindToTemporary when constructing functino call operator calls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79172 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
a303f9eab9ceb356a24d84e178d079f0d41ad8d4 |
16-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Call MaybeBindToTemporary when constructing functino call operator calls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79172 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
b8ff3403512a9c12cb4efd0a7e97520529ae58e6 |
16-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Add MaybeBindToTemporary calls for member call expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79171 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
6f68027af2b6ce294a2706f23a1d3cb7ca1b8d37 |
16-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Add MaybeBindToTemporary calls for member call expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79171 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
54ad8a013896f07560d335ce56536521f5a9794b |
16-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Make sure to call MaybeBindToTemporary when creating CallExprs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79168 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ec74c5929c78bd1670619022f6cfd471becf65aa |
16-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Make sure to call MaybeBindToTemporary when creating CallExprs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79168 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
7fb13801b165ac3b72d62fde53f16187e6cdec07 |
16-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Move builtin call checking out into a separate function, make CheckFunctionCall and CheckBlockCall return bool instead. No intended functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79157 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
emaExpr.cpp
emaOverload.cpp
|
d406bf0e8c17012110a8476d03c6f9a97b56ecf7 |
16-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Move builtin call checking out into a separate function, make CheckFunctionCall and CheckBlockCall return bool instead. No intended functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79157 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
emaExpr.cpp
emaOverload.cpp
|
1bfe1c47238444b2de13034b6254126386afb3f9 |
16-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
BuildCXXConstructExpr doesn't need to take an ASTContext. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79149 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExprCXX.cpp
emaInit.cpp
reeTransform.h
|
089c2602ebaccdda271beaabdd32575b354d4d09 |
16-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
BuildCXXConstructExpr doesn't need to take an ASTContext. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79149 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExprCXX.cpp
emaInit.cpp
reeTransform.h
|
2fcc3cce325c1ef98177a31c8b808c139fbb9a72 |
16-Aug-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Add an explicit constructor to ActiveTemplateInstantiation which initializes all the members; this fixes a valgrind error in the regression tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79148 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
|
2ebcc6b9a240e290a41c6e86a88a4d4ed35e9650 |
16-Aug-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Add an explicit constructor to ActiveTemplateInstantiation which initializes all the members; this fixes a valgrind error in the regression tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79148 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
|
10747ff6448c87cdfd2b438042738036ecb5de86 |
15-Aug-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Implement __is_empty. Patch by Sean Hunt. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79143 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
|
1d954f6a0057cb55a3a5d483904a3c57d03c996f |
15-Aug-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Implement __is_empty. Patch by Sean Hunt. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79143 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
|
01e0f65ea3fc166ba059876fbbe7ecf18f93b662 |
15-Aug-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Don't perform integer promotions on the operand to a cast; this simplifies the AST, and can matter in some rare cases involving casts to vector types. Patch by Enea Zaffanella. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79126 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
199ea95fd5ef9a089dbf7b2ade018d4444a65177 |
15-Aug-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Don't perform integer promotions on the operand to a cast; this simplifies the AST, and can matter in some rare cases involving casts to vector types. Patch by Enea Zaffanella. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79126 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
cb6dd8a2171c0e8e996078a91377b8e9b31c40a3 |
15-Aug-2009 |
John McCall <rjmccall@apple.com> |
Disable all recognition of main() in -ffreestanding. Addresses bug #4720. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79070 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
07a5c22bb6fb0674c95205ae189365bf8e1b695e |
15-Aug-2009 |
John McCall <rjmccall@apple.com> |
Disable all recognition of main() in -ffreestanding. Addresses bug #4720. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79070 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f87ef44558ee53d1f8fbe5f43f2655870370e738 |
15-Aug-2009 |
Ted Kremenek <kremenek@apple.com> |
Change handling of attribute 'malloc' to only accept the attribute on function declarations (and not function pointers). This is consistent with GCC. Accepting this attribute on function pointers means that the attribute should be treated as a type qualifier, which apparently is not what GCC does. We obviously can change this later should we desire to enhance the 'malloc' attribute in this way. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79060 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
2cff7d16fe58e6d6447ec9cad2af083beb20d6b5 |
15-Aug-2009 |
Ted Kremenek <kremenek@apple.com> |
Change handling of attribute 'malloc' to only accept the attribute on function declarations (and not function pointers). This is consistent with GCC. Accepting this attribute on function pointers means that the attribute should be treated as a type qualifier, which apparently is not what GCC does. We obviously can change this later should we desire to enhance the 'malloc' attribute in this way. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79060 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
092f27a40ca0ef18c2be13942879d41a0e9cc6bf |
15-Aug-2009 |
Ted Kremenek <kremenek@apple.com> |
Per Eli Friedman's feedback, handle attribute 'malloc' being applied to declarations of function pointers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79053 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
b109069995b44f3ef182bcd1b02ad05e9ea9d21d |
15-Aug-2009 |
Ted Kremenek <kremenek@apple.com> |
Per Eli Friedman's feedback, handle attribute 'malloc' being applied to declarations of function pointers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79053 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
45ccbbf6003f99037c3803f91383d979eebbe0ce |
14-Aug-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
objc2's foreach statement's selector type can be a block pointer too. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79050 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
a5e42a82ce055f29f3733f3a1f10da6cb9877dee |
14-Aug-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
objc2's foreach statement's selector type can be a block pointer too. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79050 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
c3c23f22b9b4db7fb4566f9116bc0efbd6c2cb3f |
14-Aug-2009 |
Ted Kremenek <kremenek@apple.com> |
Use 'dyn_cast' instead of a check for a function declaration followed by a 'cast'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79041 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
f1858598d2dea36991df88bb32a795797ea1c316 |
14-Aug-2009 |
Ted Kremenek <kremenek@apple.com> |
Use 'dyn_cast' instead of a check for a function declaration followed by a 'cast'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79041 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
24ffe5dfeeaa396a5fa21770da6e3517ea550372 |
14-Aug-2009 |
Ted Kremenek <kremenek@apple.com> |
Improve Sema's handling of attribute 'malloc' to reject the attribute when attaching to Objective-C methods (which mirrors GCC's behavior) and to allow the return type of the function to be an Objective-C pointer or Block pointer (which GCC also accepts). Along the way, add 'const' to some of the pointer arguments of various utility functions... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79040 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
a18d7d80eb914a48521f0b7b25057fb8a69c4652 |
14-Aug-2009 |
Ted Kremenek <kremenek@apple.com> |
Improve Sema's handling of attribute 'malloc' to reject the attribute when attaching to Objective-C methods (which mirrors GCC's behavior) and to allow the return type of the function to be an Objective-C pointer or Block pointer (which GCC also accepts). Along the way, add 'const' to some of the pointer arguments of various utility functions... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79040 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
3d752dbee56ff1988d81644613aa595fc8d7bfa4 |
14-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Make the CXXDefaultArgExpr constructor protected and add a static Create function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79013 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExpr.cpp
emaOverload.cpp
reeTransform.h
|
f1480eee38b59d15438fb7bc50865ac7c7e22403 |
14-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Make the CXXDefaultArgExpr constructor protected and add a static Create function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79013 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExpr.cpp
emaOverload.cpp
reeTransform.h
|
af51b7e15542b501d41d5c396acc1065acab99f4 |
14-Aug-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Fixed a regression in deciding when to issue warning on properties which implement NSCopying protocol in GC mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79008 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
b11d798984a4cef5beeea8c0152090d8af77ab6e |
14-Aug-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Fixed a regression in deciding when to issue warning on properties which implement NSCopying protocol in GC mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79008 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
8f5a2a6f78147abd68bb81053069bcdfdb093178 |
14-Aug-2009 |
John McCall <rjmccall@apple.com> |
Support friend declarations in templates and test that argdep lookup still works. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78979 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
fd810b1386ed29b250e7d522ea826a65c815e49d |
14-Aug-2009 |
John McCall <rjmccall@apple.com> |
Support friend declarations in templates and test that argdep lookup still works. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78979 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
9da58e486fcb6c5d226f5857d13fbb5cdb82fb51 |
13-Aug-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to force synthesis of copy assignment operator function in the order according to c++03. ir-gen for copy assignment in the trivial case and the first test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78938 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
ad25883a644dd6b52c7923dd128a7d05fb26213c |
13-Aug-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to force synthesis of copy assignment operator function in the order according to c++03. ir-gen for copy assignment in the trivial case and the first test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78938 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
f09f396c0773ff4b8b61591c4f4635860a6a410a |
13-Aug-2009 |
Ryan Flynn <pizza@parseerror.com> |
change cast to dyn_cast because d may not be a FunctionDecl git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78876 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
f7f947acd7c78c57a6ed2f43cdfb20fa597244d6 |
13-Aug-2009 |
Ryan Flynn <pizza@parseerror.com> |
change cast to dyn_cast because d may not be a FunctionDecl git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78876 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
b3b17a16297286383dd4a143513e4a4d1ee2ba96 |
13-Aug-2009 |
Ryan Flynn <pizza@parseerror.com> |
change a dyn_cast to cast git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78862 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
0b47c374f84f7b536b8095e9287c069d8bb68e31 |
13-Aug-2009 |
Ryan Flynn <pizza@parseerror.com> |
change a dyn_cast to cast git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78862 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
04500242a5c45dd1165547dcaafd88956e197edd |
13-Aug-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
More toward synthesizing copy assignments. SWIP. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78861 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
0270b8aa3f9b50ec3acd1abfd2b97377a3e1bb05 |
13-Aug-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
More toward synthesizing copy assignments. SWIP. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78861 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
651efb73490efb9715fb4ca21cac71b9ae86d2a2 |
12-Aug-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch for synthesizing copy assignment operator. WIP. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78841 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
2198ba12b73a8e6801d13f25de38031da6df46b6 |
12-Aug-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch for synthesizing copy assignment operator. WIP. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78841 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
a9c11d7fad4f6f6107744c5ba04c32060975d52b |
12-Aug-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
error on property of objc interface type instead of crashing git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78826 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
acf2d137f362ede2b8f6a86b4f9dd9f6bcf00d7a |
12-Aug-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
error on property of objc interface type instead of crashing git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78826 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
257589e9035a669dd4c67645009cedca2b491b01 |
12-Aug-2009 |
Nate Begeman <natebegeman@mac.com> |
Fix a fixme by allocating ShuffleVectorExprs in the Context git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78780 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
a88dc3079bedf70a5cfc39791727e43a10383006 |
12-Aug-2009 |
Nate Begeman <natebegeman@mac.com> |
Fix a fixme by allocating ShuffleVectorExprs in the Context git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78780 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
3e2ac77555a5655835f2d0accad5055f548d7afe |
12-Aug-2009 |
Benjamin Kramer <benny.kra@googlemail.com> |
Add newline at end of file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78735 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
27ba2f019f7ba173348bebf53770dc025c087ef2 |
12-Aug-2009 |
Benjamin Kramer <benny.kra@googlemail.com> |
Add newline at end of file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78735 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
92c7b16d2d171d92187c44a2cf8fa34b0314602a |
12-Aug-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to warn if a property which is 'assign' by default may not implement NSCopying protocol in -fobjc-gc[-only] mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78726 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
0fd8904c5f71a11d29f67716c3ebdf7ad1c855fb |
12-Aug-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to warn if a property which is 'assign' by default may not implement NSCopying protocol in -fobjc-gc[-only] mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78726 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
7be34f4c71849160496fc33f5e7a1a150e9d0add |
11-Aug-2009 |
John McCall <rjmccall@apple.com> |
Add a FriendClassDecl type for holding declarations of friend types in the AST, and create such declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78719 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
c48fbdfb83a5e50fed693f0bdda3396e5b67051d |
11-Aug-2009 |
John McCall <rjmccall@apple.com> |
Add a FriendClassDecl type for holding declarations of friend types in the AST, and create such declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78719 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
fef75cbb293a4684ae4799d0f4211c4b78fcaf3b |
11-Aug-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
ir-gen support for anonymous union data member copying in copy constructors and used in default constructor's initializer list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78700 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
e64941280877d065a27e8cefd2a9038256d0e3ac |
11-Aug-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
ir-gen support for anonymous union data member copying in copy constructors and used in default constructor's initializer list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78700 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
6ffe7b41d91c6c0134f9d9cf4ac7d2787024f720 |
11-Aug-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix DISABLE_SMART_POINTERS build git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78674 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
0dec56d4ce737484aff17d4429a6e2e2fbad73e0 |
11-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
Fix DISABLE_SMART_POINTERS build git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78674 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
3649308db6bd13b6e3ada598cad1cc40daaf504d |
11-Aug-2009 |
John McCall <rjmccall@apple.com> |
Argument-dependent lookup for friend declarations. Add a new decl type, FriendFunctionDecl, and create instances as appropriate. The design of FriendFunctionDecl is still somewhat up in the air; you can befriend arbitrary types of functions --- methods, constructors, etc. --- and it's not clear that this representation captures that very well. We'll have a better picture when we start consuming this data in access control. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78653 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaLookup.cpp
|
3f9a8a60614b763785d54ad08821745d03a4af70 |
11-Aug-2009 |
John McCall <rjmccall@apple.com> |
Argument-dependent lookup for friend declarations. Add a new decl type, FriendFunctionDecl, and create instances as appropriate. The design of FriendFunctionDecl is still somewhat up in the air; you can befriend arbitrary types of functions --- methods, constructors, etc. --- and it's not clear that this representation captures that very well. We'll have a better picture when we start consuming this data in access control. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78653 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaLookup.cpp
|
9d87976f7f2e258d12eb546a473518d493afedd7 |
11-Aug-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Refactor the template-instantiation logic for expressions into a generic tree transformation (also used for recanonicalization) and a small amount of template-instantiation-specific logic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78645 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
emaTemplateInstantiate.cpp
emaTemplateInstantiateExpr.cpp
reeTransform.h
|
b98b1991c7ad1eaedb863bdbdd784ec164277675 |
11-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
Refactor the template-instantiation logic for expressions into a generic tree transformation (also used for recanonicalization) and a small amount of template-instantiation-specific logic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78645 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
emaTemplateInstantiate.cpp
emaTemplateInstantiateExpr.cpp
reeTransform.h
|
40688ad3e675337255c194a010c77f03897ecacd |
11-Aug-2009 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Check whether a tag was defined in a C++ condition declaration using GetTypeForDeclarator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78644 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
e955e7221a9cf335a089f548c01e854dca95ca99 |
11-Aug-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Check whether a tag was defined in a C++ condition declaration using GetTypeForDeclarator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78644 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
e85f43d31101a875a6621e43bde21dcc13d860ff |
11-Aug-2009 |
Nate Begeman <natebegeman@mac.com> |
Take 2 on AltiVec-style vector initializers. Fixes PR4704 problems Addresses Eli's patch feedback re: ugly cast code Updates all postfix operators to remove ParenListExprs. While this is awful, no better solution (say, in the parser) is obvious to me. Better solutions welcome. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78621 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaExpr.cpp
emaInit.cpp
emaTemplateInstantiateExpr.cpp
|
2ef13e5abef0570a9f567b4671367275c05d4d34 |
11-Aug-2009 |
Nate Begeman <natebegeman@mac.com> |
Take 2 on AltiVec-style vector initializers. Fixes PR4704 problems Addresses Eli's patch feedback re: ugly cast code Updates all postfix operators to remove ParenListExprs. While this is awful, no better solution (say, in the parser) is obvious to me. Better solutions welcome. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78621 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaExpr.cpp
emaInit.cpp
emaTemplateInstantiateExpr.cpp
|
c0b0396e7e37b56bc73c43c2dc290cd801fa1567 |
10-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Add a CastInfo struct that will be used for cast information when constructing cast expressions. Right now it only stores the cast kind, but in the future it might store conversion functions and constructors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78599 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
|
bd0fb30fa2a039439d1a30a83ea896801394d780 |
10-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Add a CastInfo struct that will be used for cast information when constructing cast expressions. Right now it only stores the cast kind, but in the future it might store conversion functions and constructors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78599 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
|
43954311b4159a6f058ff19a5d66817afe0d025f |
10-Aug-2009 |
Chris Lattner <sabre@nondot.org> |
fix a couple of problems with section attributes: 1. Passing something that isn't a string used to cause: "argument to annotate attribute was not a string literal" make it say "section attribute" instead. 2. Fix the location of the above message to point to the bad argument instead of the section token. 3. Implement rdar://4341926, by diagnosing invalid section specifiers in the frontend rather than letting them slip all the way to the assembler (a QoI win). An example of #3 is that we used to produce something like this: /var/folders/n7/n7Yno9ihEm894640nJdSQU+++TI/-Tmp-//ccFPFGtT.s:2:Expected comma after segment-name /var/folders/n7/n7Yno9ihEm894640nJdSQU+++TI/-Tmp-//ccFPFGtT.s:2:Rest of line ignored. 1st junk character valued 46 (.). Daniel improved clang to use llvm_report_error, so now we got: $ clang t.c -c fatal error: error in backend: Global variable 'x' has an invalid section specifier 'sadf': mach-o section specifier requires a segment and section separated by a comma. with no loc info. Now we get: $ clang t.c -fsyntax-only t.c:4:30: error: argument to 'section' attribute is not valid for this target: mach-o section specifier requires a segment and section separated by a comma int x __attribute__((section("sadf"))); ^ which is nice :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78586 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
797c3c4f5dc4fda735e55c6b5d6270a54cf6d263 |
10-Aug-2009 |
Chris Lattner <sabre@nondot.org> |
fix a couple of problems with section attributes: 1. Passing something that isn't a string used to cause: "argument to annotate attribute was not a string literal" make it say "section attribute" instead. 2. Fix the location of the above message to point to the bad argument instead of the section token. 3. Implement rdar://4341926, by diagnosing invalid section specifiers in the frontend rather than letting them slip all the way to the assembler (a QoI win). An example of #3 is that we used to produce something like this: /var/folders/n7/n7Yno9ihEm894640nJdSQU+++TI/-Tmp-//ccFPFGtT.s:2:Expected comma after segment-name /var/folders/n7/n7Yno9ihEm894640nJdSQU+++TI/-Tmp-//ccFPFGtT.s:2:Rest of line ignored. 1st junk character valued 46 (.). Daniel improved clang to use llvm_report_error, so now we got: $ clang t.c -c fatal error: error in backend: Global variable 'x' has an invalid section specifier 'sadf': mach-o section specifier requires a segment and section separated by a comma. with no loc info. Now we get: $ clang t.c -fsyntax-only t.c:4:30: error: argument to 'section' attribute is not valid for this target: mach-o section specifier requires a segment and section separated by a comma int x __attribute__((section("sadf"))); ^ which is nice :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78586 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
48cf40f8f2e06e54a63ff13f06a567f5cf489404 |
10-Aug-2009 |
Daniel Dunbar <daniel@zuster.org> |
Revert r78535, it is causing a number of failures to build projects. --- Reverse-merging r78535 into '.': D test/Sema/altivec-init.c U include/clang/Basic/DiagnosticSemaKinds.td U include/clang/AST/Expr.h U include/clang/AST/StmtNodes.def U include/clang/Parse/Parser.h U include/clang/Parse/Action.h U tools/clang-cc/clang-cc.cpp U lib/Frontend/PrintParserCallbacks.cpp U lib/CodeGen/CGExprScalar.cpp U lib/Sema/SemaInit.cpp U lib/Sema/Sema.h U lib/Sema/SemaExpr.cpp U lib/Sema/SemaTemplateInstantiateExpr.cpp U lib/AST/StmtProfile.cpp U lib/AST/Expr.cpp U lib/AST/StmtPrinter.cpp U lib/Parse/ParseExpr.cpp U lib/Parse/ParseExprCXX.cpp git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78551 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaInit.cpp
emaTemplateInstantiateExpr.cpp
|
1df5109f475bcbc528eb1fb9fdb179dcadbb33a6 |
10-Aug-2009 |
Daniel Dunbar <daniel@zuster.org> |
Revert r78535, it is causing a number of failures to build projects. --- Reverse-merging r78535 into '.': D test/Sema/altivec-init.c U include/clang/Basic/DiagnosticSemaKinds.td U include/clang/AST/Expr.h U include/clang/AST/StmtNodes.def U include/clang/Parse/Parser.h U include/clang/Parse/Action.h U tools/clang-cc/clang-cc.cpp U lib/Frontend/PrintParserCallbacks.cpp U lib/CodeGen/CGExprScalar.cpp U lib/Sema/SemaInit.cpp U lib/Sema/Sema.h U lib/Sema/SemaExpr.cpp U lib/Sema/SemaTemplateInstantiateExpr.cpp U lib/AST/StmtProfile.cpp U lib/AST/Expr.cpp U lib/AST/StmtPrinter.cpp U lib/Parse/ParseExpr.cpp U lib/Parse/ParseExprCXX.cpp git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78551 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaInit.cpp
emaTemplateInstantiateExpr.cpp
|
6a7fda0a3b1b7f5229e1121190e009e92f533555 |
10-Aug-2009 |
Ryan Flynn <pizza@parseerror.com> |
warn, as gcc does, if __attribute__((malloc)) applied to function returning non-pointer type git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78542 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
fd6ad3cf9c8fc6904bd5f33212207aa69743fd45 |
10-Aug-2009 |
Ryan Flynn <pizza@parseerror.com> |
warn, as gcc does, if __attribute__((malloc)) applied to function returning non-pointer type git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78542 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
31af091f101c08ecb39a00c2b4741bec5cc00150 |
09-Aug-2009 |
Ryan Flynn <pizza@parseerror.com> |
map previously ignored __attribute((malloc)) to noalias attribute of llvm function's return git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78541 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
76168e289ca4b307259e3bc9b3353f03b05bb6b9 |
09-Aug-2009 |
Ryan Flynn <pizza@parseerror.com> |
map previously ignored __attribute((malloc)) to noalias attribute of llvm function's return git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78541 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
bc8e297c7d620cd63eeb31c641dc7f51a1076785 |
09-Aug-2009 |
Nate Begeman <natebegeman@mac.com> |
AltiVec-style vector initializer syntax, vec4 a = (vec4)(a, b, c, d); In addition to being defined by the AltiVec PIM, this is also the vector initializer syntax used by OpenCL, so that vector literals are compatible with macro arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78535 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaInit.cpp
emaTemplateInstantiateExpr.cpp
|
25b4fdb9d63095448e6cbc97b8865b36b0c8cbb6 |
09-Aug-2009 |
Nate Begeman <natebegeman@mac.com> |
AltiVec-style vector initializer syntax, vec4 a = (vec4)(a, b, c, d); In addition to being defined by the AltiVec PIM, this is also the vector initializer syntax used by OpenCL, so that vector literals are compatible with macro arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78535 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaInit.cpp
emaTemplateInstantiateExpr.cpp
|
f2a022ac2d73958151ae3b700f0665ff5252e575 |
08-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Refactor some code and implement support for global destructors for static variables. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78507 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
3b2e16b3d25f6b311dba2871e2a566c96238c3d2 |
08-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Refactor some code and implement support for global destructors for static variables. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78507 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d6e117232e618145a9471a971122879c8823d915 |
08-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Use CastExpr::CK_ArrayToPointerDecay and fix an assert. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78502 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
824957643238ea1712b966deee9c65043ac6ffea |
08-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Use CastExpr::CK_ArrayToPointerDecay and fix an assert. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78502 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
a5e76935d79d84e3a00a2fbb47651799f5da7fef |
08-Aug-2009 |
Ryan Flynn <pizza@parseerror.com> |
PR4700 - remove shift by 0 warning git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78488 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
8045c7393bc83060f812d0f7b1221edbc767407c |
08-Aug-2009 |
Ryan Flynn <pizza@parseerror.com> |
PR4700 - remove shift by 0 warning git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78488 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
c915fa76c5429bbc235d8993dc218ad20bc26e3b |
08-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Introduce a new PragmaPack attribute, and use it for #pragma pack. The PackedAttr now only represents __attribute__((packed)). This is necessary because #pragma pack and __attribute__((packed)) have different semantics. No functionality change yet, but this lays the groundwork for fixing a record layout bug. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78483 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
|
a860e755f1f9f071b6a6a2f96128a6a258f5c331 |
08-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Introduce a new PragmaPack attribute, and use it for #pragma pack. The PackedAttr now only represents __attribute__((packed)). This is necessary because #pragma pack and __attribute__((packed)) have different semantics. No functionality change yet, but this lays the groundwork for fixing a record layout bug. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78483 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
|
84ee3495c838bea87195a633898e27a8ead1b6b4 |
08-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
getFunctionLevelDeclContext needs to get the previous DeclContext if EnterDeclaratorContext has been called. Fixes PR4694. (Doug, please review) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78480 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
fb7ef75a28af7b6a7f666df2a5db53cf90d957b1 |
08-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
getFunctionLevelDeclContext needs to get the previous DeclContext if EnterDeclaratorContext has been called. Fixes PR4694. (Doug, please review) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78480 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
2f19dce7498442c30fb4894edfa1b9235243046d |
08-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Factor some code to get the "function level" DeclContext out into a separate function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78478 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
|
8517d9b731f065cdfc55ec0f3ddf5d564d988648 |
08-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Factor some code to get the "function level" DeclContext out into a separate function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78478 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
|
9fbe6876aa5f7a89436a10ccf96b223272e7d0f9 |
08-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Make sure to diagnose use of declarations in the case where we create an implicit CXXThisExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78474 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
0f44b5a85e612e1644d688be93151b22f08604a7 |
08-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Make sure to diagnose use of declarations in the case where we create an implicit CXXThisExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78474 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
7103a89ce3a9e0628f339028a5ef5a8cde6169e0 |
08-Aug-2009 |
Edward O'Callaghan <eocallaghan@auroraux.org> |
Patch should implement packed enums - PR4098. Credit to Anders Johnsen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78471 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplateInstantiateDecl.cpp
|
fee13819693c8492f0c364bc704645e844ef737a |
08-Aug-2009 |
Edward O'Callaghan <eocallaghan@auroraux.org> |
Patch should implement packed enums - PR4098. Credit to Anders Johnsen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78471 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplateInstantiateDecl.cpp
|
2665057a9cbee200a2c2c0cb7b8585c698d86e52 |
08-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Get rid of Stmt::Clone now that we can reference count statements instead. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78452 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
emaTemplateInstantiateExpr.cpp
emaTemplateInstantiateStmt.cpp
|
d497206844a894a0557e927adf29b34fe960dffd |
08-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Get rid of Stmt::Clone now that we can reference count statements instead. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78452 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
emaTemplateInstantiateExpr.cpp
emaTemplateInstantiateStmt.cpp
|
a5d06285584d8c5d4db1ebe09e6c48536b37794d |
08-Aug-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Introduce reference counting for statements and expressions, using it to allow sharing of nodes. Simplifies some aspects of template instantiation, and fixes both PR3444 and <rdar://problem/6757457>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78450 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateInstantiateDecl.cpp
emaTemplateInstantiateExpr.cpp
|
43d9d9243329b1b75d1a6efdad9f16d6fb386b8e |
08-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
Introduce reference counting for statements and expressions, using it to allow sharing of nodes. Simplifies some aspects of template instantiation, and fixes both PR3444 and <rdar://problem/6757457>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78450 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateInstantiateDecl.cpp
emaTemplateInstantiateExpr.cpp
|
5c09af0f78493759fee5948784d270d9126a2d51 |
08-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Add a CK_ArrayToPointerDecay cast kind. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78434 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
112a0a8ddf23f6d25e0920002d5d4c1df0515f86 |
08-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Add a CK_ArrayToPointerDecay cast kind. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78434 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b4671fa23fe684b71594cf2010d0286d0bd2718d |
08-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Add CK_ToUnion and use it for aggregate expression codegen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78429 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
4d8673b645ad86e496b886a0f80b60763f67071d |
08-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Add CK_ToUnion and use it for aggregate expression codegen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78429 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
9583fa752f1d32c68daca069fb8dd34e0aa80478 |
08-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
More CastKind work. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78415 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXCast.cpp
emaChecking.cpp
emaExpr.cpp
emaExprCXX.cpp
|
cdb61979755c1c0699c1ee25eede9a50bf94d29b |
08-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
More CastKind work. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78415 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXCast.cpp
emaChecking.cpp
emaExpr.cpp
emaExprCXX.cpp
|
b41b2052f4188f2254c28a877c2c8f1787d9d6a4 |
08-Aug-2009 |
John McCall <rjmccall@apple.com> |
Just add global scope to the associated namespaces set instead of tracking it separately. Add the framework (currently unfed) for finding friend declarations during argument-dependent lookup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78414 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaLookup.cpp
|
6ff0785f1e58fb2cfb702d2995d076c6648a9a13 |
08-Aug-2009 |
John McCall <rjmccall@apple.com> |
Just add global scope to the associated namespaces set instead of tracking it separately. Add the framework (currently unfed) for finding friend declarations during argument-dependent lookup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78414 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaLookup.cpp
|
e25b6cdbb5f49679cae15826ec61f7db9b38f8ca |
07-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Use the correct cast kind as suggested by Doug. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78395 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
116b7d9cd0a31b34f32f6c5fe5b799367b70f257 |
07-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Use the correct cast kind as suggested by Doug. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78395 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
f109fffb4f803b7d70450d7809c8473037c4af71 |
07-Aug-2009 |
Ryan Flynn <pizza@parseerror.com> |
PR3333: warn when shifting by invalid amount git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78385 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
d0439688fea4dedc28125d246bbdec1f5a208660 |
07-Aug-2009 |
Ryan Flynn <pizza@parseerror.com> |
PR3333: warn when shifting by invalid amount git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78385 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
72f34bb47d6fd741419f6754fab708562df256fd |
07-Aug-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Minor refactoring to introduce a new transformation function, TransformStmt, into the tree transformer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78347 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
657c1acfc47d5c315ce864f2089b692262532a17 |
07-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
Minor refactoring to introduce a new transformation function, TransformStmt, into the tree transformer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78347 91177308-0d34-0410-b5e6-96231b3b80d8
reeTransform.h
|
dc9d681e44b05d028a6955c9ddd7887b9f626489 |
06-Aug-2009 |
John McCall <rjmccall@apple.com> |
Drop the friend-inner-class diagnostic from an extwarn to an ext and don't guard its report on GNUMode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78338 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
470c2a9ab6807be8a695e583a41b20ed69082260 |
06-Aug-2009 |
John McCall <rjmccall@apple.com> |
Drop the friend-inner-class diagnostic from an extwarn to an ext and don't guard its report on GNUMode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78338 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
392245a58d4fe55d5c73427c97a8c7b319108880 |
06-Aug-2009 |
John McCall <rjmccall@apple.com> |
Permit a class to friend its members in C++0x, without restriction. Permit a class to friend its class members in C++ 98, as long as extensions are enabled (and even when they aren't, only give an extwarn about it). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78332 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
7f27d92006936b16a29ca0a5c442476b4f585b21 |
06-Aug-2009 |
John McCall <rjmccall@apple.com> |
Permit a class to friend its members in C++0x, without restriction. Permit a class to friend its class members in C++ 98, as long as extensions are enabled (and even when they aren't, only give an extwarn about it). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78332 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
325cdd8be9b037f6a86d0e33a7c4c077094b1500 |
06-Aug-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Set and use Elidable in elimination of copy ctors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78331 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaInit.cpp
|
1cf9ff87ee235ad252332a96699abdb32bd6facb |
06-Aug-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Set and use Elidable in elimination of copy ctors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78331 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaInit.cpp
|
625fb9dc1d937313030c4e1e2fee0daf1f575f5b |
06-Aug-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
After reporting ill-formed copy constructor(12.8.p3) don't recurs and crash. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78323 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
52ab92bee00eb14e38dcbefc091d6b9aa5157506 |
06-Aug-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
After reporting ill-formed copy constructor(12.8.p3) don't recurs and crash. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78323 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
3f220e82148793f0788d69cacc3d562b1de16120 |
06-Aug-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When we encounter a dependent type that was parsed before we know that we were going to enter into the scope of a class template or class template partial specialization, rebuild that type so that it can refer to members of the current instantiation, as in code like template<typename T> struct X { typedef T* pointer; pointer data(); }; template<typename T> typename X<T>::pointer X<T>::data() { ... } Without rebuilding the return type of this out-of-line definition, the canonical return type of the out-of-line definition (a TypenameType) will not match the canonical return type of the declaration (the canonical type of T*). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78316 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplate.cpp
reeTransform.h
|
4a959d8788179d654df6b213b08d2b064989211d |
06-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
When we encounter a dependent type that was parsed before we know that we were going to enter into the scope of a class template or class template partial specialization, rebuild that type so that it can refer to members of the current instantiation, as in code like template<typename T> struct X { typedef T* pointer; pointer data(); }; template<typename T> typename X<T>::pointer X<T>::data() { ... } Without rebuilding the return type of this out-of-line definition, the canonical return type of the out-of-line definition (a TypenameType) will not match the canonical return type of the declaration (the canonical type of T*). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78316 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplate.cpp
reeTransform.h
|
214d046d7b289f9e6c69ed0666ba40d061129916 |
06-Aug-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement transformation of template names within the generic tree transform, then use the result for template instantiation. The generic transformation fixes a few issues: - It copes better with template template parameters and member templates (when they're implemented). - The logic used to replace template template parameters with their arguments is now centralized in TransformDecl, so that it will apply for other declaration-instantiation steps. - The error-recovery strategy is normalized now, so that any error results in a NULL TemplateName. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78292 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
reeTransform.h
|
d1067e5a0a6e2aee7260c392452df9553034c92b |
06-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement transformation of template names within the generic tree transform, then use the result for template instantiation. The generic transformation fixes a few issues: - It copes better with template template parameters and member templates (when they're implemented). - The logic used to replace template template parameters with their arguments is now centralized in TransformDecl, so that it will apply for other declaration-instantiation steps. - The error-recovery strategy is normalized now, so that any error results in a NULL TemplateName. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78292 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
reeTransform.h
|
12431cbb285890b3d94602e8dccb01c7fc71cb65 |
06-Aug-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement transformation of nested-name-specifiers within the general tree transformation. Template instantiation uses this general transformation rather than implementing its own transformation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78286 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaTemplateInstantiate.cpp
reeTransform.h
|
dcee1a12c83a6cbc9b5bf42df5d4efbc502664e7 |
06-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement transformation of nested-name-specifiers within the general tree transformation. Template instantiation uses this general transformation rather than implementing its own transformation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78286 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaTemplateInstantiate.cpp
reeTransform.h
|
da61ad2a4875cced61d9a02c2d0ec3b91d463414 |
06-Aug-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Support nested-name-specifiers for C++ member access expressions, e.g., this->Base::foo from James Porter! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78278 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaExpr.cpp
emaOverload.cpp
emaTemplateInstantiateExpr.cpp
|
fe85cedd58df7daed29201703cfb8806e12876d0 |
06-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
Support nested-name-specifiers for C++ member access expressions, e.g., this->Base::foo from James Porter! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78278 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaExpr.cpp
emaOverload.cpp
emaTemplateInstantiateExpr.cpp
|
b692ec46b956d5a17d6db7e96252864e54999d08 |
06-Aug-2009 |
Ryan Flynn <pizza@parseerror.com> |
add support for FreeBSD's format(printf0,x,y) attribute; allows null format string. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78276 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
emaDeclAttr.cpp
|
4403a5e1f956fa86d515492dbe7c7a2817d8780d |
06-Aug-2009 |
Ryan Flynn <pizza@parseerror.com> |
add support for FreeBSD's format(printf0,x,y) attribute; allows null format string. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78276 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
emaDeclAttr.cpp
|
140607b259f8139dcc2db963e44c8a37299d76f5 |
06-Aug-2009 |
John McCall <rjmccall@apple.com> |
First pass at friend semantics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78274 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaLookup.cpp
|
67d1a67f3db2f1aa69083c5c94164d6e0ee05b32 |
06-Aug-2009 |
John McCall <rjmccall@apple.com> |
First pass at friend semantics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78274 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaLookup.cpp
|
d5a72f07e9e6edfb459e7709b106988ce44110b8 |
05-Aug-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Get rid of "smart" quotes. Per report on cfe-dev. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78230 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaLookup.cpp
emaOverload.cpp
emaType.cpp
|
33a3138a0862cafdd9ff1332b834454a79cd2cdc |
05-Aug-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Get rid of "smart" quotes. Per report on cfe-dev. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78230 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaLookup.cpp
emaOverload.cpp
emaType.cpp
|
88e09ccef0d019211f738178fc7b8390a6327577 |
05-Aug-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Handle destruction of temporaries used in default argument construction of constructor calls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78222 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaInit.cpp
|
caa499b50bd6d423d095b79aca857f1c57345a0a |
05-Aug-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Handle destruction of temporaries used in default argument construction of constructor calls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78222 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaInit.cpp
|
1c30f26e4cfe979d9064ae24229d0cbe4ac776a7 |
05-Aug-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to improve ir-gen for constructors with default argument expressions and a test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78213 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExprCXX.cpp
emaInit.cpp
emaTemplateInstantiateExpr.cpp
|
b2c352ed5586cf869a5dad87a528b9ac000d2fae |
05-Aug-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to improve ir-gen for constructors with default argument expressions and a test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78213 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExprCXX.cpp
emaInit.cpp
emaTemplateInstantiateExpr.cpp
|
cfe6ae592450d8466b4d78b59ff4526266549a9a |
05-Aug-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Introduce the canonical type smart pointers, and use them in a few places to tighten up the static type system. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78164 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaTemplateInstantiateDecl.cpp
|
50d62d1b4a98adbc83de8f8cd1379ea1c25656f7 |
05-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
Introduce the canonical type smart pointers, and use them in a few places to tighten up the static type system. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78164 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaTemplateInstantiateDecl.cpp
|
f7043ad9eaaa22f83dbbc529ed1c6e1b8254b393 |
05-Aug-2009 |
Mike Stump <mrs@apple.com> |
Remove an unused header. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78140 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
11b3a95d1698c033691fce6cd444201668ba3e0a |
05-Aug-2009 |
Mike Stump <mrs@apple.com> |
Remove an unused header. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78140 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
beb68c4546bd8cbd1950ca900fd32b96762eea89 |
05-Aug-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Support for use of default argument in constructors. work in progress. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78132 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
2eeed7bc4fd457ac57ff32ab3b02674588545f65 |
05-Aug-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Support for use of default argument in constructors. work in progress. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78132 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
2999faa634ac172fcc2648af39d06248f8b5c561 |
05-Aug-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Move the template instantiation logic for template arguments into the general tree transformation. Also, implement template instantiation for parameter packs. In addition, introduce logic to enter the appropriate context for subexpressions that are not potentially evaluated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78114 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
reeTransform.h
|
670444ed30cc8ff66eb4847d921d9af0291a7111 |
05-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
Move the template instantiation logic for template arguments into the general tree transformation. Also, implement template instantiation for parameter packs. In addition, introduce logic to enter the appropriate context for subexpressions that are not potentially evaluated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78114 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
reeTransform.h
|
90fc78e83a12eaee80a3d0a174429529b7f82e85 |
04-Aug-2009 |
Mike Stump <mrs@apple.com> |
Canonicalize else. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78102 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInherit.cpp
emaInit.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
ac5fc7c6bcb494b60fee7ce615ac931c5db6135e |
04-Aug-2009 |
Mike Stump <mrs@apple.com> |
Canonicalize else. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78102 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInherit.cpp
emaInit.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
629bfc4b34b6355c21b31f76d9799af52b5bdd99 |
04-Aug-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Some code refactoring. Be more generous in issuance of warning on method type mismatches per Chris's comment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78075 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
e198f5d609dda2b6d0435f040ebe2479a4e378ba |
04-Aug-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Some code refactoring. Be more generous in issuance of warning on method type mismatches per Chris's comment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78075 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
841324a33cb8dd0868bd3102f5ba0b4f10dddf0f |
04-Aug-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Refactor template instantiation for types into a generic tree transformation template (TreeTransform) that handles the transformation and reconstruction of AST nodes. Template instantiation for types is a (relatively small) customization of the generic tree transformation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78071 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateInstantiate.cpp
reeTransform.h
|
577f75a7498e9e2536434da0ef0da0eea390d18b |
04-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
Refactor template instantiation for types into a generic tree transformation template (TreeTransform) that handles the transformation and reconstruction of AST nodes. Template instantiation for types is a (relatively small) customization of the generic tree transformation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78071 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateInstantiate.cpp
reeTransform.h
|
26454cfe7d5c8e991a47bcbf07d578737730c48d |
04-Aug-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Compare matching selectors in current and super class(s) and warn on any parameter type mismatch if potentially unsafe. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78029 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
dbdec8bcb5686cd34763db49488f77e88c43eb64 |
04-Aug-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Compare matching selectors in current and super class(s) and warn on any parameter type mismatch if potentially unsafe. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78029 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
a2717ea575c0c6d2258746bce5851450171ca3f6 |
04-Aug-2009 |
Ted Kremenek <kremenek@apple.com> |
Per advice that Doug Gregor gave me several months ago, clean up the implementation of '#pragma unused' by not constructing intermediate DeclRefExprs, but instead do the name lookup directly. The implementation is greatly simplified. Along the way, degrade '#pragma unused(undeclaredvariable)' to a warning instead of being a hard error. This implements: <rdar://problem/6761874> [sema] allow #pragma unused to reference undefined variable (with warning) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78019 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaAttr.cpp
|
7a02a3733cdd2ca672902d869fda4ef2e3f05052 |
04-Aug-2009 |
Ted Kremenek <kremenek@apple.com> |
Per advice that Doug Gregor gave me several months ago, clean up the implementation of '#pragma unused' by not constructing intermediate DeclRefExprs, but instead do the name lookup directly. The implementation is greatly simplified. Along the way, degrade '#pragma unused(undeclaredvariable)' to a warning instead of being a hard error. This implements: <rdar://problem/6761874> [sema] allow #pragma unused to reference undefined variable (with warning) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78019 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaAttr.cpp
|
9f6e097a64d91bbffd8c829783bef8db7e0a1bbe |
03-Aug-2009 |
John McCall <rjmccall@apple.com> |
Refactor methods on DeclSpec to take a diagnostic& parameter, and reflect this elsewhere. Very slightly decouples DeclSpec users from knowing the exact diagnostics to report, and makes it easier to provide different diagnostics in some places. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77990 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
fec54013fcd0eb72642741584ca04c1bc292bef8 |
03-Aug-2009 |
John McCall <rjmccall@apple.com> |
Refactor methods on DeclSpec to take a diagnostic& parameter, and reflect this elsewhere. Very slightly decouples DeclSpec users from knowing the exact diagnostics to report, and makes it easier to provide different diagnostics in some places. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77990 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
cd208114d72c342e6a804a5297b28216dbb16eb7 |
03-Aug-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Minor renaming/refactoring. No change in functionality. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77985 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
|
a83f7ed3de1ce98d633dfb6bb223bb7711893dce |
03-Aug-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Minor renaming/refactoring. No change in functionality. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77985 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
|
2146a6b5b042dfaca492ac9e9ba797d9e3950105 |
03-Aug-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix assertion crash. I don't have a testcase, but the fix is pretty obviously correct. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77969 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateExpr.cpp
|
d469fc81969fd3a28aa9f2d04d7376405f887d77 |
03-Aug-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix assertion crash. I don't have a testcase, but the fix is pretty obviously correct. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77969 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateExpr.cpp
|
f8e5167d6a3af5a0c152b00973ef33b75912d949 |
03-Aug-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Produce a warning that partial ordering of function templates is not yet supported git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77928 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
1f561c14edb9c2f54d5f4d0ad0f4b2f4bb6ece5e |
03-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
Produce a warning that partial ordering of function templates is not yet supported git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77928 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
7b0b83f39b4db3fa3c48cc7bb2ca11a365da13f7 |
03-Aug-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Keep track of the template arguments deduced when matching a class template partial specialization. Then, use those template arguments when instantiating members of that class template partial specialization. Fixes PR4607. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77925 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
37d93e9252026d4fb836d9c05d0122a2d46e56be |
03-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
Keep track of the template arguments deduced when matching a class template partial specialization. Then, use those template arguments when instantiating members of that class template partial specialization. Fixes PR4607. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77925 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
1ecbf595ee2f85e3c2bc960193c994041cc053ab |
02-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Use the correct cast kind for dynamic_cast. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77905 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
714179b179a31a0c3769a968ee18ba87b901b13f |
02-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
Use the correct cast kind for dynamic_cast. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77905 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
|
34921b592a29cd4422874004cd5700faa8c1e137 |
01-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
More warnings for unused expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77763 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
3af708ff19e4ae2bf9e40550548361b00e5916bf |
01-Aug-2009 |
Anders Carlsson <andersca@mac.com> |
More warnings for unused expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77763 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
af48afe008bd244b7ee8d31ee811d05817d475b6 |
31-Jul-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Remove a redundant getCanonicalType call git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77702 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
|
1560def1f796c0e5db6026fe366759623c9f13c2 |
31-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
Remove a redundant getCanonicalType call git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77702 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
|
ddb8b81b517927ce7f83f0a353d6478dccaec7f0 |
31-Jul-2009 |
Ryan Flynn <pizza@parseerror.com> |
PR3679 - enable #pragma weak aliasing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77660 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
ema.h
emaDecl.cpp
emaDeclAttr.cpp
|
7b1fdbda2757cc4a7f25664475be44119d7f8e59 |
31-Jul-2009 |
Ryan Flynn <pizza@parseerror.com> |
PR3679 - enable #pragma weak aliasing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77660 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
ema.h
emaDecl.cpp
emaDeclAttr.cpp
|
069c23a8f980c6a76882435fc1b16df5b0eb492e |
31-Jul-2009 |
John McCall <rjmccall@apple.com> |
Rename Action::TagKind to Action::TagUseKind, which removes both a misnomer and a name collision. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77658 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplate.cpp
|
0f434ecbead44c1f4d5f9dda088f9827fa0dc40f |
31-Jul-2009 |
John McCall <rjmccall@apple.com> |
Rename Action::TagKind to Action::TagUseKind, which removes both a misnomer and a name collision. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77658 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplate.cpp
|
dda815239162ddc4555f4726c0cb734faedc7772 |
31-Jul-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Make the check for the linkage of a template handle the case of nested linkage specifications correctly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77653 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
1503f777d94fc05a89c7305651d4b0221c63f586 |
31-Jul-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Make the check for the linkage of a template handle the case of nested linkage specifications correctly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77653 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
851869475d149002c1ee0ec6cafab37fb645aea8 |
31-Jul-2009 |
Anders Carlsson <andersca@mac.com> |
Add CK_DerivedToBase and use it PerformObjectMemberConversion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77652 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaChecking.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaOverload.cpp
|
3503d041ca8a3535a1c1a30005a6b18ae7aed5db |
31-Jul-2009 |
Anders Carlsson <andersca@mac.com> |
Add CK_DerivedToBase and use it PerformObjectMemberConversion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77652 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaChecking.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaOverload.cpp
|
7ef181c5df246e133e86b97e684f650decc67e37 |
31-Jul-2009 |
Anders Carlsson <andersca@mac.com> |
Add a CastKind enum to CastExpr. Right now it's not used for much but it will be :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77650 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaCXXCast.cpp
emaDecl.cpp
emaExpr.cpp
emaExprCXX.cpp
emaOverload.cpp
emaTemplateInstantiateExpr.cpp
|
cdef2b75aa60cde1ca00e0aa3f89139ac89c6ae4 |
31-Jul-2009 |
Anders Carlsson <andersca@mac.com> |
Add a CastKind enum to CastExpr. Right now it's not used for much but it will be :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77650 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaCXXCast.cpp
emaDecl.cpp
emaExpr.cpp
emaExprCXX.cpp
emaOverload.cpp
emaTemplateInstantiateExpr.cpp
|
ed0a8a946efc8c0b4965102bd1990e01b9518a96 |
31-Jul-2009 |
Anders Carlsson <andersca@mac.com> |
Diagnose unused expression results for all statements, just not compound statements. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77631 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
754431107b61a0523df5271c2876a73dd5a051e9 |
31-Jul-2009 |
Anders Carlsson <andersca@mac.com> |
Diagnose unused expression results for all statements, just not compound statements. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77631 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
5cdcf5734e977be5c34a230c0f9fbbb4147e9c20 |
31-Jul-2009 |
Anders Carlsson <andersca@mac.com> |
Factor code out into a DiagnoseUnusedExprResult function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77628 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaStmt.cpp
|
636463e4c43be15e2f0fd0b8a08667f3066d8af7 |
31-Jul-2009 |
Anders Carlsson <andersca@mac.com> |
Factor code out into a DiagnoseUnusedExprResult function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77628 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaStmt.cpp
|
c1d2525e009cb58144207a6bae05f4a15e6d4173 |
30-Jul-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
What luck! Clang obtains support for refering to members of the current instantiation when that current instantiation is a class template partial specialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77609 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
|
c5b8c9b6607de7ce25a28f26a34f43efa5728cb7 |
30-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
What luck! Clang obtains support for refering to members of the current instantiation when that current instantiation is a class template partial specialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77609 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
|
1930d2011783c0355a37ef2aa5d9e27ad4784f42 |
30-Jul-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Support out-of-line definitions of the members of class template partial specializations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77606 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
emaTemplate.cpp
|
b88e888404ad0a2bdd9bfae457e8530bb38a87c5 |
30-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
Support out-of-line definitions of the members of class template partial specializations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77606 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
emaTemplate.cpp
|
52900801654a2f4b76179dc061cca465d8f03757 |
30-Jul-2009 |
Ryan Flynn <pizza@parseerror.com> |
PR3679 - handle #pragma weak git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77573 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
emaDeclAttr.cpp
|
e25ff83fb7eee9eeda89b6f2371bc33a37bf1028 |
30-Jul-2009 |
Ryan Flynn <pizza@parseerror.com> |
PR3679 - handle #pragma weak git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77573 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
emaDeclAttr.cpp
|
d00cd9ec368acf3e615d55f659eca4639044ba7d |
29-Jul-2009 |
Ted Kremenek <kremenek@apple.com> |
Change uses of: Type::getAsReferenceType() -> Type::getAs<ReferenceType>() Type::getAsRecordType() -> Type::getAs<RecordType>() Type::getAsPointerType() -> Type::getAs<PointerType>() Type::getAsBlockPointerType() -> Type::getAs<BlockPointerType>() Type::getAsLValueReferenceType() -> Type::getAs<LValueReferenceType>() Type::getAsRValueReferenceType() -> Type::getAs<RValueReferenceType>() Type::getAsMemberPointerType() -> Type::getAs<MemberPointerType>() Type::getAsReferenceType() -> Type::getAs<ReferenceType>() Type::getAsTagType() -> Type::getAs<TagType>() And remove Type::getAsReferenceType(), etc. This change is similar to one I made a couple weeks ago, but that was partly reverted pending some additional design discussion. With Doug's pending smart pointer changes for Types, it seemed natural to take this approach. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77510 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaCXXScopeSpec.cpp
emaChecking.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInherit.cpp
emaInit.cpp
emaLookup.cpp
emaOverload.cpp
emaStmt.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaType.cpp
|
6217b80b7a1379b74cced1c076338262c3c980b3 |
29-Jul-2009 |
Ted Kremenek <kremenek@apple.com> |
Change uses of: Type::getAsReferenceType() -> Type::getAs<ReferenceType>() Type::getAsRecordType() -> Type::getAs<RecordType>() Type::getAsPointerType() -> Type::getAs<PointerType>() Type::getAsBlockPointerType() -> Type::getAs<BlockPointerType>() Type::getAsLValueReferenceType() -> Type::getAs<LValueReferenceType>() Type::getAsRValueReferenceType() -> Type::getAs<RValueReferenceType>() Type::getAsMemberPointerType() -> Type::getAs<MemberPointerType>() Type::getAsReferenceType() -> Type::getAs<ReferenceType>() Type::getAsTagType() -> Type::getAs<TagType>() And remove Type::getAsReferenceType(), etc. This change is similar to one I made a couple weeks ago, but that was partly reverted pending some additional design discussion. With Doug's pending smart pointer changes for Types, it seemed natural to take this approach. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77510 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXCast.cpp
emaCXXScopeSpec.cpp
emaChecking.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInherit.cpp
emaInit.cpp
emaLookup.cpp
emaOverload.cpp
emaStmt.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaType.cpp
|
3ae1c807337467cb2e324c7f00397401e6bc7b9a |
29-Jul-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Some refactoring of member access for performace sake. Also added a test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77502 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
96e2fa97ea929f69778c66dd42e426330d893e7a |
29-Jul-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Some refactoring of member access for performace sake. Also added a test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77502 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
724478c70126b02ce3c496156ee6dca4574e37e4 |
29-Jul-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Refactor base/member initializers, and construct them correctly in cases with dependent types. Fixes PR4621 and PR4627. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77498 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
59c04373c6a4fef5c6341a21ac847d4b3a25ee36 |
29-Jul-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Refactor base/member initializers, and construct them correctly in cases with dependent types. Fixes PR4621 and PR4627. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77498 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
843336e4929e88ee04238d9324ace2a70eac031d |
29-Jul-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Check accessibility when converting object to the base class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77497 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
f3e53d35d0ed1a156baf7ccfec65e6a38648c632 |
29-Jul-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Check accessibility when converting object to the base class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77497 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
80b859e5ee1a3ad9576403ca1324a6b63fb74281 |
29-Jul-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to provide cast of objects in member access excpression, if needed, and remove some ir-gen code now unnencessary. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77490 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
98a541e80848d3b7d1131237ac04e698faffd151 |
29-Jul-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to provide cast of objects in member access excpression, if needed, and remove some ir-gen code now unnencessary. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77490 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
6631cb4e3387064a019f6d677356298a8f7b08b9 |
29-Jul-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
[llvm up] A template name can refer to a set of overloaded function templates. Model this in TemplateName, which can now refer to an OverloadedFunctionDecl that contains function templates. This removes an unspeakable hack in Sema::isTemplateName. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77488 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaLookup.cpp
emaTemplate.cpp
emaTemplateInstantiateExpr.cpp
|
d99cbe66403ee39c2ee58024b9582b95649a4fc5 |
29-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
[llvm up] A template name can refer to a set of overloaded function templates. Model this in TemplateName, which can now refer to an OverloadedFunctionDecl that contains function templates. This removes an unspeakable hack in Sema::isTemplateName. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77488 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaLookup.cpp
emaTemplate.cpp
emaTemplateInstantiateExpr.cpp
|
07c6c9a52871a5ec52caae374b40465ef5581d3c |
29-Jul-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Check for identical types in C++ catch expression. Patch by Erik Verbruggen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77475 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
c447aba04527a71d254b151f79f444d1cbe83ce9 |
29-Jul-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Check for identical types in C++ catch expression. Patch by Erik Verbruggen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77475 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
d6ea07dc00eb9a39ddd25f1252d314548c0b11e6 |
29-Jul-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When lookup of an identifier preceding a '<' finds a set of overloaded functions, only return those overloaded functions that are actually function templates. Note that there is still a glaring problem with treating an OverloadedFunctionDecl as a TemplateName. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77472 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
f511e47039798ce08287dfafcc03c445eae2168b |
29-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
When lookup of an identifier preceding a '<' finds a set of overloaded functions, only return those overloaded functions that are actually function templates. Note that there is still a glaring problem with treating an OverloadedFunctionDecl as a TemplateName. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77472 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
4313e6dd67a4778ac72769289213220f22e12483 |
29-Jul-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Remove an obsolete kludge based on the previous, completely broken handling of function templates git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77464 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
1f27ac6a52075f9a717f649dd778270916864e0e |
29-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
Remove an obsolete kludge based on the previous, completely broken handling of function templates git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77464 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
99eef4a6d3632a78155e7639a9f91d10b33e8218 |
29-Jul-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Use the new statement/expression profiling code to unique dependent template arguments, as in template specialization types. This permits matching out-of-line definitions of members for class templates that involve non-type template parameters. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77462 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
828e226ab7ed08b3eb766549e9d3306432137460 |
29-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
Use the new statement/expression profiling code to unique dependent template arguments, as in template specialization types. This permits matching out-of-line definitions of members for class templates that involve non-type template parameters. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77462 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
4ace8ac11e0bcab6e62fb24d00bffd210a925de3 |
29-Jul-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/7100524> regression: "error: incompatible operand types ('void *' and 'NSString *')". Remove XFAIL from 'conditional-expr-4.m' test case (which would have caught this). Also tweaked several aspects of the test to jive with the current type checking. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77453 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
c715e78618eb69674be828b46dc52604dd3af271 |
29-Jul-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/7100524> regression: "error: incompatible operand types ('void *' and 'NSString *')". Remove XFAIL from 'conditional-expr-4.m' test case (which would have caught this). Also tweaked several aspects of the test to jive with the current type checking. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77453 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
bbe4f96aaf32fad56812cec2f536256a6554209f |
29-Jul-2009 |
Steve Naroff <snaroff@apple.com> |
Incorporate feedback from Chris (on r76979). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77452 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
99b10be143e3148b9499af4c0e9ebaf46757cfe6 |
29-Jul-2009 |
Steve Naroff <snaroff@apple.com> |
Incorporate feedback from Chris (on r76979). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77452 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
c358b629c382d3a34ecf7c977ff3e904458e0ff9 |
29-Jul-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Make functional-style casts emit correct messages, and fix a crash-on-invalid. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77451 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXCast.cpp
emaExpr.cpp
emaExprCXX.cpp
|
ef0cb8e62d090ad88a01ca9fa89e48d7416f0ac7 |
29-Jul-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Make functional-style casts emit correct messages, and fix a crash-on-invalid. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77451 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXCast.cpp
emaExpr.cpp
emaExprCXX.cpp
|
c7ef2b971cac163750e2ce51a461db3629949f55 |
29-Jul-2009 |
Daniel Dunbar <daniel@zuster.org> |
BlockScopeInfo::hasPrototype was uninitialized. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77421 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
1d2154c3590d21345d02e28f2916f7492c82bf54 |
29-Jul-2009 |
Daniel Dunbar <daniel@zuster.org> |
BlockScopeInfo::hasPrototype was uninitialized. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77421 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
06cac85d7ff58a3fb08f792f457471eddf2de02f |
29-Jul-2009 |
Mike Stump <mrs@apple.com> |
Some minor cleanups, thanks Chris. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77402 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f711c41dd9412a8182793259d355c4f6979ed5ed |
29-Jul-2009 |
Mike Stump <mrs@apple.com> |
Some minor cleanups, thanks Chris. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77402 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
6edde614a8ee027693598fd8a97d8c403a92b505 |
29-Jul-2009 |
Mike Stump <mrs@apple.com> |
Add support for -Wmissing-noreturn. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77391 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
4d9d51ae3b868268082f94d84d0dff4c0b1ad435 |
29-Jul-2009 |
Mike Stump <mrs@apple.com> |
Add support for -Wmissing-noreturn. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77391 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
4262bc9b6a07a78efce52344577130936d1f4296 |
29-Jul-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Refactor the code that produces a TemplateSpecializationType, so that canonicalization for dependent TemplateSpecializationTypes occurs within ASTContext::getTemplateSpecializationType. Also, move template argument canonicalization into ASTContext::getCanonicalTemplateArgument. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77388 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
1275ae098acda31fe0e434510c729fcfed0458a1 |
29-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
Refactor the code that produces a TemplateSpecializationType, so that canonicalization for dependent TemplateSpecializationTypes occurs within ASTContext::getTemplateSpecializationType. Also, move template argument canonicalization into ASTContext::getCanonicalTemplateArgument. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77388 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
8e288f43956d355114ad904c78cebc2b1183aeda |
29-Jul-2009 |
Mike Stump <mrs@apple.com> |
Add noreturn support for blocks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77377 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaExpr.cpp
|
5692586ae59be8d49edd7b45dd52c1ffa920ba5e |
29-Jul-2009 |
Mike Stump <mrs@apple.com> |
Add noreturn support for blocks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77377 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaExpr.cpp
|
fda7da669298c7428a1c963013d9a8c71cbedbc5 |
28-Jul-2009 |
John McCall <rjmccall@apple.com> |
Bounds checking for address spaces. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77303 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
efadb7768e7c7418185f5a4010ecd8b21ca9731b |
28-Jul-2009 |
John McCall <rjmccall@apple.com> |
Bounds checking for address spaces. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77303 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
ed2f9296431718d81ff66ebb5e677a07f870b87f |
28-Jul-2009 |
Mike Stump <mrs@apple.com> |
Make longjmp a real builtin. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77291 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
782fa308a765aeac2acb39c4e697c937ec21185b |
28-Jul-2009 |
Mike Stump <mrs@apple.com> |
Make longjmp a real builtin. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77291 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
065e8c860559b117e8a32181d1f2e15d8c249722 |
28-Jul-2009 |
John McCall <rjmccall@apple.com> |
Allow functions to be marked "implicit return zero" and so mark main(). Codegen by initializing the return value with its LLVM type's null value. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77288 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
0cfeb63f532973777f6fe75d3468c3acad4adfe3 |
28-Jul-2009 |
John McCall <rjmccall@apple.com> |
Allow functions to be marked "implicit return zero" and so mark main(). Codegen by initializing the return value with its LLVM type's null value. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77288 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
b81611bdd79f6b0a43e8f2cea48545074fb23164 |
28-Jul-2009 |
Mike Stump <mrs@apple.com> |
Make sure to move the comment with the code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77279 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
523a8fddefee7836d6317f6dc265acb4ee84a0d4 |
28-Jul-2009 |
Mike Stump <mrs@apple.com> |
Make sure to move the comment with the code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77279 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
68572bd05a5326201f80b62ddeac35a5b5717f5b |
27-Jul-2009 |
Mike Stump <mrs@apple.com> |
Add knowledge about _longjmp being noreturn. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77254 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
773db1d4b5974a1849d0214900f5006f98adea5b |
27-Jul-2009 |
Mike Stump <mrs@apple.com> |
Add knowledge about _longjmp being noreturn. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77254 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
5963a2d6180c750c357f48aa09bd58316ee011e2 |
27-Jul-2009 |
Mike Stump <mrs@apple.com> |
Add builtin knowledge about longjmp being noreturn. Add printing for the noreturn attribute. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77253 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
fd350b5b4ae557d6b74899b945e77508f33149a9 |
27-Jul-2009 |
Mike Stump <mrs@apple.com> |
Add builtin knowledge about longjmp being noreturn. Add printing for the noreturn attribute. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77253 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
67356ae8e55d11c4d3e69f3651d5cb923a36e517 |
27-Jul-2009 |
Mike Stump <mrs@apple.com> |
Add noreturn for exit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77237 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
0feecbb3165b06ff34663a8c233316aaf7f84ce1 |
27-Jul-2009 |
Mike Stump <mrs@apple.com> |
Add noreturn for exit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77237 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
b2082e1c1199d8499f7a75e914ffbcf60c6c1d1e |
27-Jul-2009 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Make ObjCImplDecl inherit from ObjCContainerDecl. ObjCContainerDecl now is the root class for objc decls that contain methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77235 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
aecae629269fae3bf484baf1d109e9a89d14eead |
27-Jul-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Make ObjCImplDecl inherit from ObjCContainerDecl. ObjCContainerDecl now is the root class for objc decls that contain methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77235 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
e50ea97a9f7fc04c0ade25df712a03dddd9457ac |
27-Jul-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When instantiating a variable without an initializer, call ActOnUninitializedDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77211 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
65b90055dd30cfb83d8344ff62ed428257431be4 |
27-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
When instantiating a variable without an initializer, call ActOnUninitializedDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77211 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
51301abc49f28c078a78e9745109d3848430b00d |
26-Jul-2009 |
Ryan Flynn <pizza@parseerror.com> |
PR3575 - warn on declared variable or function attributes after a definition, which are currently ignored. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77095 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
478fbc68b1873678edfb2a3c420749635db100e6 |
26-Jul-2009 |
Ryan Flynn <pizza@parseerror.com> |
PR3575 - warn on declared variable or function attributes after a definition, which are currently ignored. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77095 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
1bb806498909a43a7829edb21c42606335d69694 |
25-Jul-2009 |
Mike Stump <mrs@apple.com> |
Add noreturn as a type attribute, handle printing for them and handle calls to noreturn function pointers when CFG building. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77089 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaType.cpp
|
2455636163fdd18581d7fdae816433f886d88213 |
25-Jul-2009 |
Mike Stump <mrs@apple.com> |
Add noreturn as a type attribute, handle printing for them and handle calls to noreturn function pointers when CFG building. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77089 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaType.cpp
|
0e35d04dc95cc25f96f6ddf9436910f1c3b8e07c |
25-Jul-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implement C++ semantics for C-style and functional-style casts. This regresses Clang extension conversions, like vectors, but allows conversions via constructors and conversion operators. Add custom conversions to static_cast. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77076 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXCast.cpp
emaExpr.cpp
emaOverload.cpp
|
9cc11e70031365972424b43f439021d88096b146 |
25-Jul-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implement C++ semantics for C-style and functional-style casts. This regresses Clang extension conversions, like vectors, but allows conversions via constructors and conversion operators. Add custom conversions to static_cast. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77076 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXCast.cpp
emaExpr.cpp
emaOverload.cpp
|
43d2805a83b01e6938928a6da5184bc8da963b2d |
25-Jul-2009 |
John McCall <rjmccall@apple.com> |
Semantic checking for main(). Fix some invalid main() methods in the test suite that were nicely exposed by the new checks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77047 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
13591ed054d1b2d6d392151ba05cbc883e640648 |
25-Jul-2009 |
John McCall <rjmccall@apple.com> |
Semantic checking for main(). Fix some invalid main() methods in the test suite that were nicely exposed by the new checks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77047 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
181fe794b8945defefc63443b15fe99a15f0a28b |
24-Jul-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Template instantiation for static data members that are defined out-of-line. Note that this also fixes a bug that affects non-template code, where we were not treating out-of-line static data members are "file-scope" variables, and therefore not checking their initializers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77002 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
7caa6825f42a0f7e97d6fc06233133c42b218e46 |
24-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
Template instantiation for static data members that are defined out-of-line. Note that this also fixes a bug that affects non-template code, where we were not treating out-of-line static data members are "file-scope" variables, and therefore not checking their initializers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77002 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
4cbc09206c5b65ecc7dc08a9764cfb1a10d32172 |
24-Jul-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
More Sema check for constructor's member initializer along with type conversion to fix ir-gen crash. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77000 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
7252f5110de3163a465aa50a2114c1fef9e848e8 |
24-Jul-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
More Sema check for constructor's member initializer along with type conversion to fix ir-gen crash. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77000 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
deb9d85e00b08389071860d152d0ac50d84ab1ab |
24-Jul-2009 |
Mike Stump <mrs@apple.com> |
Fix 80-col violations, reflow a few comments and zap some extra whitespace at ends of lines. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76992 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
bf91650557d9afa08e3d311a9c0a10d73c62cbfc |
24-Jul-2009 |
Mike Stump <mrs@apple.com> |
Fix 80-col violations, reflow a few comments and zap some extra whitespace at ends of lines. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76992 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
29d293b79901491af6da2e2368ea8e506402e1fe |
24-Jul-2009 |
Steve Naroff <snaroff@apple.com> |
Allow front-end 'isa' access on object's of type 'id'. Enhance test case to cover 'isa' access on interface types (clang produces an error, GCC produces a warning). Still need back-end CodeGen for ObjCIsaExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76979 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaTemplateInstantiateExpr.cpp
|
f242b1b0c4e998911cb96b2ba7e27ab4a5abaed3 |
24-Jul-2009 |
Steve Naroff <snaroff@apple.com> |
Allow front-end 'isa' access on object's of type 'id'. Enhance test case to cover 'isa' access on interface types (clang produces an error, GCC produces a warning). Still need back-end CodeGen for ObjCIsaExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76979 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaTemplateInstantiateExpr.cpp
|
8092b6617920bae033ccc159221bebcdcb5e57d3 |
24-Jul-2009 |
John McCall <rjmccall@apple.com> |
Test commit: make a little stub routine for semantic checking of main(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76934 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
8c4859ad8a60388f09d641b88f9444ccc6c2f31b |
24-Jul-2009 |
John McCall <rjmccall@apple.com> |
Test commit: make a little stub routine for semantic checking of main(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76934 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
77740582868469e4de5437ae285f628d5bbfbcf0 |
24-Jul-2009 |
Mike Stump <mrs@apple.com> |
Implement new warning for functions declared 'noreturn' when they fall off the end. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76932 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
5f28a1edf6decac64ca12e51ca4a929d26fc21f2 |
24-Jul-2009 |
Mike Stump <mrs@apple.com> |
Implement new warning for functions declared 'noreturn' when they fall off the end. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76932 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
4af0523edc341c6e7bb4499c45ce45397f2dc979 |
24-Jul-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
This patch fixes the implementations of the __has_trivial_destructor and __has_trivial_constructor builtin pseudo-functions and additionally implements __has_trivial_copy and __has_trivial_assign, from John McCall! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76916 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
5e03f9ea8174ae588c5e69ec6b5ef4c68f8fd766 |
24-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
This patch fixes the implementations of the __has_trivial_destructor and __has_trivial_constructor builtin pseudo-functions and additionally implements __has_trivial_copy and __has_trivial_assign, from John McCall! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76916 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
7c1771cc1016fac539b364f350f0e33ce11aadb2 |
24-Jul-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Diagnose when base classes and members to be intialized with constructors don't have a matching constructor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76913 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
87595e46ccd61c9b7c08074c2c64b66b5c0fc694 |
24-Jul-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Diagnose when base classes and members to be intialized with constructors don't have a matching constructor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76913 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
beacf16579c946a7e20028c64477cb1710665b5c |
24-Jul-2009 |
Mike Stump <mrs@apple.com> |
Some cleanups suggested by Daniel. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76906 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
79a1411a4cc4d4efdbb90da6b4eb034371bcc2e8 |
24-Jul-2009 |
Mike Stump <mrs@apple.com> |
Some cleanups suggested by Daniel. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76906 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
95254bc9257d9bcb425c84bbb94a0b47d5e8ee0a |
23-Jul-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Clean up the ActOnTag action, so that there is only a single entry point that covers templates and non-templates. This should eliminate the flood of warnings I introduced yesterday. Removed the ActOnClassTemplate action, which is no longer used. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76881 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplate.cpp
|
bd1099efde211cbb63fce3feee4ebcc6bac58781 |
23-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
Clean up the ActOnTag action, so that there is only a single entry point that covers templates and non-templates. This should eliminate the flood of warnings I introduced yesterday. Removed the ActOnClassTemplate action, which is no longer used. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76881 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplate.cpp
|
65f181bbc69c4ce94b00690550d25e519dd0738d |
23-Jul-2009 |
Daniel Dunbar <daniel@zuster.org> |
Use llvm::BitVector instead of managing memory by hand. - As it happens, this also fixes a use-of-uninitialized memory that was causing non-deterministic test failures. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76857 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
1f15e768983a614e45c3ca01df1ddb3339e746dd |
23-Jul-2009 |
Daniel Dunbar <daniel@zuster.org> |
Use llvm::BitVector instead of managing memory by hand. - As it happens, this also fixes a use-of-uninitialized memory that was causing non-deterministic test failures. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76857 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
99eb86b296883b55bb49b7c56c7ffa50039b351c |
23-Jul-2009 |
Steve Naroff <snaroff@apple.com> |
Remove a bunch of FIXME's related to ObjC type checking. - Move Sema::ObjCQualifiedIdTypesAreCompatible(), Sema::QualifiedIdConformsQualifiedId(), and a couple helper functions to ASTContext. - Change ASTContext::canAssignObjCInterfaces() to use ASTContext:: ObjCQualifiedIdTypesAreCompatible(). - Tweak several test cases to accommodate the new/improved type checking. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76830 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
emaExpr.cpp
emaExprObjC.cpp
emaOverload.cpp
|
4084c306635b70f37029dca938444e6013f08684 |
23-Jul-2009 |
Steve Naroff <snaroff@apple.com> |
Remove a bunch of FIXME's related to ObjC type checking. - Move Sema::ObjCQualifiedIdTypesAreCompatible(), Sema::QualifiedIdConformsQualifiedId(), and a couple helper functions to ASTContext. - Change ASTContext::canAssignObjCInterfaces() to use ASTContext:: ObjCQualifiedIdTypesAreCompatible(). - Tweak several test cases to accommodate the new/improved type checking. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76830 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
emaExpr.cpp
emaExprObjC.cpp
emaOverload.cpp
|
898f5745d68202867f72ccbc9fb4156fc43d26a7 |
23-Jul-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Add constructor used to initialize base/member in CXXBaseOrMemberInitializer AST node. Needed by its clients to do the initialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76826 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
d7b27e1c17d40c72a1ccf8868315bf0c5271aa54 |
23-Jul-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Add constructor used to initialize base/member in CXXBaseOrMemberInitializer AST node. Needed by its clients to do the initialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76826 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
56f009a82076726082a5c7b4252606e8e757d8e6 |
23-Jul-2009 |
Mike Stump <mrs@apple.com> |
Fix case, apparently some people still build on case sensitive filesystems. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76824 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
10e975c9a31461b7b5c32725d749a7c6d9b88efa |
23-Jul-2009 |
Mike Stump <mrs@apple.com> |
Fix case, apparently some people still build on case sensitive filesystems. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76824 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
fa5209bec23edb26ae6c52f87b13418fed37224e |
23-Jul-2009 |
Mike Stump <mrs@apple.com> |
Add warning for falling off the end of a function that should return a value. This is on by default, and controlled by -Wreturn-type (-Wmost -Wall). I believe there should be very few false positives, though the most interesting case would be: int() { bar(); } when bar does: bar() { while (1) ; } Here, we assume functions return, unless they are marked with the noreturn attribute. I can envision a fixit note for functions that never return normally that don't have a noreturn attribute to add a noreturn attribute. If anyone spots other false positives, let me know! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76821 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
b1682c50d26e0f12130d35b7b9b77d40542c4540 |
23-Jul-2009 |
Mike Stump <mrs@apple.com> |
Add warning for falling off the end of a function that should return a value. This is on by default, and controlled by -Wreturn-type (-Wmost -Wall). I believe there should be very few false positives, though the most interesting case would be: int() { bar(); } when bar does: bar() { while (1) ; } Here, we assume functions return, unless they are marked with the noreturn attribute. I can envision a fixit note for functions that never return normally that don't have a noreturn attribute to add a noreturn attribute. If anyone spots other false positives, let me know! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76821 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
84a20812c8204f2210622729b8a41e53170baaad |
23-Jul-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement support for out-of-line definitions of the class members of class templates, e.g., template<typename T> struct Outer { struct Inner; }; template<typename T> struct Outer<T>::Inner { // ... }; Implementing this feature required some extensions to ActOnTag, which now takes a set of template parameter lists, and is the precursor to removing the ActOnClassTemplate function from the parser Action interface. The reason for this approach is simple: the parser cannot tell the difference between a class template definition and the definition of a member of a class template; both have template parameter lists, and semantic analysis determines what that template parameter list means. There is still some cleanup to do with ActOnTag and ActOnClassTemplate. This commit provides the basic functionality we need, however. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76820 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaDecl.cpp
emaTemplate.cpp
|
7cdbc5832084f45721693dfb1d93284c3e08efee |
23-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement support for out-of-line definitions of the class members of class templates, e.g., template<typename T> struct Outer { struct Inner; }; template<typename T> struct Outer<T>::Inner { // ... }; Implementing this feature required some extensions to ActOnTag, which now takes a set of template parameter lists, and is the precursor to removing the ActOnClassTemplate function from the parser Action interface. The reason for this approach is simple: the parser cannot tell the difference between a class template definition and the definition of a member of a class template; both have template parameter lists, and semantic analysis determines what that template parameter list means. There is still some cleanup to do with ActOnTag and ActOnClassTemplate. This commit provides the basic functionality we need, however. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76820 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaDecl.cpp
emaTemplate.cpp
|
94d3095c7ae6dec81d0c75f7bb4efcf8c0319232 |
23-Jul-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix test breakage. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76816 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
6016cb2d1e99960675e4c4bb97f6f4ecdff97818 |
23-Jul-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix test breakage. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76816 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
7934114fe85e688ac5ab96b7c8c23e34047dcbc5 |
23-Jul-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Slight code reorganization to allow instantiating post-inc/dec. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76807 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
de99a45c1295ec8e2eea20d35906178ff10722b5 |
23-Jul-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Slight code reorganization to allow instantiating post-inc/dec. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76807 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
78c665b4e776722b687ab69ca933901689e2275e |
23-Jul-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Calls to Sema::MatchTemplateParametersToScopeSpecifier should not depend on the order of evaluation of their arguments to be correct. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76804 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
27eeb5ef469a83b8b374ee29cd530ee8ab911fc1 |
23-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
Calls to Sema::MatchTemplateParametersToScopeSpecifier should not depend on the order of evaluation of their arguments to be correct. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76804 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
b931d6e9193ae7ef342fd197ac9430c89d14899d |
22-Jul-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix the problems with template argument deduction and array types for real. It turns out that we need to actually move all of the qualifiers up to the array type itself, then recanonicalize the deduced template argument type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76788 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
f290e0db835a619014538c41ed552696efc0e977 |
22-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
Fix the problems with template argument deduction and array types for real. It turns out that we need to actually move all of the qualifiers up to the array type itself, then recanonicalize the deduced template argument type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76788 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
f2fedc6aa0e3f74f3c53ff33cf432ba97258c94d |
22-Jul-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix some memory allocation/deallocation issues git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76783 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplate.cpp
|
2aef06d3447f048ac4c9c3d2c67d643523a74993 |
22-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
Fix some memory allocation/deallocation issues git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76783 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplate.cpp
|
6b9caf2d53b4fafbfd55be357e2b77bd3e2cad7f |
22-Jul-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Canonicalize the types produced by template argument deduction. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76777 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
b084a05b3546137c71bed3cdf469b85e56deac75 |
22-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
Canonicalize the types produced by template argument deduction. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76777 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
fdbc8a1f8b3289e99fb43f12a16ccbe9f1ab36a9 |
22-Jul-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve template argument deduction for array types, so that a parameter const T can be matched with, e.g., volatile int [5] git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76773 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
|
9e9fae4b8af47c15696da4ea3c30102e3a035179 |
22-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
Improve template argument deduction for array types, so that a parameter const T can be matched with, e.g., volatile int [5] git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76773 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
|
6eeaa783e8dafae28b0bf30d72fde8704d536f3e |
22-Jul-2009 |
Mike Stump <mrs@apple.com> |
Use isa instead of dyn_cast for conditionals. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76771 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
8e1fab243ab8023b7ee3899745386b3b3a4258f8 |
22-Jul-2009 |
Mike Stump <mrs@apple.com> |
Use isa instead of dyn_cast for conditionals. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76771 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
f73c851b2b05f4a5eabed6227179b49802ddc53c |
22-Jul-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
"This patch implements the restrictions on union members detailed in [class.union]p1", from John McCall! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76766 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
1f2023ab8b35e0f665eb6c0f11dd6d9b9bca12b8 |
22-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
"This patch implements the restrictions on union members detailed in [class.union]p1", from John McCall! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76766 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
1373b6f58b2d8e2c2d6865eae4a4bd06a71a001b |
22-Jul-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Allocate BaseOrMemberInitializers and CXXBaseSpecifier nodes via ASTContext. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76758 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplateInstantiate.cpp
|
71c6e714778740d98cd01252101d0aaf1efa1553 |
22-Jul-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Allocate BaseOrMemberInitializers and CXXBaseSpecifier nodes via ASTContext. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76758 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplateInstantiate.cpp
|
3f03d52d973c6e2fd267163d416d6b3b642a84fe |
22-Jul-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement parsing and semantic analysis for out-of-line definitions of static data members of class templates. We don't instantiate the definitions yet, however. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76756 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
dfe3f2d8ba49f03d01f42570e640d9a6755e6c08 |
22-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement parsing and semantic analysis for out-of-line definitions of static data members of class templates. We don't instantiate the definitions yet, however. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76756 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
27bc49f518604f310aca9ed21be0bee12bdc6237 |
22-Jul-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6770276> Support Class<Proto> syntax. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76741 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
emaType.cpp
|
470301bac9c8abfc6b451b3b669c6695a9fd1518 |
22-Jul-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6770276> Support Class<Proto> syntax. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76741 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
emaType.cpp
|
04d89cb922577a4f4363674b8999920d46eb69f1 |
22-Jul-2009 |
Mon P Wang <wangmp@apple.com> |
Preserve address space information through member accesses, e.g., __attribute__((address_space(1))) struct {int arr[ 3 ]; } *p1; ... = p1->arr[2]; // load from address space 1 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76717 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
c6a38a47bf3908ab2183d7946498138d8b07c886 |
22-Jul-2009 |
Mon P Wang <wangmp@apple.com> |
Preserve address space information through member accesses, e.g., __attribute__((address_space(1))) struct {int arr[ 3 ]; } *p1; ... = p1->arr[2]; // load from address space 1 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76717 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
acd015f11a0db84bd1b36ec72875369a9fc48483 |
22-Jul-2009 |
Mike Stump <mrs@apple.com> |
Remove an unneeded header. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76716 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
|
02857678061f80c9e97e0aa9cf23cd49429a7d09 |
22-Jul-2009 |
Mike Stump <mrs@apple.com> |
Remove an unneeded header. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76716 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
|
179bcef0720c75c9efdd617e74f53306fd36eab1 |
22-Jul-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Complain if we're entering the context of a dependent nested-name-specifier but cannot match that nested-name-specifier to a class template or class template partial specialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76704 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
|
7551c183e8d788b5254e9c6f8bd8d719cea47da8 |
22-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
Complain if we're entering the context of a dependent nested-name-specifier but cannot match that nested-name-specifier to a class template or class template partial specialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76704 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
|
b462c32207196f76f3b2eb0b6bcaa11fbb2f3397 |
22-Jul-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Basic parsing and semantic analysis for out-of-line definitions of the member functions of class templates, e.g., template<typename T> struct X { void f(T); }; template<typename T> X<T>::f(T) { /* ... */ } git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76692 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaDecl.cpp
emaTemplate.cpp
emaType.cpp
|
f59a56e180bf54528d7d1d5afa68fcc13300965a |
22-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
Basic parsing and semantic analysis for out-of-line definitions of the member functions of class templates, e.g., template<typename T> struct X { void f(T); }; template<typename T> X<T>::f(T) { /* ... */ } git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76692 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaDecl.cpp
emaTemplate.cpp
emaType.cpp
|
4e1272381cf2553bcc4394bc1690be1b954f6be6 |
22-Jul-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to accomodate Doug's comment on default destruction of base/members for each destructor AST. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76663 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
393612e6c7727f1fee50039254d9f434364cc0b2 |
22-Jul-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to accomodate Doug's comment on default destruction of base/members for each destructor AST. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76663 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
16a1ca708935b18c9afeea73c412d4a751605f87 |
21-Jul-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Misc fixes for -Wreorder: 1. Make it work correctly with anonymous unions. 2. Don't compute it if the warning isn't enabled. 3. Optimize the algorithm slightly to make it linear time in the case where we don't produce any warnings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76630 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
6347f420ee0b097c0e642dc6c51afee5f1b14235 |
21-Jul-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Misc fixes for -Wreorder: 1. Make it work correctly with anonymous unions. 2. Don't compute it if the warning isn't enabled. 3. Optimize the algorithm slightly to make it linear time in the case where we don't produce any warnings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76630 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
c495faafe8fdc1bae552bc53f9e16d547af9106d |
21-Jul-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Make Sema::ActOnCXXEnterDeclaratorScope robust against failures to compute the declaration context, as occurs with out-of-line class template member definitions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76622 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
|
3fdbed594f4cb238fe37cad2ec3fefa3b6f67125 |
21-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
Make Sema::ActOnCXXEnterDeclaratorScope robust against failures to compute the declaration context, as occurs with out-of-line class template member definitions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76622 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
|
48e539966b6ab97c12a5a39a4aff21d1bbf35feb |
21-Jul-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Diagnose when a destructor uses a unrelated class type as its name. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76577 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
c19f959d7fa5303f2fff5fa7a4968361cb7ef068 |
21-Jul-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Diagnose when a destructor uses a unrelated class type as its name. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76577 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
9060d0e1f3cf3feccdc9022a33b79b4063fe7cd4 |
21-Jul-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Add the location of the tag keyword into TagDecl. From Enea Zaffanella, with tweaks from Abramo Bagnara. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76576 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
741dd9a7e1d63e4e385b657e4ce11c5d96d44f72 |
21-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
Add the location of the tag keyword into TagDecl. From Enea Zaffanella, with tweaks from Abramo Bagnara. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76576 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
200968606a3c72e1e53efc2a8ebe48f1e1510706 |
21-Jul-2009 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Remove the ObjCCategoryImpls vector from Sema class. Use ObjCInterfaceDecl::getCategoryClassMethod() and ObjCInterfaceDecl::getCategoryInstanceMethod() for the same functionality. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76510 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
emaExpr.cpp
emaExprObjC.cpp
|
1cb35dd4840d21cec58648361180d5688446a9ca |
21-Jul-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Remove the ObjCCategoryImpls vector from Sema class. Use ObjCInterfaceDecl::getCategoryClassMethod() and ObjCInterfaceDecl::getCategoryInstanceMethod() for the same functionality. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76510 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
emaExpr.cpp
emaExprObjC.cpp
|
b1c4ee510f480e055f1350307508095833ece3ab |
21-Jul-2009 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Remove Sema::LookupObjCImplementation and replace it with just calling ObjCInterfaceDecl::getImplementation(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76509 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
emaExpr.cpp
emaExprObjC.cpp
emaLookup.cpp
|
87018775ed689d0a67357cf767747166044b3a27 |
21-Jul-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Remove Sema::LookupObjCImplementation and replace it with just calling ObjCInterfaceDecl::getImplementation(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76509 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
emaExpr.cpp
emaExprObjC.cpp
emaLookup.cpp
|
3a4d98341a3b016f6bf2559dde5f3d9d8bf5f358 |
21-Jul-2009 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
- Introduce ASTContext::getObjCImplementation() and ASTContext::setObjCImplementation() which use a DenseMap to associate an interface/category with its implementation (if one exists). - Introduce ObjCInterfaceDecl::get/setImplementation() and ObjCCategoryDecl::get/setImplementation() that use the above methods. - Add a compiler error for when a category is reimplemented. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76508 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
8a1d722f13df383600f36d77f842957c8adb5f1b |
21-Jul-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
- Introduce ASTContext::getObjCImplementation() and ASTContext::setObjCImplementation() which use a DenseMap to associate an interface/category with its implementation (if one exists). - Introduce ObjCInterfaceDecl::get/setImplementation() and ObjCCategoryDecl::get/setImplementation() that use the above methods. - Add a compiler error for when a category is reimplemented. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76508 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
34aa4529f7639e10d620a483f922cc0e3615d164 |
20-Jul-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When a field is variable-sized or is an array with a negative size, don't replace the type of the field with 'int', from Enea Zaffanella! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76454 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
ec820c6bc49aef01767b5810e765bba853909ef8 |
20-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
When a field is variable-sized or is an array with a negative size, don't replace the type of the field with 'int', from Enea Zaffanella! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76454 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
1dcc023ca7043b6951647492a40aad894ec25695 |
20-Jul-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve GCC compatibility by allowing static tentative definitions of incomplete type (with a warning), from Enea Zaffanella! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76451 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
ec8b59ffc30c65051070e6d6cbb8e4b419210d18 |
20-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
Improve GCC compatibility by allowing static tentative definitions of incomplete type (with a warning), from Enea Zaffanella! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76451 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
8194a544b410d6d49ca892e2c0139367d8ea16c5 |
20-Jul-2009 |
Steve Naroff <snaroff@apple.com> |
5 cleanups to ObjCObjectPointerType work: - Remove Sema::CheckPointeeTypesForAssignment(), a temporary API I added to ease migration to ObjCObjectPointerType. Convert Sema::CheckAssignmentConstraints() to no longer depend on the temporary API. - Sema::ConvertDeclSpecToType(): Replace a couple FIXME's with an important comment/example. - Sema::GetTypeForDeclarator(): Get the protocol's from the interface, NOT the declspec (to support the following C typedef idiom: "typedef C<P> T; T *obj"). - Sema::ObjCQualifiedIdTypesAreCompatible(): Removed some dead code. - ASTContext::getObjCEncodingForTypeImpl(): Some minor cleanups. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76443 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprObjC.cpp
emaType.cpp
|
67ef8eaea8a0a2073147a8d863f0e3f30d525802 |
20-Jul-2009 |
Steve Naroff <snaroff@apple.com> |
5 cleanups to ObjCObjectPointerType work: - Remove Sema::CheckPointeeTypesForAssignment(), a temporary API I added to ease migration to ObjCObjectPointerType. Convert Sema::CheckAssignmentConstraints() to no longer depend on the temporary API. - Sema::ConvertDeclSpecToType(): Replace a couple FIXME's with an important comment/example. - Sema::GetTypeForDeclarator(): Get the protocol's from the interface, NOT the declspec (to support the following C typedef idiom: "typedef C<P> T; T *obj"). - Sema::ObjCQualifiedIdTypesAreCompatible(): Removed some dead code. - ASTContext::getObjCEncodingForTypeImpl(): Some minor cleanups. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76443 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprObjC.cpp
emaType.cpp
|
f90b6d72a924303412b3099afcae6765034e732d |
19-Jul-2009 |
Chris Lattner <sabre@nondot.org> |
enhance the goto checker to reject jumps across __block variable definitions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76376 91177308-0d34-0410-b5e6-96231b3b80d8
umpDiagnostics.cpp
emaDecl.cpp
|
be6d259a375bbec49659d54a302c4758058f2eef |
19-Jul-2009 |
Chris Lattner <sabre@nondot.org> |
enhance the goto checker to reject jumps across __block variable definitions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76376 91177308-0d34-0410-b5e6-96231b3b80d8
umpDiagnostics.cpp
emaDecl.cpp
|
77763c58e3b7783c8e54671c2b696ecd81ed524f |
18-Jul-2009 |
Steve Naroff <snaroff@apple.com> |
Remove ObjCQualifiedInterfaceType:-) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76321 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaType.cpp
|
c15cb2af27514ecc879daba9aa01389c5203685d |
18-Jul-2009 |
Steve Naroff <snaroff@apple.com> |
Remove ObjCQualifiedInterfaceType:-) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76321 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaType.cpp
|
fee42117631d2e729085e7a23af72a95792f47aa |
18-Jul-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Rename file in preparation of properly implementing C-style casts in C++. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76318 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
emaCXXCast.cpp
emaNamedCast.cpp
|
6cbb28d645e466142c31c65d8e0db333df08f334 |
18-Jul-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Rename file in preparation of properly implementing C-style casts in C++. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76318 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
emaCXXCast.cpp
emaNamedCast.cpp
|
4479334b2709677b258e34f5d4451a30accc1f9f |
18-Jul-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Enhance testing of overriding exception specs for inaccessible base exceptions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76317 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaAccess.cpp
emaType.cpp
|
726212f41bac77dc7f3352bc7047615fa0cd9e58 |
18-Jul-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Enhance testing of overriding exception specs for inaccessible base exceptions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76317 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaAccess.cpp
emaType.cpp
|
3bb490403651e01b959b5c8cff619100d8f7ac9d |
18-Jul-2009 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Don't add a SourceLocation for 'self' if it does not actually appears in the source code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76295 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ecd1bae999a1d6196cd0882e96e637d23ce69b12 |
18-Jul-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Don't add a SourceLocation for 'self' if it does not actually appears in the source code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76295 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
17c7cab301f05a9e88924b00f5988eecdca2c12f |
18-Jul-2009 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Remove ASTContext::getCanonicalDecl() and use Decl::getCanonicalDecl in its place. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76274 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
97fbaa2a38804268a024f1a104b43fcf8b4411b0 |
18-Jul-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Remove ASTContext::getCanonicalDecl() and use Decl::getCanonicalDecl in its place. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76274 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
c5c807c17608381e6019f714fe594a49ee9cc955 |
18-Jul-2009 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Set ObjCMethodDecl's EndLoc to the '}' when it's a definition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76269 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
a2e85ada1dfef36201a31f6646bc4ea3bd76a89a |
18-Jul-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Set ObjCMethodDecl's EndLoc to the '}' when it's a definition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76269 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d9b39bfecbc4faec367c3b2b53b8a3c7f71bdc3b |
17-Jul-2009 |
Ted Kremenek <kremenek@apple.com> |
Per offline discussion with Steve Naroff, add back Type::getAsXXXType() methods until Doug Gregor's Type smart pointer code lands (or more discussion occurs). These methods just call the new Type::getAs<XXX> methods, so we still have reduced implementation redundancy. Having explicit getAsXXXType() methods makes it easier to set breakpoints in the debugger. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76193 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
emaChecking.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaInherit.cpp
emaInit.cpp
emaLookup.cpp
emaNamedCast.cpp
emaOverload.cpp
emaStmt.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaType.cpp
|
35366a67baa970c287c714c957cf78a4131cf60d |
17-Jul-2009 |
Ted Kremenek <kremenek@apple.com> |
Per offline discussion with Steve Naroff, add back Type::getAsXXXType() methods until Doug Gregor's Type smart pointer code lands (or more discussion occurs). These methods just call the new Type::getAs<XXX> methods, so we still have reduced implementation redundancy. Having explicit getAsXXXType() methods makes it easier to set breakpoints in the debugger. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76193 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
emaChecking.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaInherit.cpp
emaInit.cpp
emaLookup.cpp
emaNamedCast.cpp
emaOverload.cpp
emaStmt.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaType.cpp
|
60d5671481f35143349d08261af20f08facbde17 |
17-Jul-2009 |
Ted Kremenek <kremenek@apple.com> |
Replaced Type::getAsLValueReferenceType(), Type::getAsRValueReferenceType(), Type::getAsMemberPointerType(), Type::getAsTagType(), and Type::getAsRecordType() with their Type::getAs<XXX> equivalents. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76139 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInherit.cpp
emaInit.cpp
emaLookup.cpp
emaNamedCast.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaType.cpp
|
5cad1f74469d4d8b4fc51fe53a7837778aeb6107 |
17-Jul-2009 |
Ted Kremenek <kremenek@apple.com> |
Replaced Type::getAsLValueReferenceType(), Type::getAsRValueReferenceType(), Type::getAsMemberPointerType(), Type::getAsTagType(), and Type::getAsRecordType() with their Type::getAs<XXX> equivalents. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76139 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInherit.cpp
emaInit.cpp
emaLookup.cpp
emaNamedCast.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaType.cpp
|
6a6c0971f29d9fb7cb5e7318a4a493ed1331258c |
17-Jul-2009 |
Ted Kremenek <kremenek@apple.com> |
Replace Type::getAsReferenceType() with Type::getAs<ReferenceType>(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76132 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExpr.cpp
emaNamedCast.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaType.cpp
|
808825cd08704d1cccef605f8cd3ef83c93eac78 |
17-Jul-2009 |
Ted Kremenek <kremenek@apple.com> |
Replace Type::getAsReferenceType() with Type::getAs<ReferenceType>(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76132 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExpr.cpp
emaNamedCast.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaType.cpp
|
8886545060a247c91f62b674be86b14c5e45a0fa |
17-Jul-2009 |
Daniel Dunbar <daniel@zuster.org> |
Fix unused variable warnings (with -Asserts) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76112 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
bcbb8bd3326a86aa70b7df386ae3c86c9ad255c5 |
17-Jul-2009 |
Daniel Dunbar <daniel@zuster.org> |
Fix unused variable warnings (with -Asserts) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76112 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
f5de0a3cbaa216daf2ea7e42611bbd1ebad42fa7 |
16-Jul-2009 |
Ted Kremenek <kremenek@apple.com> |
Add member template 'Type::getAs<T>', which converts a Type* to a respective T*. This method is intended to eventually replace the individual Type::getAsXXXType<> methods. The motivation behind this change is twofold: 1) Reduce redundant implementations of Type::getAsXXXType() methods. Most of them are basically copy-and-paste. 2) By centralizing the implementation of the getAs<Type> logic we can more smoothly move over to Doug Gregor's proposed canonical type smart pointer scheme. Along with this patch: a) Removed 'Type::getAsPointerType()'; now clients use getAs<PointerType>. b) Removed 'Type::getAsBlockPointerTypE()'; now clients use getAs<BlockPointerType>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76098 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaLookup.cpp
emaNamedCast.cpp
emaOverload.cpp
emaStmt.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaType.cpp
|
1a1a6e2bd4c5aefd7fd643cf25915f9623a02e59 |
16-Jul-2009 |
Ted Kremenek <kremenek@apple.com> |
Add member template 'Type::getAs<T>', which converts a Type* to a respective T*. This method is intended to eventually replace the individual Type::getAsXXXType<> methods. The motivation behind this change is twofold: 1) Reduce redundant implementations of Type::getAsXXXType() methods. Most of them are basically copy-and-paste. 2) By centralizing the implementation of the getAs<Type> logic we can more smoothly move over to Doug Gregor's proposed canonical type smart pointer scheme. Along with this patch: a) Removed 'Type::getAsPointerType()'; now clients use getAs<PointerType>. b) Removed 'Type::getAsBlockPointerTypE()'; now clients use getAs<BlockPointerType>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76098 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaLookup.cpp
emaNamedCast.cpp
emaOverload.cpp
emaStmt.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaType.cpp
|
4738ac558b938797e70b22928e763ba513680984 |
16-Jul-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Diagnose ++/-- op on objc pointers in nonfragile abi, instead of crashing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76088 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
9f8a04f3ed589de0a2e9fec855177dc0f185bfa9 |
16-Jul-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Diagnose ++/-- op on objc pointers in nonfragile abi, instead of crashing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76088 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ad75bd277827709b7597fb94de498548bff4ee23 |
16-Jul-2009 |
Steve Naroff <snaroff@apple.com> |
Remove ASTContext::isObjCObjectPointerType(). Convert all clients to use the new predicate on Type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76076 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaOverload.cpp
emaStmt.cpp
|
f49545602089be5b1f744e04326b8a566f6d8773 |
16-Jul-2009 |
Steve Naroff <snaroff@apple.com> |
Remove ASTContext::isObjCObjectPointerType(). Convert all clients to use the new predicate on Type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76076 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaOverload.cpp
emaStmt.cpp
|
be36bb28e6e97f1ea660027648ff6a88aa4d1c1a |
16-Jul-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Generate error on declaration containing 'static' and '__attribute__((weak))' Patch by Ryan Flynn git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75879 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
f23ecd91bf0205b776dfab2c5231e895019a7400 |
16-Jul-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Generate error on declaration containing 'static' and '__attribute__((weak))' Patch by Ryan Flynn git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75879 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
4e74396a2df3f8b8b6f85451524d84e0adccda39 |
16-Jul-2009 |
Steve Naroff <snaroff@apple.com> |
Avoid crashing for the enclosed test case. This is fallout from the recent ObjCObjectPointerType rework. I'll work on fixing this tomorrow. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75870 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
c70e8d90d192af8f4e8caca4d20c85b843f7d699 |
16-Jul-2009 |
Steve Naroff <snaroff@apple.com> |
Avoid crashing for the enclosed test case. This is fallout from the recent ObjCObjectPointerType rework. I'll work on fixing this tomorrow. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75870 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
46eff7357fd9242e033dafc338c836cf27374c36 |
16-Jul-2009 |
Ted Kremenek <kremenek@apple.com> |
Handle some more fallout with the conversion of using PointerType for Objective-C pointers to using ObjCObjectPointerType. Now the checking for 'attribute ((nonnull))' in Sema doesn't emit an error when trying to apply that attribute to a parameter that is an Objective-C pointer (this is a regression). To prevent this regression from occuring in the future, the 'nonnull.c' test was moved to test/SemaObjC and renamed 'nonnull.m'. I also enhanced the tests to show that function calls involved a NULL Objective-C pointer constant does not trigger a warning. This is consistent with GCC, but should likely be fixed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75856 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
dbfe99ef39163fd3574332673ee175c2bb6ef3ca |
16-Jul-2009 |
Ted Kremenek <kremenek@apple.com> |
Handle some more fallout with the conversion of using PointerType for Objective-C pointers to using ObjCObjectPointerType. Now the checking for 'attribute ((nonnull))' in Sema doesn't emit an error when trying to apply that attribute to a parameter that is an Objective-C pointer (this is a regression). To prevent this regression from occuring in the future, the 'nonnull.c' test was moved to test/SemaObjC and renamed 'nonnull.m'. I also enhanced the tests to show that function calls involved a NULL Objective-C pointer constant does not trigger a warning. This is consistent with GCC, but should likely be fixed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75856 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
21e25e780b1a6a44bedef0dae4e89ebb982cacd1 |
16-Jul-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Added ASTs to destructor decl AST for default destruction of object's base/members. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75849 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
560de45ccbf21c5e4dbeef3fc49f932e499cc181 |
16-Jul-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Added ASTs to destructor decl AST for default destruction of object's base/members. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75849 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
6093e74141497b81adf3910d3fe17c0411ab2fac |
15-Jul-2009 |
Ted Kremenek <kremenek@apple.com> |
Lexically order files in CMakeLists.txt files. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75832 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
|
b3b73642bfb4417d6312725ad6cc8d73ae143aca |
15-Jul-2009 |
Ted Kremenek <kremenek@apple.com> |
Lexically order files in CMakeLists.txt files. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75832 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
|
7bffd37bd2642e9d1bf0d093e9c1a7b3467f3014 |
15-Jul-2009 |
Steve Naroff <snaroff@apple.com> |
Implement the ObjC pseudo built-in types as clang "BuiltinType's". I say pseudo built-in types, since Sema still injects a typedef for recognition (i.e. they aren't truly built-ins from a parser perspective). This removes the static data/methods on ObjCObjectPointerType while preserving the nice API (no need to fiddle with ASTContext:-). This patch also adds Type::isObjCBuiltinType(). This should be the last fairly large patch related to recrafting the ObjC type system. The follow-on patches should be fairly small. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75808 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaExpr.cpp
emaOverload.cpp
|
de2e22d33afec98324a66a358dfe0951b3c7259a |
15-Jul-2009 |
Steve Naroff <snaroff@apple.com> |
Implement the ObjC pseudo built-in types as clang "BuiltinType's". I say pseudo built-in types, since Sema still injects a typedef for recognition (i.e. they aren't truly built-ins from a parser perspective). This removes the static data/methods on ObjCObjectPointerType while preserving the nice API (no need to fiddle with ASTContext:-). This patch also adds Type::isObjCBuiltinType(). This should be the last fairly large patch related to recrafting the ObjC type system. The follow-on patches should be fairly small. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75808 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaExpr.cpp
emaOverload.cpp
|
79ae19a7c9421e17ba26ea9cbf5a7f4dcc015cde |
14-Jul-2009 |
Steve Naroff <snaroff@apple.com> |
Introduce Type::isAnyPointerType() and convert all clients (suggested by Chris). I don't love the name, however it simplifies the code and is a worthwhile change. If/when we come up with a better name, we can do a search/replace. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75650 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprCXX.cpp
|
58f9f2c884af6b72d036b746a016d8031d31cb7a |
14-Jul-2009 |
Steve Naroff <snaroff@apple.com> |
Introduce Type::isAnyPointerType() and convert all clients (suggested by Chris). I don't love the name, however it simplifies the code and is a worthwhile change. If/when we come up with a better name, we can do a search/replace. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75650 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprCXX.cpp
|
9294d19c99e38be44342f84051431c371ccd4983 |
14-Jul-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to build AST for ctor's initializer list according to semantics of order of construction [class.init]. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75649 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
d01c915dda27bb0045687f0a08bbcab1dd40e652 |
14-Jul-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to build AST for ctor's initializer list according to semantics of order of construction [class.init]. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75649 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
b79574e54f3e1b135b87511399ea63363654c2ad |
14-Jul-2009 |
Steve Naroff <snaroff@apple.com> |
Add a "TypeSpecStartLoc" to FieldDecl. Patch contributed by Enea Zaffanella. Note: One day, it might be useful to consider adding this info to DeclGroup (as the comments in FunctionDecl/VarDecl suggest). For now, I think this works fine. I considered moving this to ValueDecl (a common ancestor of FunctionDecl/VarDecl/FieldDecl), however this would add overhead to EnumConstantDecl (which would burn memory and isn't necessary). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75635 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplateInstantiateDecl.cpp
|
ea218b8e8f9ba82d1c76bcb7e86d121a5f65ebed |
14-Jul-2009 |
Steve Naroff <snaroff@apple.com> |
Add a "TypeSpecStartLoc" to FieldDecl. Patch contributed by Enea Zaffanella. Note: One day, it might be useful to consider adding this info to DeclGroup (as the comments in FunctionDecl/VarDecl suggest). For now, I think this works fine. I considered moving this to ValueDecl (a common ancestor of FunctionDecl/VarDecl/FieldDecl), however this would add overhead to EnumConstantDecl (which would burn memory and isn't necessary). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75635 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplateInstantiateDecl.cpp
|
2bcacb61cf94b71e5c87f29d517f8dc29fe3993e |
14-Jul-2009 |
Alisdair Meredith <public@alisdairm.net> |
Basic support for C++0x unicode types. Support for literals will follow in an incremental patch git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75622 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaType.cpp
|
f5c209d23b20ada4a9b6235db50317239cbf6ae1 |
14-Jul-2009 |
Alisdair Meredith <public@alisdairm.net> |
Basic support for C++0x unicode types. Support for literals will follow in an incremental patch git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75622 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaType.cpp
|
cca21b8ae5bb22ca9625ce96bdc858853bd57123 |
14-Jul-2009 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
For C++ overloaded operator calls, set the source location of the DeclRefExpr to the location of the operator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75600 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
812730911edee505015a1ee3b0bf48be7e838532 |
14-Jul-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
For C++ overloaded operator calls, set the source location of the DeclRefExpr to the location of the operator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75600 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
25cc0b9d0ddc1abe0342afb30c6934f9fa632265 |
14-Jul-2009 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Fixes for a couple of things: - Declaration context of ParmVarDecls (that we got from the Declarator) was not their containing function. - C++ out-of-line method definitions didn't get an access specifier. Both were exposed by a crash when emitting a C++ method to a PCH file (assert at Decl::CheckAccessDeclContext()). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75597 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
9bedef6ae106f94b2edd3ec19bd5927d390d4fa4 |
14-Jul-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Fixes for a couple of things: - Declaration context of ParmVarDecls (that we got from the Declarator) was not their containing function. - C++ out-of-line method definitions didn't get an access specifier. Both were exposed by a crash when emitting a C++ method to a PCH file (assert at Decl::CheckAccessDeclContext()). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75597 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
eb92564b8e5ab9eaadb835b0bf6aee735aa4f370 |
14-Jul-2009 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Pass the right brace SourceLocation from the Parser to the TagDecls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75591 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
07a5b282fbe719986df9ed05543081ea0ed94aa5 |
14-Jul-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Pass the right brace SourceLocation from the Parser to the TagDecls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75591 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
3fc227b36c38f51541b95ddfc05832e36e3c9c7a |
13-Jul-2009 |
Steve Naroff <snaroff@apple.com> |
Remove superfluous call to getAsPointerType()... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75509 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
9deaeca2c9cd28a73914e190aa609faf0da510d8 |
13-Jul-2009 |
Steve Naroff <snaroff@apple.com> |
Remove superfluous call to getAsPointerType()... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75509 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
18b3812a21e0a5ac09678f40ec5411176fe06bfe |
13-Jul-2009 |
Steve Naroff <snaroff@apple.com> |
Sema::CheckAdditionOperands(): Use Type::getPointeeType() and remove PTy and OPT variables. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75505 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
760e3c4bf4b1354688c854c91cc1e11a6e010f25 |
13-Jul-2009 |
Steve Naroff <snaroff@apple.com> |
Sema::CheckAdditionOperands(): Use Type::getPointeeType() and remove PTy and OPT variables. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75505 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
898111463b64a26d55af56474ad8cca1fdb76268 |
13-Jul-2009 |
Steve Naroff <snaroff@apple.com> |
- Improve comment for Type::getPointeeType(). - Remove a couple redundant casts/returns. - Fix 80 column violations for all getAsStringInternal() methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75485 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
f8910df57799256c1897a8610dc52685729ae90e |
13-Jul-2009 |
Steve Naroff <snaroff@apple.com> |
- Improve comment for Type::getPointeeType(). - Remove a couple redundant casts/returns. - Fix 80 column violations for all getAsStringInternal() methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75485 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
7982a648d05fabf2d5aa08341e8f9b348d0296b6 |
13-Jul-2009 |
Steve Naroff <snaroff@apple.com> |
Fix 5 issues from Chris's feedback on http://llvm.org/viewvc/llvm-project?view=rev&revision=75314. Still more to come...just wanted to get the no-brainers out of the way. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75477 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
emaExprObjC.cpp
|
430ee5a4fd20c02e59d6a0d720401a5f21e4e5c1 |
13-Jul-2009 |
Steve Naroff <snaroff@apple.com> |
Fix 5 issues from Chris's feedback on http://llvm.org/viewvc/llvm-project?view=rev&revision=75314. Still more to come...just wanted to get the no-brainers out of the way. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75477 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
emaExprObjC.cpp
|
68acecb4d2a3aa824de5551c16d9bdcecd854188 |
11-Jul-2009 |
Anders Carlsson <andersca@mac.com> |
Implement more of C++0x 'auto'. A variable with an auto type specifier must have an initializer. Also, move some tests around to match the C++0x draft better. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75322 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
6a75cd9c1d54625fca7b5477ab9545bcdbd85ea4 |
11-Jul-2009 |
Anders Carlsson <andersca@mac.com> |
Implement more of C++0x 'auto'. A variable with an auto type specifier must have an initializer. Also, move some tests around to match the C++0x draft better. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75322 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
ea33f7140caf2e87d2a2d87e2822f192fb678a67 |
11-Jul-2009 |
Ted Kremenek <kremenek@apple.com> |
Fix warning when compiling with optimizations: warning: ‘OPT’ may be used uninitialized in this function Now OPT is initialized to NULL. I'm not certain if this is the correct fix; others please review. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75321 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
496e89f8d55f7a931c246e820c10f7296a246ac2 |
11-Jul-2009 |
Ted Kremenek <kremenek@apple.com> |
Fix warning when compiling with optimizations: warning: ‘OPT’ may be used uninitialized in this function Now OPT is initialized to NULL. I'm not certain if this is the correct fix; others please review. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75321 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
af43d84b2be89c1ab098fc9eb325676ec0160b0c |
11-Jul-2009 |
Anders Carlsson <andersca@mac.com> |
Remove some unused code from an experiment that I didn't like. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75315 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
|
771d7c374327d8f55a77431d78eae7b89f16a499 |
11-Jul-2009 |
Anders Carlsson <andersca@mac.com> |
Remove some unused code from an experiment that I didn't like. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75315 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
|
329ec22704eee011640ebf37c29343e82fb984c6 |
11-Jul-2009 |
Steve Naroff <snaroff@apple.com> |
This patch includes a conceptually simple, but very intrusive/pervasive change. The idea is to segregate Objective-C "object" pointers from general C pointers (utilizing the recently added ObjCObjectPointerType). The fun starts in Sema::GetTypeForDeclarator(), where "SomeInterface *" is now represented by a single AST node (rather than a PointerType whose Pointee is an ObjCInterfaceType). Since a significant amount of code assumed ObjC object pointers where based on C pointers/structs, this patch is very tedious. It should also explain why it is hard to accomplish this in smaller, self-contained patches. This patch does most of the "heavy lifting" related to moving from PointerType->ObjCObjectPointerType. It doesn't include all potential "cleanups". The good news is additional cleanups can be done later (some are noted in the code). This patch is so large that I didn't want to include any changes that are purely aesthetic. By making the ObjC types truly built-in, they are much easier to work with (and require fewer "hacks"). For example, there is no need for ASTContext::isObjCIdStructType() or ASTContext::isObjCClassStructType()! We believe this change (and the follow-up cleanups) will pay dividends over time. Given the amount of code change, I do expect some fallout from this change (though it does pass all of the clang tests). If you notice any problems, please let us know asap! Thanks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75314 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
emaDeclAttr.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaOverload.cpp
emaType.cpp
|
14108da7f7fc059772711e4ffee1322a27b152a7 |
11-Jul-2009 |
Steve Naroff <snaroff@apple.com> |
This patch includes a conceptually simple, but very intrusive/pervasive change. The idea is to segregate Objective-C "object" pointers from general C pointers (utilizing the recently added ObjCObjectPointerType). The fun starts in Sema::GetTypeForDeclarator(), where "SomeInterface *" is now represented by a single AST node (rather than a PointerType whose Pointee is an ObjCInterfaceType). Since a significant amount of code assumed ObjC object pointers where based on C pointers/structs, this patch is very tedious. It should also explain why it is hard to accomplish this in smaller, self-contained patches. This patch does most of the "heavy lifting" related to moving from PointerType->ObjCObjectPointerType. It doesn't include all potential "cleanups". The good news is additional cleanups can be done later (some are noted in the code). This patch is so large that I didn't want to include any changes that are purely aesthetic. By making the ObjC types truly built-in, they are much easier to work with (and require fewer "hacks"). For example, there is no need for ASTContext::isObjCIdStructType() or ASTContext::isObjCClassStructType()! We believe this change (and the follow-up cleanups) will pay dividends over time. Given the amount of code change, I do expect some fallout from this change (though it does pass all of the clang tests). If you notice any problems, please let us know asap! Thanks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75314 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
emaDeclAttr.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaOverload.cpp
emaType.cpp
|
c1ce61b59d6d0c462133d0d375679bf822866e14 |
10-Jul-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to build list of inherited virtual base classes in their order of construction for each class and use it to to check on propery order of base class construction under -Wreorder option. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75270 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
40c072f44ff081293f79909ecc518af23938108e |
10-Jul-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to build list of inherited virtual base classes in their order of construction for each class and use it to to check on propery order of base class construction under -Wreorder option. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75270 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
4732543017ef10cfadaeffb3e677d6e09d326108 |
10-Jul-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
don't crash if class is using itself as its super class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75178 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
fdee089b11e0bb57aa2c7291dd5e4201c2f906ff |
10-Jul-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
don't crash if class is using itself as its super class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75178 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
cca8d8d5d553dabed70e2d11dd18ccfd33bb2703 |
09-Jul-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Sema check on out of order object initialization of class object's base and members under -Wreorder flag. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75168 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
eb96e1275206b888eee484aac8b1b693417c6521 |
09-Jul-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Sema check on out of order object initialization of class object's base and members under -Wreorder flag. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75168 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
1c0c52cb8019f7d0b4ba3e190593e24a5bc60533 |
09-Jul-2009 |
Anders Carlsson <andersca@mac.com> |
Use getDeclName in DefineImplicitOverloadedAssign as well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75152 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
5e09d4c96dc2846cc1fc75f80f5632612247354b |
09-Jul-2009 |
Anders Carlsson <andersca@mac.com> |
Use getDeclName in DefineImplicitOverloadedAssign as well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75152 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
6a661267340baa628e2bf57067ca9db162dbf037 |
09-Jul-2009 |
Anders Carlsson <andersca@mac.com> |
Pass the DeclName to the diagnostic builder so that member names will be quoted correctly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75150 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
5eda81624ff3b9f617fa377f43d89f36741460a7 |
09-Jul-2009 |
Anders Carlsson <andersca@mac.com> |
Pass the DeclName to the diagnostic builder so that member names will be quoted correctly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75150 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
72bb499fdc806fd6ac68265ed9420793ce7f2193 |
09-Jul-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Add test for C++ [over.over.]p1, the contexts in which one can take the address of an overloaded function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75146 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
72e771f12a97700e578b28f953622a6b6916bef1 |
09-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
Add test for C++ [over.over.]p1, the contexts in which one can take the address of an overloaded function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75146 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
4e8d569581255e2749e578cf357dc58630ce4ebc |
09-Jul-2009 |
Anders Carlsson <andersca@mac.com> |
Store the isAddressOfOperand in the UnresolvedDeclRefExpr, so that we can pass it when instantiating the expr. Fixes another member pointer bug. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75075 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaTemplateInstantiateExpr.cpp
|
9b31df4acdeeb61bb084a03fc37bc5bd570a659e |
09-Jul-2009 |
Anders Carlsson <andersca@mac.com> |
Store the isAddressOfOperand in the UnresolvedDeclRefExpr, so that we can pass it when instantiating the expr. Fixes another member pointer bug. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75075 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaTemplateInstantiateExpr.cpp
|
a142a05732cac5218bd4f1a53880abce9a66bbea |
09-Jul-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement the simple form of overload resolution used when taking the address of an overloaded function (which may involve both functions and function templates). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75069 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
00aeb52314ec0b1902bb15aef9c62259296fbc29 |
09-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement the simple form of overload resolution used when taking the address of an overloaded function (which may involve both functions and function templates). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75069 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
6437147bf6c28b9b08130662c6380b9a654cbd28 |
08-Jul-2009 |
Anders Carlsson <andersca@mac.com> |
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75054 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
f9e48bdea6e56404deb0776bf2d0eddedb77dce3 |
08-Jul-2009 |
Anders Carlsson <andersca@mac.com> |
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75054 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
62f78762eb92e9d4abb045d76923c7ff09ab025d |
08-Jul-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75044 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaOverload.cpp
emaTemplateDeduction.cpp
|
83314aa1cf61ed2458a8a20c83b2d4708192d5dc |
08-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75044 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaOverload.cpp
emaTemplateDeduction.cpp
|
6e2641067adfb98bab5adceeccd380bb5be36c27 |
08-Jul-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix a corner case with argument-dependent lookup and overloaded function sets. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74999 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
daa439a6c47d3299157b94a496bf22389bbc77a3 |
08-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
Fix a corner case with argument-dependent lookup and overloaded function sets. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74999 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
a850d3cb67c159c35c213632fdc9b0ba458e91a2 |
08-Jul-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve argument-dependent lookup to find associated classes and namespaces based on the template arguments of a class template specialization type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74993 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
69be8d60ded8bbfbd30facf0590c97920a074f46 |
08-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
Improve argument-dependent lookup to find associated classes and namespaces based on the template arguments of a class template specialization type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74993 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
614e8f099b8334e2307d26d45cb066f01c4fd71b |
08-Jul-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Implemented memmove_collectable API for Next runtime when struct variables with GC'able members are copied into. Will provide a test case later. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74984 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
082b02e8403d3ee9d2ded969fbe0e5d472f04cd8 |
08-Jul-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Implemented memmove_collectable API for Next runtime when struct variables with GC'able members are copied into. Will provide a test case later. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74984 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
08ac85229da1bee4d43445bdb8ffd655995da52b |
08-Jul-2009 |
Chris Lattner <sabre@nondot.org> |
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74983 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
9c10fcfc3b9d2076efe701b60644a9987a93c503 |
08-Jul-2009 |
Chris Lattner <sabre@nondot.org> |
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74983 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
8aef85a5f111a3e19001e6b2b1ab6c790c1dc807 |
08-Jul-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Overload resolution prefers non-templates to templates git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74971 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
3e15cc318e9cd577eda56c0294f32535738d8630 |
08-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
Overload resolution prefers non-templates to templates git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74971 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
76f46073797c9903412b6b9a5cb773e047c39f8d |
08-Jul-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Template argument deduction from a call has improved a bit git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74966 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
8fdc3c49e3c8178222a35b16426dc5a08a0efb6d |
08-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
Template argument deduction from a call has improved a bit git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74966 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
597afb4d747c0e6cb02c7f0fd6b86f60b5055c42 |
08-Jul-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74965 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateDeduction.cpp
|
de0cb8b6c15c756e14b0716bebd40f4ce48ee717 |
08-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74965 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateDeduction.cpp
|
48fd8c9c6389ee452af6545095d5562fe876606f |
07-Jul-2009 |
Nate Begeman <natebegeman@mac.com> |
Extra vector element initializers in OpenCL is an error, not a warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74951 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
0863452c21e3e6da5b2613fd455495486c1ad5df |
07-Jul-2009 |
Nate Begeman <natebegeman@mac.com> |
Extra vector element initializers in OpenCL is an error, not a warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74951 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
953d12aabb8cb25f0713a0913c837d2fdf8996b2 |
07-Jul-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implement checking of exception spec compatibility for overriding virtual functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74943 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaType.cpp
|
23c7d061367dd2fc1631e867cffc3d6aae24e799 |
07-Jul-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implement checking of exception spec compatibility for overriding virtual functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74943 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaType.cpp
|
1b749a01660141c6af12b074f50556c2fed91ffe |
07-Jul-2009 |
Anders Carlsson <andersca@mac.com> |
Some (most) type trait expressions require that the argument passed in is a complete type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74937 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
3292d5ce510061ea50152f53b7ab462b622176f4 |
07-Jul-2009 |
Anders Carlsson <andersca@mac.com> |
Some (most) type trait expressions require that the argument passed in is a complete type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74937 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
b35984aff913a4209df6fe036f499e87be9f42c2 |
07-Jul-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Diagnose, and not crash, when taking address of property expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74935 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
0337f21c78bdadff64bc6ae40eb9962d947e5bb0 |
07-Jul-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Diagnose, and not crash, when taking address of property expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74935 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
dd38cc698d2128812c282fd0b6f9bfdfc337ded3 |
07-Jul-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Tighten up the conditions under which we build an implicit function declaration for a builtin. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74917 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
6bec78d58b2fa73939c9cc16543c14433f004d5a |
07-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
Tighten up the conditions under which we build an implicit function declaration for a builtin. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74917 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
151fac73d9d9dd2f14606c124f54abbce2e19144 |
07-Jul-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74911 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
c29f77b769bcc5b6dc85e72c8e3cc2e348e5cf25 |
07-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74911 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
4da4738a49dfd5f434ce2b37bc9cc97efcfcba85 |
06-Jul-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix a problem with false diagnostics when comparing distinct NULL pointer types, from David Majnemer git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74850 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
f93343764765b24f53e389c7dd35f90901925451 |
06-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
Fix a problem with false diagnostics when comparing distinct NULL pointer types, from David Majnemer git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74850 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
1d381135f0c9dcbac521112b3f6936caf871b91a |
06-Jul-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Keep track of the Expr used to describe the size of an array type, from Enea Zaffanella! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74831 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
emaInit.cpp
emaTemplateInstantiate.cpp
emaType.cpp
|
7e7eb3da052a6d80ddf2377cab0384c798f73f75 |
06-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
Keep track of the Expr used to describe the size of an array type, from Enea Zaffanella! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74831 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
emaInit.cpp
emaTemplateInstantiate.cpp
emaType.cpp
|
5e1e0a089240eb47560dc0785e53e2dcf4ec82fa |
04-Jul-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Catch function redeclarations with incompatible exception specifications. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74787 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaType.cpp
|
4994d2d50ceacdc8908f750c55589c0a20942a0a |
04-Jul-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Catch function redeclarations with incompatible exception specifications. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74787 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaType.cpp
|
9cd0a3c6b68570a1c2788c5fec0ef4371fb48d81 |
02-Jul-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to allocate list of bases in CXXRecordDecl using ASTContxt allocation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74717 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
5ffcd7b1ba8bfcb253f0a0bdf7c94c4d0270a4ab |
02-Jul-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to allocate list of bases in CXXRecordDecl using ASTContxt allocation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74717 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
a252b23fb4318b2bf84fa86bd9c55fd15a85b588 |
02-Jul-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Add support for retrieving the Doxygen comment associated with a given declaration in the AST. The new ASTContext::getCommentForDecl function searches for a comment that is attached to the given declaration, and returns that comment, which may be composed of several comment blocks. Comments are always available in an AST. However, to avoid harming performance, we don't actually parse the comments. Rather, we keep the source ranges of all of the comments within a large, sorted vector, then lazily extract comments via a binary search in that vector only when needed (which never occurs in a "normal" compile). Comments are written to a precompiled header/AST file as a blob of source ranges. That blob is only lazily loaded when one requests a comment for a declaration (this never occurs in a "normal" compile). The indexer testbed now supports comment extraction. When the -point-at location points to a declaration with a Doxygen-style comment, the indexer testbed prints the associated comment block(s). See test/Index/comments.c for an example. Some notes: - We don't actually attempt to parse the comment blocks themselves, beyond identifying them as Doxygen comment blocks to associate them with a declaration. - We won't find comment blocks that aren't adjacent to the declaration, because we start our search based on the location of the declaration. - We don't go through the necessary hops to find, for example, whether some redeclaration of a declaration has comments when our current declaration does not. Similarly, we don't attempt to associate a \param Foo marker in a function body comment with the parameter named Foo (although that is certainly possible). - Verification of my "no performance impact" claims is still "to be done". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74704 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
|
2e22253e03e175144aeb9d13350a12fd83f858be |
02-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
Add support for retrieving the Doxygen comment associated with a given declaration in the AST. The new ASTContext::getCommentForDecl function searches for a comment that is attached to the given declaration, and returns that comment, which may be composed of several comment blocks. Comments are always available in an AST. However, to avoid harming performance, we don't actually parse the comments. Rather, we keep the source ranges of all of the comments within a large, sorted vector, then lazily extract comments via a binary search in that vector only when needed (which never occurs in a "normal" compile). Comments are written to a precompiled header/AST file as a blob of source ranges. That blob is only lazily loaded when one requests a comment for a declaration (this never occurs in a "normal" compile). The indexer testbed now supports comment extraction. When the -point-at location points to a declaration with a Doxygen-style comment, the indexer testbed prints the associated comment block(s). See test/Index/comments.c for an example. Some notes: - We don't actually attempt to parse the comment blocks themselves, beyond identifying them as Doxygen comment blocks to associate them with a declaration. - We won't find comment blocks that aren't adjacent to the declaration, because we start our search based on the location of the declaration. - We don't go through the necessary hops to find, for example, whether some redeclaration of a declaration has comments when our current declaration does not. Similarly, we don't attempt to associate a \param Foo marker in a function body comment with the parameter named Foo (although that is certainly possible). - Verification of my "no performance impact" claims is still "to be done". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74704 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
|
bb70eb307c83d870333b8d6567cc7df61b4dcbc1 |
02-Jul-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Use Destroy for member initializer list clean up. Per Doug's comments. Doug please review. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74666 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
73b85f3d7ccdff37bab7adafc6b06dfd03740058 |
02-Jul-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Use Destroy for member initializer list clean up. Per Doug's comments. Doug please review. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74666 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
4c8b2b33016f55eda96d69f638c93b3dc7e5a9f4 |
02-Jul-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Keep track of more information within the template instantiation stack, e.g., by distinguishing between substitution that occurs for template argument deduction vs. explicitly-specifiad template arguments. This is used both to improve diagnostics and to make sure we only provide SFINAE in those cases where SFINAE should apply. In addition, deal with the sticky issue where SFINAE only considers substitution of template arguments into the *type* of a function template; we need to issue hard errors beyond this point, as test/SemaTemplate/operator-template.cpp illustrates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74651 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
cca9e9674a5e50a283185d8e9d8a5c3414eb008e |
02-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
Keep track of more information within the template instantiation stack, e.g., by distinguishing between substitution that occurs for template argument deduction vs. explicitly-specifiad template arguments. This is used both to improve diagnostics and to make sure we only provide SFINAE in those cases where SFINAE should apply. In addition, deal with the sticky issue where SFINAE only considers substitution of template arguments into the *type* of a function template; we need to issue hard errors beyond this point, as test/SemaTemplate/operator-template.cpp illustrates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74651 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
2b2b736550746280d96b8c49a0462c7b7b6c1408 |
01-Jul-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to implement template types in ctor-initializer list. Also has fix for bugzilla-4469. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74631 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
961743326fd18776f897bf4461345dba680ef637 |
01-Jul-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to implement template types in ctor-initializer list. Also has fix for bugzilla-4469. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74631 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
5ca84bccd83982d3941d68dd88139ca43f6322a0 |
01-Jul-2009 |
Steve Naroff <snaroff@apple.com> |
Rework Sema::CheckConditionalOperands(). No functionality change. This was necessary to simplify some other changes I'm making (wrt ObjC type cleanups). The idea is to separate the constraint checks for block pointers, ObjC pointers, and C pointers (the previous code combined them into one clause). Note: This routine will be further simplified when I integrate the ObjC type cleanups (forthcoming). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74604 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
7154a77e7c1f23418342d3b72836ab504aa7821e |
01-Jul-2009 |
Steve Naroff <snaroff@apple.com> |
Rework Sema::CheckConditionalOperands(). No functionality change. This was necessary to simplify some other changes I'm making (wrt ObjC type cleanups). The idea is to separate the constraint checks for block pointers, ObjC pointers, and C pointers (the previous code combined them into one clause). Note: This routine will be further simplified when I integrate the ObjC type cleanups (forthcoming). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74604 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ecd63b87e626bbf6b47d9eb828553d5857fb85ee |
01-Jul-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Cope with explicitly-specified function template arguments when there are fewer template arguments than there are template parameters for that function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74578 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateExpr.cpp
|
16134c62ef3d146e0dd0c76aafb906ff12c0a15d |
01-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
Cope with explicitly-specified function template arguments when there are fewer template arguments than there are template parameters for that function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74578 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateExpr.cpp
|
c9a03b7ff075d6bf757baa2895b124001a670c85 |
01-Jul-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When explicit template arguments are provided for a function call, substitute those template arguments into the function parameter types prior to template argument deduction. There's still a bit of work to do to make this work properly when only some of the template arguments are specified. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74576 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaOverload.cpp
emaTemplateDeduction.cpp
|
6db8ed4498b83fe9336e3855a4ba1a298b04ee00 |
01-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
When explicit template arguments are provided for a function call, substitute those template arguments into the function parameter types prior to template argument deduction. There's still a bit of work to do to make this work properly when only some of the template arguments are specified. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74576 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaOverload.cpp
emaTemplateDeduction.cpp
|
c37d3069b7b0968fad902995dc368400d983fa90 |
01-Jul-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to support optional nested-name-specifier in in ctor-initializer list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74571 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
bcfad54a43e5570e09daddd976bd4545933e75b1 |
01-Jul-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to support optional nested-name-specifier in in ctor-initializer list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74571 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
2885775090f6b4b011ce8b1cb6045e3b2202e9a1 |
01-Jul-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Preliminary parsing and ASTs for template-ids that refer to function templates, such as make<int&>. These template-ids are only barely functional for function calls; much more to come. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74563 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaTemplate.cpp
emaTemplateInstantiateExpr.cpp
|
edce4dd44732dfad69f28822dddcf2b8e92b4483 |
01-Jul-2009 |
Douglas Gregor <dgregor@apple.com> |
Preliminary parsing and ASTs for template-ids that refer to function templates, such as make<int&>. These template-ids are only barely functional for function calls; much more to come. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74563 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaTemplate.cpp
emaTemplateInstantiateExpr.cpp
|
f75b9d562f780d842ffb99ca79647629a166c123 |
30-Jun-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Diagnose multiple initialization of anonymous union fields in the ctor-initializer list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74554 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
5ac3dfc24bd2d8c5c0d9955f5de33c97e6aaaadf |
30-Jun-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Diagnose multiple initialization of anonymous union fields in the ctor-initializer list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74554 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
c13953a7594505b86f57434d0a1a1db14e0c0a18 |
30-Jun-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
More diagnostics related to initialization of direct bases in ctor-initializer list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74541 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
9da7201adeab345fc7da72bcfcf30e11774fb8c4 |
30-Jun-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
More diagnostics related to initialization of direct bases in ctor-initializer list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74541 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
dcdb384966f3fb866e691a1d4c1f563f9947b7aa |
30-Jun-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When recursively instantiating function templates, keep track of the instantiation stack so that we provide a full instantiation backtrace. Previously, we performed all of the instantiations implied by the recursion, but each looked like a "top-level" instantiation. The included test case tests the previous fix for the instantiation of DeclRefExprs. Note that the "instantiated from" diagnostics still don't tell us which template arguments we're instantiating with. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74540 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaTemplateInstantiateDecl.cpp
|
b33fe2ff12676bff9db595fdf77e29014d7ba397 |
30-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
When recursively instantiating function templates, keep track of the instantiation stack so that we provide a full instantiation backtrace. Previously, we performed all of the instantiations implied by the recursion, but each looked like a "top-level" instantiation. The included test case tests the previous fix for the instantiation of DeclRefExprs. Note that the "instantiated from" diagnostics still don't tell us which template arguments we're instantiating with. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74540 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaTemplateInstantiateDecl.cpp
|
b394bd3e238fb834ef006adff7dac0dc4c8b5fb8 |
30-Jun-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Compute ending of iterator in for-loop once. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74533 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
514b7b153bc9aa381e73f853ac37b62ab8995fd6 |
30-Jun-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Compute ending of iterator in for-loop once. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74533 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
6ef403d334d699441400da4b9a9763866970fa4a |
30-Jun-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Refactor ActOnDeclarationNameExpr into a "parsing action" part and a "semantic analysis" part. Use the "semantic analysis" part when performing template instantiation on a DeclRefExpr, rather than an ad hoc list of rules to construct DeclRefExprs from the instantiation. A test case for this change will come in with a large commit, which illustrates what I was actually trying to work on. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74528 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaTemplateInstantiateDecl.cpp
emaTemplateInstantiateExpr.cpp
|
751f9a416a94fe723e6c34fc15fff2ccdf1c4be9 |
30-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
Refactor ActOnDeclarationNameExpr into a "parsing action" part and a "semantic analysis" part. Use the "semantic analysis" part when performing template instantiation on a DeclRefExpr, rather than an ad hoc list of rules to construct DeclRefExprs from the instantiation. A test case for this change will come in with a large commit, which illustrates what I was actually trying to work on. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74528 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaTemplateInstantiateDecl.cpp
emaTemplateInstantiateExpr.cpp
|
f350c6e27365226d2c84eded38805ed25c4a0c8a |
30-Jun-2009 |
Chris Lattner <sabre@nondot.org> |
Implement PR4175, catching some questionable comparisons. Patch by David Majnemer! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74513 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
149f1386c60aa07de0f6a5d43ab524b22af68059 |
30-Jun-2009 |
Chris Lattner <sabre@nondot.org> |
Implement PR4175, catching some questionable comparisons. Patch by David Majnemer! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74513 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ab6e38adbcdbdb4e7d211b4ff7a52d871ea0e994 |
30-Jun-2009 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
De-ASTContext-ify DeclContext. Remove ASTContext parameter from DeclContext's methods. This change cascaded down to other Decl's methods and changes to call sites started "escalating". Timings using pre-tokenized "cocoa.h" showed only a ~1% increase in time run between and after this commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74506 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaInherit.cpp
emaInit.cpp
emaLookup.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaTemplateInstantiateExpr.cpp
|
17945a0f64fe03ff6ec0c2146005a87636e3ac12 |
30-Jun-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
De-ASTContext-ify DeclContext. Remove ASTContext parameter from DeclContext's methods. This change cascaded down to other Decl's methods and changes to call sites started "escalating". Timings using pre-tokenized "cocoa.h" showed only a ~1% increase in time run between and after this commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74506 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaInherit.cpp
emaInit.cpp
emaLookup.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaTemplateInstantiateExpr.cpp
|
ccb9efea4c1a88ccf62ac49d60f98b754897695a |
30-Jun-2009 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Remove the ASTContext parameter from the getBody() methods of Decl and subclasses. Timings showed no significant difference before and after the commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74504 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
emaExpr.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
6fb0aee4f9dc261bbec72e1283ad8dc0557a6d96 |
30-Jun-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Remove the ASTContext parameter from the getBody() methods of Decl and subclasses. Timings showed no significant difference before and after the commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74504 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
emaExpr.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
fe5f9736723cbaae5423f98ebbd0f0f537b51de4 |
30-Jun-2009 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Remove the ASTContext parameter from the attribute-related methods of Decl. The implementations of these methods can Use Decl::getASTContext() to get the ASTContext. This commit touches a lot of files since call sites for these methods are everywhere. I used pre-tokenized "carbon.h" and "cocoa.h" headers to do some timings, and there was no real time difference between before the commit and after it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74501 91177308-0d34-0410-b5e6-96231b3b80d8
umpDiagnostics.cpp
ema.h
emaAttr.cpp
emaChecking.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaExpr.cpp
emaLookup.cpp
emaOverload.cpp
emaStmt.cpp
|
40b598eea1310ec9ed554d56ce3e25b34c585458 |
30-Jun-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Remove the ASTContext parameter from the attribute-related methods of Decl. The implementations of these methods can Use Decl::getASTContext() to get the ASTContext. This commit touches a lot of files since call sites for these methods are everywhere. I used pre-tokenized "carbon.h" and "cocoa.h" headers to do some timings, and there was no real time difference between before the commit and after it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74501 91177308-0d34-0410-b5e6-96231b3b80d8
umpDiagnostics.cpp
ema.h
emaAttr.cpp
emaChecking.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaExpr.cpp
emaLookup.cpp
emaOverload.cpp
emaStmt.cpp
|
4b61ba63888136f05791f8e47172927451c6a9f3 |
30-Jun-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Take care of Chris's comments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74486 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
16dbdce02366c372fe934c0528148fc38906f21a |
30-Jun-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Take care of Chris's comments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74486 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
9cfad75f2f0554fbcf43421b18fd0430fc77bfec |
30-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Make an error message more clear. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74481 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
8d4655d3b966da02fe0588767160448594cddd61 |
30-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Make an error message more clear. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74481 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
89f61bd06f28e7898456433248f569a1cd67d02c |
30-Jun-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
A more detailed diagnosis of ill-formed ctor-initializer list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74480 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
47deacfa43625c6cc1b2008a0396ccb3af725fde |
30-Jun-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
A more detailed diagnosis of ill-formed ctor-initializer list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74480 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
0040e0cb507668263a58fc3647a3ec3d41c921a3 |
30-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Improvements to decltype. We now don't crash anymore when the expr is an overloaded function decl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74472 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateInstantiate.cpp
emaType.cpp
|
af017e682918f7a1a95ff08d9ab7ae3426436ca3 |
30-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Improvements to decltype. We now don't crash anymore when the expr is an overloaded function decl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74472 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateInstantiate.cpp
emaType.cpp
|
4e0aba8010d63c1d6bcd9770088864b9c0cc0751 |
30-Jun-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Diagnose multiple initialzation of data-member/base in the ctor-initializer list. More to come. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74465 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
7881a0565893f1da6faafbd86377f5b50e4376a5 |
30-Jun-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Diagnose multiple initialzation of data-member/base in the ctor-initializer list. More to come. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74465 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
147498691c68d4de40a90a59aa356c43dc30de4a |
29-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Remove some dead code git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74460 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
74add6d9a4f475fe1cc5c146e9a0543578e95da3 |
29-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Remove some dead code git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74460 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
27b6d2b2671814fd94f2f70f58feb68cefe609d1 |
29-Jun-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Keep track of function template specializations, to eliminate redundant, implicit instantiations of function templates and provide a place where we can hang function template specializations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74454 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
emaTemplateInstantiateDecl.cpp
|
127102b5196ffe04bdb70fd553fe62c265ab10a9 |
29-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
Keep track of function template specializations, to eliminate redundant, implicit instantiations of function templates and provide a place where we can hang function template specializations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74454 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
emaTemplateInstantiateDecl.cpp
|
ff1bf1a70cb5d6f8428727aa26994b6572347717 |
29-Jun-2009 |
Chris Lattner <sabre@nondot.org> |
Fix the FloatingLiteral API to take the isexact flag by value instead of by pointer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74432 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
001d64dd2947c1ce06e3eac257a9a21c65ae4ff3 |
29-Jun-2009 |
Chris Lattner <sabre@nondot.org> |
Fix the FloatingLiteral API to take the isexact flag by value instead of by pointer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74432 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
979f8f0ed481821f2b2bf9e196d4c0024803d5b7 |
29-Jun-2009 |
Steve Naroff <snaroff@apple.com> |
Remove ASTContext::getObjCQualifiedIdType(). Convert clients to use ASTContext::getObjCObjectPointerType(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74424 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
683087ffcf21d2a22cd2d0424b7f119168b47a8e |
29-Jun-2009 |
Steve Naroff <snaroff@apple.com> |
Remove ASTContext::getObjCQualifiedIdType(). Convert clients to use ASTContext::getObjCObjectPointerType(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74424 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
50d279d3af276caf49e5b5bea930fe665435e256 |
28-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Move the check for vprintf* functions inside of SemaCheckStringLiteral. Fixes PR4470. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74413 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
d966a55bccae13f34d18958877c5e71dd643a125 |
28-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Move the check for vprintf* functions inside of SemaCheckStringLiteral. Fixes PR4470. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74413 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
f169589e96a032c6019eee6293cf3316519ecc4a |
28-Jun-2009 |
Nate Begeman <natebegeman@mac.com> |
Fix incorrect AST's being produced, noticed by Eli. The issue this was working around is no longer present in TOT clang. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74411 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
dde2598cfbaafd71e5d6926f0beb6b77599de28e |
28-Jun-2009 |
Nate Begeman <natebegeman@mac.com> |
Fix incorrect AST's being produced, noticed by Eli. The issue this was working around is no longer present in TOT clang. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74411 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
0e0eadd1788f7230e5de742a6ac3fdc919c2fa06 |
28-Jun-2009 |
Nate Begeman <natebegeman@mac.com> |
OpenCL 1.0 support: Handle rules for ExtVector + ExtVector and ExtVector + Scalar operations. Fix problem Eli noticed where we were allowing pointer types to be splatted to vector elements. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74404 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
1bd1f6e85a011fe3129dc2898857e72741d36667 |
28-Jun-2009 |
Nate Begeman <natebegeman@mac.com> |
OpenCL 1.0 support: Handle rules for ExtVector + ExtVector and ExtVector + Scalar operations. Fix problem Eli noticed where we were allowing pointer types to be splatted to vector elements. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74404 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
9e0637013743b96d36271b183045190909b71d92 |
28-Jun-2009 |
Nate Begeman <natebegeman@mac.com> |
Implement feedback from Eli re: the purpose of lax vector conversions git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74397 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
9b10da6f710617570e585e0504768f1e9bc6f145 |
28-Jun-2009 |
Nate Begeman <natebegeman@mac.com> |
Implement feedback from Eli re: the purpose of lax vector conversions git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74397 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
993a060816aa82ca90fc6ccab23000cd2803a9f2 |
27-Jun-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve support for overloaded operator templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74390 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaLookup.cpp
emaOverload.cpp
|
364e021e8cbbeebd4d2544053268a008cf9ee5a9 |
27-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
Improve support for overloaded operator templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74390 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaLookup.cpp
emaOverload.cpp
|
4e75d39663a206fdf9e510e4b9f93a35d1558b72 |
27-Jun-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Renamed MarcDestructorReferenced -> MarkDestructorReferenced git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74386 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
|
f8d736ca54191c3cf9395ca41ed9b03777774321 |
27-Jun-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Renamed MarcDestructorReferenced -> MarkDestructorReferenced git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74386 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
|
a73d6b15c4a8bd9db1ca805eec00e39daf112296 |
27-Jun-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix a bogus error overloading an operator where the only class parameter has a dependent type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74380 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
5d39dee0cca8d675120791234cd39a622b986f1b |
27-Jun-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix a bogus error overloading an operator where the only class parameter has a dependent type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74380 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
71d5f68e1f44a04cbf273fe168cfd9337c19140d |
27-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Implement support for the format_arg attribute. Fixes PR4442. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74369 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
8f031b3b14e726b093fb8693c2be4ab6d779e331 |
27-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Implement support for the format_arg attribute. Fixes PR4442. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74369 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
e8c36f2e5582270b336bdf73fd217bd1682b92ac |
27-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Make it possible for using decls to point to operators. Fixes PR4441. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74362 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
0c6139d0c2497c4e8780340e0dc097de041f248e |
27-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Make it possible for using decls to point to operators. Fixes PR4441. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74362 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
368cc6cb678d50a643f60905c645e52ac846da2f |
27-Jun-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to mark destructors when they are used. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74359 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
|
8d2b35630d4afc474b766eeab1f1bef469cf633a |
27-Jun-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to mark destructors when they are used. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74359 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
|
94afd6f37eb1363e1b21b4f518d0c50204986d49 |
27-Jun-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Set the rest of the flags we need to perform template argument deduction using a base class of the argument type. No actual functionality change; this is just a hook. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74356 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
4112877d1043d0b937f5abcf043bc7fa48138f05 |
27-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
Set the rest of the flags we need to perform template argument deduction using a base class of the argument type. No actual functionality change; this is just a hook. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74356 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
611127629363f5b016aa45ef37fd06f873b9734e |
27-Jun-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
During template argument deduction from a function call, allow deduction from pointer and pointer-to-member types to work even in the presence of a qualification conversion (C++ [temp.deduct.type]p3 bullet 2). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74354 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
508f1c889b9833903ea394034fe0246d3a57a32d |
27-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
During template argument deduction from a function call, allow deduction from pointer and pointer-to-member types to work even in the presence of a qualification conversion (C++ [temp.deduct.type]p3 bullet 2). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74354 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
953555049465feac39bd1be20efb8a560f2acf28 |
27-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
More auto work. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74339 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
baf45d31f18e6d5b3d2a33695c2af6e6cbc4ee29 |
27-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
More auto work. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74339 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
072ac38487276e488cf5b920b1b78f4f4790e68f |
26-Jun-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
A little template argument deduction test uncovered an "oops". As part of template instantiation, we were dropping cv-qualifiers on the instantiated type in a few places. This change reshuffles the type-instantiation code a little bit so that there's a single place where we add qualifiers to the instantiated type, so that we won't end up with this same bug in the future. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74331 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
8a5cb1196ee8491570160e36c216631df3a9e95c |
26-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
A little template argument deduction test uncovered an "oops". As part of template instantiation, we were dropping cv-qualifiers on the instantiated type in a few places. This change reshuffles the type-instantiation code a little bit so that there's a single place where we add qualifiers to the instantiated type, so that we won't end up with this same bug in the future. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74331 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
ad538e5150e7248e49066e917db2620bd8af8825 |
26-Jun-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Template argument deduction is no longer responsible for checking non-dependent parameter types. Instead, class template partial specializations perform a final check of all of the instantiated arguments. This model is cleaner, and works better for function templates where the "final check" occurs during overload resolution. Also, cope with cv-qualifiers when the parameter type was originally a reference type, so that the deduced argument can be more qualified than the transformed argument. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74323 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
f670c8cfa58b4c224eb8fb566130dc47844dd3de |
26-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
Template argument deduction is no longer responsible for checking non-dependent parameter types. Instead, class template partial specializations perform a final check of all of the instantiated arguments. This model is cleaner, and works better for function templates where the "final check" occurs during overload resolution. Also, cope with cv-qualifiers when the parameter type was originally a reference type, so that the deduced argument can be more qualified than the transformed argument. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74323 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
f679ea8b9a9786591e2a25ac11a382c4175d19e8 |
26-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Can't have arrays of auto. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74314 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
e7cf07d8df83e083505c7105c50b2797493008a6 |
26-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Can't have arrays of auto. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74314 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
9bd48664107071827487fbefaf5d94db5fcb7c9b |
26-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
An auto variable can't appear in its own initializer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74312 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e2bb224dee15d07bc9843acd4f3ded8eb0f835ed |
26-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
An auto variable can't appear in its own initializer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74312 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
4a8498cc0f251e839912285112a014a5d1248648 |
26-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Implement enough of the 'auto' keyword so we can claim to support N2546. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74307 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
e89d15944dd3be750a09805ad21222d2fa9321fa |
26-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Implement enough of the 'auto' keyword so we can claim to support N2546. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74307 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
78b6f56af95f5e2e34312082f98136ae80fb1a4b |
26-Jun-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve template argument deduction for reference parameters when deducing template arguments from a function call. Plus, add a bunch of tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74301 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
500d331eade2f5070b66ba51d777224f9fda6e1d |
26-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
Improve template argument deduction for reference parameters when deducing template arguments from a function call. Plus, add a bunch of tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74301 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
2c313fbb9d9ca17cbd610327aeea6524889fdff5 |
26-Jun-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Minor change per Doug's comments. - Fariborz git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74287 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
c6249b9230e1821b0d28f6f2d5c2d793508606fd |
26-Jun-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Minor change per Doug's comments. - Fariborz git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74287 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
607021675efc13cdaa93bbe22fa4526307d48cd3 |
26-Jun-2009 |
Nate Begeman <natebegeman@mac.com> |
OpenCL 1.0 support: attributes git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74280 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
6f3d838867538638b9bbf412028e8537ae12f3e5 |
26-Jun-2009 |
Nate Begeman <natebegeman@mac.com> |
OpenCL 1.0 support: attributes git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74280 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
df5ab84157d78afb51148bb8e6aa7c1ee309c58a |
26-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Add NamedDecl::getUnderlyingDecl that can see through UsingDecl and ObjCCompatibleAliasDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74279 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
e136e0e1b74760d7ec3ede38e0e739d5c52a3c0a |
26-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Add NamedDecl::getUnderlyingDecl that can see through UsingDecl and ObjCCompatibleAliasDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74279 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
5847da50f7f3595bda61ec44776eadfcaa4da736 |
26-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
See through UsingDecls in more places. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74269 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
58badb7a655d021fc67bb7ed0af95d6ea0c63eb1 |
26-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
See through UsingDecls in more places. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74269 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
f5f8fa6961bb0007eb7d4be137d3f31132e2f03a |
26-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Fix failing test. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74268 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
5e50569d45d7c8545fecd17685a3a613b1cb0158 |
26-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Fix failing test. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74268 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
6434a1b16311153e6ad578bae47e05ef09739133 |
26-Jun-2009 |
Chris Lattner <sabre@nondot.org> |
Improve error recovery in C++: when we hit 'implicit int' cases in C++, these are usually because the parser was thoroughly confused. In addition to typing the value being declared as an int and hoping for the best, we mark the value as invalid so we don't get chains of errors when it is used downstream. In C, implicit int actually is valid, so typing the thing as int is good and marking it invalid is bad. :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74266 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
emaType.cpp
|
b78d833b12f7c4baab138f305f72efd49455a3f9 |
26-Jun-2009 |
Chris Lattner <sabre@nondot.org> |
Improve error recovery in C++: when we hit 'implicit int' cases in C++, these are usually because the parser was thoroughly confused. In addition to typing the value being declared as an int and hoping for the best, we mark the value as invalid so we don't get chains of errors when it is used downstream. In C, implicit int actually is valid, so typing the thing as int is good and marking it invalid is bad. :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74266 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
emaType.cpp
|
c1b3e762e2218a3e6e70f88621327bb4e123b204 |
26-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Fix another assert related to using decls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74262 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
bc13ab2bc75bd997a2a40e371f50a4c456d8ee69 |
26-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Fix another assert related to using decls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74262 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
d50ff9ba99e07fde3000eb5c49bf44fd2889ea08 |
26-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
When creating LookupResults, see through UsingDecls. Fixes PR4450. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74258 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
8b50d01949c649fbe89ea83f76e5f445170c7d26 |
26-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
When creating LookupResults, see through UsingDecls. Fixes PR4450. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74258 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
1343813580506abcc8cdb3813d6e1496cb7a9c8c |
26-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Fix PR4448. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74257 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
emaTemplateInstantiateExpr.cpp
|
87471f5b64783c52e01e7accc1b123560b52bf35 |
26-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Fix PR4448. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74257 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
emaTemplateInstantiateExpr.cpp
|
bd42e02d833f1876b2bc67b47f7c2ea82c6e476e |
26-Jun-2009 |
Nate Begeman <natebegeman@mac.com> |
OpenCL 1.0 support: explicit casts to ext-vector types git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74247 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
58d29a41271d96509f464716f79b0ab2e815b6b1 |
26-Jun-2009 |
Nate Begeman <natebegeman@mac.com> |
OpenCL 1.0 support: explicit casts to ext-vector types git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74247 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
6f5e054b35aed3e4d22d4bc29bc74e5003dd2038 |
26-Jun-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implicit instantiation for function template specializations. For a FunctionDecl that has been instantiated due to template argument deduction, we now store the primary template from which it was instantiated and the deduced template arguments. From this information, we can instantiate the body of the function template. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74232 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
1637be727f2a0434c1ed7aa385ea1c18328b0ccd |
26-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
Implicit instantiation for function template specializations. For a FunctionDecl that has been instantiated due to template argument deduction, we now store the primary template from which it was instantiated and the deduced template arguments. From this information, we can instantiate the body of the function template. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74232 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
b60eb759cc2de7125e3554b7f48b2452ca807d82 |
26-Jun-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Improved semantic analysis and AST respresentation for function templates. For example, this now type-checks (but does not instantiate the body of deref<int>): template<typename T> T& deref(T* t) { return *t; } void test(int *ip) { int &ir = deref(ip); } Specific changes/additions: * Template argument deduction from a call to a function template. * Instantiation of a function template specializations (just the declarations) from the template arguments deduced from a call. * FunctionTemplateDecls are stored directly in declaration contexts and found via name lookup (all forms), rather than finding the FunctionDecl and then realizing it is a template. This is responsible for most of the churn, since some of the core declaration matching and lookup code assumes that all functions are FunctionDecls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74213 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaLookup.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiateDecl.cpp
emaTemplateInstantiateExpr.cpp
|
e53060fa78ad7e98352049f72787bdb7543e2a48 |
26-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
Improved semantic analysis and AST respresentation for function templates. For example, this now type-checks (but does not instantiate the body of deref<int>): template<typename T> T& deref(T* t) { return *t; } void test(int *ip) { int &ir = deref(ip); } Specific changes/additions: * Template argument deduction from a call to a function template. * Instantiation of a function template specializations (just the declarations) from the template arguments deduced from a call. * FunctionTemplateDecls are stored directly in declaration contexts and found via name lookup (all forms), rather than finding the FunctionDecl and then realizing it is a template. This is responsible for most of the churn, since some of the core declaration matching and lookup code assumes that all functions are FunctionDecls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74213 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaLookup.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiateDecl.cpp
emaTemplateInstantiateExpr.cpp
|
d67364cad8b6e5b06f54ebeb8d5932eca79a4d84 |
25-Jun-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to diagnose and Mark use of implicit default assignment operator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74205 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExpr.cpp
|
c75bc2d1f6f637098abc5db4caf0551f9437471e |
25-Jun-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to diagnose and Mark use of implicit default assignment operator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74205 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExpr.cpp
|
e2ed6f7a96d7cc444f4a7f15775164b3eccc3c34 |
25-Jun-2009 |
Nate Begeman <natebegeman@mac.com> |
OpenCL 1.0 Support, patch 1/N: upper case swizzle operator and hex element index. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74202 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
131f4658249b2a7d2d7e30fe07e84c484f79ef99 |
25-Jun-2009 |
Nate Begeman <natebegeman@mac.com> |
OpenCL 1.0 Support, patch 1/N: upper case swizzle operator and hex element index. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74202 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
1dd0da3ff9fc2864b8ef3e19278281afff81d377 |
25-Jun-2009 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Set the end range location of a FunctionDecl to the right paren. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74195 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
16f19306f9dd24cdc397ceae89a73a55086e5127 |
25-Jun-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Set the end range location of a FunctionDecl to the right paren. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74195 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
7814671fc62c01af546c8b63e75969c2a6cf883e |
25-Jun-2009 |
Duncan Sands <baldrick@free.fr> |
Explicit braces to avoid ambiguous ‘else’. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74171 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
6887e63ff533d46046c47a2f0ea8765914fbfb76 |
25-Jun-2009 |
Duncan Sands <baldrick@free.fr> |
Explicit braces to avoid ambiguous ‘else’. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74171 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
b12bd436d5b2883cf833d591045581560ce346c7 |
25-Jun-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Backed out my last patch which caused a clang-test breakage. Will look at it later. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74126 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
f5ed9e0442a9299a19b312fd2d6160efec43c0ea |
25-Jun-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Backed out my last patch which caused a clang-test breakage. Will look at it later. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74126 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
09b8896d0f1e273bf616e9cd90f55d40da3fb7eb |
24-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
C++ decltype support (N2343) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74118 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
60a9a2a404a4cf259d39133383e922aa00ca9043 |
24-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
C++ decltype support (N2343) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74118 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
264e357dcd55af5a6d34eeda4903c6204d92080e |
24-Jun-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Added a missing else part to my previous patche(s). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74108 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ecce1314380e740bbe303cc68bf8f6b57480b09a |
24-Jun-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Added a missing else part to my previous patche(s). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74108 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
93ab533a2e9522a2e9a7695cb7446812fc9e70a6 |
24-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Add a DecltypeType type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74099 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
395b475a4474f1c7574d927ad142ca0c7997cbca |
24-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Add a DecltypeType type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74099 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
eed418bc4a3a68aa20dfa8c76f5c04bfa3d32936 |
24-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Parse the C++0x decltype specifier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74086 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
6fd634f4ac59f5923cffadadb99d19f23c18707a |
24-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Parse the C++0x decltype specifier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74086 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
bf6bc3067accbbafa9451c42690beb557db7e278 |
24-Jun-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement matching of function templates, so that one can declare overloaded function templates. C++ [temp.over.link] paragraphs 4-8. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74079 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaTemplate.cpp
|
34d1dc9f0ca8f5b0528a8cd29f1addfe096361b8 |
24-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement matching of function templates, so that one can declare overloaded function templates. C++ [temp.over.link] paragraphs 4-8. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74079 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaTemplate.cpp
|
19d1065e4ff54f822017982570d56fbddcc1a46f |
24-Jun-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Make sure that the template parameter lists get from the parser down to ActOnFunctionDeclarator for function template definitions git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74040 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplate.cpp
|
52591bf224b2c43e2b00e265bb8599a620081925 |
24-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
Make sure that the template parameter lists get from the parser down to ActOnFunctionDeclarator for function template definitions git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74040 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplate.cpp
|
6fb069ce903558b7eb06b556f57a35e43c8cfeef |
24-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Support for [class.local]p4. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74030 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaStmt.cpp
|
e98da2e7af16056a53db327b520d4b53b4be5e7a |
24-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Support for [class.local]p4. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74030 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaStmt.cpp
|
9614dad5316b4222dedf8a094d8c8a2ede86eb26 |
24-Jun-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When declaring a function template, create a FunctionTemplateDecl node and associate it with the FunctionDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74028 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplate.cpp
|
c5c903acd805581dc7ef881f7cb8df38afca4468 |
24-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
When declaring a function template, create a FunctionTemplateDecl node and associate it with the FunctionDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74028 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplate.cpp
|
4571d8171bac6b734fbfab217db433a1605d6b61 |
24-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
[class.local] p1 and p3. Also, add back the xcodeproj file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74027 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaStmt.cpp
|
e41590d2504d73453d58f22e9176088990555cc1 |
24-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
[class.local] p1 and p3. Also, add back the xcodeproj file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74027 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaStmt.cpp
|
f6da0dd6450b37f8c0ccd2fc25fd4aa465259542 |
24-Jun-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Some changes to accomodate Doug's comment for implicit copy constructor definition determination. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74025 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
220a0f3412dad46d7dadf8b6042783016c029564 |
24-Jun-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Some changes to accomodate Doug's comment for implicit copy constructor definition determination. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74025 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
2ae1d770afc17f52a4434b492cf6ea685a724092 |
24-Jun-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Start propagating template parameter lists to the right places to handle function templates. There's no actual code for function templates yet, but at least we complain about typedef templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74021 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplate.cpp
|
e542c862bdf9a9bcb4f468be8fa6561372430611 |
24-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
Start propagating template parameter lists to the right places to handle function templates. There's no actual code for function templates yet, but at least we complain about typedef templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74021 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplate.cpp
|
e153fcfc2ff1c385d542b023c2811b643125f801 |
23-Jun-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Eliminate DeclPtrTy() arguments to ActOnDeclarator that are just a very, very weird way to pass "false". No functionality change git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74007 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExprCXX.cpp
|
2e01cdacc5ecab5a14329405dc481a18ac3ccfdc |
23-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
Eliminate DeclPtrTy() arguments to ActOnDeclarator that are just a very, very weird way to pass "false". No functionality change git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74007 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExprCXX.cpp
|
6123ae63b90bca3b780ce38b7c7a78425bb003ac |
23-Jun-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Make sure that argument-dependent lookup looks into the global scope when it should. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73992 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaLookup.cpp
|
44bc2d53ebf1b7ad7439a0f73aba3d00a462d63a |
23-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
Make sure that argument-dependent lookup looks into the global scope when it should. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73992 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaLookup.cpp
|
b0fc999fb07646e67aab2a6bb3bb4ab0c95be384 |
23-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Check in a new template argument list builder that should work better for variadic templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73937 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateDeduction.cpp
|
fb25052736439d72a557cddd41dfb927bcb3d3e5 |
23-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Check in a new template argument list builder that should work better for variadic templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73937 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateDeduction.cpp
|
599778ef5106277527d60a7cc9c3d8f0756a40c7 |
23-Jun-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
patch to mark use of implicit copy constructors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73922 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExpr.cpp
|
485f087407849a8989053122f52b8c07d1191b45 |
23-Jun-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
patch to mark use of implicit copy constructors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73922 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExpr.cpp
|
ac77dd63188c12389eb0fb616fdab4fccf612dc2 |
23-Jun-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Robustify a bunch of C++-related declaration actions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73918 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
4c4f7cb3a5b692bbc28ff6c5042f540a8e2bf6ac |
23-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
Robustify a bunch of C++-related declaration actions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73918 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
cad27f643ec41875c51d5ac860abf766f0a33675 |
23-Jun-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement implicit instantiation of the member functions of a class template specialization. At present, all implicit instantiations occur at the end of the translation unit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73915 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDeclCXX.cpp
emaExpr.cpp
emaTemplateInstantiateDecl.cpp
|
d7f37bf8b9a211455c5037df7b7e88e5a9510119 |
23-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement implicit instantiation of the member functions of a class template specialization. At present, all implicit instantiations occur at the end of the translation unit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73915 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDeclCXX.cpp
emaExpr.cpp
emaTemplateInstantiateDecl.cpp
|
a8b2fbf69432805ecb555d89a6e98aa50da9766a |
22-Jun-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Rework the way we track which declarations are "used" during compilation, and (hopefully) introduce RAII objects for changing the "potentially evaluated" state at all of the necessary places within Sema and Parser. Other changes: - Set the unevaluated/potentially-evaluated context appropriately during template instantiation. - We now recognize three different states while parsing or instantiating expressions: unevaluated, potentially evaluated, and potentially potentially evaluated (for C++'s typeid). - When we're in a potentially potentially-evaluated context, queue up MarkDeclarationReferenced calls in a stack. For C++ typeid expressions that are potentially evaluated, we will play back these MarkDeclarationReferenced calls when we exit the corresponding potentially potentially-evaluated context. - Non-type template arguments are now parsed as constant expressions, so they are not potentially-evaluated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73899 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaExpr.cpp
emaExprCXX.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaTemplateInstantiateExpr.cpp
emaTemplateInstantiateStmt.cpp
|
ac7610dad6653bad02dd42de198ca358b6fb1f1d |
22-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
Rework the way we track which declarations are "used" during compilation, and (hopefully) introduce RAII objects for changing the "potentially evaluated" state at all of the necessary places within Sema and Parser. Other changes: - Set the unevaluated/potentially-evaluated context appropriately during template instantiation. - We now recognize three different states while parsing or instantiating expressions: unevaluated, potentially evaluated, and potentially potentially evaluated (for C++'s typeid). - When we're in a potentially potentially-evaluated context, queue up MarkDeclarationReferenced calls in a stack. For C++ typeid expressions that are potentially evaluated, we will play back these MarkDeclarationReferenced calls when we exit the corresponding potentially potentially-evaluated context. - Non-type template arguments are now parsed as constant expressions, so they are not potentially-evaluated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73899 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaExpr.cpp
emaExprCXX.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaTemplateInstantiateExpr.cpp
emaTemplateInstantiateStmt.cpp
|
2f5a0a34daeb300d562a2a8a749053e8fa914e1b |
22-Jun-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Changes made per Doug's comments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73897 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExpr.cpp
|
05a5c45507243b88ee9e1b3f1ac2fb05b611d7d2 |
22-Jun-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Changes made per Doug's comments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73897 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExpr.cpp
|
8915a3dcd08b890239dc943d38892183f570da20 |
22-Jun-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Remove ImplicitMustBeDefined, use universal 'Used' flag instead. Do the implicit default ctor checking in MarkDeclarationReferenced. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73888 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
|
b7f4cc09ead099c1306d06db53e258d648d0f652 |
22-Jun-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Remove ImplicitMustBeDefined, use universal 'Used' flag instead. Do the implicit default ctor checking in MarkDeclarationReferenced. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73888 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
|
1644360a5795ace4ff2cc15db4b1ff5669690b17 |
20-Jun-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Made improvements in c++'s object model patch on Doug's review. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73833 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
3da83eb7bcfa6bd476ab804ecb6cf755b39a6f92 |
20-Jun-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Made improvements in c++'s object model patch on Doug's review. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73833 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
683a1144296b0d866dea5b8bee2c2948ad0b6312 |
20-Jun-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Parsing and AST support for using declarations, from John Thompson! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73812 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaLookup.cpp
|
9cfbe48a7a20a217fdb2920b29b67ae7941cb116 |
20-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
Parsing and AST support for using declarations, from John Thompson! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73812 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaLookup.cpp
|
981892622a7fbb6d0e7eb7759ed7e8039e46bef9 |
20-Jun-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Keep track of when declarations are "used" according to C and C++. This logic is required to trigger implicit instantiation of function templates and member functions of class templates, which will be implemented separately. This commit includes support for -Wunused-parameter, printing warnings for named parameters that are not used within a function/Objective-C method/block. Fixes <rdar://problem/6505209>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73797 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaOverload.cpp
|
e0762c92110dfdcdd207db461a4ea17afd168f1e |
20-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
Keep track of when declarations are "used" according to C and C++. This logic is required to trigger implicit instantiation of function templates and member functions of class templates, which will be implemented separately. This commit includes support for -Wunused-parameter, printing warnings for named parameters that are not used within a function/Objective-C method/block. Fixes <rdar://problem/6505209>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73797 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaOverload.cpp
|
89942a084af119f82b4e99adde48afef1561f8ce |
20-Jun-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Use QualType to represent block's implicit return type as to not lose its 'const/volatile' qualifier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73795 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaStmt.cpp
|
7d5c74ecbbd8719436c071f38657bc8e97ee4a24 |
20-Jun-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Use QualType to represent block's implicit return type as to not lose its 'const/volatile' qualifier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73795 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaStmt.cpp
|
3603e0c11af0d958225d8db2f25ed2683d652436 |
19-Jun-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch for implementation of C++'s object model. This is work in progress. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73782 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
f8dcb866d344aa9355595e14c429852830b63095 |
19-Jun-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch for implementation of C++'s object model. This is work in progress. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73782 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
68a7a6db3693e6df54a2198f3ee4e3f87e7f9ac0 |
18-Jun-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Some cleanups suggested by Chris git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73713 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
|
f6ddb737cb882ffbf0b75a9abd50b930cc2b9068 |
18-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
Some cleanups suggested by Chris git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73713 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
|
98da6aed9fbc7fc82dd581c7bb647412f7864299 |
18-Jun-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Move the static DeclAttrs map into ASTContext. Fixes <rdar://problem/6983177>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73702 91177308-0d34-0410-b5e6-96231b3b80d8
umpDiagnostics.cpp
emaAttr.cpp
emaChecking.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaExpr.cpp
emaLookup.cpp
emaOverload.cpp
emaStmt.cpp
|
68584ed35ad819a1668e3f527ba7f5dd4ae6a333 |
18-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
Move the static DeclAttrs map into ASTContext. Fixes <rdar://problem/6983177>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73702 91177308-0d34-0410-b5e6-96231b3b80d8
umpDiagnostics.cpp
emaAttr.cpp
emaChecking.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaExpr.cpp
emaLookup.cpp
emaOverload.cpp
emaStmt.cpp
|
2352180cbc20abaf98da00cd49f01d037e313541 |
18-Jun-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Diagnose class members that shadow a template parameter. Fixes <rdar://problem/6952203>. To do this, we actually remove a not-quite-correct optimization in the C++ name lookup routines. We'll revisit this optimization for the general case once more C++ is working. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73659 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaLookup.cpp
emaTemplate.cpp
|
c19ee3eb08ce1d77504d5fc27f7c44b94543221b |
18-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
Diagnose class members that shadow a template parameter. Fixes <rdar://problem/6952203>. To do this, we actually remove a not-quite-correct optimization in the C++ name lookup routines. We'll revisit this optimization for the general case once more C++ is working. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73659 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaLookup.cpp
emaTemplate.cpp
|
80d16fa31eb2654a7a1793e484ff2b593fdb1b7b |
18-Jun-2009 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Fix some erroneous comments due to trigger-happy copy&paste. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73657 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
179fe1a47dce4fe7fee39c55c1e9421464da8cdf |
18-Jun-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Fix some erroneous comments due to trigger-happy copy&paste. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73657 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
a0b19fe3d24397fdf4f9373f29ad49d7bd4b76cd |
18-Jun-2009 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Factor out some common code into Sema::EnterDeclaratorContext/ExitDeclaratorContext. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73655 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
|
1d1755348d3790ebf019c1c6de58cd1f1fa5295a |
18-Jun-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Factor out some common code into Sema::EnterDeclaratorContext/ExitDeclaratorContext. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73655 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
|
6837059a1bcf1dc4da5667e69c6203e4110def34 |
18-Jun-2009 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Implement correct name lookup inside an initializer of a C++ class static data member. Fixes "test/CXX/basic/basic.lookup/basic.lookup.unqual/p13.cpp" test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73652 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
0ffd9ffb633ca4886c7db4dd12dc36bdad3d797c |
18-Jun-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Implement correct name lookup inside an initializer of a C++ class static data member. Fixes "test/CXX/basic/basic.lookup/basic.lookup.unqual/p13.cpp" test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73652 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
38bc2b568f9a179119f196f7bcebd87b37c6355e |
18-Jun-2009 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Move CXXMethodDecl::OutOfLineDefinition into Decl::OutOfLine. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73651 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f5cecfbdcd20be224861f9e67c5973a9a2b61512 |
18-Jun-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Move CXXMethodDecl::OutOfLineDefinition into Decl::OutOfLine. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73651 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f27ef733ed988505288433714313488cc05ab5b0 |
18-Jun-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Removed deadcode related to addition of constructor decls to a class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73650 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
8bc3fa4eb6bcb307bef7965a9578afffe22eab4b |
18-Jun-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Removed deadcode related to addition of constructor decls to a class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73650 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
c75c1a882cad91f2edc6a926eb8cd725abad2262 |
18-Jun-2009 |
Steve Naroff <snaroff@apple.com> |
First step toward fixing <rdar://problem/6613046> refactor clang objc type representation. Add a type (ObjCObjectPointerType) and remove a type (ObjCQualifiedIdType). This large/tedious patch is just a first step. Next step is to remove ObjCQualifiedInterfaceType. After that, I will remove the magic TypedefType for 'id' (installed by Sema). This work will enable various simplifications throughout clang (when dealing with ObjC types). No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73649 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaExpr.cpp
emaExprObjC.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
|
d1b3c2dd5bc1f3103bee6137957aa7c5f8f2f0bc |
18-Jun-2009 |
Steve Naroff <snaroff@apple.com> |
First step toward fixing <rdar://problem/6613046> refactor clang objc type representation. Add a type (ObjCObjectPointerType) and remove a type (ObjCQualifiedIdType). This large/tedious patch is just a first step. Next step is to remove ObjCQualifiedInterfaceType. After that, I will remove the magic TypedefType for 'id' (installed by Sema). This work will enable various simplifications throughout clang (when dealing with ObjC types). No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73649 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaExpr.cpp
emaExprObjC.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
|
2a2e0405001f22e9026cb0dec219146996d1e7b6 |
17-Jun-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Support dependent extended vector types and template instantiation thereof. Patch by Anders Johnsen! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73641 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaType.cpp
|
9cdda0cf8528e3d595be9bfa002f0450074beb4d |
17-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
Support dependent extended vector types and template instantiation thereof. Patch by Anders Johnsen! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73641 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaType.cpp
|
1de7089a5df96d50f54ea8855d0ca6a71af0f669 |
17-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Since integral template arguments can't have dependent types we don't need an extra pass to set the right APSInt bit width/signedness. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73580 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
25af1ed6ffa46a333886264299be98a838097b34 |
17-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Since integral template arguments can't have dependent types we don't need an extra pass to set the right APSInt bit width/signedness. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73580 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
cfb830e364d34ee6f088096a5fa6e20ebe5abd22 |
17-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Make DeduceNonTypeTemplateArgument take an APSInt instead of an APInt. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73574 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
335e24a194f2000086d298b800d6169ebc5a7ee6 |
17-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Make DeduceNonTypeTemplateArgument take an APSInt instead of an APInt. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73574 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
c4bdfcd19df88bd75cc31bdca20a359711f4ae8f |
16-Jun-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Implements -Wundeclared-selector for ObjC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73495 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
7ff22ded2221f442b1f8ff78172938d04ec8c926 |
16-Jun-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Implements -Wundeclared-selector for ObjC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73495 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
37bb2bd63d6a2dfeb4b8f2e07205e501e96e49e1 |
16-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Handle temporaries in default arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73462 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaTemplateInstantiateExpr.cpp
|
f54741e6465692d3bdbae974ac3beeeab92e4a95 |
16-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Handle temporaries in default arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73462 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaTemplateInstantiateExpr.cpp
|
4e3d355931542dc1a40c35c108f7e0b72876584c |
16-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Keep track of whether a type parameter type is a parameter pack. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73452 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
76e4ce42a30cee4dc40ce7c6014874fbc4f9baa7 |
16-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Keep track of whether a type parameter type is a parameter pack. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73452 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
89b0a05eb0deca45a32a45ed3ed8c40a1906d194 |
16-Jun-2009 |
Steve Naroff <snaroff@apple.com> |
Add a comment to Sema::ActOnTranslationUnitScope(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73450 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
cb83c530ee82c0107720129473fa78336b6f4879 |
16-Jun-2009 |
Steve Naroff <snaroff@apple.com> |
Add a comment to Sema::ActOnTranslationUnitScope(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73450 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
023cbac100a3d7efe76337de307fee5b181d07e4 |
15-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
More parameter pack work. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73395 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
3b36b66a00b7d5bab71b486a54694f0ae397bddb |
15-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
More parameter pack work. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73395 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
584b50610476aa300c4b648d860c8938cc7f23cb |
15-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Add a new 'Pack' argument kind to TemplateArgument. This is not yet used. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73391 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
|
d01b1da213aeb71fd40ff7fb78a194613cc1ece7 |
15-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Add a new 'Pack' argument kind to TemplateArgument. This is not yet used. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73391 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
|
a78418407762f4e287c58c549670fb6690145c67 |
15-Jun-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Base SFINAE error suppression counting on the class of an error, not its (possibly-remapped) diagnostics. Thanks, Chris! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73390 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
|
8439fac3ce6c26db7982e34d119bf905b57eac91 |
15-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
Base SFINAE error suppression counting on the class of an error, not its (possibly-remapped) diagnostics. Thanks, Chris! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73390 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
|
003d7406cca525f36303127d1c50927a7cfbc1ef |
14-Jun-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Introduce a SFINAE "trap" that keeps track of the number of errors that were suppressed due to SFINAE. By checking whether any errors occur at the end of template argument deduction, we avoid the possibility of suppressing an error (due to SFINAE) and then recovering so well that template argument deduction never detects that there was a problem. Thanks to Eli for the push in this direction. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73336 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaTemplateDeduction.cpp
|
bb2604122f4186b6f666481f699b27c7e7a95790 |
14-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
Introduce a SFINAE "trap" that keeps track of the number of errors that were suppressed due to SFINAE. By checking whether any errors occur at the end of template argument deduction, we avoid the possibility of suppressing an error (due to SFINAE) and then recovering so well that template argument deduction never detects that there was a problem. Thanks to Eli for the push in this direction. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73336 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaTemplateDeduction.cpp
|
95d6c95238d03080803549be81139f03a098016e |
14-Jun-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Update LLVM. Implement support for C++ Substitution Failure Is Not An Error (SFINAE), which says that errors that occur during template argument deduction do *not* produce diagnostics and do not necessarily make a program ill-formed. Instead, template argument deduction silently fails. This is currently implemented for template argument deduction during matching of class template partial specializations, although the mechanism will also apply to template argument deduction for function templates. The scheme is simple: - If we are in a template argument deduction context, any diagnostic that is considered a SFINAE error (or warning) will be suppressed. The error will be propagated up the call stack via the normal means. - By default, all warnings and errors are SFINAE errors. Add the NoSFINAE class to a diagnostic in the .td file to make it a hard error (e.g., for access-control violations). Note that, to make this fully work, every place in Sema that emits an error *and then immediately recovers* will need to check Sema::isSFINAEContext() to determine whether it must immediately return an error rather than recovering. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73332 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaTemplateInstantiate.cpp
|
5e9f35c7cb61aea46f56d46c77cbcf47c0cf28ba |
14-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
Update LLVM. Implement support for C++ Substitution Failure Is Not An Error (SFINAE), which says that errors that occur during template argument deduction do *not* produce diagnostics and do not necessarily make a program ill-formed. Instead, template argument deduction silently fails. This is currently implemented for template argument deduction during matching of class template partial specializations, although the mechanism will also apply to template argument deduction for function templates. The scheme is simple: - If we are in a template argument deduction context, any diagnostic that is considered a SFINAE error (or warning) will be suppressed. The error will be propagated up the call stack via the normal means. - By default, all warnings and errors are SFINAE errors. Add the NoSFINAE class to a diagnostic in the .td file to make it a hard error (e.g., for access-control violations). Note that, to make this fully work, every place in Sema that emits an error *and then immediately recovers* will need to check Sema::isSFINAEContext() to determine whether it must immediately return an error rather than recovering. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73332 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaTemplateInstantiate.cpp
|
c46fcddc0bb2256110a710801f34a560453e3549 |
14-Jun-2009 |
Chris Lattner <sabre@nondot.org> |
Sink the BuiltinInfo object from ASTContext into the preprocessor and initialize it early in clang-cc. This ensures that __has_builtin works in all modes, not just when ASTContext is around. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73319 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
1b63e4f732dbc73d90abf886b4d21f8e3a165f6d |
14-Jun-2009 |
Chris Lattner <sabre@nondot.org> |
Sink the BuiltinInfo object from ASTContext into the preprocessor and initialize it early in clang-cc. This ensures that __has_builtin works in all modes, not just when ASTContext is around. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73319 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
260ad501d479ae610259272ad5ce13910b0cc0ac |
14-Jun-2009 |
Chris Lattner <sabre@nondot.org> |
move GetBuiltinType from Builtin::Context to ASTContext. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73316 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
86df27bbdbb98c39ec2184695c0561209f91bedd |
14-Jun-2009 |
Chris Lattner <sabre@nondot.org> |
move GetBuiltinType from Builtin::Context to ASTContext. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73316 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
13fac3fcba7f8ad212cefb9a2a784c72a6cb3c74 |
13-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Have CheckClassTemplatePartialSpecializationArgs take a TemplateArgumentListBuilder. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73297 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
|
6360be748e494d35784834d39b2c2bc6cd187d0c |
13-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Have CheckClassTemplatePartialSpecializationArgs take a TemplateArgumentListBuilder. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73297 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
|
2a5538120391a2eb9e3b18a8e2468cf97a1e363e |
13-Jun-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Allow initializing a vector with a vector in addition to allowing a list of the elements. Issue reported on cfe-dev by Mattias Holm. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73292 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
6b5374f837f925d99b1a76bc2fe8c98c1698df7f |
13-Jun-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Allow initializing a vector with a vector in addition to allowing a list of the elements. Issue reported on cfe-dev by Mattias Holm. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73292 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
1db6bab172726a62684ca1d7874d5b203ee9c248 |
13-Jun-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix for PR4382: allow instantiating dependent nested name specifiers. I'm not completely sure this is the right way to fix this issue, but it seems reasonable, and it's consistent with the non-template code for this construct. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73285 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
923f7534c529be478826f3d390d70dd8575dfd72 |
13-Jun-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix for PR4382: allow instantiating dependent nested name specifiers. I'm not completely sure this is the right way to fix this issue, but it seems reasonable, and it's consistent with the non-template code for this construct. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73285 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
4ffb581f6eb74e56c74dd3566c68ee53da004b20 |
13-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
More work on type parameter packs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73281 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
0ceffb51b28b09db67404058c642dcb1f877f6e8 |
13-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
More work on type parameter packs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73281 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
7573b3bef328dc8d6c330ad099a80b308e971521 |
13-Jun-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Remove a bunch of unnecessary template argument deduction code that was obviously written by someone who didn't read C++ [temp.class.spec]. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73276 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
c9e5d25ea33616c896a2ce5fbd6d68186eaddc5c |
13-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
Remove a bunch of unnecessary template argument deduction code that was obviously written by someone who didn't read C++ [temp.class.spec]. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73276 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
fdd33cce4707275f06ec6a8b8f695b80be29f396 |
13-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Move template type argument checking out into a separate function. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73275 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
|
436b156dc87a8687d7ab76a5b60d9c8977303c65 |
13-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Move template type argument checking out into a separate function. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73275 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
|
f90c2134cb342a33f4b112806052269fe847d5b2 |
13-Jun-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When some template parameters of a class template partial specialization cannot be deduced, produce a warning noting that the affected class template partial specialization will never be used. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73274 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaTemplateDeduction.cpp
|
031a5880e19d06624551aed9d74594356f4f9db1 |
13-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
When some template parameters of a class template partial specialization cannot be deduced, produce a warning noting that the affected class template partial specialization will never be used. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73274 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaTemplateDeduction.cpp
|
b19295070a3ed69e36a57086ff9bb997a06f6aee |
13-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
A parameter pack must always come last in a class template. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73269 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
49d2557addafd2f43b6d2ff54cf77b4f250d1544 |
13-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
A parameter pack must always come last in a class template. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73269 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
f81eaa07375078c7686d8bb3cc3cb02d409bfb6f |
13-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
No need to mark the parameter as invalid, just ignore the default argument. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73268 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
94c1cdcb0a23fee5845d9ecf0c964013f600e450 |
13-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
No need to mark the parameter as invalid, just ignore the default argument. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73268 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
0485d88ad80aec19d42e079659f2ccf7a636b791 |
13-Jun-2009 |
Chris Lattner <sabre@nondot.org> |
add the location of the ')' in a do/while statement to DoStmt. This fixes a source range problem reported by Olaf Krzikalla. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73266 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaStmt.cpp
emaTemplateInstantiateStmt.cpp
|
989135901c750af61ef012b6b0a0368be415bc46 |
13-Jun-2009 |
Chris Lattner <sabre@nondot.org> |
add the location of the ')' in a do/while statement to DoStmt. This fixes a source range problem reported by Olaf Krzikalla. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73266 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaStmt.cpp
emaTemplateInstantiateStmt.cpp
|
db52d3422271dde2ddc99f5be0948fbd528af35c |
13-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Address comments from Doug - Add a Sema::SemaRef.BuildBlockPointerType and use it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73264 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaType.cpp
|
9a917e4fac79aba20fbd25983c78396475078918 |
13-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Address comments from Doug - Add a Sema::SemaRef.BuildBlockPointerType and use it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73264 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaType.cpp
|
21530c548e79bcb93e54aed68c422ca7dd763435 |
13-Jun-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
It looks like we've finished off matching of class template partial specializations; add comments and update the C++ status page git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73263 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
|
c1efb3faefa7d42f974fe384dfd45e5127f8afa6 |
13-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
It looks like we've finished off matching of class template partial specializations; add comments and update the C++ status page git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73263 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
|
a2333785cb39c5dc9e80b8d79d1ddc8ba65bbe42 |
13-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Parameter packs can't have default arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73262 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
9c4c5c8e174e203da5f841f187bd290a76b34710 |
13-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Parameter packs can't have default arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73262 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
eebbf9aa9b9bd0f9e61f5e622dbf36a60836161b |
13-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Keep track of whether a type parameter is actually a type parameter pack. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73261 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
6d845ae1baf77691bca080e0762a1d45ee017f70 |
13-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Keep track of whether a type parameter is actually a type parameter pack. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73261 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
4faa4269490ed6448711e3e0ae8792e6823ae354 |
13-Jun-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Finish implementing checking of class template partial specializations git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73260 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaTemplateInstantiate.cpp
|
16df850bb73e8e2a3dece830b59785ff167428bc |
13-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
Finish implementing checking of class template partial specializations git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73260 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaTemplateInstantiate.cpp
|
424764408d9ba3a0b6a3f2b71650ab841bedeb67 |
13-Jun-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Diagnose C++ [temp.class.spec]p9b3, where a class template partial specialization's arguments are identical to the implicit template arguments of the primary template. Typically, this is meant to be a declaration/definition of the primary template, so we give that advice. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73259 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
|
6aa75cfbdd473cb8fb2a2261abf7e9d3c8389bca |
13-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
Diagnose C++ [temp.class.spec]p9b3, where a class template partial specialization's arguments are identical to the implicit template arguments of the primary template. Typically, this is meant to be a declaration/definition of the primary template, so we give that advice. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73259 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
|
76e7995d72d3966590e97e8897629c0b5b967536 |
12-Jun-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Diagnose the incorrect use of non-type template arguments for class template partial specializations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73254 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaTemplateInstantiateExpr.cpp
|
e94866ffc12d33d30b351f30aac4aa3828bc05d7 |
12-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
Diagnose the incorrect use of non-type template arguments for class template partial specializations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73254 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaTemplateInstantiateExpr.cpp
|
9c85fa039d98db5210fce90c6128938b93bfeff6 |
12-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Parse support for C++0x type parameter packs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73247 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
|
941df7dac2c733bad57342a01ca4c8dac956ef63 |
12-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Parse support for C++0x type parameter packs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73247 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
|
fbcc9e972aa713321e69b184e01c62976101b4ad |
12-Jun-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Verify that the template parameters of a class template partial specialization do not have default arguments (C++ [temp.class.spec]p10). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73245 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
ba1ecb564c05c2b749193e8deef1df3b69ea3f54 |
12-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
Verify that the template parameters of a class template partial specialization do not have default arguments (C++ [temp.class.spec]p10). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73245 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
0893d96ef45bbf6643161664254be4d32f4ba486 |
12-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Fix PR4365. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73240 91177308-0d34-0410-b5e6-96231b3b80d8
emaInherit.cpp
|
1d79faf915cc01739664c3817220ed25ad08a367 |
12-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Fix PR4365. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73240 91177308-0d34-0410-b5e6-96231b3b80d8
emaInherit.cpp
|
623e2e07723aeb17b86146036f0ddec2a70fb93a |
12-Jun-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve template argument deduction to keep track of why template argument deduction failed. For example, given template<typename T> struct is_same<T, T> { ... }; template argument deduction will fail for is_same<int, float>, and now reports enough information Right now, we don't do anything with this extra information, but it can be used for informative diagnostics that say, e.g., "template argument deduction failed because T was deduced to 'int' in one context and 'float' in another". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73237 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
|
f67875d5addf36b951ad37fb04509ab2b572c88a |
12-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
Improve template argument deduction to keep track of why template argument deduction failed. For example, given template<typename T> struct is_same<T, T> { ... }; template argument deduction will fail for is_same<int, float>, and now reports enough information Right now, we don't do anything with this extra information, but it can be used for informative diagnostics that say, e.g., "template argument deduction failed because T was deduced to 'int' in one context and 'float' in another". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73237 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
|
a116e6e7d544e9e9680fc917709147ea71069877 |
12-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
It's an error to use a function declared in a class definition as a default argument before the function has been declared. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73234 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExpr.cpp
|
5e300d1a8e37f24e71f8cf204b982f20f85cf91a |
12-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
It's an error to use a function declared in a class definition as a default argument before the function has been declared. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73234 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExpr.cpp
|
9d914d3d786f2957c3f925d2020a238fbc5d6ab6 |
12-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Deducation and instantiation of block types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73232 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
|
859ba504e754436e1ccf81f50800e5d2ea647447 |
12-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Deducation and instantiation of block types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73232 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
|
8f378a991e89f669d05d184142050e5e9b716469 |
11-Jun-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Once we have deduced the template arguments of a class template partial specialization, substitute those template arguments back into the template arguments of the class template partial specialization to see if the results still match the original template arguments. This code is more general than it needs to be, since we don't yet diagnose C++ [temp.class.spec]p9. However, it's likely to be needed for function templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73196 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
|
02cbbd2d945e466174bee536758e5a2e6a1c0ea2 |
11-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
Once we have deduced the template arguments of a class template partial specialization, substitute those template arguments back into the template arguments of the class template partial specialization to see if the results still match the original template arguments. This code is more general than it needs to be, since we don't yet diagnose C++ [temp.class.spec]p9. However, it's likely to be needed for function templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73196 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
|
0297caf49d9b20446f117b8d124138e7575302ed |
11-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Add a null check that fixes the crash in PR4362, and make sure to instantiate non-type template arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73193 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
3b56c002591b59c6c257951f6613b44de83fa860 |
11-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Add a null check that fixes the crash in PR4362, and make sure to instantiate non-type template arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73193 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
1f7744a5d080f048a6e44cef767fae4a9000924c |
11-Jun-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Make sure to calculate value-dependence correctly when deal with ICEs. (Actually, this isn't precisely correct, but it doesn't make sense to query whether an expression that isn't an ICE is value-dependent anyway.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73179 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
c149412d3adfc28ce1f1c0cf6d3701f9491adaf0 |
11-Jun-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Make sure to calculate value-dependence correctly when deal with ICEs. (Actually, this isn't precisely correct, but it doesn't make sense to query whether an expression that isn't an ICE is value-dependent anyway.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73179 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b320b9ecc2910ff2af2d25f8d2b213d5a4c7d23e |
11-Jun-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Separate TemplateArgument instantiation logic into its own function. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73176 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateInstantiate.cpp
|
913330004126031920bbceae577dce659514d58e |
11-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
Separate TemplateArgument instantiation logic into its own function. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73176 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateInstantiate.cpp
|
c5e01af856aca7fbacdf4835edd32a054a6328b2 |
11-Jun-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Template argument deduction for member pointers. Also, introduced some of the framework for performing instantiation as part of template argument deduction. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73175 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
|
637a4097f61b09d6ccf619298d9d121fafa044e4 |
11-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
Template argument deduction for member pointers. Also, introduced some of the framework for performing instantiation as part of template argument deduction. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73175 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
|
9e6a13fb9b94bf3c32370aa209d146af56ff2f98 |
10-Jun-2009 |
Eli Friedman <eli.friedman@gmail.com> |
PR4350: Make sure we don't create invalid printf attributes. This isn't visible anywhere normally because the printf format checks for this case, and we don't print out attribute values anywhere. Original patch by Roberto Bagnara. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73157 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d7dad72aa5d98194dc19601a435765c94444ba3b |
10-Jun-2009 |
Eli Friedman <eli.friedman@gmail.com> |
PR4350: Make sure we don't create invalid printf attributes. This isn't visible anywhere normally because the printf format checks for this case, and we don't print out attribute values anywhere. Original patch by Roberto Bagnara. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73157 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
a39e830d4f32b349943d6f3441e7a8c3407ef606 |
10-Jun-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Handle member pointer types with dependent class types (e.g., int T::*) and implement template instantiation for member pointer types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73151 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateInstantiate.cpp
emaType.cpp
|
949bf69136e07fb7968d84bc21d9272ff343ffdb |
10-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
Handle member pointer types with dependent class types (e.g., int T::*) and implement template instantiation for member pointer types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73151 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateInstantiate.cpp
emaType.cpp
|
5069ae385699f09f71295f77e7f2ab27465966ef |
09-Jun-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement template argument deduction for class template specialization types. As the example shows, we can now compute the length of a type-list using a template metaprogram and class template partial specialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73136 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
d708c72e3e5186662fb0045d2bd666bfd93a013d |
09-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement template argument deduction for class template specialization types. As the example shows, we can now compute the length of a type-list using a template metaprogram and class template partial specialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73136 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
891d82f6cec99543735d2b4cd6354352862532be |
09-Jun-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Add more parser support for Microsoft extensions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73101 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
290eeb0ec2b6b91f3621e05ef541deb257fbea73 |
09-Jun-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Add more parser support for Microsoft extensions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73101 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
3e39f924ede3ad2e8076e191a9ff1c4fa99a39f5 |
08-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Address comments from Doug. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73077 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
994b6cb65c9daba2128366bc4c64be6dbf953528 |
08-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Address comments from Doug. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73077 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
1c67c00c4f8b15235a7f2027bbab6d0d9aaed334 |
08-Jun-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Document the template argument deduction patterns that Anders' patch supports git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73071 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
0fce0ae7d60bed52e36c87194922b7aecce78b83 |
08-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
Document the template argument deduction patterns that Anders' patch supports git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73071 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
8574e7f21c6d2ee78fe3d91d2f6a960471e510e2 |
08-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Template argument deduction for function types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73070 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
a27fad59dc760252af025ef6a86d31bb7d11a44a |
08-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Template argument deduction for function types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73070 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
b6eed6e84d81efeeda9e405fd6ec440b81510b14 |
08-Jun-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Delete method which is now trivial. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73043 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
26784c1dd1f3e395f024fd594646790421b3bbf3 |
08-Jun-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Delete method which is now trivial. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73043 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
45b1e22a0aeb450188be75c8ea07ea70a757ce20 |
08-Jun-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Don't allow defining a block with a non-prototype type. Remove a hack which introduces some strange inconsistencies in compatibility for block pointers. Note that unlike an earlier revision proposed on cfe-commits, this patch still allows declaring block pointers without a prototype. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73041 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
687abffee40d0459fe5eecf3e5ee6e60be69d93c |
08-Jun-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Don't allow defining a block with a non-prototype type. Remove a hack which introduces some strange inconsistencies in compatibility for block pointers. Note that unlike an earlier revision proposed on cfe-commits, this patch still allows declaring block pointers without a prototype. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73041 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
0ebbcba04c95cd6fc8033a862ddaebdc98875c26 |
07-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Instantiation support for more Obj-C expressions, string literals, @selector and @protocol expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73036 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateExpr.cpp
|
02d95baf23cbb29ea4ca58b3e8f54f92f845b900 |
07-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Instantiation support for more Obj-C expressions, string literals, @selector and @protocol expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73036 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateExpr.cpp
|
7e2e967f7df16c8f9b3cf75ff243765dc7d8ad3a |
07-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Template instantiation support for Obj-C @encode expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73034 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprObjC.cpp
emaTemplateInstantiateExpr.cpp
|
fc0f021b492cf28ee7b3a6bd4445ae569e6f15de |
07-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Template instantiation support for Obj-C @encode expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73034 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprObjC.cpp
emaTemplateInstantiateExpr.cpp
|
9e8d7ca443bb7edaadf6ccff635e269c11ca4021 |
06-Jun-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Adds synthesize ivars to DeclContext. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73000 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
8019a7b55086da1b99dd156567d1f8c7e773d225 |
06-Jun-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Adds synthesize ivars to DeclContext. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73000 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
d2e57d9154d55251a4e94439dcdc96ab74f882ae |
06-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Make ParmVarDecl::getDefaultArg() more robust, it now asserts that the argument is not unparsed. Add a new hasDefaultArg() and use it in places where getDefaultArg() was called when the argument was unparsed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72984 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
ae0b4e7be78cf0dc2a6a333e865c2be9265774f9 |
06-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Make ParmVarDecl::getDefaultArg() more robust, it now asserts that the argument is not unparsed. Add a new hasDefaultArg() and use it in places where getDefaultArg() was called when the argument was unparsed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72984 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
92ca424a5e020280da1eb3a35185030aaa29f82e |
06-Jun-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Default builtin creation to off; we don't really want to be doing it without a relevant source location anyway. Fixes the issue with weird warnings when including objc/Object.h on OS X. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72978 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
|
6eb32f433fc660a3812497a88efa7537f48d43cf |
06-Jun-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Default builtin creation to off; we don't really want to be doing it without a relevant source location anyway. Fixes the issue with weird warnings when including objc/Object.h on OS X. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72978 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
|
074cf971ecca9fb93427f5e2b044858570bdd9ba |
05-Jun-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Use of DeclContext for objc's ivars. No functionality change. More to follow. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72951 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
496b5a894c5ec5425de53909f5aac3fb4771a2ec |
05-Jun-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Use of DeclContext for objc's ivars. No functionality change. More to follow. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72951 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
8f75fbcdd758570d095dde0ecbe1c42facacbac6 |
05-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Improvements to CXXExprWithTemporaries in preparation for fixing a bug with default arguments that have temporaries. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72944 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
|
99ba36de0d5b34624e74e77bffa73929617976cb |
05-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Improvements to CXXExprWithTemporaries in preparation for fixing a bug with default arguments that have temporaries. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72944 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
|
590b5683fd7f7f5dbcaf5efd2178e5bc5bf2efed |
05-Jun-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Address review comments for #pragma weak. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72926 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
dec7c76981a4624b6f40f2bf2375b174d1e90039 |
05-Jun-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Address review comments for #pragma weak. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72926 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
558a3a34d4a317592ea7ec74dafb7e15debe64ad |
05-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Make TemplateArgumentListBuilder take an ASTContext (because we're probably going to need it later). Move push_back to the .cpp file. If the passed in template argument is a type, assert that it's canonical. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72918 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateDeduction.cpp
|
9ba41645892da0000fe8a7832b80208f44dafeda |
05-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Make TemplateArgumentListBuilder take an ASTContext (because we're probably going to need it later). Move push_back to the .cpp file. If the passed in template argument is a type, assert that it's canonical. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72918 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateDeduction.cpp
|
0233eb600f22b2023000778205f3ae1dfa3f5292 |
05-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Make the TemplateArgumentList take a TemplateArgumentListBuilder. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72917 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateDeduction.cpp
|
e9c904b082ac3299831704a69066b86ab0f78bec |
05-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Make the TemplateArgumentList take a TemplateArgumentListBuilder. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72917 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateDeduction.cpp
|
6e9d02f2456d21fb4e377d781d3d81dffe5fb30c |
05-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Change the specialization decls to take a TemplateArgumentListBuilder. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72916 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
91fdf6f576b91f023c3bebb0d3786aab555cb3c5 |
05-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Change the specialization decls to take a TemplateArgumentListBuilder. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72916 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
a35faf97e36ffb4974f3f5f3ee6182fbbd9172c7 |
05-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Add a helper class for building template argument lists. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72915 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
|
1c5976e5e933c0d74f7e04e8f907a93f5edbfec1 |
05-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Add a helper class for building template argument lists. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72915 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
|
efbff32775b3dea2fe5f8e48de4e46b49c953d53 |
05-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Fix another crash and actually make the test case work. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72913 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
f4e2a2ce1101d875c4b69294416438007947daeb |
05-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Fix another crash and actually make the test case work. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72913 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
9758c0b0cc4683cd03e008f2a1469ee9b4c52076 |
05-Jun-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Start of a Sema implementation for #pragma weak. This isn't really the right approach, but I'm still not sure what the best way to go about this is. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72912 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
c49f19b6d39c5de71755a4be7c41f835c3e132f8 |
05-Jun-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Start of a Sema implementation for #pragma weak. This isn't really the right approach, but I'm still not sure what the best way to go about this is. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72912 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
b912b39f31773356651b6e0e9338715541a6286d |
05-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Fix a case when the TemplateArgs vector can be empty. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72911 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
9bff9a91fbd6213e2d042aadd8ede92bed6be666 |
05-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Fix a case when the TemplateArgs vector can be empty. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72911 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
ab9f71a3121ae99e85e09a34a8a35824d0ba0694 |
05-Jun-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Several improvements to template argument deduction: - Once we have deduced template arguments for a class template partial specialization, we use exactly those template arguments for instantiating the definition of the class template partial specialization. - Added template argument deduction for non-type template parameters. - Added template argument deduction for dependently-sized array types. With these changes, we can now implement, e.g., the remove_reference type trait. Also, Daniel's Ackermann template metaprogram now compiles properly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72909 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateExpr.cpp
|
199d99192fbcca9f043596c40ead4afab4999dba |
05-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
Several improvements to template argument deduction: - Once we have deduced template arguments for a class template partial specialization, we use exactly those template arguments for instantiating the definition of the class template partial specialization. - Added template argument deduction for non-type template parameters. - Added template argument deduction for dependently-sized array types. With these changes, we can now implement, e.g., the remove_reference type trait. Also, Daniel's Ackermann template metaprogram now compiles properly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72909 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateExpr.cpp
|
6b60e051af642fe5ae0d2274808bc84321cdc9d3 |
05-Jun-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix up this compatibility hack to be more compatible with gcc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72901 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
340a4e500f7a3952e7e72265c977711e504c69c7 |
05-Jun-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix up this compatibility hack to be more compatible with gcc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72901 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
3974a529fd12acaed0a820c06882ae4d21c15b35 |
04-Jun-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
More refactoring/cleanup of objc ivars. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72871 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
4183335fa8bfce8dd2d910dc992dace8c5f66b0d |
04-Jun-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
More refactoring/cleanup of objc ivars. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72871 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
0bcee30e4e38cb8f09578bd18c8f43b979e2ff1e |
04-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Template argument deduction for incomplete and constant array types. Doug, please review. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72844 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
4d6fb501ffc0568ca5ca7266005e96a6f1273845 |
04-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Template argument deduction for incomplete and constant array types. Doug, please review. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72844 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
5284b8804cc146ad1030c7f65a6254147a9eeac3 |
04-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Make sure to call FullExpr before parsing anything else. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72834 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateStmt.cpp
|
c4ee170b0c71f61fb1dec273d15fb11c29449a88 |
04-Jun-2009 |
Anders Carlsson <andersca@mac.com> |
Make sure to call FullExpr before parsing anything else. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72834 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateStmt.cpp
|
4ea653d3fc36b54003323306ba3e7aa709e58a0a |
04-Jun-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Template argument deduction for references git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72822 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
d560d5025a0e5b1942d99d5f39005337b03a64c2 |
04-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
Template argument deduction for references git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72822 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateDeduction.cpp
|
bf23a8a69def861809aaa2e0adb35be3920cacea |
04-Jun-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When performing template argument deduction, ensure that multiple deductions of the same template parameter are equivalent. This allows us to implement the is_same type trait (!). Also, move template argument deduction into its own file and update a few build systems with this change (grrrr). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72819 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
ema.h
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
|
0b9247f129401b4849682b2e2bcdea8fc977068a |
04-Jun-2009 |
Douglas Gregor <dgregor@apple.com> |
When performing template argument deduction, ensure that multiple deductions of the same template parameter are equivalent. This allows us to implement the is_same type trait (!). Also, move template argument deduction into its own file and update a few build systems with this change (grrrr). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72819 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
ema.h
emaTemplate.cpp
emaTemplateDeduction.cpp
emaTemplateInstantiate.cpp
|
ae671cfac12c6f9b25dc0204f60fa0984e789d30 |
03-Jun-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Minor cleanup for implicit int warnings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72770 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
fcff57751247d534159e0b51177cad5cc3e18ae7 |
03-Jun-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Minor cleanup for implicit int warnings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72770 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
31231ee8e93d7e1e051b5a8b03d141653373bbe8 |
03-Jun-2009 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Use "()" instead of "(void)" when pretty-printing a parameter-less function type for C++. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72747 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
7c94c4bb7b875dc1a2b23f77f1ed8013cf94abdb |
03-Jun-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Use "()" instead of "(void)" when pretty-printing a parameter-less function type for C++. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72747 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
b53dbd01ec8ea6fb259288f31337aced6e82e5af |
02-Jun-2009 |
Eli Friedman <eli.friedman@gmail.com> |
PR4142: Add %m format string specifier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72726 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
b92abb460be254fe577ccb95355ff7debf6a7719 |
02-Jun-2009 |
Eli Friedman <eli.friedman@gmail.com> |
PR4142: Add %m format string specifier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72726 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
f7ed78151d1ca4cf63198b4987bff9bcd650cb40 |
01-Jun-2009 |
Eli Friedman <eli.friedman@gmail.com> |
PR4287: allow a variadic prototype to make a subsequent K&R style definition variadic. I'm not completely sure it's legal, but the standard can be interpreted as making it legal, and gcc seems to think it's legal, so I didn't add an extension warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72689 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
|
bc4e29f307f86ddbc2f31d9530da79ad9b0c6b7b |
01-Jun-2009 |
Eli Friedman <eli.friedman@gmail.com> |
PR4287: allow a variadic prototype to make a subsequent K&R style definition variadic. I'm not completely sure it's legal, but the standard can be interpreted as making it legal, and gcc seems to think it's legal, so I didn't add an extension warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72689 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
|
0db4adec3b172426d572707d75495d04370c8b04 |
31-May-2009 |
Anders Carlsson <andersca@mac.com> |
Make sure to copy back arguments that can be changed by FindAllocationOverload. This fixes placement new. (Sebastian, please review). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72673 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
d958389d52170be1c6dee93031d34b13809b786b |
31-May-2009 |
Anders Carlsson <andersca@mac.com> |
Make sure to copy back arguments that can be changed by FindAllocationOverload. This fixes placement new. (Sebastian, please review). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72673 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
8871974682d0bfbf96322a9e68247ea42363c592 |
31-May-2009 |
Anders Carlsson <andersca@mac.com> |
Fix an off by one error when trying to perform copy initialization of operator new and operator delete arguments. Sebastian, please review. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72670 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
fc27d268cb34cbb8d186c6ad7cc043d41581ce71 |
31-May-2009 |
Anders Carlsson <andersca@mac.com> |
Fix an off by one error when trying to perform copy initialization of operator new and operator delete arguments. Sebastian, please review. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72670 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
449e7c1de1694b79e5539bda8827edc66efffd5e |
31-May-2009 |
Chris Lattner <sabre@nondot.org> |
Downgrade an error about "return in a no-return function" from being an error to being a warning that defaults to error. If you want this to be a warning, you have to explicitly pass -Winvalid-noreturn to clang to map it back to a warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72669 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
8662587fa75d3fb04f873e265841c9314c7f5523 |
31-May-2009 |
Chris Lattner <sabre@nondot.org> |
Downgrade an error about "return in a no-return function" from being an error to being a warning that defaults to error. If you want this to be a warning, you have to explicitly pass -Winvalid-noreturn to clang to map it back to a warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72669 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
9fbe9bfcc4bbc42f45936d4dc1dd2e60bb4e12bc |
31-May-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Disallow exception specs on typedefs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72664 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaType.cpp
|
3cc9726a493d90bd8faf094986a59352fd3461cb |
31-May-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Disallow exception specs on typedefs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72664 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaType.cpp
|
d16b089547a20939dd2ac490fd5def63b3596347 |
31-May-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix for PR4285: allow intializing a const wchar_t array with a wide string. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72663 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
bb6415c69fc6440c337970e39749d4d482d9de42 |
31-May-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix for PR4285: allow intializing a const wchar_t array with a wide string. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72663 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
58944acac481a17adc174389c1124892cbdfd979 |
31-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Initial infrastructure for class template partial specialization. Here we have the basics of declaring and storing class template partial specializations, matching class template partial specializations at instantiation time via (limited) template argument deduction, and using the class template partial specialization's pattern for instantiation. This patch is enough to make a simple is_pointer type trait work, but not much else. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72662 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaTemplateInstantiate.cpp
|
c8ab2563ac8f7dcc4fdc518b5cc7015ecbb2f003 |
31-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Initial infrastructure for class template partial specialization. Here we have the basics of declaring and storing class template partial specializations, matching class template partial specializations at instantiation time via (limited) template argument deduction, and using the class template partial specialization's pattern for instantiation. This patch is enough to make a simple is_pointer type trait work, but not much else. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72662 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaTemplateInstantiate.cpp
|
0f9df2dae63a517b170ad3b4735a844af423cd3e |
31-May-2009 |
Anders Carlsson <andersca@mac.com> |
Forgot the implementation. Thanks Eli. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72647 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
75bbb97f6e413633f2537e42f90547ccac559fde |
31-May-2009 |
Anders Carlsson <andersca@mac.com> |
Forgot the implementation. Thanks Eli. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72647 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
a8969cb74add6bbb48444adaabcb7d9186942274 |
31-May-2009 |
Anders Carlsson <andersca@mac.com> |
Add RemoveOutermostTemporaryBinding. Not used yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72644 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
|
b27615af9047fa87b7dd6b31582a072d3636acf5 |
31-May-2009 |
Anders Carlsson <andersca@mac.com> |
Add RemoveOutermostTemporaryBinding. Not used yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72644 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
|
cb8e0c060390e2a97c736aab525eb1127b7d0176 |
31-May-2009 |
Anders Carlsson <andersca@mac.com> |
Clean up the newly added C++ AST nodes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72643 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
88eaf075c56672761b72cc50957db4a35bf24ebd |
31-May-2009 |
Anders Carlsson <andersca@mac.com> |
Clean up the newly added C++ AST nodes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72643 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
2d58f47c2a99f3a2595fd696ecd71a64be700e52 |
31-May-2009 |
Anders Carlsson <andersca@mac.com> |
It's OK for a full expr to be null. This fixes the failing test cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72642 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
a19e66d448223ccb1570a37d8838480011c8ecf8 |
31-May-2009 |
Anders Carlsson <andersca@mac.com> |
It's OK for a full expr to be null. This fixes the failing test cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72642 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
1d768747ea6bfb2024a247821769c39362484d93 |
30-May-2009 |
Anders Carlsson <andersca@mac.com> |
ActOnReturnStmt should also take a FullExprArg. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72641 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaStmt.cpp
emaTemplateInstantiateStmt.cpp
|
a0ab25d2808fe77ffff54f25a015893791dfd4b6 |
30-May-2009 |
Anders Carlsson <andersca@mac.com> |
ActOnReturnStmt should also take a FullExprArg. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72641 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaStmt.cpp
emaTemplateInstantiateStmt.cpp
|
f9f05b833a9778ec1405b6c8c79ae9a2e2de65b0 |
30-May-2009 |
Anders Carlsson <andersca@mac.com> |
AddInitializerToDecl needs to take a full expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72640 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaExprCXX.cpp
|
f5dcd3885865c931fdbd16f36237af70743d53c6 |
30-May-2009 |
Anders Carlsson <andersca@mac.com> |
AddInitializerToDecl needs to take a full expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72640 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaExprCXX.cpp
|
1ef0ee94fb641a3fe9459d6cc5fc106c5bd41bf6 |
30-May-2009 |
Anders Carlsson <andersca@mac.com> |
Add the newly created temporary to the ExprTemporaries stack. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72638 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
860306ee303d4c60068b76cca7cfc7b60323f8b7 |
30-May-2009 |
Anders Carlsson <andersca@mac.com> |
Add the newly created temporary to the ExprTemporaries stack. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72638 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
5552c80bf4f02f764bb9d8708bbc686845bf9bb4 |
30-May-2009 |
Anders Carlsson <andersca@mac.com> |
Stop using CXXTempVarDecl and use CXXTemporary instead. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72634 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
|
ff6b3d64c9f07155f1414411b8451d7bf8937c62 |
30-May-2009 |
Anders Carlsson <andersca@mac.com> |
Stop using CXXTempVarDecl and use CXXTemporary instead. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72634 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
|
7b7b25588fbcda3306d9725d863daed4f54699c2 |
30-May-2009 |
Anders Carlsson <andersca@mac.com> |
Remove VarDecl from CXXConstructExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72633 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExprCXX.cpp
emaInit.cpp
emaTemplateInstantiateExpr.cpp
|
8e587a15da6d3457a418239d5eb4146fcbd209f3 |
30-May-2009 |
Anders Carlsson <andersca@mac.com> |
Remove VarDecl from CXXConstructExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72633 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExprCXX.cpp
emaInit.cpp
emaTemplateInstantiateExpr.cpp
|
c813e3d0b61ffdbd086af91c63840950d531668e |
30-May-2009 |
Anders Carlsson <andersca@mac.com> |
Bind temporaries correctly when instantiating expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72632 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateExpr.cpp
|
464f4f327a218725a1a3f0756ef8f17d7a2b48f0 |
30-May-2009 |
Anders Carlsson <andersca@mac.com> |
Bind temporaries correctly when instantiating expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72632 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateExpr.cpp
|
8cc1f0df89d914c99abfa0d2d89edd7aaa44d49a |
30-May-2009 |
Anders Carlsson <andersca@mac.com> |
Remove VarDecl from CheckInitializerTypes now that CXXConstructExpr doesn't need to take a VarDecl anymore. (It still does, but it won't for long) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72630 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaInit.cpp
|
0f5f2c669e435a31eca9ca2f09fd8917ee11664e |
30-May-2009 |
Anders Carlsson <andersca@mac.com> |
Remove VarDecl from CheckInitializerTypes now that CXXConstructExpr doesn't need to take a VarDecl anymore. (It still does, but it won't for long) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72630 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaInit.cpp
|
a05fa10ba08f4bf0fc95264d48983f93e965279b |
30-May-2009 |
Anders Carlsson <andersca@mac.com> |
Add Sema::MaybeBindToTemporary which takes an expression and (if needed) wraps it in a CXXBindTemporaryExpr. Use this when creating CXXTemporaryObjectExprs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72629 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
|
def11996fb558f58a8a7ae87aa95eb0bb96bfe4a |
30-May-2009 |
Anders Carlsson <andersca@mac.com> |
Add Sema::MaybeBindToTemporary which takes an expression and (if needed) wraps it in a CXXBindTemporaryExpr. Use this when creating CXXTemporaryObjectExprs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72629 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
|
873176e53a2e499bfea5568f3a31556d38130b21 |
30-May-2009 |
Anders Carlsson <andersca@mac.com> |
Add a CXXBindTemporaryExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72627 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateExpr.cpp
|
fceb0a8adba9d25db99a4d73e9655c2831a96ecd |
30-May-2009 |
Anders Carlsson <andersca@mac.com> |
Add a CXXBindTemporaryExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72627 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateExpr.cpp
|
8345da7024ecab816188f8b7d84acf4bcf8576dd |
30-May-2009 |
Anders Carlsson <andersca@mac.com> |
Replace a cast with a dyn_cast as suggested by Doug. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72624 91177308-0d34-0410-b5e6-96231b3b80d8
emaInherit.cpp
|
f89bb0fa8b2b806b0a3ad23619c1f5acb4aa952a |
30-May-2009 |
Anders Carlsson <andersca@mac.com> |
Replace a cast with a dyn_cast as suggested by Doug. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72624 91177308-0d34-0410-b5e6-96231b3b80d8
emaInherit.cpp
|
8d8ddcab753252ea999c37c2b585399bb8a7dfed |
30-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Pretty printing and improved representation for namespace alias declarations git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72616 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
6c9c94053132e5ca0655124b70f1c386a332e71d |
30-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Pretty printing and improved representation for namespace alias declarations git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72616 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
1d27d691cda32d632aea9b83f6a57d4caf6ba60b |
30-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Printing for using directives, e.g., using namespace std::debug; Extended UsingDirectiveDecl to store the nested-name-specifier that precedes the nominated namespace. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72614 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
8419fa3af97208eb00f0cd6c62354ce4ff986677 |
30-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Printing for using directives, e.g., using namespace std::debug; Extended UsingDirectiveDecl to store the nested-name-specifier that precedes the nominated namespace. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72614 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
8e7e49e55e61cdcbd6db3847f86d8d434197e417 |
30-May-2009 |
Anders Carlsson <andersca@mac.com> |
Add a member lookup criteria constructor for searching for overridden virtual member functions. Use this instead of regular name lookup when checking for overriding functions so we will see declarations that would otherwise be hidden. Fixes 6902298. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72601 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaInherit.cpp
emaInherit.h
|
d12ef8d142868889867f9dd968b5f3ea02d463c1 |
30-May-2009 |
Anders Carlsson <andersca@mac.com> |
Add a member lookup criteria constructor for searching for overridden virtual member functions. Use this instead of regular name lookup when checking for overriding functions so we will see declarations that would otherwise be hidden. Fixes 6902298. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72601 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaInherit.cpp
emaInherit.h
|
996677cffa764e70e85f289a2edd88aa48b57c2d |
30-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Refactor and clean up the AST printer, so that it uses a DeclVisitor, walks through DeclContexts properly, and prints more of the information available in the AST. The functionality is still available via -ast-print, -ast-dump, etc., and also via the new member functions Decl::dump() and Decl::print(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72597 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
4fe0c8e9c76b96e7aff21696a40dacc09d0237bc |
30-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Refactor and clean up the AST printer, so that it uses a DeclVisitor, walks through DeclContexts properly, and prints more of the information available in the AST. The functionality is still available via -ast-print, -ast-dump, etc., and also via the new member functions Decl::dump() and Decl::print(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72597 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
b72eca9721640e0bedec4a26c068c1eb427f62b4 |
30-May-2009 |
Anders Carlsson <andersca@mac.com> |
Make the LookupBase boolean an enum instead. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72594 91177308-0d34-0410-b5e6-96231b3b80d8
emaInherit.cpp
emaInherit.h
|
9e8a72291465488e734c8aa5e20142d8b3cd981c |
30-May-2009 |
Anders Carlsson <andersca@mac.com> |
Make the LookupBase boolean an enum instead. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72594 91177308-0d34-0410-b5e6-96231b3b80d8
emaInherit.cpp
emaInherit.h
|
3bf3bbcb3cf79cc5bc065a011f5ae195667d3a29 |
29-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Create a new PrintingPolicy class, which we pass down through the AST printing logic to help customize the output. For now, we use this rather than a special flag to suppress the "struct" when printing "struct X" and to print the Boolean type as "bool" in C++ but "_Bool" in C. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72590 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaTemplateInstantiate.cpp
|
d249e1d1f1498b81314459ceda19d6ff25c278ad |
29-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Create a new PrintingPolicy class, which we pass down through the AST printing logic to help customize the output. For now, we use this rather than a special flag to suppress the "struct" when printing "struct X" and to print the Boolean type as "bool" in C++ but "_Bool" in C. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72590 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaTemplateInstantiate.cpp
|
579534aca65724541687935c890555267a303083 |
29-May-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Make sure we don't give the wrong warning, and make sure not to set hadError (suppressing future diagnostics) if we didn't print an error. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72588 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
e540858b289b23653bcb23646f135729203635cb |
29-May-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Make sure we don't give the wrong warning, and make sure not to set hadError (suppressing future diagnostics) if we didn't print an error. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72588 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
b4c71b389d72b0825f78cc4e68ed2b299dc49558 |
29-May-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Add an assertion so that we don't accidentally build constant arrays of VLAs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72587 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
587cbdfd95f4b0aaccc14b31f5debe85d5daf7ed |
29-May-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Add an assertion so that we don't accidentally build constant arrays of VLAs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72587 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
4ac20ef0578c5bcf99cd5574e0ed6b36d186eadc |
29-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Reduce the amount of stack space we use in SmallVectors during template instantiation. This helps reduce our stack footprint when performing deep template instantiations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72582 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaTemplateInstantiateExpr.cpp
emaTemplateInstantiateStmt.cpp
|
0ca20ac8cea99c43d89510f29cf3dc876f9c9111 |
29-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Reduce the amount of stack space we use in SmallVectors during template instantiation. This helps reduce our stack footprint when performing deep template instantiations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72582 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaTemplateInstantiateExpr.cpp
emaTemplateInstantiateStmt.cpp
|
95acf985692a9cfa9bfa25b0cb6a509ca0f21e17 |
29-May-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Revert r72575, which isn't really right, and fix up other code to handle the construct in question correctly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72581 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
8718a6a02ccc53fea758677781a8df3a8b0c41c9 |
29-May-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Revert r72575, which isn't really right, and fix up other code to handle the construct in question correctly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72581 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
aaacda9e0df28383bf78db72e2a5831cbdd23a08 |
29-May-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Reject incomplete types in exception specs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72580 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaType.cpp
|
ef65f06e8e440aec541442cfd73a8a836e9bc842 |
29-May-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Reject incomplete types in exception specs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72580 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaType.cpp
|
567c7fb70af7424665cbb86229dbb91102dc5398 |
29-May-2009 |
Mike Stump <mrs@apple.com> |
Avoid dumping during semantic analysis when checking array types when a vla is used. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72575 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
4f54f4e2f1af5850805033d69c5199df068d11e7 |
29-May-2009 |
Mike Stump <mrs@apple.com> |
Avoid dumping during semantic analysis when checking array types when a vla is used. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72575 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
dfc009f08085c2daa8f74214c966a74950db5d26 |
29-May-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Disallow exception specifications on multi-level indirections. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72571 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaType.cpp
|
6a7330c20cabf1cf1cd46f5dfc183ec3a72add66 |
29-May-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Disallow exception specifications on multi-level indirections. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72571 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaType.cpp
|
f3a200f916a2bae6a83fe2dbfd6c9aa6a8554dea |
29-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Some cleanups and commenting to our declaration-name handling git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72570 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
00c4486243ac0baa77a387335541c742c4dd615a |
29-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Some cleanups and commenting to our declaration-name handling git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72570 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
246d53b370f2a57ed7386418d5123ce9b69459b3 |
29-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Now that we have declared/defined tag types within DeclGroups, instantiation of tags local to member functions of class templates (and, eventually, function templates) works when the tag is defined as part of the decl-specifier-seq, e.g., struct S { T x, y; } s1; Also, make sure that we don't try to default-initialize a dependent type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72568 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplateInstantiateDecl.cpp
|
8e92bf33baa91a8d97cbd4859648af149d5b5e74 |
29-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Now that we have declared/defined tag types within DeclGroups, instantiation of tags local to member functions of class templates (and, eventually, function templates) works when the tag is defined as part of the decl-specifier-seq, e.g., struct S { T x, y; } s1; Also, make sure that we don't try to default-initialize a dependent type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72568 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplateInstantiateDecl.cpp
|
4d57af2198b8cfe9505c43266383419c1303ecfd |
29-May-2009 |
Eli Friedman <eli.friedman@gmail.com> |
If a declarator group declares a type, make sure to add that declaration to the DeclGroup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72559 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
c1dc653b08226c1d8e1732f9d8b03b82869900bc |
29-May-2009 |
Eli Friedman <eli.friedman@gmail.com> |
If a declarator group declares a type, make sure to add that declaration to the DeclGroup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72559 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
71f06033638805d6179308b7d574241500d5056f |
29-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When we parse a tag specifier, keep track of whether that tag specifier resulted in the creation of a new TagDecl node, which happens either when the tag specifier was a definition or when the tag specifier was the first declaration of that tag type. This information has several uses, the first of which is implemented in this commit: 1) In C++, one is not allowed to define tag types within a type specifier (e.g., static_cast<struct S { int x; } *>(0) is ill-formed) or within the result or parameter types of a function. We now diagnose this. 2) We can extend DeclGroups to contain information about any tags that are declared/defined within the declaration specifiers of a variable, e.g., struct Point { int x, y, z; } p; This will help improve AST printing and template instantiation, among other things. 3) For C99, we can keep track of whether a tag type is defined within the type of a parameter, to properly cope with cases like, e.g., int bar(struct T2 { int x; } y) { struct T2 z; } We can also do similar things wherever there is a type specifier, e.g., to keep track of where the definition of S occurs in this legal C99 code: (struct S { int x, y; } *)0 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72555 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplate.cpp
emaType.cpp
|
402abb55fc2e0cdda5fb1ac90009b1f5f6774906 |
29-May-2009 |
Douglas Gregor <dgregor@apple.com> |
When we parse a tag specifier, keep track of whether that tag specifier resulted in the creation of a new TagDecl node, which happens either when the tag specifier was a definition or when the tag specifier was the first declaration of that tag type. This information has several uses, the first of which is implemented in this commit: 1) In C++, one is not allowed to define tag types within a type specifier (e.g., static_cast<struct S { int x; } *>(0) is ill-formed) or within the result or parameter types of a function. We now diagnose this. 2) We can extend DeclGroups to contain information about any tags that are declared/defined within the declaration specifiers of a variable, e.g., struct Point { int x, y, z; } p; This will help improve AST printing and template instantiation, among other things. 3) For C99, we can keep track of whether a tag type is defined within the type of a parameter, to properly cope with cases like, e.g., int bar(struct T2 { int x; } y) { struct T2 z; } We can also do similar things wherever there is a type specifier, e.g., to keep track of where the definition of S occurs in this legal C99 code: (struct S { int x, y; } *)0 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72555 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplate.cpp
emaType.cpp
|
1a6b88e99f3c83f9404cccef65fb38230799a747 |
28-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Introduced DeclContext::isDependentContext, which determines whether a given DeclContext is dependent on type parameters. Use this to properly determine whether a TagDecl is dependent; previously, we were missing the case where the TagDecl is a local class of a member function of a class template (phew!). Also, make sure that, when we instantiate declarations within a member function of a class template (or a function template, eventually), that we add those declarations to the "instantiated locals" map so that they can be found when instantiating declaration references. Unfortunately, I was not able to write a useful test for this change, although the assert() that fires when uncommenting the FIXME'd line in test/SemaTemplate/instantiate-declref.cpp tells the "experienced user" that we're now doing the right thing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72526 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
bc221637f5ed3538b8495dd13b831c11e821c712 |
28-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Introduced DeclContext::isDependentContext, which determines whether a given DeclContext is dependent on type parameters. Use this to properly determine whether a TagDecl is dependent; previously, we were missing the case where the TagDecl is a local class of a member function of a class template (phew!). Also, make sure that, when we instantiate declarations within a member function of a class template (or a function template, eventually), that we add those declarations to the "instantiated locals" map so that they can be found when instantiating declaration references. Unfortunately, I was not able to write a useful test for this change, although the assert() that fires when uncommenting the FIXME'd line in test/SemaTemplate/instantiate-declref.cpp tells the "experienced user" that we're now doing the right thing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72526 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
a376cbd55366711bb9dd98b730b3d0f8c80fb2ba |
28-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Reimplement much of the way that we track nested classes in the parser. Rather than placing all of the delayed member function declarations and inline definitions into a single bucket corresponding to the top-level class, we instead mirror the nesting structure of the nested classes and place the delayed member functions into their appropriate place. Then, when we actually parse the delayed member function declarations, set up the scope stack the same way as it was when we originally saw the declaration, so that we can find, e.g., template parameters that are in scope. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72502 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaTemplateInstantiateStmt.cpp
|
6569d68745c8213709740337d2be52b031384f58 |
28-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Reimplement much of the way that we track nested classes in the parser. Rather than placing all of the delayed member function declarations and inline definitions into a single bucket corresponding to the top-level class, we instead mirror the nesting structure of the nested classes and place the delayed member functions into their appropriate place. Then, when we actually parse the delayed member function declarations, set up the scope stack the same way as it was when we originally saw the declaration, so that we can find, e.g., template parameters that are in scope. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72502 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaTemplateInstantiateStmt.cpp
|
2767d88f088ce07f489e6a64592950f9c0a91ebd |
28-May-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Reintroduce the home for exception specs, and make Sema fill it. However, keep the spec out of the canonical type this time. Net effect is currently nothing, because the spec isn't checked anywhere. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72498 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaType.cpp
|
465226e23a3008bd68973513dda1f9e3cd27dbdd |
28-May-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Reintroduce the home for exception specs, and make Sema fill it. However, keep the spec out of the canonical type this time. Net effect is currently nothing, because the spec isn't checked anywhere. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72498 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaType.cpp
|
9f1a3df47b8c63c2f90486b1cdde526d6b461c06 |
27-May-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Fix the type of a enum non-type template argument within the instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72489 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
599fe7ccc0cbfe761b54039fcc2a7c62d7f84934 |
27-May-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Fix the type of a enum non-type template argument within the instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72489 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
9cbe6cd0f953f7a31df5ad1aaf8bdd33aed12a1e |
27-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Simplify, and improve the performance of, template instantiation for declaration references. The key realization is that dependent Decls, which actually require instantiation, can only refer to the current instantiation or members thereof. And, since the current context during instantiation contains all of those members of the current instantiation, we can simply find the real instantiate that matches up with the "current instantiation" template. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72486 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaTemplateInstantiateExpr.cpp
|
ed961e7fffc268eeace169869f5a059bcbd5fcbd |
27-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Simplify, and improve the performance of, template instantiation for declaration references. The key realization is that dependent Decls, which actually require instantiation, can only refer to the current instantiation or members thereof. And, since the current context during instantiation contains all of those members of the current instantiation, we can simply find the real instantiate that matches up with the "current instantiation" template. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72486 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaTemplateInstantiateExpr.cpp
|
d769bfac167d585e69a9f1f8f100c2ba301fca4b |
27-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Add some more tests for instantiation of declaration references. Also, improve some error recovery with explicit template instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72484 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplate.cpp
|
d0c873799614d32c9c11280878ac1a856f92f707 |
27-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Add some more tests for instantiation of declaration references. Also, improve some error recovery with explicit template instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72484 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplate.cpp
|
8d71743661227dd7a938d217ae28c55f2b7c1abf |
27-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Enumeration declarations that were instantiated from an enumeration within a template now have a link back to the enumeration from which they were instantiated. This means that we can now find the instantiation of an anonymous enumeration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72482 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
8dbc3c64965f99e48830885835b7d2fc26ec3cf5 |
27-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Enumeration declarations that were instantiated from an enumeration within a template now have a link back to the enumeration from which they were instantiated. This means that we can now find the instantiation of an anonymous enumeration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72482 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
e919fb069b604f0070e3bd2169e06448acf0a7f9 |
27-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve name lookup for and template instantiation of declaration references. There are several smallish fixes here: - Make sure we look through template parameter scope when determining whether we're parsing a nested class (or nested class *template*). This makes sure that we delay parsing the bodies of inline member functions until after we're out of the outermost class (template) scope. - Since the bodies of member functions are always parsed "out-of-line", even when they were declared in-line, teach unqualified name lookup to look into the (semantic) parents. - Use the new InstantiateDeclRef to handle the instantiation of a reference to a declaration (in DeclRefExpr), which drastically simplifies template instantiation for DeclRefExprs. - When we're instantiating a ParmVarDecl, it must be in the current instantiation scope, so only look there. Also, remove the #if 0's and FIXME's from the dynarray example, which now compiles and executes thanks to Anders and Eli. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72481 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
emaTemplateInstantiateDecl.cpp
emaTemplateInstantiateExpr.cpp
|
2bba76b0ec4c2f2134eebb1a2bbfe102f36c2f6e |
27-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Improve name lookup for and template instantiation of declaration references. There are several smallish fixes here: - Make sure we look through template parameter scope when determining whether we're parsing a nested class (or nested class *template*). This makes sure that we delay parsing the bodies of inline member functions until after we're out of the outermost class (template) scope. - Since the bodies of member functions are always parsed "out-of-line", even when they were declared in-line, teach unqualified name lookup to look into the (semantic) parents. - Use the new InstantiateDeclRef to handle the instantiation of a reference to a declaration (in DeclRefExpr), which drastically simplifies template instantiation for DeclRefExprs. - When we're instantiating a ParmVarDecl, it must be in the current instantiation scope, so only look there. Also, remove the #if 0's and FIXME's from the dynarray example, which now compiles and executes thanks to Anders and Eli. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72481 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
emaTemplateInstantiateDecl.cpp
emaTemplateInstantiateExpr.cpp
|
5868dfcbe19cb2e46797809e061b8077121a4296 |
27-May-2009 |
Anders Carlsson <andersca@mac.com> |
Fix another test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72478 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
bffed8a98cf5775cd39dc1765abc75c914513012 |
27-May-2009 |
Anders Carlsson <andersca@mac.com> |
Fix another test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72478 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
6b0e797329996d8648ae7c0efa3aa35789f4c4cf |
27-May-2009 |
Anders Carlsson <andersca@mac.com> |
Relax an assert to an if check. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72477 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
7c520cf417e7a4eceeefef0a8b2a2b33811f0481 |
27-May-2009 |
Anders Carlsson <andersca@mac.com> |
Relax an assert to an if check. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72477 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
83418529244038b34ae9990b4cf6ac0a92f8c741 |
27-May-2009 |
Steve Naroff <snaroff@apple.com> |
Convert ObjC qualified type clients over to using iterators. This allows me to remove some API that I don't want to carry over to ObjCObjectPointerType. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72475 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
446ee4eb4fc4c705a59365252df7a5c253daafa1 |
27-May-2009 |
Steve Naroff <snaroff@apple.com> |
Convert ObjC qualified type clients over to using iterators. This allows me to remove some API that I don't want to carry over to ObjCObjectPointerType. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72475 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
73bb5e6bdee5fe8d05ad7cd9380172113fe38223 |
27-May-2009 |
Anders Carlsson <andersca@mac.com> |
Create CXXConstructExprs when constructing via copy initialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72474 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaInit.cpp
|
2078bb9c9336da56ea521e98e718556b227541f6 |
27-May-2009 |
Anders Carlsson <andersca@mac.com> |
Create CXXConstructExprs when constructing via copy initialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72474 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaInit.cpp
|
f97986dce99ea113744872de1d2a6d2da274061b |
27-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Initial stab at a generalized operation for determining the instantiation of a declaration from the template version (or version that lives in a template) and a given set of template arguments. This needs much, much more testing, but it suffices for simple examples like typedef T* iterator; iterator begin(); git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72461 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaTemplateInstantiateExpr.cpp
|
815215daf8f642b53a28212313fca7b9f77e5b9d |
27-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Initial stab at a generalized operation for determining the instantiation of a declaration from the template version (or version that lives in a template) and a given set of template arguments. This needs much, much more testing, but it suffices for simple examples like typedef T* iterator; iterator begin(); git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72461 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaTemplateInstantiateExpr.cpp
|
b2f81ac583b519aa09c10e63d84e10abd13bfed7 |
27-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Don't drop the computed implicit conversions when building a call to overloaded operator[] or overloaded postfix unary operator (++, --). Thanks to Eli for finding this bug! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72460 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
7ff69269cf13583a981b265d4edee689feb4a830 |
27-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Don't drop the computed implicit conversions when building a call to overloaded operator[] or overloaded postfix unary operator (++, --). Thanks to Eli for finding this bug! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72460 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
d4f14affb7480a8610fc12997c647d22e7ecfb1a |
27-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Template instantiation for "typeof" for both types and expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72440 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
emaTemplateInstantiateExpr.cpp
|
5f8bd59b448576e0ac5996b5247f653b7476ad3e |
27-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Template instantiation for "typeof" for both types and expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72440 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
emaTemplateInstantiateExpr.cpp
|
dc18e894fb684c27224657d5375942680588498d |
26-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Make sure that CodeGen sees template instantiations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72433 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
aba43bb13b3aa3e81990989375fba3a902bfe1c2 |
26-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Make sure that CodeGen sees template instantiations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72433 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
4833ff0f4a21577e2b4d2c870adab24e5199ef7a |
26-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When evaluating a VarDecl as a constant or determining whether it is an integral constant expression, maintain a cache of the value and the is-an-ICE flag within the VarDecl itself. This eliminates exponential-time behavior of the Fibonacci template metaprogram. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72428 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
78d1583d0b36b7d6d8d10234cdc19ab94adf765a |
26-May-2009 |
Douglas Gregor <dgregor@apple.com> |
When evaluating a VarDecl as a constant or determining whether it is an integral constant expression, maintain a cache of the value and the is-an-ICE flag within the VarDecl itself. This eliminates exponential-time behavior of the Fibonacci template metaprogram. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72428 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
89f549254750afd2c9b89b1629743e006d70d30b |
26-May-2009 |
Anders Carlsson <andersca@mac.com> |
An Obj-C message send expression can never have a reference type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72417 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
187ba159b04d8cc760daeee5cfbbc69450b2d50d |
26-May-2009 |
Anders Carlsson <andersca@mac.com> |
An Obj-C message send expression can never have a reference type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72417 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
bf89b30d26ae7fda7865cdb69ba679bd87d57798 |
25-May-2009 |
Chris Lattner <sabre@nondot.org> |
tweak non-null check to put the caret on the function, but underline the argument. This avoids the argument from being silenced when the argument is the NULL macro, which is defined in a system header. This also makes the output a bit nicer, e.g.: t.c:8:3: warning: null passed to a callee which requires a non-null argument func1(NULL, cp2, i1); ^ ~~~~ vs something like: t.c:8:10: warning: argument is null where non-null is required func1(NULL, cp2, i1); ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72393 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
12b97ff9ce1412e388444f03049bfa6ad1bb5eb9 |
25-May-2009 |
Chris Lattner <sabre@nondot.org> |
tweak non-null check to put the caret on the function, but underline the argument. This avoids the argument from being silenced when the argument is the NULL macro, which is defined in a system header. This also makes the output a bit nicer, e.g.: t.c:8:3: warning: null passed to a callee which requires a non-null argument func1(NULL, cp2, i1); ^ ~~~~ vs something like: t.c:8:10: warning: argument is null where non-null is required func1(NULL, cp2, i1); ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72393 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
b578b9574b7deca4d87bcfb8a4fc71e94b1e8b51 |
23-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Template instantiation for qualified declaration reference expressions. We are now missing template instantiation logic for only three classes of expressions: - Blocks-related expressions (BlockExpr, BlockDeclRefExpr) - C++ default argument expressions - Objective-C expressions Additionally, our handling of DeclRefExpr is still quite poor, since it cannot handle references to many kinds of declarations. As part of this change, converted the TemplateExprInstantiator to use iteration through all of the expressions via clang/AST/StmtNodes.def, ensuring that we don't forget to add template instantiation logic for any new expression node kinds. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72303 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateExpr.cpp
|
e30d0bdda24708e9a667722a56b9c96153fe8b4d |
23-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Template instantiation for qualified declaration reference expressions. We are now missing template instantiation logic for only three classes of expressions: - Blocks-related expressions (BlockExpr, BlockDeclRefExpr) - C++ default argument expressions - Objective-C expressions Additionally, our handling of DeclRefExpr is still quite poor, since it cannot handle references to many kinds of declarations. As part of this change, converted the TemplateExprInstantiator to use iteration through all of the expressions via clang/AST/StmtNodes.def, ensuring that we don't forget to add template instantiation logic for any new expression node kinds. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72303 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateExpr.cpp
|
c89a2afc35e21efbf55275341c004ea3e409925e |
23-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Template instantiation for the GNU address-of-label extension. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72301 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateExpr.cpp
|
76658235f9e350eab68bfbb4e88d0be2ad48e102 |
23-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Template instantiation for the GNU address-of-label extension. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72301 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateExpr.cpp
|
d56ae46dfec4c501b7bca0e144a121020841aa53 |
23-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Template instantiation for ExtVectorElementExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72299 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateExpr.cpp
|
bec53e7ef3ad39242209a0c7765ca333dd3af8fe |
23-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Template instantiation for ExtVectorElementExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72299 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateExpr.cpp
|
4862e875890b1e27ac474f6ee193753fdb72a776 |
22-May-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Cannot type cast @selector expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72284 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b5ff6bfaf4bff6c70042600ad4070518440cec4a |
22-May-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Cannot type cast @selector expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72284 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
4d967e222b1b86cd46f7f1bb49e43157f43d8ee6 |
22-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Add a few tests to ensure that member functions of class templates can call other member functions of class templates, including after template instantiation. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72282 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateExpr.cpp
|
08d3e7c9ccbed9b26c301390d5997871b2dd41b7 |
22-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Add a few tests to ensure that member functions of class templates can call other member functions of class templates, including after template instantiation. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72282 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateExpr.cpp
|
93b8b0f10bd443028da8d3af67874de578737171 |
22-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Representation of and template instantiation for member expressions. This change introduces another AST node, CXXUnresolvedMemberExpr, that captures member references (x->m, x.m) when the base of the expression (the "x") is type-dependent, and we therefore cannot resolve the member reference yet. Note that our parsing of member references for C++ is still quite poor, e.g., we don't handle x->Base::m or x->operator int. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72281 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaTemplateInstantiateExpr.cpp
|
1c0ca59416999129d0439c2661d137ef38e86209 |
22-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Representation of and template instantiation for member expressions. This change introduces another AST node, CXXUnresolvedMemberExpr, that captures member references (x->m, x.m) when the base of the expression (the "x") is type-dependent, and we therefore cannot resolve the member reference yet. Note that our parsing of member references for C++ is still quite poor, e.g., we don't handle x->Base::m or x->operator int. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72281 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaTemplateInstantiateExpr.cpp
|
c0672e4add6bd89aee2bb032b4f91bd1aff100e2 |
22-May-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
(Next runtime only) check to see if class implements forwardInvocation method and objects of this class are derived from 'NSProxy'. Under such conditions, which means that every method possible is implemented in the class, we should not issue "Method definition not found" warnings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72267 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
cd1876207f5564beba74e4b2524b664bdba0ba9f |
22-May-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
(Next runtime only) check to see if class implements forwardInvocation method and objects of this class are derived from 'NSProxy'. Under such conditions, which means that every method possible is implemented in the class, we should not issue "Method definition not found" warnings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72267 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
ed71c546582b95de9b468a8020d373fed08aff5f |
22-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Template instantiation for C99 compound literals git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72236 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaTemplateInstantiateExpr.cpp
emaType.cpp
|
690dc7f4f2c0fe87409839b7560c19dee7832195 |
22-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Template instantiation for C99 compound literals git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72236 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaTemplateInstantiateExpr.cpp
emaType.cpp
|
1401c06a733b12fee811d8ef82c560c4c84fe08b |
22-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Template instantiation for GNU array-range designators. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72234 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
emaTemplateInstantiateExpr.cpp
|
c4bb7bfe8328f79004517dd268f6146c8066c205 |
22-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Template instantiation for GNU array-range designators. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72234 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
emaTemplateInstantiateExpr.cpp
|
3a7a06edafb1c7474a7b41ee760101e433639273 |
22-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Template instantiation for C99 designated initializers, because we can. Also, delay semantic analysis of initialization for value-dependent as well as type-dependent expressions, since we can't always properly type-check a value-dependent expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72233 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
emaTemplateInstantiateExpr.cpp
|
9ea62768fca25d829d80199cf4f8cf0f4dd39251 |
22-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Template instantiation for C99 designated initializers, because we can. Also, delay semantic analysis of initialization for value-dependent as well as type-dependent expressions, since we can't always properly type-check a value-dependent expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72233 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
emaTemplateInstantiateExpr.cpp
|
eae01a74450848bd95e1fdad487aa17d0d22e635 |
21-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Template instantiation for initializer lists git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72229 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateExpr.cpp
|
ccb97f52afeb4ce5b239a6f3b44956d9e220e5e3 |
21-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Template instantiation for initializer lists git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72229 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateExpr.cpp
|
d60027388eec3ffeba6e2521a22bed808a119e6f |
21-May-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Fixed a warning bug when receiver is an object via setting of NSObject attribute. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72225 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
636bed1b8185099ef40a4f7fd192fc4242b385a4 |
21-May-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Fixed a warning bug when receiver is an object via setting of NSObject attribute. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72225 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
a53035423c54aaf9605134d3e0ec8b96979a119f |
21-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Template instantiation for unary type traits, e.g., __is_pod git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72220 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateExpr.cpp
|
36bb03b86ab6f905b336ee9ec11f288291b22b45 |
21-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Template instantiation for unary type traits, e.g., __is_pod git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72220 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateExpr.cpp
|
5440d2f8d6fd39f16510de5086a707df4e3664ab |
21-May-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Check on null arguments in the presense of nonnull attribute. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72219 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
|
e898f8a94947c6074d76ff83943b47d5bbdf210d |
21-May-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Check on null arguments in the presense of nonnull attribute. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72219 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
|
6db78ad5b35af294bc59ed84dedc37eb223d63ca |
21-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Template instantiation for C++ "typeid" expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72218 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateExpr.cpp
|
12d0c307369e4a523e2e40025bf124c310f98dff |
21-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Template instantiation for C++ "typeid" expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72218 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateExpr.cpp
|
c378232fae7e00cd6cd43af493c219e769fc316a |
21-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Template instantiation for C++ throw expressions git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72217 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateExpr.cpp
|
42e5b50f4dc897f252e0d476063a7f9846d96624 |
21-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Template instantiation for C++ throw expressions git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72217 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateExpr.cpp
|
7032f423e6af607bc88ccf0e94960e5377bd91c6 |
21-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Template instantiation for C++ delete expression git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72216 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateExpr.cpp
|
d0c02674e32cea54e386a52094f89abb71b274da |
21-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Template instantiation for C++ delete expression git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72216 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateExpr.cpp
|
de3011ccf5cc0b45f26024445b4facf8afcae942 |
21-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Merge the ASTVector and ASTOwningVector templates, since they offered redundant functionality. The result (ASTOwningVector) lives in clang/Parse/Ownership.h and is used by both the parser and semantic analysis. No intended functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72214 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateExpr.cpp
emaTemplateInstantiateStmt.cpp
|
45db71d295cfda888a6187d950bba695ce21a287 |
21-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Merge the ASTVector and ASTOwningVector templates, since they offered redundant functionality. The result (ASTOwningVector) lives in clang/Parse/Ownership.h and is used by both the parser and semantic analysis. No intended functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72214 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateExpr.cpp
emaTemplateInstantiateStmt.cpp
|
35196b446ed1e858b90850205bd7318725bb5339 |
21-May-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Avoid using the built-in type checker for assignment in C++ when classes are involved. Patch by Vyacheslav Kononenko. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72212 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
8593c7810fba6548679e7c89d8eaccebf4d5ec20 |
21-May-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Avoid using the built-in type checker for assignment in C++ when classes are involved. Patch by Vyacheslav Kononenko. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72212 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
9e6bef4fb5efb19c7286fa24d8aedab9c3d625fc |
21-May-2009 |
Jay Foad <jay.foad@gmail.com> |
Use v.data() instead of &v[0] when SmallVector v might be empty. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72210 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaInit.cpp
emaStmt.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
|
beaaccd8e2a8748f77b66e2b330fb9136937e14c |
21-May-2009 |
Jay Foad <jay.foad@gmail.com> |
Use v.data() instead of &v[0] when SmallVector v might be empty. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72210 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaInit.cpp
emaStmt.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
|
d8c2370415ea5defcfe6c4bc0621850b26643292 |
21-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Template instantiation for C++ "new" expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72199 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
emaTemplateInstantiateExpr.cpp
|
3433cf7dfda405bf51bba914a338adf645a87e3b |
21-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Template instantiation for C++ "new" expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72199 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
emaTemplateInstantiateExpr.cpp
|
6d0089ba8efccd8997c95104594f254a9d573f18 |
21-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix template instantiation for compound statements so that it properly passes the "isStmtExpr" flag, to suppress warnings about unused expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72190 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateInstantiateExpr.cpp
emaTemplateInstantiateStmt.cpp
|
66b46be52f82addd4edab3a54928e111dfa09de7 |
21-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Fix template instantiation for compound statements so that it properly passes the "isStmtExpr" flag, to suppress warnings about unused expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72190 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateInstantiateExpr.cpp
emaTemplateInstantiateStmt.cpp
|
1f280197fe37c7e05c6bdb4d6c320ec7925c6d02 |
21-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Introduce a new kind of RAII class, ASTOwningVector, which is an llvm::SmallVector that owns all of the AST nodes inside of it. This RAII class is used to ensure proper destruction of AST nodes when template instantiation fails. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72186 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateInstantiateExpr.cpp
emaTemplateInstantiateStmt.cpp
|
d7e2705961bacb9df5d9119403c01c9b04aff97f |
21-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Introduce a new kind of RAII class, ASTOwningVector, which is an llvm::SmallVector that owns all of the AST nodes inside of it. This RAII class is used to ensure proper destruction of AST nodes when template instantiation fails. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72186 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateInstantiateExpr.cpp
emaTemplateInstantiateStmt.cpp
|
72090765372445fb14eca307cdcb07041c4902ef |
20-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Template instantiation for CXXExprWithTemporaries, which occurs when temporaries are generated for some object-constructing expressions in templates that are not type-dependent. Also, be sure to introduce the variable from a CXXConditionDeclExpr into the set of instantiated local variables. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72185 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateExpr.cpp
|
e06274d5c5c6b2decc9f217a8913b28f846bfcfa |
20-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Template instantiation for CXXExprWithTemporaries, which occurs when temporaries are generated for some object-constructing expressions in templates that are not type-dependent. Also, be sure to introduce the variable from a CXXConditionDeclExpr into the set of instantiated local variables. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72185 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateExpr.cpp
|
66c3cf00b06119ec4141d1e54d5e7cd7b03a2e6f |
20-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Template instantiation for the various kinds of AST nodes that occur due to C++ type construction of the form T(a1, a2, ..., aN). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72183 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateExpr.cpp
|
d94546a0a1deef7286c13e49b9584621ae81cc9a |
20-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Template instantiation for the various kinds of AST nodes that occur due to C++ type construction of the form T(a1, a2, ..., aN). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72183 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateExpr.cpp
|
f27b765e5a5e06ff637e0ef35fdc1bfead9040a4 |
20-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Introduce a new expression type, CXXUnresolvedConstructExpr, to describe the construction of a value of a given type using function syntax, e.g., T(a1, a2, ..., aN) when the type or any of its arguments are type-dependent. In this case, we don't know what kind of type-construction this will be: it might construct a temporary of type 'T' (which might be a class or non-class type) or might perform a conversion to type 'T'. Also, implement printing of and template instantiation for this new expression type. Due to the change in Sema::ActOnCXXTypeConstructExpr, our existing tests cover template instantiation of this new expression node. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72176 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaTemplateInstantiateExpr.cpp
|
d81e6ca6e378c3996a139066a5c4b7fc1869630c |
20-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Introduce a new expression type, CXXUnresolvedConstructExpr, to describe the construction of a value of a given type using function syntax, e.g., T(a1, a2, ..., aN) when the type or any of its arguments are type-dependent. In this case, we don't know what kind of type-construction this will be: it might construct a temporary of type 'T' (which might be a class or non-class type) or might perform a conversion to type 'T'. Also, implement printing of and template instantiation for this new expression type. Due to the change in Sema::ActOnCXXTypeConstructExpr, our existing tests cover template instantiation of this new expression node. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72176 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaTemplateInstantiateExpr.cpp
|
306d7251d0fe8749f2a6a8cb67546830be520f0c |
20-May-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
implementation of format_arg for ObjC methods/functions. Still more to do. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72173 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
5b160927672440076aa53c31d84149f70fd8d40e |
20-May-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
implementation of format_arg for ObjC methods/functions. Still more to do. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72173 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
fedea7e9eb19ef96027e1b3169ad57e1e15dbbf9 |
20-May-2009 |
Zhongxing Xu <xuzhongxing@gmail.com> |
add header to be built by gcc 4.3 on Linux. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72158 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
a1f3dba77b7418575c1ff539ffa74ebaa068280c |
20-May-2009 |
Zhongxing Xu <xuzhongxing@gmail.com> |
add header to be built by gcc 4.3 on Linux. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72158 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
a9a9775dbc6fb3d7b32c4470bf38dd0d844958d1 |
20-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Add FIXMEs for the remaining C and C++ expression types that still need template instantiation logic. Remove one FIXME by instantiating the callee in a non-type-dependent CXXOperatorCallExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72145 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateExpr.cpp
|
0529519a9feb1995ba88d179197454103b758866 |
20-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Add FIXMEs for the remaining C and C++ expression types that still need template instantiation logic. Remove one FIXME by instantiating the callee in a non-type-dependent CXXOperatorCallExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72145 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateExpr.cpp
|
25990971b88779a28de14657560bf589e35e4743 |
20-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Template instantiation for __builtin_va_arg. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72144 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaTemplateInstantiateExpr.cpp
|
dd0273078111ec7312172c456a01ff86bff83b23 |
20-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Template instantiation for __builtin_va_arg. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72144 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaTemplateInstantiateExpr.cpp
|
dd4ae3f16a09719220806cc1e0f2a16ddcc5fa24 |
20-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Template instantiation for __builtin_choose_expr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72143 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaTemplateInstantiateExpr.cpp
|
c9ecc57d6d1fd4a96c748e52958d70be3b3da9fb |
20-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Template instantiation for __builtin_choose_expr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72143 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaTemplateInstantiateExpr.cpp
|
e621150f8912706269f94b652d974107176f7ab3 |
20-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Ban the use of __builtin_types_compatible_p in C++; g++ doesn't support it, and it isn't clear exactly what it's supposed to mean. Thanks Eli! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72142 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaTemplateInstantiateExpr.cpp
|
c12a9c5e552825c2b7d2e4352a9f70e061ebb367 |
20-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Ban the use of __builtin_types_compatible_p in C++; g++ doesn't support it, and it isn't clear exactly what it's supposed to mean. Thanks Eli! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72142 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaTemplateInstantiateExpr.cpp
|
602173d78446cdf7bb072514d997dc4dae2de1b4 |
20-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Template instantiation for __builtin_shufflevector. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72139 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
emaTemplateInstantiateExpr.cpp
|
cde01739dffe574c53a6ba1def1a57a2cc7b4a8b |
20-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Template instantiation for __builtin_shufflevector. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72139 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
emaTemplateInstantiateExpr.cpp
|
b4245188f28d3942f42380a803755acabe4f3aec |
19-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Template instantiation for __builtin_types_compatible_p. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72134 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateExpr.cpp
|
dc241b42c7588f99027b035a09b71557a6db219e |
19-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Template instantiation for __builtin_types_compatible_p. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72134 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateExpr.cpp
|
83f412bc91ba89622a6670ec8b1406e65a144eba |
19-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Template instantiation for GNU statement expressions git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72129 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateExpr.cpp
|
cd938172a40c6f1aca357cf7bad3cf6c208b6136 |
19-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Template instantiation for GNU statement expressions git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72129 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateExpr.cpp
|
0816e827cf2c9c7b1bbc10c91a1060504e8ac6f4 |
19-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix handling of the GNU "t ? : f" extension to the conditional operator in C++, and verify that template instantiation for the condition operator does the right thing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72127 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateExpr.cpp
|
d5f3a0fde43bca9f3738aed931b0f13ca73a9f11 |
19-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Fix handling of the GNU "t ? : f" extension to the conditional operator in C++, and verify that template instantiation for the condition operator does the right thing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72127 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateExpr.cpp
|
e88fde32a316c47959ae0c522467a36d8a1d0dfe |
19-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Template instantiation for compound assignment operators. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72126 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateExpr.cpp
|
6731c31150524b365138e5b8f46e6a4751a7c391 |
19-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Template instantiation for compound assignment operators. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72126 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateExpr.cpp
|
e0513a3d92d53cd06fe37b48a31b5b86d63b8ed6 |
19-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Template instantiation for cast expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72119 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateExpr.cpp
|
a3a7b8eea87c90a5a257f685749222b212ddaf36 |
19-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Template instantiation for cast expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72119 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateExpr.cpp
|
536f73dd0285c8830454234935df46c8a715e07d |
19-May-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch finishes off application of printf attribute on blocks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72111 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaExpr.cpp
|
d66f22d9f8423579322a6dd16587ed52b0a58834 |
19-May-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch finishes off application of printf attribute on blocks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72111 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaExpr.cpp
|
0e0983546597944fc934e815a9d47610793a26fe |
19-May-2009 |
Anders Carlsson <andersca@mac.com> |
Create CXXConstructExpr calls for arguments passed to functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72102 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
7c3e8a1ddb19030a7937e02afd59607c40026348 |
19-May-2009 |
Anders Carlsson <andersca@mac.com> |
Create CXXConstructExpr calls for arguments passed to functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72102 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
30c35bfa6994f29ab980f8b90b70a03e3f5eb3d6 |
19-May-2009 |
Anders Carlsson <andersca@mac.com> |
When assigning from an rvalue to a const reference, the implicit cast from T -> const T is not an lvalue cast. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72082 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
6865480f0ccf049ef53bd1e058aaacc4f77beebe |
19-May-2009 |
Anders Carlsson <andersca@mac.com> |
When assigning from an rvalue to a const reference, the implicit cast from T -> const T is not an lvalue cast. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72082 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
e1f8c0ab26edd816d905e766aefd7023ea4878cf |
19-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Template instantiation for call expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72081 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateExpr.cpp
|
4a2487aeacf9f35ce553318c2eb39c20ec23845e |
19-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Template instantiation for call expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72081 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateExpr.cpp
|
de72f3e4492cabca8c0b6a41795d67fcbfa9689d |
19-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Template instantiation for array subscript expressions. This was far easier than expected because of the limitation that subscript operators must be member functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72076 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaOverload.cpp
emaTemplateInstantiateExpr.cpp
|
3384c9c1882bab002971f59a31b1da47b13c818c |
19-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Template instantiation for array subscript expressions. This was far easier than expected because of the limitation that subscript operators must be member functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72076 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaOverload.cpp
emaTemplateInstantiateExpr.cpp
|
262c0d75d22eeaffcb398fe47dfdab69a52c416a |
19-May-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
BlockDecl node must be complete before block attributes can be processed. No change in functionality. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72066 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
3d1a7af3f09cc8f5e04f71080debc4366e5b1a37 |
19-May-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
BlockDecl node must be complete before block attributes can be processed. No change in functionality. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72066 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
4a95134918f5492e363a44868e3473299e0562ce |
19-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Template instantiation for imaginary literals, because they were next in Expr.h git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72058 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateExpr.cpp
|
d8ac436c8c10c52c937ba323db582259ceb06197 |
19-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Template instantiation for imaginary literals, because they were next in Expr.h git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72058 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateExpr.cpp
|
693197721aac1d95385003ffee033029db5d0ec5 |
19-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix sorting of using directives, from Jay Foad git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72048 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
b738e08cad7c9362e82a1384cf81fdce07d1b6ba |
19-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Fix sorting of using directives, from Jay Foad git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72048 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
3b7e911c0ba4e6e86546a1712311d5648d17e81c |
18-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Deal with an icky corner case where we were complaining that a catch statement was using an rvalue reference during the template definition. However, template instantiations based on an lvalue reference type are well-formed, so we delay checking of these property until template instantiation time. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72041 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
2f2433f2c4965640e3eea62c87deb7292492b10f |
18-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Deal with an icky corner case where we were complaining that a catch statement was using an rvalue reference during the template definition. However, template instantiations based on an lvalue reference type are well-formed, so we delay checking of these property until template instantiation time. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72041 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
f83c85f32383f4bf9af679ebd1ff595c5164a20f |
18-May-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
more printf attribute on block declaration and checking when block is envoked. In progress. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72039 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
emaExpr.cpp
|
725165f2846bd37d3aaf863747fa30126992085e |
18-May-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
more printf attribute on block declaration and checking when block is envoked. In progress. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72039 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
emaExpr.cpp
|
57420b4ca8a98a4c81b7a55338ad0b6a8d993b4e |
18-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Template instantiation for C++ try/catch statements. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72035 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
emaTemplateInstantiateStmt.cpp
|
d308e6201afd3a8a198c52ba034d35ed19d4bafe |
18-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Template instantiation for C++ try/catch statements. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72035 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
emaTemplateInstantiateStmt.cpp
|
61d21ae2c412a843b9d7cabc74226e013c89ff57 |
18-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Include StmtNodes.def to declare Visit methods for all of the known kinds of statements (in the instantiation logic). No functionality change, but now we'll get linker errors if we add a statement but forget to introduce its instantiation logic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72031 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateStmt.cpp
|
68d10c47c50ad7e866db4cc035ad5ff4555593c2 |
18-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Include StmtNodes.def to declare Visit methods for all of the known kinds of statements (in the instantiation logic). No functionality change, but now we'll get linker errors if we add a statement but forget to introduce its instantiation logic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72031 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateStmt.cpp
|
728451428126809d3fd1d3c60e937d61c58fd4c7 |
18-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Simplify struct/class tag mismatch warning, per Sebastian's suggestion git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72027 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
52b2fe2d70d83f73ee59e9ad3d0ba8ac154acfda |
18-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Simplify struct/class tag mismatch warning, per Sebastian's suggestion git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72027 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
614651bd2ab6d626ed2e8e537270f5d084c7d84f |
18-May-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Minor tweak to support format attribute on blocks. No change in functionality. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72020 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
755f9d2c65f75d539a2440e5de82d881e4417397 |
18-May-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Minor tweak to support format attribute on blocks. No change in functionality. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72020 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
b12249d254535d4b156c9dc5bfa9f0b9a0ccc548 |
18-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When instantiating the definition of a member function of a class template, introduce that member function into the template instantiation stack. Also, add diagnostics showing the member function within the instantiation stack and clean up the qualified-name printing so that we get something like: note: in instantiation of member function 'Switch1<int, 2, 2>::f' requested here in the template instantiation backtrace. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72015 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
f3e7ce4bd9837cdab6a096235922865f95467d3d |
18-May-2009 |
Douglas Gregor <dgregor@apple.com> |
When instantiating the definition of a member function of a class template, introduce that member function into the template instantiation stack. Also, add diagnostics showing the member function within the instantiation stack and clean up the qualified-name printing so that we get something like: note: in instantiation of member function 'Switch1<int, 2, 2>::f' requested here in the template instantiation backtrace. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72015 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
3ee2dae8b70bb32bd5d7caa71b1d498a650735b0 |
17-May-2009 |
Anders Carlsson <andersca@mac.com> |
Make ActOnWhileStmt take a FullExprArg for the condition expr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71990 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaStmt.cpp
emaTemplateInstantiateStmt.cpp
|
7f537c18c7029e73f0bd555be3782c066e7e2c1e |
17-May-2009 |
Anders Carlsson <andersca@mac.com> |
Make ActOnWhileStmt take a FullExprArg for the condition expr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71990 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaStmt.cpp
emaTemplateInstantiateStmt.cpp
|
18ca477e291542fcb9e1beb50cacf32e67498f13 |
17-May-2009 |
Anders Carlsson <andersca@mac.com> |
Make ActOnExprStmt take a FullExprArg. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71989 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaStmt.cpp
|
6b1d283fe879fb11d7ce7a69feecf66e77b0eaf3 |
17-May-2009 |
Anders Carlsson <andersca@mac.com> |
Make ActOnExprStmt take a FullExprArg. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71989 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaStmt.cpp
|
251ecff43865744a8cb074772c8281023fffbdba |
17-May-2009 |
Anders Carlsson <andersca@mac.com> |
Fix instantiate-function-1.cpp. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71988 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
bde200858679c58ca1d7acdc4a75de3bef210b20 |
17-May-2009 |
Anders Carlsson <andersca@mac.com> |
Fix instantiate-function-1.cpp. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71988 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
934d176d525bf4236770f8c474e32586f1cc78de |
17-May-2009 |
Anders Carlsson <andersca@mac.com> |
Fix DISABLE_SMART_POINTERS build. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71984 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateStmt.cpp
|
df3b2089692dae0ef00b79e9240b2ccf9b36ff94 |
17-May-2009 |
Anders Carlsson <andersca@mac.com> |
Fix DISABLE_SMART_POINTERS build. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71984 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateStmt.cpp
|
f0967d79f08679390a3c6583794af9bdc25175d9 |
17-May-2009 |
Anders Carlsson <andersca@mac.com> |
Implement Sema::ActOnFinishFullExpr and create a CXXExprWithTemporaries node if necessary. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71983 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
|
165a0a07c0a91f8d61ee3737b62e7f376bb7e1c7 |
17-May-2009 |
Anders Carlsson <andersca@mac.com> |
Implement Sema::ActOnFinishFullExpr and create a CXXExprWithTemporaries node if necessary. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71983 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
|
e4d378906a83376e6167b0428f6c082d1b4a894b |
17-May-2009 |
Anders Carlsson <andersca@mac.com> |
Add the FullExprArg wrapper and use it for if statement conditions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71982 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaStmt.cpp
emaTemplateInstantiateStmt.cpp
|
a99fad8ff134273fe85f2970c7d89133d1218900 |
17-May-2009 |
Anders Carlsson <andersca@mac.com> |
Add the FullExprArg wrapper and use it for if statement conditions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71982 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaStmt.cpp
emaTemplateInstantiateStmt.cpp
|
c90aa1385a76053789f48ed8b83d328c2ff7bbac |
17-May-2009 |
Anders Carlsson <andersca@mac.com> |
Add FIXME about not using MemberExpr nodes when the base type is a dependent type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71979 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
a59077d3ac38d734b4188ac91ef40a7142093ac7 |
17-May-2009 |
Anders Carlsson <andersca@mac.com> |
Add FIXME about not using MemberExpr nodes when the base type is a dependent type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71979 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
1eba0ac881d5b73b7cb17b1cce1f1b0e1025dc69 |
17-May-2009 |
Anders Carlsson <andersca@mac.com> |
Rewrite PureVirtualMethodCollector to use the overridden methods. Fixes <rdar://problem/6854087> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71970 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
8ff8c2278cf5ef26e40314dfbb363e32542da032 |
17-May-2009 |
Anders Carlsson <andersca@mac.com> |
Rewrite PureVirtualMethodCollector to use the overridden methods. Fixes <rdar://problem/6854087> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71970 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
179b9cdb177120ab4b8fe1a0a5e82fa4aab34fa7 |
17-May-2009 |
Anders Carlsson <andersca@mac.com> |
Add OldMD to the list of methods NewMD overrides git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71969 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
758a422bc1af68f64f7f86ef4aad958148a89e97 |
17-May-2009 |
Anders Carlsson <andersca@mac.com> |
Add OldMD to the list of methods NewMD overrides git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71969 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
14ab4c4ee25519d1718f2fb16d85992c111e8c2a |
17-May-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Refactor address-of-void extension a bit so that it's more obviously correct. No functionality change, as far as I know. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71965 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
441cf1004620342ec8efb5b849abd4b89f0cf552 |
17-May-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Refactor address-of-void extension a bit so that it's more obviously correct. No functionality change, as far as I know. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71965 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
bfc84a9460bebae1223c4d9cfe5192f86f09bc0e |
17-May-2009 |
Anders Carlsson <andersca@mac.com> |
Fix another case where the extern-ness of extern "C" wasn't being captured. This makes me think that we should make hasExternalStorage perform this check... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71962 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
425bfdee21d7ce13799bb7f9d74805a2d5775762 |
17-May-2009 |
Anders Carlsson <andersca@mac.com> |
Fix another case where the extern-ness of extern "C" wasn't being captured. This makes me think that we should make hasExternalStorage perform this check... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71962 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
e9cc4c48f023c62ddce8c8f13fe3b6d4ab2fadd0 |
16-May-2009 |
Anders Carlsson <andersca@mac.com> |
Don't return member pointer types for static member functions. Fixes 6879261. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71961 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
196f7d0ce9d928ecf89430e099f6c065d72ef920 |
16-May-2009 |
Anders Carlsson <andersca@mac.com> |
Don't return member pointer types for static member functions. Fixes 6879261. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71961 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
4082ecd62808b60a847055edb33ea264c41b65ec |
16-May-2009 |
Anders Carlsson <andersca@mac.com> |
Improve checking of member expressions where the base type is a dependent type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71956 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
4ef2770ee522048a19311d13ccd3b9605297ec58 |
16-May-2009 |
Anders Carlsson <andersca@mac.com> |
Improve checking of member expressions where the base type is a dependent type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71956 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
f80e261d943ecbef3036c769e492dcda0012c67d |
16-May-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implement instantiation of a few boring, simple expressions. I don't think these are testable yet, though. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71953 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateExpr.cpp
|
8b0b475b3464b0f70b91ba7d679d23c424677d5e |
16-May-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implement instantiation of a few boring, simple expressions. I don't think these are testable yet, though. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71953 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateExpr.cpp
|
143ddc990ba5d3384dd529fa3b093a15ebf5de03 |
16-May-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Avoid calling mergeTypes in C++. I think these are the correct C++ alternatives, but please correct me if I'm wrong. I eventually plan to assert in mergeTypes that we aren't in C++ mode because composite types are fundamentally not a part of C++. The remaining callers for code in the regression tests are Sema::WarnConflictingTypedMethods and CodeGenFunction::EmitFunctionProlog; I'm not quite sure what the correct approach is for those callers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71946 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
|
88d936b245978038a14b9c7acc062d12bc46096a |
16-May-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Avoid calling mergeTypes in C++. I think these are the correct C++ alternatives, but please correct me if I'm wrong. I eventually plan to assert in mergeTypes that we aren't in C++ mode because composite types are fundamentally not a part of C++. The remaining callers for code in the regression tests are Sema::WarnConflictingTypedMethods and CodeGenFunction::EmitFunctionProlog; I'm not quite sure what the correct approach is for those callers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71946 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
|
6f6e89229da877230a2dac489f87d02f96a2b9db |
16-May-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Add stricter checking for va_arg. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71942 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
5c091bab12d2e3fc69d7580a89dd3b9520bd471c |
16-May-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Add stricter checking for va_arg. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71942 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ec33566ffb6111d0a2ef522a4f91a49ef7379e33 |
16-May-2009 |
Eli Friedman <eli.friedman@gmail.com> |
PR2044: reject declarations of functions returning variably modified types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71941 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
88f7b576dde22ca95b4c73c4fd463e2e799873a7 |
16-May-2009 |
Eli Friedman <eli.friedman@gmail.com> |
PR2044: reject declarations of functions returning variably modified types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71941 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
90bcb899cc114c542e798b4505f29fc43b3ba52d |
16-May-2009 |
Eli Friedman <eli.friedman@gmail.com> |
PR3009: Get rid of bogus warning for scalar compound literals. This patch isn't quite ideal in that it eliminates the warning for constructs like "int a = {1};", where the braces are in fact redundant. However, that would have required a bunch of refactoring, and it's much less likely to cause confusion compared to redundant nested braces. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71939 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
759f25237864f3a3cc23eb01f0c0ce6edcc9342d |
16-May-2009 |
Eli Friedman <eli.friedman@gmail.com> |
PR3009: Get rid of bogus warning for scalar compound literals. This patch isn't quite ideal in that it eliminates the warning for constructs like "int a = {1};", where the braces are in fact redundant. However, that would have required a bunch of refactoring, and it's much less likely to cause confusion compared to redundant nested braces. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71939 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
e127ae3174322af06f6934a81edadf5931cad1b2 |
16-May-2009 |
Mike Stump <mrs@apple.com> |
Reflow some comments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71936 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaInit.cpp
emaLookup.cpp
emaNamedCast.cpp
emaOverload.cpp
emaStmt.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaTemplateInstantiateExpr.cpp
emaTemplateInstantiateStmt.cpp
emaType.cpp
|
390b4cc8b45a05612349269ef08faab3e4688f06 |
16-May-2009 |
Mike Stump <mrs@apple.com> |
Reflow some comments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71936 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaInit.cpp
emaLookup.cpp
emaNamedCast.cpp
emaOverload.cpp
emaStmt.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaTemplateInstantiateExpr.cpp
emaTemplateInstantiateStmt.cpp
emaType.cpp
|
155750e17d2489f702f22bc0250cef953b1d2913 |
16-May-2009 |
Mike Stump <mrs@apple.com> |
Implement a FIXME, we now pass in the locations of the braces for enums. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71930 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplateInstantiateDecl.cpp
|
c6e35aae23bc3cea7daf5ee075fa695c01c0f66f |
16-May-2009 |
Mike Stump <mrs@apple.com> |
Implement a FIXME, we now pass in the locations of the braces for enums. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71930 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplateInstantiateDecl.cpp
|
b653af4f69e7b8f8ad9d720bc7638e359f5987aa |
16-May-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Remove useless wrapper. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71928 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
623712be8a498e0da0f5be0a77678cd2bfa35be2 |
16-May-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Remove useless wrapper. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71928 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
83df82a4b8272c846b2b24350784793b57f8f561 |
16-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Template instantiation for IndirectGotoStmt. Now my life is complete. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71917 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
emaTemplateInstantiateStmt.cpp
|
5f1b9e689fa5c101512aef99225f2afea1673449 |
16-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Template instantiation for IndirectGotoStmt. Now my life is complete. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71917 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
emaTemplateInstantiateStmt.cpp
|
34712db615418b178dff09ba45112bc44c4e1993 |
16-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Template instantiation for switch statements git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71916 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
emaTemplateInstantiateStmt.cpp
|
dbb26db1d426fb6caaaf1b4fa47b46d1947c12c9 |
16-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Template instantiation for switch statements git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71916 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
emaTemplateInstantiateStmt.cpp
|
9ccc052637d79c54ca11f9ae6084b32f2c0fc1b8 |
16-May-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Removed superfluous code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71909 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
c13b7ca5f5c81d0a526bda179d3cd700882e713e |
16-May-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Removed superfluous code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71909 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
abe6c23722dfd2f871b47b87cb295aaf910a9710 |
16-May-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Early support for __format__attribute on blocks. Work in progress... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71908 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
620d89ca4eb5dcb6be13a42aafa4849eaa9b834b |
16-May-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Early support for __format__attribute on blocks. Work in progress... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71908 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
72d3c669ed7257bf3c169dabc2316d04c416a959 |
16-May-2009 |
Anders Carlsson <andersca@mac.com> |
Basic support for member exprs where the base expr type is dependent. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71907 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ffce2df6ae280d354d51371282a579df1eb86876 |
16-May-2009 |
Anders Carlsson <andersca@mac.com> |
Basic support for member exprs where the base expr type is dependent. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71907 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
777cc7a08e55e0b027ee4c7dd9caa6481b23b034 |
16-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Template instantiation for break and continue statements. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71903 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateStmt.cpp
|
861ce3178c70cfb0fa50baf685e1ad363538eaa9 |
16-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Template instantiation for break and continue statements. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71903 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateStmt.cpp
|
1401330b1c620dd8e14af4e2c1b1589cf68dc2c3 |
16-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Template instantiation for "for" loops git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71901 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
emaTemplateInstantiateStmt.cpp
|
5831c6a1efc47e6a19d82fe3dd25b5b8fef6979d |
16-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Template instantiation for "for" loops git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71901 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
emaTemplateInstantiateStmt.cpp
|
ef482764777252110a1095e7f5b7a300ccb26d4e |
15-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Template instantiation for do-while statements. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71899 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
emaTemplateInstantiateStmt.cpp
|
9f3ca2a7747bd47f14d7693f333103fac29a24d2 |
15-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Template instantiation for do-while statements. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71899 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
emaTemplateInstantiateStmt.cpp
|
cbe3be67e42644ed596a4cc4444ea0cae48b39e6 |
15-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Template instantiation for WhileStmt and CXXConditionDeclExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71896 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
emaTemplateInstantiateExpr.cpp
emaTemplateInstantiateStmt.cpp
|
4a2e2041edc63db687677325e113b39b9d123c40 |
15-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Template instantiation for WhileStmt and CXXConditionDeclExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71896 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
emaTemplateInstantiateExpr.cpp
emaTemplateInstantiateStmt.cpp
|
4850df6d9978b2d04d70b7f0f45576a93474403e |
15-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Make sure that we use the canonical type for the names of instantiated constructors and destructors. This is a requirement of DeclarationNameTable::getCXXSpecialName that we weren't assert()'ing, so it should have been caught much earlier :( Big thanks to Anders for the test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71895 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
49f25ecf7ff358039ce4c9254b867f32110e660e |
15-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Make sure that we use the canonical type for the names of instantiated constructors and destructors. This is a requirement of DeclarationNameTable::getCXXSpecialName that we weren't assert()'ing, so it should have been caught much earlier :( Big thanks to Anders for the test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71895 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
6dac16d54fef437e5f8adceb0ab5d89fa6029d96 |
15-May-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
improved on diagnosing misplacement of sentinel attributes. No change in functionality. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71894 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaExpr.cpp
|
3bba33d6f58844d4924ab1e221dc2ff44c521624 |
15-May-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
improved on diagnosing misplacement of sentinel attributes. No change in functionality. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71894 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaExpr.cpp
|
1967cd8ca24225c1010d31f258e517a4e113820c |
15-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Allow instantiation of NULL expressions and statements git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71889 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateExpr.cpp
emaTemplateInstantiateStmt.cpp
|
50557a77cfc5c182d450766bf77b1f017305d494 |
15-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Allow instantiation of NULL expressions and statements git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71889 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateExpr.cpp
emaTemplateInstantiateStmt.cpp
|
c10357dff31d7acfd4be986958629d05f91993d9 |
15-May-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
This patch finishes off the sentinel attribute handling for blocks and function pointers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71888 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaExpr.cpp
|
daf0415583e33d5d279197c65e9227c1ed92474b |
15-May-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
This patch finishes off the sentinel attribute handling for blocks and function pointers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71888 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaExpr.cpp
|
07d3cf2ba2b2057e6152aaeb171848e905dda688 |
15-May-2009 |
Anders Carlsson <andersca@mac.com> |
I take it back, InstantiateExpr does not check for null. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71887 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateStmt.cpp
|
e28be4386b3b2af45462339fc04c0924ffa78e93 |
15-May-2009 |
Anders Carlsson <andersca@mac.com> |
I take it back, InstantiateExpr does not check for null. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71887 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateStmt.cpp
|
abf6af4524c034d746f55b327688579e994b213e |
15-May-2009 |
Anders Carlsson <andersca@mac.com> |
Instantiation support for 'this' git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71886 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateExpr.cpp
|
0712d29123215e00b9e5b3c89746c90d9624830f |
15-May-2009 |
Anders Carlsson <andersca@mac.com> |
Instantiation support for 'this' git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71886 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateExpr.cpp
|
ea0bf5d9f83f2caf59958495bb1288301ed5b3bd |
15-May-2009 |
Anders Carlsson <andersca@mac.com> |
No need to null check the expr, Sema::SemaRef.InstantiateExpr handles all that. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71885 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateStmt.cpp
|
a52aac4851d379403aae4994f16307bf1a219a1c |
15-May-2009 |
Anders Carlsson <andersca@mac.com> |
No need to null check the expr, Sema::SemaRef.InstantiateExpr handles all that. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71885 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateStmt.cpp
|
12aed0be9db50a396a9163bea1ee466a8e2c2b5e |
15-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Make sure that the type associated with a class template is dependent. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71878 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
aafc0ccfcf860d921a86423c6c9a738301987abf |
15-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Make sure that the type associated with a class template is dependent. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71878 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
30033494eab58aefa22eb275c00ef458b8e6a538 |
15-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Template instantiation for "if" statements. Also: - Skip semantic analysis of the "if" condition if it is type-dependent. - Added the location of the "else" keyword into IfStmt, so that we can provide it for type-checking after template instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71875 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
emaTemplateInstantiateStmt.cpp
|
d06f6ca61062f85926eb9d409eb3d4f8afcf93c7 |
15-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Template instantiation for "if" statements. Also: - Skip semantic analysis of the "if" condition if it is type-dependent. - Added the location of the "else" keyword into IfStmt, so that we can provide it for type-checking after template instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71875 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
emaTemplateInstantiateStmt.cpp
|
f8c0565d966ae65ace59bf4a4338b5b870d08260 |
15-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Move statement instantiation into its own file. No functionality change git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71872 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
emaTemplateInstantiateExpr.cpp
emaTemplateInstantiateStmt.cpp
|
b70ccad30c7854f29c44d9bdd26c70754d28d3fe |
15-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Move statement instantiation into its own file. No functionality change git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71872 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
emaTemplateInstantiateExpr.cpp
emaTemplateInstantiateStmt.cpp
|
556d8c7046f5eea0187a1cc83fb4ae2a93552976 |
15-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Call ActOnStartOfFunctionDecl/ActOnFinishFunctionBody when instantiating the definition of a function from a template. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71869 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
e2c31ff0bc622e6fd7d47d7e08b53840f3be6c89 |
15-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Call ActOnStartOfFunctionDecl/ActOnFinishFunctionBody when instantiating the definition of a function from a template. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71869 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
92358aefb08bc9e0a1cb5ba42bf1f7d95e6c4f2f |
15-May-2009 |
Anders Carlsson <andersca@mac.com> |
Instantiate return statements. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71825 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
emaTemplateInstantiateExpr.cpp
|
03d77760a5db7990724b6901cea958a673ce0b39 |
15-May-2009 |
Anders Carlsson <andersca@mac.com> |
Instantiate return statements. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71825 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
emaTemplateInstantiateExpr.cpp
|
328b9dfb017589eae55f21859ac3e0b373dcef1d |
15-May-2009 |
Anders Carlsson <andersca@mac.com> |
Add NullStmt::Clone and use it git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71823 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateExpr.cpp
|
d19cd90b266181c4a8d186adfa20ccebe73336cc |
15-May-2009 |
Anders Carlsson <andersca@mac.com> |
Add NullStmt::Clone and use it git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71823 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateExpr.cpp
|
23daf4111f5d58dc21a2615c3e1985e66420d05f |
15-May-2009 |
Anders Carlsson <andersca@mac.com> |
Instantiate goto and label statements. (Very useful, I know) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71822 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateExpr.cpp
|
137fa562caedf11df4bb10f2657651a785769ca7 |
15-May-2009 |
Anders Carlsson <andersca@mac.com> |
Instantiate goto and label statements. (Very useful, I know) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71822 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateExpr.cpp
|
b06585a1f117d8f056effc7ed500daac78124bbc |
15-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement template instantiation for DeclStmt git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71818 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateInstantiateDecl.cpp
emaTemplateInstantiateExpr.cpp
|
b9f1b8d877541e76390cd3807c2dcff2f950360a |
15-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement template instantiation for DeclStmt git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71818 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateInstantiateDecl.cpp
emaTemplateInstantiateExpr.cpp
|
6e83c92b84335fb36c29786a750594f736a90ad7 |
15-May-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Don't warn if result/argument type of an implemented method is a qualified id which conforms to the matching type of its method declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71817 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
emaExprObjC.cpp
|
2574a68e5cca0171f1e8c09373cb2f7e612ab77e |
15-May-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Don't warn if result/argument type of an implemented method is a qualified id which conforms to the matching type of its method declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71817 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
emaExprObjC.cpp
|
bd5c81c7b5e19b6cdb7d52cc25d3df130d6b5e44 |
15-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Template instantiation for the NULL statement. Lame, I know git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71816 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateExpr.cpp
|
e7a18c88b77523cf1085d239fd373770ba5791f1 |
15-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Template instantiation for the NULL statement. Lame, I know git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71816 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateExpr.cpp
|
5f62c5e91eeee5847b637b9820d5b3009d035dc1 |
15-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Introduce basic support for instantiating the definitions of member functions of class templates. Only compound statements and expression statements are currently implemented. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71814 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaTemplateInstantiateExpr.cpp
|
54dabfca850ca9e60e9ffb60003529f868d4d127 |
15-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Introduce basic support for instantiating the definitions of member functions of class templates. Only compound statements and expression statements are currently implemented. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71814 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaTemplateInstantiateExpr.cpp
|
f98556020bc7f248ac17c9804e4e5af1a636f514 |
15-May-2009 |
Anders Carlsson <andersca@mac.com> |
Check that the function being overridden is virtual. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71802 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplateInstantiateDecl.cpp
|
77b7f1d4fb782c9152f91b76f9f8b1d1af21bd35 |
15-May-2009 |
Anders Carlsson <andersca@mac.com> |
Check that the function being overridden is virtual. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71802 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplateInstantiateDecl.cpp
|
d9d6d50992923eeb0c0ac0a2ec2d227867d35787 |
14-May-2009 |
Anders Carlsson <andersca@mac.com> |
Improvements to the FunctionDecl getters/setters. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71800 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
a75e8534f2b7c2480c48f31f301bd00b241c5499 |
14-May-2009 |
Anders Carlsson <andersca@mac.com> |
Improvements to the FunctionDecl getters/setters. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71800 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f036aa7e79db083bff6f5ddd83a68f65cb7e74f0 |
14-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Introduce a stack of instantiation scopes that are used to store the mapping from variable declarations that occur within templates to their instantiated counterparts git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71799 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaTemplateInstantiateDecl.cpp
emaTemplateInstantiateExpr.cpp
|
48dd19b19ddb9e105f8cf0bf6f0732ca4e6a385b |
14-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Introduce a stack of instantiation scopes that are used to store the mapping from variable declarations that occur within templates to their instantiated counterparts git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71799 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaTemplateInstantiateDecl.cpp
emaTemplateInstantiateExpr.cpp
|
260059cab5bab4960880bc9155b32618201d7994 |
14-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Link FunctionDecls instantiated from the member functions of a class template to the FunctionDecls from which they were instantiated. This is a necessary first step to support instantiation of the definitions of such functions, but by itself does essentially nothing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71792 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
1eee0e753fb390b04848846e837714ec774b7bfd |
14-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Link FunctionDecls instantiated from the member functions of a class template to the FunctionDecls from which they were instantiated. This is a necessary first step to support instantiation of the definitions of such functions, but by itself does essentially nothing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71792 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
8dde59b41362cd606a87f6a1956be1b81cf853dd |
14-May-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
updated comments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71790 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
ffb0081d0c0509eb4884143381cb3e5a5f6947b4 |
14-May-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
updated comments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71790 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
157c4264aef499b146c6258bcba34b2ea88a29a3 |
14-May-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Adds recognition of sentinel attribute on block declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71788 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaExpr.cpp
|
2f7c39246a968b921a6d95c7f8037fb3429e9501 |
14-May-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Adds recognition of sentinel attribute on block declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71788 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaExpr.cpp
|
ee7177b01a43b5cbd7591a411729eff304a82ddc |
14-May-2009 |
Anders Carlsson <andersca@mac.com> |
Better diagnostics for covariance when checking overriding return types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71786 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
c3a68b25cdd687d4beb59f083fcb22afe173286f |
14-May-2009 |
Anders Carlsson <andersca@mac.com> |
Better diagnostics for covariance when checking overriding return types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71786 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
45f01f8db034ded74a9a414ea24239fffbd730d9 |
14-May-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
When there are any member new operators, global versions aren't looked up at all. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71780 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
9afe1308ed19dffc281dca5cfbe521826754980f |
14-May-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
When there are any member new operators, global versions aren't looked up at all. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71780 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
09f2e3fab4800bc6ba7579e180778b8e9c452795 |
14-May-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Diagnose missing sentinel argument on a funciton call with sentinel attribute. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71778 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
236673e8fbd391cc7827efcaa64320344900d348 |
14-May-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Diagnose missing sentinel argument on a funciton call with sentinel attribute. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71778 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
625185c386e0117a1e2b19117e23f07235a006e8 |
14-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
In C++, warn when something previously declared as a "struct" is later declared as a "class", or vice-versa. This warning is under the control of -Wmismatched-tags, which is off by default. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71773 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplate.cpp
|
501c5ce63c2ff54c103fbab8c1c45234d5a82a57 |
14-May-2009 |
Douglas Gregor <dgregor@apple.com> |
In C++, warn when something previously declared as a "struct" is later declared as a "class", or vice-versa. This warning is under the control of -Wmismatched-tags, which is off by default. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71773 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplate.cpp
|
e80e29c17b537cadb1d9d6d306508a10379f1f79 |
14-May-2009 |
Anders Carlsson <andersca@mac.com> |
Add return type checking for overriding virtual functions. We currently don't check covariance but that's next. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71759 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
d7ba27dc562e1837703fa8696531c1f21a5fdb36 |
14-May-2009 |
Anders Carlsson <andersca@mac.com> |
Add return type checking for overriding virtual functions. We currently don't check covariance but that's next. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71759 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
96b6df95c32cc11fdc3bae59e01d7ecb594f66e0 |
14-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement explicit instantiations of member classes of class templates, e.g., template<typename T> struct X { struct Inner; }; template struct X<int>::Inner; This change is larger than it looks because it also fixes some a problem with nested-name-specifiers and tags. We weren't requiring the DeclContext associated with the scope specifier of a tag to be complete. Therefore, when looking for something like "struct X<int>::Inner", we weren't instantiating X<int>. This, naturally, uncovered a problem with member pointers, where we were requiring the left-hand side of a member pointer access expression (e.g., x->*) to be a complete type. However, this is wrong: the semantics of this expression does not require a complete type (EDG agrees). Stuart vouched for me. Blame him. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71756 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaDecl.cpp
emaExprCXX.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
|
3f5b61c394f4f205bcb4d316eb2a7a0a68b8af86 |
14-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement explicit instantiations of member classes of class templates, e.g., template<typename T> struct X { struct Inner; }; template struct X<int>::Inner; This change is larger than it looks because it also fixes some a problem with nested-name-specifiers and tags. We weren't requiring the DeclContext associated with the scope specifier of a tag to be complete. Therefore, when looking for something like "struct X<int>::Inner", we weren't instantiating X<int>. This, naturally, uncovered a problem with member pointers, where we were requiring the left-hand side of a member pointer access expression (e.g., x->*) to be a complete type. However, this is wrong: the semantics of this expression does not require a complete type (EDG agrees). Stuart vouched for me. Blame him. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71756 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaDecl.cpp
emaExprCXX.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
|
79d29e764fd8f8fefda3cdf61dc959d56a0c1fa1 |
14-May-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Look for and diagnose missing sentinel argument on message dispatch arguments which have sentinel attribute. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71737 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaExpr.cpp
|
88f1ba0f0439e31ab57ffc088aa91137cadee585 |
14-May-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Look for and diagnose missing sentinel argument on message dispatch arguments which have sentinel attribute. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71737 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaExpr.cpp
|
495324693ee70c6533ef223a4836173050c85ebe |
13-May-2009 |
Anders Carlsson <andersca@mac.com> |
Use an iterator type for found_decls_begin/found_decls_end. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71721 91177308-0d34-0410-b5e6-96231b3b80d8
emaInherit.cpp
emaInherit.h
|
6a502a3bc72700d5db65f07ffcf1f11b67ca86db |
13-May-2009 |
Anders Carlsson <andersca@mac.com> |
Use an iterator type for found_decls_begin/found_decls_end. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71721 91177308-0d34-0410-b5e6-96231b3b80d8
emaInherit.cpp
emaInherit.h
|
9ecd315caf5e8229dca9629dbe16228926f546d5 |
13-May-2009 |
Anders Carlsson <andersca@mac.com> |
Add a new, more advanced CheckDerivedToBaseConversion that takes custom diagnostic IDs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71720 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaAccess.cpp
emaInherit.cpp
|
d8f9cb03ad5ba30094995c254e2b7afcef34d813 |
13-May-2009 |
Anders Carlsson <andersca@mac.com> |
Add a new, more advanced CheckDerivedToBaseConversion that takes custom diagnostic IDs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71720 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaAccess.cpp
emaInherit.cpp
|
4330d8d82e4de280c6dca4f202b8cc53db26960f |
13-May-2009 |
Ted Kremenek <kremenek@apple.com> |
Add some basic type checking for attributes ns_returns_retained and cf_returns_retained. Currently this attribute can now be applied to any Objective-C method or C function that returns a pointer or Objective-C object type. Modify the tablegen definition of diagnostic 'warn_attribute_wrong_decl_type' to expect that the diagnostics infrastructure will add quotes around the attribute name when appropriate. Alonq with this change, I modified the places where this warning is issued to passed the attribute's IdentifierInfo* instead of having a hard-coded C constant string. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71718 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
5dc53c9c2328b5bea5422005b04960c18afd83ad |
13-May-2009 |
Ted Kremenek <kremenek@apple.com> |
Add some basic type checking for attributes ns_returns_retained and cf_returns_retained. Currently this attribute can now be applied to any Objective-C method or C function that returns a pointer or Objective-C object type. Modify the tablegen definition of diagnostic 'warn_attribute_wrong_decl_type' to expect that the diagnostics infrastructure will add quotes around the attribute name when appropriate. Alonq with this change, I modified the places where this warning is issued to passed the attribute's IdentifierInfo* instead of having a hard-coded C constant string. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71718 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
df9f5d1b23bf49014b3eac328d0c03fc2a3c628a |
13-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Explicit instantiations of templates now instantiate the definitions of class members (recursively). Only member classes are actually instantiated; the instantiation logic for member functions and variables are just stubs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71713 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
a58861f6490780baec50689e06ca65f7438b85dc |
13-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Explicit instantiations of templates now instantiate the definitions of class members (recursively). Only member classes are actually instantiated; the instantiation logic for member functions and variables are just stubs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71713 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
f23101418d1c1844893aa52420f5ba19742aaf9f |
13-May-2009 |
Anders Carlsson <andersca@mac.com> |
Disable access control by default. It can be enabled with the -faccess-control option. When we have better support for it, we can enable it by default again. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71706 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
a33d9b4ebf732a5da6d56fd7319ff6c020789b1c |
13-May-2009 |
Anders Carlsson <andersca@mac.com> |
Disable access control by default. It can be enabled with the -faccess-control option. When we have better support for it, we can enable it by default again. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71706 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
9017791815e42a07864bccf7b1517f445e491400 |
13-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve the semantic checking for explicit instantiations of templates. In particular: - An explicit instantiation can follow an implicit instantiation (we were improperly diagnosing this as an error, previously). - In C++0x, an explicit instantiation that follows an explicit specialization of the same template specialization is ignored. In C++98, we just emit an extension warning. - In C++0x, an explicit instantiation must be in a namespace enclosing the original template. C++98 has no such requirement. Also, fixed a longstanding FIXME regarding the integral type that is used for the size of a constant array type when it is being instantiated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71689 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaTemplateInstantiate.cpp
|
ff66803b43f2ea9206637dceb793e9505f3b9c48 |
13-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Improve the semantic checking for explicit instantiations of templates. In particular: - An explicit instantiation can follow an implicit instantiation (we were improperly diagnosing this as an error, previously). - In C++0x, an explicit instantiation that follows an explicit specialization of the same template specialization is ignored. In C++98, we just emit an extension warning. - In C++0x, an explicit instantiation must be in a namespace enclosing the original template. C++98 has no such requirement. Also, fixed a longstanding FIXME regarding the integral type that is used for the size of a constant array type when it is being instantiated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71689 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaTemplateInstantiate.cpp
|
180f341a528dd5608704b40de48620720e6a9dc7 |
13-May-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Some early declarations to support sentinel attribute on message dispatches (and function calls later). No change in functionality. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71683 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprObjC.cpp
|
5b53005fb9ef24b8bdfe995f29b4662de468128a |
13-May-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Some early declarations to support sentinel attribute on message dispatches (and function calls later). No change in functionality. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71683 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprObjC.cpp
|
4ff8a15ffa780a652b16750db4d4e80afb7653ca |
13-May-2009 |
Ted Kremenek <kremenek@apple.com> |
Fix <rdar://problem/6880975> [format string] Assertion failed: (Arg < NumArgs && "Arg access out of range!"). For format string checking, only check the type of the format specifier for non-vararg functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71672 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
42ae3e81a811362c0bf78deb71b72455aadff772 |
13-May-2009 |
Ted Kremenek <kremenek@apple.com> |
Fix <rdar://problem/6880975> [format string] Assertion failed: (Arg < NumArgs && "Arg access out of range!"). For format string checking, only check the type of the format specifier for non-vararg functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71672 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
2a15f8e9f6d46896e929046337d3bedbd4169eb8 |
13-May-2009 |
Chris Lattner <sabre@nondot.org> |
Fix rdar://6880951 by rejecting vectors of vectors. It seems dubious to me that isIntegerType() returns true for vectors of integers, but not complex integers. This should probably be rethought, I'll file a bugzilla. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71640 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
82afa2d97d39cc0d5a4897716ec0a80aeab9e14b |
13-May-2009 |
Chris Lattner <sabre@nondot.org> |
Fix rdar://6880951 by rejecting vectors of vectors. It seems dubious to me that isIntegerType() returns true for vectors of integers, but not complex integers. This should probably be rethought, I'll file a bugzilla. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71640 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
57278230bfb1f257ee245aa0d158bd1a692bcdd6 |
13-May-2009 |
Chris Lattner <sabre@nondot.org> |
reject use of the GNU _Decimal32 extension with a diagnostic, not an abort. rdar://6880104 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71639 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
8f12f65fad7bfbbdbd4234efe0d484f68c3924b6 |
13-May-2009 |
Chris Lattner <sabre@nondot.org> |
reject use of the GNU _Decimal32 extension with a diagnostic, not an abort. rdar://6880104 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71639 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
e03b9fa8d9046d98adf5d64fe03853df4b70d332 |
13-May-2009 |
Chris Lattner <sabre@nondot.org> |
eli correctly points out that this code is dead, just rip it out for now until someone does it right git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71638 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
01ad39e42de07f9a81fba986e6a045a3904ef7a9 |
13-May-2009 |
Chris Lattner <sabre@nondot.org> |
eli correctly points out that this code is dead, just rip it out for now until someone does it right git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71638 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
33615252c42257bacfeb8921bc8f648bd8271b0e |
13-May-2009 |
Chris Lattner <sabre@nondot.org> |
add support for __sync_nand_and_fetch and __sync_fetch_and_nand, rdar://6880573 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71636 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
eebd9d2165a705ce6a8a6b6a7327864189d02785 |
13-May-2009 |
Chris Lattner <sabre@nondot.org> |
add support for __sync_nand_and_fetch and __sync_fetch_and_nand, rdar://6880573 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71636 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
077fed531835769c12eed0ccfe8d14b92b5336ae |
13-May-2009 |
Chris Lattner <sabre@nondot.org> |
Fix rdar://6881069, a crash on a form of vector_size that we don't support. While it would be nice to support this eventually, this form is not common at all (just seen in gcc testsuite) and it might be better to model vector_size as a type attribute anyway. For now just emit a nice error on it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71633 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
2db15bdd945163eacfa4623fd2e32a536ed2dd3b |
13-May-2009 |
Chris Lattner <sabre@nondot.org> |
Fix rdar://6881069, a crash on a form of vector_size that we don't support. While it would be nice to support this eventually, this form is not common at all (just seen in gcc testsuite) and it might be better to model vector_size as a type attribute anyway. For now just emit a nice error on it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71633 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
fd79ac64fa4467e575ffd1960c168f33d3b875cf |
13-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Semantic analysis for explicit instantiation of class templates. We still aren't instantiating the definitions of class template members, and core issues 275 and 259 will both affect the checking that we do for explicit instantiations (but are not yet implemented). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71613 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaType.cpp
|
93dfdb1299ef740df854f4a745dc87e5e43f0c30 |
13-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Semantic analysis for explicit instantiation of class templates. We still aren't instantiating the definitions of class template members, and core issues 275 and 259 will both affect the checking that we do for explicit instantiations (but are not yet implemented). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71613 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaType.cpp
|
a9db0faf0eab240dc1808ffe597fa88af3b4bdea |
13-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement parsing for explicit instantiations of class templates, e.g., template class X<int>; This also cleans up the propagation of template information through declaration parsing, which is used to improve some diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71608 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
4d9a16f36d3b768672d50e6d02000f982ae448d7 |
13-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement parsing for explicit instantiations of class templates, e.g., template class X<int>; This also cleans up the propagation of template information through declaration parsing, which is used to improve some diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71608 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
edf8844f2e68617892c6883fedd343efd987df68 |
12-May-2009 |
Chris Lattner <sabre@nondot.org> |
improve the diagnostic for uses of the GCC "global variable in a register" extension. This implements rdar://6880449 - improve diagnostic for usage of "global register variable" GCC extension git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71599 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d4b19d52416c3a04a1740ab5e766d9537c8ea00e |
12-May-2009 |
Chris Lattner <sabre@nondot.org> |
improve the diagnostic for uses of the GCC "global variable in a register" extension. This implements rdar://6880449 - improve diagnostic for usage of "global register variable" GCC extension git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71599 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
060f70719c14c3dc6bd30c96b96fad5d7e336643 |
12-May-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Method attributes may only be specified on method declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71597 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
5d36ac2cc91125134fd8e1f0a0f1c2f888fb0566 |
12-May-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Method attributes may only be specified on method declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71597 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
e42d7827fca5470cdb198cb680fbe89020ef467b |
12-May-2009 |
Chris Lattner <sabre@nondot.org> |
Method who have definitions in structs/classes are semantically inline. Per the FIXME, it might be interesting to track whether the inline keyword was also used on the method, but for now we don't do this. Testcase pending. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71589 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
0afeaa3ff83d88c52bf785825d6bab8848f44772 |
12-May-2009 |
Chris Lattner <sabre@nondot.org> |
Method who have definitions in structs/classes are semantically inline. Per the FIXME, it might be interesting to track whether the inline keyword was also used on the method, but for now we don't do this. Testcase pending. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71589 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f9e7d3d4e672391f649336eb425129dccc9a2fed |
12-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Encapsulate template arguments lists in a new class, TemplateArgumentList. This avoids the need to pass around pointer/length pairs of template arguments lists, and will eventually make it easier to introduce member templates and variadic templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71517 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaTemplateInstantiateExpr.cpp
emaType.cpp
|
7e06390f8a60440d6fc5f0e633acdc2edd8ee924 |
12-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Encapsulate template arguments lists in a new class, TemplateArgumentList. This avoids the need to pass around pointer/length pairs of template arguments lists, and will eventually make it easier to introduce member templates and variadic templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71517 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaTemplateInstantiateExpr.cpp
emaType.cpp
|
b56d8b3cf44cf14cd17b8e2a6f5cb97015f85551 |
12-May-2009 |
Anders Carlsson <andersca@mac.com> |
Friend declarations are only valid inside class definitions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71489 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
0033836b3c4bb578ef999813de4f5f1a24862d18 |
12-May-2009 |
Anders Carlsson <andersca@mac.com> |
Friend declarations are only valid inside class definitions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71489 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
3eb207002be2bdffddc850aafd21a0a5710ca1c7 |
11-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement the notions of the "current instantiation" and "unknown specialization" within a C++ template, and permit name lookup into the current instantiation. For example, given: template<typename T, typename U> struct X { typedef T type; X* x1; // current instantiation X<T, U> *x2; // current instantiation X<U, T> *x3; // not current instantiation ::X<type, U> *x4; // current instantiation X<typename X<type, U>::type, U>: *x5; // current instantiation }; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71471 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaLookup.cpp
emaTemplate.cpp
|
42af25f865a82022a04bedeb483ac251c4412e29 |
11-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement the notions of the "current instantiation" and "unknown specialization" within a C++ template, and permit name lookup into the current instantiation. For example, given: template<typename T, typename U> struct X { typedef T type; X* x1; // current instantiation X<T, U> *x2; // current instantiation X<U, T> *x3; // not current instantiation ::X<type, U> *x4; // current instantiation X<typename X<type, U>::type, U>: *x5; // current instantiation }; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71471 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaLookup.cpp
emaTemplate.cpp
|
8a7f1fa36e2ae5640387f67d36d7d8fff516f32e |
11-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
With the introduction of nullptr, a template argument that refers to a declaration can now be NULL. Use cast_or_null appropriately git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71412 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
92d5077d35cb4ac7e3fdb5785fc4e843e9fffdc8 |
11-May-2009 |
Douglas Gregor <dgregor@apple.com> |
With the introduction of nullptr, a template argument that refers to a declaration can now be NULL. Use cast_or_null appropriately git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71412 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
9054f9878dbe2b1b8384c951ad07759d9de9dc8c |
11-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement the semantics of the injected-class-name within a class template. The injected-class-name is either a type or a template, depending on whether a '<' follows it. As a type, the injected-class-name's template argument list contains its template parameters in declaration order. As part of this, add logic for canonicalizing declarations, and be sure to canonicalize declarations used in template names and template arguments. A TagType is dependent if the declaration it references is dependent. I'm not happy about the rather complicated protocol needed to use ASTContext::getTemplateSpecializationType. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71408 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
7da97d0f31e1ec16998d3de2cfd2e88fe3736673 |
11-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement the semantics of the injected-class-name within a class template. The injected-class-name is either a type or a template, depending on whether a '<' follows it. As a type, the injected-class-name's template argument list contains its template parameters in declaration order. As part of this, add logic for canonicalizing declarations, and be sure to canonicalize declarations used in template names and template arguments. A TagType is dependent if the declaration it references is dependent. I'm not happy about the rather complicated protocol needed to use ASTContext::getTemplateSpecializationType. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71408 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
5d0ead717d57405b4a3b34a55b77579ea8b2774e |
10-May-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implement C++0x nullptr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71405 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprCXX.cpp
emaNamedCast.cpp
emaOverload.cpp
emaTemplate.cpp
|
6e8ed16ffef02b82995a90bdcf10ffff7d63839a |
10-May-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implement C++0x nullptr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71405 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprCXX.cpp
emaNamedCast.cpp
emaOverload.cpp
emaTemplate.cpp
|
13ddd1af28133402e076d9d446f4f21152fe92fa |
09-May-2009 |
Ted Kremenek <kremenek@apple.com> |
Add back Parse/Sema support for attributes cf_returns_retained and ns_returns_retained, but do not include the other ownership attributes we previously had. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71308 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
b71368d28532908ae1c2dc23f91761781205b3d0 |
09-May-2009 |
Ted Kremenek <kremenek@apple.com> |
Add back Parse/Sema support for attributes cf_returns_retained and ns_returns_retained, but do not include the other ownership attributes we previously had. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71308 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
f366d51179f775531c88c7040f00cecc58cdffd0 |
09-May-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
We want to diagnose sending message to a forward class and we also want to tell which message is actually being sent. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71296 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
9f8f026fc1cd1aa2942a2850a037398415128f8a |
09-May-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
We want to diagnose sending message to a forward class and we also want to tell which message is actually being sent. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71296 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
243f60435b67ae3a20d0e93998f8a2939c8192fe |
09-May-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Warn if forward class is used as a receiver. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71278 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
89bc314c6ddf3b851ccf68bc34d3f1b5927a10f6 |
09-May-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Warn if forward class is used as a receiver. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71278 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
d7f0025c4632fe45681f05dc07cd98089df6af7c |
08-May-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Fixes a bug in my last patch. Order of types reversed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71267 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
7aaa409fe0ca54f9bcc69b55e4d8903fca64a76f |
08-May-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Fixes a bug in my last patch. Order of types reversed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71267 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
80ccaa988081145cde2981258e5cc6f4e6d5ee94 |
08-May-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Refactoring of my last patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71248 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
emaExpr.cpp
|
c001e89b920504154bd0b1832e6feacd28fbfa58 |
08-May-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Refactoring of my last patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71248 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
emaExpr.cpp
|
a996bb05da29e060822af6f3fc675903811e7dd3 |
08-May-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
More type checking for properties, accessors and use of dot-syntax expression. This is to match gcc's. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71243 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
emaExpr.cpp
|
4c2743f0afe601b0e8ea7bd9b3cd0fb09083a181 |
08-May-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
More type checking for properties, accessors and use of dot-syntax expression. This is to match gcc's. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71243 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
emaExpr.cpp
|
5e8eb1fdd88b53fdc4378521a1b834c39c5e2b3f |
08-May-2009 |
Chris Lattner <sabre@nondot.org> |
Fix the atomics sema code to convert operands to the argument types of the underlying _N builtin, not the the type of the pointee of the actual type. This ensures that atomics involving pointers end up using the correct integer type when they are resolved, avoiding aborts in codegen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71218 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
e7ac0a94f1dee3fae9292eb8372962b6d70b3e0d |
08-May-2009 |
Chris Lattner <sabre@nondot.org> |
Fix the atomics sema code to convert operands to the argument types of the underlying _N builtin, not the the type of the pointee of the actual type. This ensures that atomics involving pointers end up using the correct integer type when they are resolved, avoiding aborts in codegen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71218 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
f084b0ae1f63ac979e9472bf1e320e27b813e4f4 |
08-May-2009 |
Ted Kremenek <kremenek@apple.com> |
Remove experimental ownership attributes from Clang. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71216 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
008fc73ac971e5d30c8710e37e1f5f8a843052f1 |
08-May-2009 |
Ted Kremenek <kremenek@apple.com> |
Remove experimental ownership attributes from Clang. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71216 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
822adfe2333425ef0c6233d82ca99154eee6f168 |
08-May-2009 |
Chris Lattner <sabre@nondot.org> |
reimplement __sync_* builtins to be variadic and to follow the same semantic rules that gcc and icc use. This implements the variadic and concrete versions as builtins and has sema do the disambiguation. There are probably a bunch of details to finish up but this seems like a large monotonic step forward :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71212 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
|
5caa370ea6f70bd3e7e4a9cc3b69ac1a849c8534 |
08-May-2009 |
Chris Lattner <sabre@nondot.org> |
reimplement __sync_* builtins to be variadic and to follow the same semantic rules that gcc and icc use. This implements the variadic and concrete versions as builtins and has sema do the disambiguation. There are probably a bunch of details to finish up but this seems like a large monotonic step forward :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71212 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
|
2f567c6af5628f719abc6aa9518aa18b62e560bb |
08-May-2009 |
Mike Stump <mrs@apple.com> |
Add a warning for a missing copy attribute on a property that is a block pointer. Radar 6441502 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71190 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
046efd92714dce712ad47bedfbdbb64e6eb35eec |
08-May-2009 |
Mike Stump <mrs@apple.com> |
Add a warning for a missing copy attribute on a property that is a block pointer. Radar 6441502 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71190 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
e5be3096770dd498f74c51bff08cf969f63704df |
07-May-2009 |
Mike Stump <mrs@apple.com> |
Allow qualifiers on blocks. Radar 6441502 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71183 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
7bc8d964405ce3b0b95091cdb66a391e50275b3c |
07-May-2009 |
Mike Stump <mrs@apple.com> |
Allow qualifiers on blocks. Radar 6441502 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71183 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
9245cf263f395161cc12a3c5664f6d0895967b2a |
07-May-2009 |
Ted Kremenek <kremenek@apple.com> |
More attribute renaming: - Rename 'ns_returns_owned' -> 'ns_returns_retained'. - Rename 'cf_returns_owned' -> 'cf_returns_retained'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71182 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
7704a33fb398a4352a18bd3fcb18218d3dc5cc60 |
07-May-2009 |
Ted Kremenek <kremenek@apple.com> |
More attribute renaming: - Rename 'ns_returns_owned' -> 'ns_returns_retained'. - Rename 'cf_returns_owned' -> 'cf_returns_retained'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71182 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
4c16d769ee9d6ccf7e7d37ca90eff151433313ee |
07-May-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
a forward class declaration matching a typedef name of a class refers to the underlying class. This is radar 6859726. Steve, please read the radar for my rational. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71181 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
cae27c51f0da674cdd3b53b8b2f7ba08c44c54b0 |
07-May-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
a forward class declaration matching a typedef name of a class refers to the underlying class. This is radar 6859726. Steve, please read the radar for my rational. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71181 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
ea3d74e607e6765b8a9f6f9c35e1ab4713ed7bc3 |
07-May-2009 |
Mike Stump <mrs@apple.com> |
Tighten up relationals with blocks and ints. Radar 6441502 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71171 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
af199f32b008191341f248d7d50616a6a71ba354 |
07-May-2009 |
Mike Stump <mrs@apple.com> |
Tighten up relationals with blocks and ints. Radar 6441502 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71171 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
091cf8d61a0abbeb40362a3dc0f672f987ff16bf |
07-May-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Fix a FIXME in new expression checking. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71163 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
4f149632ed57f3136f330d230100b9787d938a3e |
07-May-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Fix a FIXME in new expression checking. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71163 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
905406bd99b8498873a045f93ef196df6fe6cc69 |
07-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Compute the canonical template name when building a template specialization type for a dependent template name. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71153 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
45fbaf02fb94a9bc6a108c9621d3db0092d11e94 |
07-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Compute the canonical template name when building a template specialization type for a dependent template name. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71153 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
b88ba4173268f00ef39cfa6c6804d43ef510646d |
07-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Start canonicalizing template names. This is not yet complete, but it improves type identity with dependent types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71152 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
25a3ef7cc5fd55dc8cc67c6e6770c8595657e082 |
07-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Start canonicalizing template names. This is not yet complete, but it improves type identity with dependent types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71152 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
e97a8545b03a4c1ca89774aca20185d70f9ed03b |
07-May-2009 |
Mike Stump <mrs@apple.com> |
Improve semantic checking for blocks. Radar 6441502 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71145 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
dd3e1664b5a0996115ef141ad2396168b3a1d288 |
07-May-2009 |
Mike Stump <mrs@apple.com> |
Improve semantic checking for blocks. Radar 6441502 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71145 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ba9a371cb3438f165ff6191c42732f699968eea2 |
07-May-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Back out r70506 (exception spec in AST) again. We won't have exception specs until we've had a lot more discussion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71125 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
bfa2fcba545fb270f31205d616846c2bfaf4e47e |
07-May-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Back out r70506 (exception spec in AST) again. We won't have exception specs until we've had a lot more discussion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71125 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
03d242e18e54faad6da12eab590ddd5e261d077a |
05-May-2009 |
Ted Kremenek <kremenek@apple.com> |
Implement attribute 'ns_autorelease'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70990 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
69aa08072decc20094bd1f75f4f9842e9bd357ad |
05-May-2009 |
Ted Kremenek <kremenek@apple.com> |
Implement attribute 'ns_autorelease'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70990 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
0c535276de28f633182ef1f29834426e7f485d6b |
05-May-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Issue a warning in odd case of instance method used in a 'Class' receiver which is not a root instance method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70987 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
041f2fd6237c7ce72864e42c66c6b12b52f35f9c |
05-May-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Issue a warning in odd case of instance method used in a 'Class' receiver which is not a root instance method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70987 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
cf651d29769f12aa7a7fb21b966b8f80ad0c9b13 |
05-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Turns out that Sebastian already implemented the logic to compute the composite pointer type, and his is better! Updated relational- and equality-operator checking accordingly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70963 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprCXX.cpp
|
de866f3d4d2653ae59a54e41e6616a6c23c63cc8 |
05-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Turns out that Sebastian already implemented the logic to compute the composite pointer type, and his is better! Updated relational- and equality-operator checking accordingly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70963 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprCXX.cpp
|
fed3c098f6345dfd908c0c27583db7140996ad8b |
05-May-2009 |
Ted Kremenek <kremenek@apple.com> |
Implement attribute 'cf_returns_owned' (mirrors 'ns_returns_owned'). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70952 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
e351aa10dab6eb8b9b502166c7035dc7b0e723e0 |
05-May-2009 |
Ted Kremenek <kremenek@apple.com> |
Implement attribute 'cf_returns_owned' (mirrors 'ns_returns_owned'). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70952 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
bf3b1f068f5d5ccd9fcd287acbe245b575e257e7 |
05-May-2009 |
Ted Kremenek <kremenek@apple.com> |
Rename ownership attributes: ns_ownership_returns -> ns_returns_owned ns_ownership_retain -> ns_retains ns_ownership_release -> ns_releases cf_ownership_retain -> cf_retains cf_ownership_release -> cf_releases git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70949 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
d331dd7fa43f547197efcd757e4a7b477c29fd6e |
05-May-2009 |
Ted Kremenek <kremenek@apple.com> |
Rename ownership attributes: ns_ownership_returns -> ns_returns_owned ns_ownership_retain -> ns_retains ns_ownership_release -> ns_releases cf_ownership_retain -> cf_retains cf_ownership_release -> cf_releases git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70949 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
b63a77eea1644d4747c16bab240945069d977a9b |
05-May-2009 |
Ted Kremenek <kremenek@apple.com> |
Rename attribute 'ns_ownership_returns' to 'ns_returns_ownership'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70941 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
6a08469ebe3e15262733841a9c29e2e563d78ba5 |
05-May-2009 |
Ted Kremenek <kremenek@apple.com> |
Rename attribute 'ns_ownership_returns' to 'ns_returns_ownership'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70941 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
a8d6fd978099620a754b62c590c39ca0dc0068a7 |
05-May-2009 |
Ted Kremenek <kremenek@apple.com> |
Remove experimental attribute 'ns_ownership_make_collectable.' git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70940 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
d99b345a1ae77c746ef025e6a050908d69e2c543 |
05-May-2009 |
Ted Kremenek <kremenek@apple.com> |
Remove experimental attribute 'ns_ownership_make_collectable.' git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70940 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
e1d5e5aaba747c50060ba3cd063aab4e69ffc396 |
04-May-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
ignore weak_import attribute on objc method decls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70901 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
d4edddde6d3966ad4a4f60d9af0f9dd36995495c |
04-May-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
ignore weak_import attribute on objc method decls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70901 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
028e811124293fa0c0f670ce16d102bbf76cf1c9 |
04-May-2009 |
Ted Kremenek <kremenek@apple.com> |
Rename attributes 'objc_ownership...' to 'ns_ownership...'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70897 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
75494ffb4ed3964fa22fb9ab15fddecedbc9fe10 |
04-May-2009 |
Ted Kremenek <kremenek@apple.com> |
Rename attributes 'objc_ownership...' to 'ns_ownership...'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70897 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
03d27943db8899157cd8aa4fcfb56abcba229435 |
04-May-2009 |
Ted Kremenek <kremenek@apple.com> |
Rename attributes: 'objc_ownership_cfretain' -> 'cf_ownership_retain' 'objc_ownership_cfrelease' -> 'cf_ownership_release' Motivation: Core Foundation objects can be used in isolation from Objective-C, and this forces users to reason about the separate semantics of CF objects. More Sema support pending. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70884 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
31c215e62031b14e85c2f695c261817c044b465b |
04-May-2009 |
Ted Kremenek <kremenek@apple.com> |
Rename attributes: 'objc_ownership_cfretain' -> 'cf_ownership_retain' 'objc_ownership_cfrelease' -> 'cf_ownership_release' Motivation: Core Foundation objects can be used in isolation from Objective-C, and this forces users to reason about the separate semantics of CF objects. More Sema support pending. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70884 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
61ccd5c7d016fa7f39c74444a2326ddffcebfac3 |
04-May-2009 |
Ted Kremenek <kremenek@apple.com> |
Remove support for ObjCMethodDecl attributes that appear between the return type and the selector. This is inconsistent with C functions (where such attributes would be placed on the return type, not the the FunctionDecl), and is inconsistent with what people are use to seeing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70878 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclAttr.cpp
emaDeclObjC.cpp
|
1c6a3cc88177c67498fccdf14cfdf09959214e41 |
04-May-2009 |
Ted Kremenek <kremenek@apple.com> |
Remove support for ObjCMethodDecl attributes that appear between the return type and the selector. This is inconsistent with C functions (where such attributes would be placed on the return type, not the the FunctionDecl), and is inconsistent with what people are use to seeing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70878 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclAttr.cpp
emaDeclObjC.cpp
|
30eed0fc54c3ac046a7cf9e41aaf75c2a177640b |
04-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement support for comparing pointers with <, >, <=, >=, ==, and != in C++, taking into account conversions to the "composite pointer type" so that we can compare, e.g., a pointer to a derived class to a pointer to a base class. Also, upgrade the "comparing distinct pointer types" from a warning to an error for C++, since this is clearly an error. Turns out that we hadn't gone through and audited this code for C++, ever. Fixes <rdar://problem/6816420>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70829 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprCXX.cpp
|
0c6db9417dceeb082296c4e097be5de3ee1c5eb7 |
04-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement support for comparing pointers with <, >, <=, >=, ==, and != in C++, taking into account conversions to the "composite pointer type" so that we can compare, e.g., a pointer to a derived class to a pointer to a base class. Also, upgrade the "comparing distinct pointer types" from a warning to an error for C++, since this is clearly an error. Turns out that we hadn't gone through and audited this code for C++, ever. Fixes <rdar://problem/6816420>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70829 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprCXX.cpp
|
e7e4dacd5a6e929e982867a02109ddaf608535cd |
04-May-2009 |
Eli Friedman <eli.friedman@gmail.com> |
PR2524: downgrade taking address of expression of type 'void' to an extension warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70805 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
53202857c60214d80950a975e6e52aebf30bd16a |
04-May-2009 |
Eli Friedman <eli.friedman@gmail.com> |
PR2524: downgrade taking address of expression of type 'void' to an extension warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70805 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
c24ae00eb85c8aec085ae858617c4b40db2abf1c |
03-May-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix/re-enable test. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70800 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
c0d600c83a91b200616616f3982553c0ff42fcf3 |
03-May-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix/re-enable test. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70800 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
5f0e403d2f136fba691d670b97d473ac13629858 |
03-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
One can use "class" and "struct" interchangeably to refer to a class in C++. Fixes <rdar://problem/6815995>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70784 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplate.cpp
|
ed4ec8f6d183c247a4528ff846669b02f2326185 |
03-May-2009 |
Douglas Gregor <dgregor@apple.com> |
One can use "class" and "struct" interchangeably to refer to a class in C++. Fixes <rdar://problem/6815995>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70784 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplate.cpp
|
4bba3fca49b4faa27ec167244bfa2a8e77af4bc8 |
03-May-2009 |
Chris Lattner <sabre@nondot.org> |
allow references to the larger value in a tied constraint from the asm string, but reject references to the smaller one. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70679 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
3351f1145aa91ddd8022fcd3ca16c219db9e8277 |
03-May-2009 |
Chris Lattner <sabre@nondot.org> |
allow references to the larger value in a tied constraint from the asm string, but reject references to the smaller one. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70679 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
14e98982586e22e98ff2715ff4fbd6a6041f297c |
03-May-2009 |
Chris Lattner <sabre@nondot.org> |
code cleanup, avoid shadowing i. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70678 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
58bce89d12b1dfba16637ce3754d6cb24c3099bb |
03-May-2009 |
Chris Lattner <sabre@nondot.org> |
code cleanup, avoid shadowing i. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70678 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
94b4de4234972c902e3fb77b95eddb63c6f586a0 |
03-May-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Don't insert an extra ParenExpr around asm operands. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70673 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
72056a237c536ee63285ab0850cb50f299281767 |
03-May-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Don't insert an extra ParenExpr around asm operands. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70673 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
5d193d295263d8327ded78afc51b445f1afad23d |
03-May-2009 |
Chris Lattner <sabre@nondot.org> |
If we have mismatched integer tied operands, but the operand number is not mentioned in the asm string, let it past sema. Right now these are currently rejected by the llvm code generator but this will be fixed next. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70670 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
f69fcaeb3843297757251a19f0a6f5bbffed7f32 |
03-May-2009 |
Chris Lattner <sabre@nondot.org> |
If we have mismatched integer tied operands, but the operand number is not mentioned in the asm string, let it past sema. Right now these are currently rejected by the llvm code generator but this will be fixed next. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70670 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
f2e6e50e04082ddbc5ee6082fc9c1d3b4cbd13db |
03-May-2009 |
Chris Lattner <sabre@nondot.org> |
avoid a crash when we encounter a implicit cast of the paren expr due to promotions. This should be fixed by not modeling asm operands (which require the ()'s according to the grammar) as not being paren exprs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70668 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
c1f3b28004a032f4cd13721d4d884c6dcec29c31 |
03-May-2009 |
Chris Lattner <sabre@nondot.org> |
avoid a crash when we encounter a implicit cast of the paren expr due to promotions. This should be fixed by not modeling asm operands (which require the ()'s according to the grammar) as not being paren exprs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70668 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
5e0ae4709a175f9c960d9c35921c5b6d832d8b34 |
03-May-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix silly mistake that was breaking tests. Sorry for any inconvenience. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70664 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
586d6a81428da2d1ce70bcb98df29d749361cbf3 |
03-May-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix silly mistake that was breaking tests. Sorry for any inconvenience. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70664 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
5fa424b33e681c1bcc862e697cafad9d0c4a04ea |
03-May-2009 |
Chris Lattner <sabre@nondot.org> |
rename some variables, improve comments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70663 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
7adaa18ef3be65971cd41cc61dd739baeb02af10 |
03-May-2009 |
Chris Lattner <sabre@nondot.org> |
rename some variables, improve comments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70663 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
f983c69b8efb8982aad4f6365f03bbd4eed6a55f |
03-May-2009 |
Chris Lattner <sabre@nondot.org> |
refactor matched operand type checking to happen after the AsmStmt is created, no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70662 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
806503f8c839d7f5ebf3fbf7ee848c179be76dd2 |
03-May-2009 |
Chris Lattner <sabre@nondot.org> |
refactor matched operand type checking to happen after the AsmStmt is created, no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70662 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
6277e4095e523d8a20d1eff82df66191ecd37487 |
03-May-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Add Sema support for __builtin_setjmp/__builtin_longjmp. The primary reason for adding these is to error out in CodeGen when trying to generate them instead of silently emitting a call to a non-existent function. (Note that it is not valid to lower these to setjmp/longjmp; in addition to that lowering being different from the intent, setjmp and longjmp require a larger buffer.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70658 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
|
d875fed28578835de89cd407e9db4be788596d7c |
03-May-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Add Sema support for __builtin_setjmp/__builtin_longjmp. The primary reason for adding these is to error out in CodeGen when trying to generate them instead of silently emitting a call to a non-existent function. (Note that it is not valid to lower these to setjmp/longjmp; in addition to that lowering being different from the intent, setjmp and longjmp require a larger buffer.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70658 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
|
e8e4492eaea4328dfd968b28e73e2211ca649299 |
03-May-2009 |
Daniel Dunbar <daniel@zuster.org> |
Fix invalid error about duplicate declaration of padding bit field in an interface. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70652 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
ad04e6737e3267a502970acac8abb54b0c899db6 |
03-May-2009 |
Daniel Dunbar <daniel@zuster.org> |
Fix invalid error about duplicate declaration of padding bit field in an interface. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70652 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
68c926c7a12bd295a8e926fe0ae60c503ded7ba6 |
02-May-2009 |
Anders Carlsson <andersca@mac.com> |
Fix a thinko and a test. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70637 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
5992e4a9cf7e2762a746a6d355dfab4598125012 |
02-May-2009 |
Anders Carlsson <andersca@mac.com> |
Fix a thinko and a test. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70637 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
bbceaea1fd99e0790688e27880f18667e5842d46 |
02-May-2009 |
Anders Carlsson <andersca@mac.com> |
Downgrade the invalid offsetof error to a warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70634 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
f9b8bc662a84bb89a2d98530592f5d8fb6bee761 |
02-May-2009 |
Anders Carlsson <andersca@mac.com> |
Downgrade the invalid offsetof error to a warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70634 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
531434b0b3e12757c57f776e42083b269bc72b3b |
02-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When determining whether an expression refers to a bit-field, look into the left-hand side of an assignment expression. This completes most of PR3500; the only remaining part is to deal with the GCC-specific implementation-defined behavior for "unsigned long" (and other) bit-fields. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70623 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExpr.cpp
emaOverload.cpp
|
33bbbc5ec8269bc2cde5b84f970fa49319a30267 |
02-May-2009 |
Douglas Gregor <dgregor@apple.com> |
When determining whether an expression refers to a bit-field, look into the left-hand side of an assignment expression. This completes most of PR3500; the only remaining part is to deal with the GCC-specific implementation-defined behavior for "unsigned long" (and other) bit-fields. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70623 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExpr.cpp
emaOverload.cpp
|
6fcf2ca844e28bcec97b7f0ee77810b7b93b98ad |
02-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix bitfield promotions in several more cases. We don't seem to work hard enough at determining whether an expression is a bitfield or not, yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70613 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
2d833e349029ba73d4a101831371515a25dbda60 |
02-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Fix bitfield promotions in several more cases. We don't seem to work hard enough at determining whether an expression is a bitfield or not, yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70613 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
21f220e79450ee703952b1bd95c8c075dfd7dffa |
02-May-2009 |
Mike Stump <mrs@apple.com> |
Add Sema checking for __block on vm declarations. Radar 6441502 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70601 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
c975bb04da88323fded43e71ff1839e8640fe878 |
02-May-2009 |
Mike Stump <mrs@apple.com> |
Add Sema checking for __block on vm declarations. Radar 6441502 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70601 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
356946ee30f0a12becabe19e956eb3f4d3933c96 |
02-May-2009 |
Anders Carlsson <andersca@mac.com> |
It's an error to call offsetof on a non-POD type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70595 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
6d7f149b0bff12e8f74c372e50b6e9a9ea980425 |
02-May-2009 |
Anders Carlsson <andersca@mac.com> |
It's an error to call offsetof on a non-POD type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70595 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
70b307e2a3f85e698244e7c69e15b0f3c40c3882 |
01-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement bit-field promotion rules for C99. Fixes PR3500. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70571 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
fc24e44bea29dcaabd9cf2c7663fe1c1286d90c1 |
01-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement bit-field promotion rules for C99. Fixes PR3500. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70571 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
78eca5d8928e8bd9a4e7ceea8e6a326c973a13b3 |
01-May-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Check for method type conflict between declaration in class/protocol and implementation which could be an imm. implementation or down in the inheritance hierarchy. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70568 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
b33f3ad379f497c5fc6d0ada618745dd46d0e717 |
01-May-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Check for method type conflict between declaration in class/protocol and implementation which could be an imm. implementation or down in the inheritance hierarchy. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70568 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
39ecdcf1af2987c847a06bcc3440c525ac33e8e0 |
01-May-2009 |
Anders Carlsson <andersca@mac.com> |
Replace more release+static_cast with takeAs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70567 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaInit.cpp
emaNamedCast.cpp
emaStmt.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
e9146f2e9f1c4e281544e8c080934c72d41012ca |
01-May-2009 |
Anders Carlsson <andersca@mac.com> |
Replace more release+static_cast with takeAs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70567 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaInit.cpp
emaNamedCast.cpp
emaStmt.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
c154a72fc369ab4dca49c4a2703595d1bc2116fa |
01-May-2009 |
Anders Carlsson <andersca@mac.com> |
Replace a bunch of static_cast + release with takeAs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70566 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaStmt.cpp
emaTemplateInstantiate.cpp
|
f1b1d59a3f0650ab97b04235a14ae4549ca1c656 |
01-May-2009 |
Anders Carlsson <andersca@mac.com> |
Replace a bunch of static_cast + release with takeAs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70566 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaStmt.cpp
emaTemplateInstantiate.cpp
|
2d30f6b514205bc74fb192aeec05c71355feae90 |
01-May-2009 |
Anders Carlsson <andersca@mac.com> |
Get rid of the implicit deref call when calling member functions where the base is a pointer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70562 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
a552f7c125d9f70eeb9e9793a2fabe99b806c983 |
01-May-2009 |
Anders Carlsson <andersca@mac.com> |
Get rid of the implicit deref call when calling member functions where the base is a pointer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70562 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
31a32d9a664f87f7dcf75bbe63727aa172b54c3f |
01-May-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Finish a thought in CheckVariableDeclaration's comment. No functionality change git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70544 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
180bb63b482381c5ffcdb2c4eca5c28c0b1f22af |
01-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Finish a thought in CheckVariableDeclaration's comment. No functionality change git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70544 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
970e56cbb567add16945688cff5404fb2c30aea9 |
01-May-2009 |
Eli Friedman <eli.friedman@gmail.com> |
PR4013 and PR4105: pointer-like types can only be cast to/from integers and other pointer-like types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70531 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
41826bb59d2ef5e8c8a4a0cd2b06a7a011b67b4d |
01-May-2009 |
Eli Friedman <eli.friedman@gmail.com> |
PR4013 and PR4105: pointer-like types can only be cast to/from integers and other pointer-like types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70531 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
fcfa244a6032fba70aeb94f20cf7946d8fec711c |
01-May-2009 |
Anders Carlsson <andersca@mac.com> |
C++ destructors can have a single unnamed void parameter. Fixes <rdar://problem/6841210>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70519 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
7786d1c5d752b90ff74093bd1ffda37daf0dbe6e |
01-May-2009 |
Anders Carlsson <andersca@mac.com> |
C++ destructors can have a single unnamed void parameter. Fixes <rdar://problem/6841210>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70519 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
e19759d8bdf60b4aa8a56d9f0ff6b533db1ca9a3 |
01-May-2009 |
Anders Carlsson <andersca@mac.com> |
Rework the way we handle constructor decls to be less hacky and fix PR3948 completely. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70516 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
4649cac75c3cb80d543c6d90269388277228508d |
01-May-2009 |
Anders Carlsson <andersca@mac.com> |
Rework the way we handle constructor decls to be less hacky and fix PR3948 completely. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70516 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
c181f5a19dd78208c6632dfd59f92a7b7ea7e9b9 |
30-Apr-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Use of super class ivar to synthesize property is back to being error. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70514 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
e2f2c16047a0165cbfbdba84c74bd4fb814d7c3e |
30-Apr-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Use of super class ivar to synthesize property is back to being error. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70514 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
74942cde3da623741b60c2524fc44ef0cb35724b |
30-Apr-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Make a home for exception specs in the AST. Now Sema can hook them up. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70506 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
7b9a2ee5a4393001bdec7dec841eb7c811da492c |
30-Apr-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Make a home for exception specs in the AST. Now Sema can hook them up. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70506 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
6f05fb06f19a9a11cd3c9c440b3309d8e3efdd5b |
30-Apr-2009 |
Ted Kremenek <kremenek@apple.com> |
Allow attributes 'objc_ownership_retain' and 'objc_ownership_release' to be applied to ObjCMethodDecls, not just parameters. This allows one to specific side-effects on the receiver of a message expression. No checker support yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70505 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
72c9dcd9dbc1ee65d7863d1ea04c2cc928007cc9 |
30-Apr-2009 |
Ted Kremenek <kremenek@apple.com> |
Allow attributes 'objc_ownership_retain' and 'objc_ownership_release' to be applied to ObjCMethodDecls, not just parameters. This allows one to specific side-effects on the receiver of a message expression. No checker support yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70505 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
2b0e6da5e1448a5feac5a9f79e1e3a35b68807c7 |
30-Apr-2009 |
Ted Kremenek <kremenek@apple.com> |
Hook up Sema support for attributes on Objective-C method declarations that appear between the return type and the selector. This is a separate code path from regular attribute processing, as we only want to (a) accept only a specific set of attributes in this place and (b) want to distinguish to clients the context in which an attribute was added to an ObjCMethodDecl. Currently, the attribute 'objc_ownership_returns' is the only attribute that uses this new feature. Shortly I will add a warning for 'objc_ownership_returns' to be placed at the end of a method declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70504 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclAttr.cpp
emaDeclObjC.cpp
|
b27d1174673d457e2ee7906c14a92bba35242cea |
30-Apr-2009 |
Ted Kremenek <kremenek@apple.com> |
Hook up Sema support for attributes on Objective-C method declarations that appear between the return type and the selector. This is a separate code path from regular attribute processing, as we only want to (a) accept only a specific set of attributes in this place and (b) want to distinguish to clients the context in which an attribute was added to an ObjCMethodDecl. Currently, the attribute 'objc_ownership_returns' is the only attribute that uses this new feature. Shortly I will add a warning for 'objc_ownership_returns' to be placed at the end of a method declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70504 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclAttr.cpp
emaDeclObjC.cpp
|
d196f75ab8ad119b03b9f353c1776629ee8e3cb1 |
30-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
only support int128_t on 64-bit and larger targets. 32-bit targets don't have support for __divti3 and friends. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70480 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
4d150c84514dbf15975960a3ea46bdf6b7f16a5b |
30-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
only support int128_t on 64-bit and larger targets. 32-bit targets don't have support for __divti3 and friends. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70480 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
6cc7e415d42291bf01e0295d9d6344e106613c48 |
30-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
initial support for __[u]int128_t, which should be basically compatible with VC++ and GCC. The codegen/mangling angle hasn't been fully ironed out yet. Note that we accept int128_t even in 32-bit mode, unlike gcc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70464 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
2df9ced9fd1e8c7d7b38443db07e0e811de22571 |
30-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
initial support for __[u]int128_t, which should be basically compatible with VC++ and GCC. The codegen/mangling angle hasn't been fully ironed out yet. Note that we accept int128_t even in 32-bit mode, unlike gcc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70464 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
64bce08a34d6925f0c4fe4c9c42cbe0e6f6bcd0a |
30-Apr-2009 |
Mike Stump <mrs@apple.com> |
Sema checking for incorrect placement of __block. Radar 6441502 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70452 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
ea000bf621552252e41fc870346e7048646709dc |
30-Apr-2009 |
Mike Stump <mrs@apple.com> |
Sema checking for incorrect placement of __block. Radar 6441502 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70452 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
745bc3af4f61d7ee1df002b9cb71ab3412cfa4f3 |
30-Apr-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Change to warning when property uses an ivar in super class in an @synthesize diective, as it breaks few projects. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70441 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
9cd6f0f58570a98a6d6acee8803c73986c6846b4 |
30-Apr-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Change to warning when property uses an ivar in super class in an @synthesize diective, as it breaks few projects. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70441 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
144b06c28e50e3bdec286c4fc74c3edf5553f88e |
30-Apr-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement semantic analysis for transparent unions. This is largely based on a patch from Anders Johnsen. CodeGen support is incomplete, in that we do not properly coerce to the first field's type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70419 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclAttr.cpp
emaExpr.cpp
emaOverload.cpp
|
0c74e8a4e8865ec9ebb8efc0af247a3c077236c4 |
30-Apr-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement semantic analysis for transparent unions. This is largely based on a patch from Anders Johnsen. CodeGen support is incomplete, in that we do not properly coerce to the first field's type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70419 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclAttr.cpp
emaExpr.cpp
emaOverload.cpp
|
76389e4761b30e18ea0aa369ef0f0234419a6c13 |
29-Apr-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
use of an ivar specified on a property @synthesize and found in super class triggers a diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70414 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
6e5201b71dcf5e98d2ac4e14bebf5b4080120bb6 |
29-Apr-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
use of an ivar specified on a property @synthesize and found in super class triggers a diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70414 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
9e439c9e0c09e4a64c32f7238ef2cce7a81f8c48 |
29-Apr-2009 |
Mike Stump <mrs@apple.com> |
Fixup Sema and CodeGen for block literal attributes when the return type and argument types are missing, and let return type deduction happen before we give errors for returning from a noreturn block. Radar 6441502 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70413 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaStmt.cpp
|
6c92fa75e62937f9738696840efcb258560f4568 |
29-Apr-2009 |
Mike Stump <mrs@apple.com> |
Fixup Sema and CodeGen for block literal attributes when the return type and argument types are missing, and let return type deduction happen before we give errors for returning from a noreturn block. Radar 6441502 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70413 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaStmt.cpp
|
115a0725f647accbecf08ccc0c920320c6531edb |
29-Apr-2009 |
Mike Stump <mrs@apple.com> |
Sema and CodeGen support for attributes on blocks. Radar 6441502 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70403 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaExpr.cpp
emaStmt.cpp
|
19c30c00e5e01e4608a43c7deb504f343f09e46d |
29-Apr-2009 |
Mike Stump <mrs@apple.com> |
Sema and CodeGen support for attributes on blocks. Radar 6441502 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70403 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaExpr.cpp
emaStmt.cpp
|
1653e238707eef9cbcc85109af0fa66aeb6593a8 |
29-Apr-2009 |
Eli Friedman <eli.friedman@gmail.com> |
PR4103: improve source location information for members of the current class. This isn't perfect, but it's a big improvement over not having any location information. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70390 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
72527137c521ad9330ecb81ccd841159719dc8cd |
29-Apr-2009 |
Eli Friedman <eli.friedman@gmail.com> |
PR4103: improve source location information for members of the current class. This isn't perfect, but it's a big improvement over not having any location information. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70390 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
35f3a5b8d2e4314171e6e3fff96847e765cbceb1 |
29-Apr-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Have the parser communicate the exception specification to the action. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70389 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
7dc813462dd9fd3f6f4296f896a12de14264fef8 |
29-Apr-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Have the parser communicate the exception specification to the action. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70389 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
5c71205b711ec2bd18991f811114e3200d275d90 |
29-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
fix PR4021, array and functions decay in the receiver position of an objc message send. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70373 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
d0d4599d8ff308ac34db9e38c578f5b8d32afa7e |
29-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
fix PR4021, array and functions decay in the receiver position of an objc message send. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70373 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
1911217aea96e2b1f082428a6454efcfcd8fa530 |
29-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
Fix PR4092 by improving error recovery in two ways: 1. In a struct field redefinition, don't mark the struct erroneous. The field is erroneous, but the struct is otherwise well formed. 2. Don't emit diagnostics about functions that are known to be broken already. Either fix is sufficient to silence the second diagnostic in the example, but the combination is better :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70371 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
65e6a093b1aeeab919025ff979a9f874cdffa628 |
29-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
Fix PR4092 by improving error recovery in two ways: 1. In a struct field redefinition, don't mark the struct erroneous. The field is erroneous, but the struct is otherwise well formed. 2. Don't emit diagnostics about functions that are known to be broken already. Either fix is sufficient to silence the second diagnostic in the example, but the combination is better :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70371 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
8ba7cc776433a5d7f3f83ae63ac2a1a04cfdb972 |
29-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
implement -Wformat-security properly, which is enabled by default. This enables one specific class of non-literal format warnings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70368 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
655f141f4d4c92eeebcc880211313e84c0a8b2f2 |
29-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
implement -Wformat-security properly, which is enabled by default. This enables one specific class of non-literal format warnings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70368 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
153b4ebe0aa320fb57a06a4c457ab1fe7730e6b6 |
29-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
code simplification, no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70367 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
1cd3e1f72c3a1c256fb6a5c3d4512bca1f1b751d |
29-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
code simplification, no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70367 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
44c5c01e1362fac745318ba0a4726d652917078a |
29-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
minor code cleanup git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70361 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
b9fc856696defc78750fdb4977c4dce34307a7f1 |
29-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
minor code cleanup git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70361 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
e81596c5342ef612bc6fe8306c72be3cd3c1f9b4 |
29-Apr-2009 |
Mike Stump <mrs@apple.com> |
Implement sema checking for noreturn. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70353 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
f7c41dab1a8de29b0991e853b8822bb0d1ddc01c |
29-Apr-2009 |
Mike Stump <mrs@apple.com> |
Implement sema checking for noreturn. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70353 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
ff8648dfaac35f96f8b59bf84ac2cd60cbe9d995 |
29-Apr-2009 |
Ted Kremenek <kremenek@apple.com> |
Implement ownership attribute 'objc_ownership_make_collectable'. This allows one to add 'CFMakeCollectable' semantics to a method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70336 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
bf20dbdec6ab7d02e96fac937ad57b2b95c0675c |
29-Apr-2009 |
Ted Kremenek <kremenek@apple.com> |
Implement ownership attribute 'objc_ownership_make_collectable'. This allows one to add 'CFMakeCollectable' semantics to a method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70336 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
e730abebca9f01f5872de09f8873eb6e8da15b89 |
28-Apr-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix a minor edge case in C89 mode related to the definition of a "function designator". (This causes a minor glitch in the diagnostics for C++ member pointers, but we weren't printing the right diagnostic there anyway.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70307 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
9895d88c34cb2eab65c622cddeaf721108d1af38 |
28-Apr-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix a minor edge case in C89 mode related to the definition of a "function designator". (This causes a minor glitch in the diagnostics for C++ member pointers, but we weren't printing the right diagnostic there anyway.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70307 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
67e1144edd7fde23b60c1b9359ac6160b50b837f |
28-Apr-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve compatibility with GCC regarding inline semantics in GNU89 mode and in the presence of __gnu_inline__ attributes. This should fix both PR3989 and PR4069. As part of this, we now keep track of all of the attributes attached to each declaration even after we've performed declaration merging. This fixes PR3264. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70292 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
|
9f9bf258f8ebae30bfb70feb9d797d6eb67b0460 |
28-Apr-2009 |
Douglas Gregor <dgregor@apple.com> |
Improve compatibility with GCC regarding inline semantics in GNU89 mode and in the presence of __gnu_inline__ attributes. This should fix both PR3989 and PR4069. As part of this, we now keep track of all of the attributes attached to each declaration even after we've performed declaration merging. This fixes PR3264. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70292 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
|
458287df784699a4d283ae4479f5d3988f46317c |
28-Apr-2009 |
Mike Stump <mrs@apple.com> |
Don't allow blocks to be declared as returning an array. Radar 6441502 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70277 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
4eeab84b6527feba5c63b819a74417677c9977a0 |
28-Apr-2009 |
Mike Stump <mrs@apple.com> |
Don't allow blocks to be declared as returning an array. Radar 6441502 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70277 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ef8d2a0217d5b57bb3a51b2b49e573ce9da08e5d |
28-Apr-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Get rid of some useless uses of NoExtensions. The philosophy here is that if we're going to print an extension warning anyway, there's no point to changing behavior based on NoExtensions: it will only make error recovery worse. Note that this doesn't cause any behavior change because NoExtensions isn't used by the current front-end. I'm still considering what to do about the remaining use of NoExtensions in IdentifierTable.cpp. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70273 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f01fdff97b245caac98100d232c760b4d0531411 |
28-Apr-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Get rid of some useless uses of NoExtensions. The philosophy here is that if we're going to print an extension warning anyway, there's no point to changing behavior based on NoExtensions: it will only make error recovery worse. Note that this doesn't cause any behavior change because NoExtensions isn't used by the current front-end. I'm still considering what to do about the remaining use of NoExtensions in IdentifierTable.cpp. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70273 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
3b1ef31607fd4abed5555c5e4a04b31337518015 |
27-Apr-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Track down return statements in the handlers of a function-try-block of constructors. Meh ... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70256 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
13e8854b186265a601545ca88f8f495fb3fb5654 |
27-Apr-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Track down return statements in the handlers of a function-try-block of constructors. Meh ... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70256 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
541986504bfa11649ca339a39b99bbd137ee4b7f |
27-Apr-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Don't allow catch declarations to name an abstract class git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70248 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
fef9f59e80275cc7515676ee6d8cc539ef155b47 |
27-Apr-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Don't allow catch declarations to name an abstract class git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70248 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
9949a5e6e5218e31c460b1d48009c6c0c163659a |
27-Apr-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Improve validation of C++ exception handling: diagnose throwing incomplete types and jumps into protected try-catch scopes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70242 91177308-0d34-0410-b5e6-96231b3b80d8
umpDiagnostics.cpp
ema.h
emaExprCXX.cpp
emaStmt.cpp
|
972041f45bdf8df7ea447221292d7827466ba94b |
27-Apr-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Improve validation of C++ exception handling: diagnose throwing incomplete types and jumps into protected try-catch scopes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70242 91177308-0d34-0410-b5e6-96231b3b80d8
umpDiagnostics.cpp
ema.h
emaExprCXX.cpp
emaStmt.cpp
|
203169f80fe7bb3fbc52921019983206230afc01 |
27-Apr-2009 |
Ted Kremenek <kremenek@apple.com> |
Add two new checker-specific attributes: 'objc_ownership_release' and 'objc_ownership_cfrelease'. These are the 'release' equivalents of 'objc_ownership_retain' and 'objc_ownership_cfretain' respectively. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70235 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
c6a59e4bf225c7f8152faca72897321f0f6cabd1 |
27-Apr-2009 |
Ted Kremenek <kremenek@apple.com> |
Add two new checker-specific attributes: 'objc_ownership_release' and 'objc_ownership_cfrelease'. These are the 'release' equivalents of 'objc_ownership_retain' and 'objc_ownership_cfretain' respectively. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70235 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
767b84eae6eb1fe6a55e799f987fe3d84a55af86 |
27-Apr-2009 |
Ted Kremenek <kremenek@apple.com> |
Refactor HandleObjCOwnershipRetainAttr and HandleObjCOwnershipCFRetainAttr into HandleObjCOwnershipParmAttr. No functionality change (hopefully). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70224 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
22afc65ce9cb90cbc9f8dcfb3ea44acbebed67a6 |
27-Apr-2009 |
Ted Kremenek <kremenek@apple.com> |
Refactor HandleObjCOwnershipRetainAttr and HandleObjCOwnershipCFRetainAttr into HandleObjCOwnershipParmAttr. No functionality change (hopefully). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70224 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
15830ed32a2bdfd4d16bdedd4f155d013a5f6720 |
27-Apr-2009 |
Ted Kremenek <kremenek@apple.com> |
Add new checker-specific attribute 'objc_ownership_cfretain'. This is the same as 'objc_ownership_cfretain' except that the method acts like a CFRetain instead of a [... retain] (important in GC modes). Checker support is wired up, but currently only for Objective-C message expressions (not function calls). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70218 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
4064de959853503d9b87065adac1b277fff8af20 |
27-Apr-2009 |
Ted Kremenek <kremenek@apple.com> |
Add new checker-specific attribute 'objc_ownership_cfretain'. This is the same as 'objc_ownership_cfretain' except that the method acts like a CFRetain instead of a [... retain] (important in GC modes). Checker support is wired up, but currently only for Objective-C message expressions (not function calls). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70218 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
4b89fff51d907afc08ab306f0b1a62b89213773f |
27-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
rdar://6827200 - [sema] reject statically allocated arrays of interface types Upgrade "array of interface" warning to an error. In addition to being a terrible idea, this crashes codegen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70178 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
c7c11b1ba6a110f2416889cc3576fe33277b2a33 |
27-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
rdar://6827200 - [sema] reject statically allocated arrays of interface types Upgrade "array of interface" warning to an error. In addition to being a terrible idea, this crashes codegen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70178 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
fdb164f9803ba8b0c8fb1a8c25069841c951183e |
27-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
Change our silencing of C typedef redefinition handling to what we had before r69391: typedef redefinition is an error by default, but if *either* the old or new definition are from a system header, we silence it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70177 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d0359af5113c1936ff3f699c7d700adff59351f2 |
27-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
Change our silencing of C typedef redefinition handling to what we had before r69391: typedef redefinition is an error by default, but if *either* the old or new definition are from a system header, we silence it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70177 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
4203db84bf725b48a335c8008a60892b6b22953b |
26-Apr-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Add a bit more handling for declarations like "int a[*]". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70162 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
f91f5c8a66ffd812f61819836529f8ad437f7e2b |
26-Apr-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Add a bit more handling for declarations like "int a[*]". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70162 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
35719da4137403da1eba852fae70e57402d45932 |
26-Apr-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix for PR4079: make sure to construct the member expressions for offsetof correctly in the presence of anonymous structs/unions. This could definitely use some cleanup, but I don't really want to mess with the anonymous union/struct code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70156 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e93569666e330ca66ed4b3f58d2c15f3d9b24cd1 |
26-Apr-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix for PR4079: make sure to construct the member expressions for offsetof correctly in the presence of anonymous structs/unions. This could definitely use some cleanup, but I don't really want to mess with the anonymous union/struct code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70156 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
bc9ef257b887506228e86a7f4c933aecc8f554a9 |
26-Apr-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implement function-try-blocks. However, there's a very subtle bug that I can't track down. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70155 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d3a413d3b8eb39bcee5944bc545d9997c1abe492 |
26-Apr-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implement function-try-blocks. However, there's a very subtle bug that I can't track down. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70155 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
5255e7ae5cde3039284ca49a4c03f7bd4869894f |
26-Apr-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Remove getIntegerConstantExprValue in favor of using EvaluateAsInt. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70145 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
9a901bb63990574ff0bcc12ff851d7a71cff8ddb |
26-Apr-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Remove getIntegerConstantExprValue in favor of using EvaluateAsInt. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70145 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
11970f9a95dbd1a5829148449a59e8c17c74dfc8 |
26-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
implement PR4077: [Linux kernel] inscrutable error on inline asm input/output constraint mismatch Before we emitted: $ clang t.c -S -m64 llvm: error: Unsupported asm: input constraint with a matching output constraint of incompatible type! Now we produce: $ clang t.c -S -m64 t.c:5:40: error: unsupported inline asm: input with type 'unsigned long' matching output with type 'int' asm volatile("foo " : "=a" (a) :"0" (b)); ~~~ ~^~ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70142 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
49ac88166d36f8c436780694f2ce955acde87c6a |
26-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
implement PR4077: [Linux kernel] inscrutable error on inline asm input/output constraint mismatch Before we emitted: $ clang t.c -S -m64 llvm: error: Unsupported asm: input constraint with a matching output constraint of incompatible type! Now we produce: $ clang t.c -S -m64 t.c:5:40: error: unsupported inline asm: input with type 'unsigned long' matching output with type 'int' asm volatile("foo " : "=a" (a) :"0" (b)); ~~~ ~^~ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70142 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
9eb395f7173bcde053cafd7b575f12f973f583b5 |
26-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
in a tied operand, don't copy over the name or constraint string, just the flags. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70137 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
d68876176a0d2c19e3864e7d38f6036c4f72f0a3 |
26-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
in a tied operand, don't copy over the name or constraint string, just the flags. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70137 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
0cd323da459fbce4e19d1bbf2923afe80bb39e44 |
26-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
pull operands names "[foo]" into ConstraintInfo. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70136 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
2819fa85651526d59ade4fdc9da2cadd7b132973 |
26-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
pull operands names "[foo]" into ConstraintInfo. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70136 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
9f8e50205526b02ae170d4e0f0b10bf0b3e66f87 |
26-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
pull the constraint string into the ConstraintInfo struct instead of passing it around in addition to it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70135 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
432c86969eced2ce658b3f3f2aa7407c8864f21b |
26-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
pull the constraint string into the ConstraintInfo struct instead of passing it around in addition to it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70135 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
f6b8618999e1c58c6f374c26f30f6881735504f2 |
26-Apr-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Make reference class unification in conditional expressions check for validity of the conversion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70121 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
a5cd2cdd11179387aa01f43cb6d6af440e006553 |
26-Apr-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Make reference class unification in conditional expressions check for validity of the conversion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70121 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
c49cc1a57583d78783137ff7914526617d032af7 |
26-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
change TargetInfo::ConstraintInfo to be a struct that contains the enum along with some other data. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70114 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
44def070435a2b5d67f0534f7a3a85a7389d60f2 |
26-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
change TargetInfo::ConstraintInfo to be a struct that contains the enum along with some other data. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70114 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
4a9e927b03ecc65ca47cc4e1cd7b8d5c1fae1cf9 |
26-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
split ObjC and C++ Statements out into their own headers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70105 91177308-0d34-0410-b5e6-96231b3b80d8
umpDiagnostics.cpp
emaStmt.cpp
|
16f0049415ec596504891259e2a83e19871c0d52 |
26-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
split ObjC and C++ Statements out into their own headers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70105 91177308-0d34-0410-b5e6-96231b3b80d8
umpDiagnostics.cpp
emaStmt.cpp
|
7ce986840f689750f9d08a8ce23eb73e1536122c |
26-Apr-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Correct the order of the parameters to CheckAssignmentConstraints in cleanup attribute checking. The difference isn't normally visible, but it can make a difference... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70104 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
d5e3e8ec50d6ea481b3bc841dcbe853175d05122 |
26-Apr-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Correct the order of the parameters to CheckAssignmentConstraints in cleanup attribute checking. The difference isn't normally visible, but it can make a difference... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70104 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
d461407636aaec91dcc76dcab2600b04857aa742 |
26-Apr-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix for PR4074: allow subscripting non-lvalue arrays in C90 mode. I wasn't originally going to use this approach, but cases like test/Sema/expr-comma.c make things difficult. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70096 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
7c32f8e9be486f8f8ec2e75eba36903f7cb1b73a |
26-Apr-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix for PR4074: allow subscripting non-lvalue arrays in C90 mode. I wasn't originally going to use this approach, but cases like test/Sema/expr-comma.c make things difficult. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70096 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
7264d2112313ab9b0268f137d5afa3ad01c03ea6 |
26-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
minor diagnostics improvements. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70092 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
338395d31eecbf99bc1b15ef5631d1359bb96083 |
26-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
minor diagnostics improvements. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70092 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ce32941dce940de53fce0f52ea8b225ab450ea0f |
26-Apr-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Make VerifyIntegerConstantExpr print extension warnings for non-ICEs. Overall, I'm not particularly happy with the current situation regarding constant expression diagnostics, but I plan to improve it at some point. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70089 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
3b5cccad43000e2c0bae52e6ec992a9fa1900266 |
26-Apr-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Make VerifyIntegerConstantExpr print extension warnings for non-ICEs. Overall, I'm not particularly happy with the current situation regarding constant expression diagnostics, but I plan to improve it at some point. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70089 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
eec8ae2c3665db2d293850a695e5a3b3cb57a50a |
25-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
fix PR4073 by making designated initializer checking code use VerifyIntegerConstantExpression instead of isIntegerConstantExpr. This makes it ext-warn but tolerate things that fold to a constant but that are not valid i-c-e's. There must be a bug in the i-c-e computation though, because it doesn't catch this case even with pedantic. This also switches the later code to use EvaluateAsInt which is simpler and handles everything that evaluate does. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70081 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaInit.cpp
|
3bf6893b77c30cb774100e0fa7ae029331675ec1 |
25-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
fix PR4073 by making designated initializer checking code use VerifyIntegerConstantExpression instead of isIntegerConstantExpr. This makes it ext-warn but tolerate things that fold to a constant but that are not valid i-c-e's. There must be a bug in the i-c-e computation though, because it doesn't catch this case even with pedantic. This also switches the later code to use EvaluateAsInt which is simpler and handles everything that evaluate does. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70081 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaInit.cpp
|
aa25759d55be0eabc45fc77455ec71caf3486d1c |
25-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
remove a fixme that is already done. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70064 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
4a049f074117555e932a1256a3d41d8254e85866 |
25-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
remove a fixme that is already done. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70064 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
354abb45be477445dede57ec6993ed2d1e1139e7 |
25-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
improve a diagnostic to make more sense. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70062 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
740782a78386ad3c64c670ba9b1619545bbb4901 |
25-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
improve a diagnostic to make more sense. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70062 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
c305c34650968a494de752a9e2bd454f9708929d |
25-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
accept an ignore the no_instrument_function attribute. Since we don't support -pg, we never instrument :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70061 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
5e204486a7dd1e5f7e14e941a2c7e707a8ad1a3b |
25-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
accept an ignore the no_instrument_function attribute. Since we don't support -pg, we never instrument :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70061 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
2651a3f124ddce8b222a1a85694040c249fadea2 |
25-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
with the fixes for better invalid decl/type propagation, this code is no longer needed: a function type and a function declarator are always known to line up. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70060 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
84bb944dee0cc102635b162c669f99c529c60c02 |
25-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
with the fixes for better invalid decl/type propagation, this code is no longer needed: a function type and a function declarator are always known to line up. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70060 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
bca4b4cf921b6179d84b830e3feed75553f04266 |
25-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
Change SemaType's "GetTypeForDeclarator" and "ConvertDeclSpecToType" to always return a non-null QualType + error bit. This fixes a bunch of cases that didn't check for null result (and could thus crash) and eliminates some crappy code scattered throughout sema. This also improves the diagnostics in the recursive struct case to eliminate a bogus second error. It also cleans up the case added to function.c by forming a proper function type even though the declarator is erroneous, allowing the parameter to be added to the function. Before: t.c:2:1: error: unknown type name 'unknown_type' unknown_type f(void*P) ^ t.c:4:3: error: use of undeclared identifier 'P' P+1; ^ After: t.c:2:1: error: unknown type name 'unknown_type' unknown_type f(void*P) ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70023 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
emaType.cpp
|
5153ee66d6d4fb37b02f85df38e48dc8b46660df |
25-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
Change SemaType's "GetTypeForDeclarator" and "ConvertDeclSpecToType" to always return a non-null QualType + error bit. This fixes a bunch of cases that didn't check for null result (and could thus crash) and eliminates some crappy code scattered throughout sema. This also improves the diagnostics in the recursive struct case to eliminate a bogus second error. It also cleans up the case added to function.c by forming a proper function type even though the declarator is erroneous, allowing the parameter to be added to the function. Before: t.c:2:1: error: unknown type name 'unknown_type' unknown_type f(void*P) ^ t.c:4:3: error: use of undeclared identifier 'P' P+1; ^ After: t.c:2:1: error: unknown type name 'unknown_type' unknown_type f(void*P) ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70023 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
emaType.cpp
|
08da477978ec0c23da5c29580313dbeb7df16819 |
25-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
change a couple more c++ sema methods to be based on isinvalid bits. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70022 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
6e4750188e836e119f8605cbd34023d0a3b18011 |
25-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
change a couple more c++ sema methods to be based on isinvalid bits. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70022 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
c82dcd41c64ebeca0b2e087d9dd4e1b8fa4ef178 |
25-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
various "is invalid" cleanups for C++ ctors/dtors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70021 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
6540180c2fd7a5b4963b22dc81461b73927499a8 |
25-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
various "is invalid" cleanups for C++ ctors/dtors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70021 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
34c61337c548fc848d250993d7cf6851a2b38f3f |
25-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
This is a pretty big cleanup for how invalid decl/type are handle. This gets rid of a bunch of random InvalidDecl bools in sema, changing us to use the following approach: 1. When analyzing a declspec or declarator, if an error is found, we set a bit in Declarator saying that it is invalid. 2. Once the Decl is created by sema, we immediately set the isInvalid bit on it from what is in the declarator. From this point on, sema consistently looks at and sets the bit on the decl. This gives a very clear separation of concerns and simplifies a bunch of code. In addition to this, this patch makes these changes: 1. it renames DeclSpec::getInvalidType() -> isInvalidType(). 2. various "merge" functions no longer return bools: they just set the invalid bit on the dest decl if invalid. 3. The ActOnTypedefDeclarator/ActOnFunctionDeclarator/ActOnVariableDeclarator methods now set invalid on the decl returned instead of returning an invalid bit byref. 4. In SemaType, refering to a typedef that was invalid now propagates the bit into the resultant type. Stuff declared with the invalid typedef will now be marked invalid. 5. Various methods like CheckVariableDeclaration now return void and set the invalid bit on the decl they check. There are a few minor changes to tests with this, but the only major bad result is test/SemaCXX/constructor-recovery.cpp. I'll take a look at this next. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70020 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
|
eaaebc7cf10dc1a2016183a262ad3256bc468759 |
25-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
This is a pretty big cleanup for how invalid decl/type are handle. This gets rid of a bunch of random InvalidDecl bools in sema, changing us to use the following approach: 1. When analyzing a declspec or declarator, if an error is found, we set a bit in Declarator saying that it is invalid. 2. Once the Decl is created by sema, we immediately set the isInvalid bit on it from what is in the declarator. From this point on, sema consistently looks at and sets the bit on the decl. This gives a very clear separation of concerns and simplifies a bunch of code. In addition to this, this patch makes these changes: 1. it renames DeclSpec::getInvalidType() -> isInvalidType(). 2. various "merge" functions no longer return bools: they just set the invalid bit on the dest decl if invalid. 3. The ActOnTypedefDeclarator/ActOnFunctionDeclarator/ActOnVariableDeclarator methods now set invalid on the decl returned instead of returning an invalid bit byref. 4. In SemaType, refering to a typedef that was invalid now propagates the bit into the resultant type. Stuff declared with the invalid typedef will now be marked invalid. 5. Various methods like CheckVariableDeclaration now return void and set the invalid bit on the decl they check. There are a few minor changes to tests with this, but the only major bad result is test/SemaCXX/constructor-recovery.cpp. I'll take a look at this next. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70020 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
|
c13d473829889a68549f2dee1ea0c7b294f900fa |
25-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
fix PR4049, a crash on invalid, by making sema install the right number of parameters in a functiondecl, even if the decl is invalid and has a confusing Declarator. On the testcase, we now emit one beautiful diagnostic: t.c:2:1: error: unknown type name 'unknown_type' unknown_type f(void*) ^ GCC 4.0 produces: t.c:2: error: syntax error before ‘f’ t.c: In function ‘f’: t.c:2: error: parameter name omitted and GCC 4.2: t.c:2: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘f’ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70016 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
2dbd285f5033ca6dea25babfd1c43d9fec35e7e5 |
25-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
fix PR4049, a crash on invalid, by making sema install the right number of parameters in a functiondecl, even if the decl is invalid and has a confusing Declarator. On the testcase, we now emit one beautiful diagnostic: t.c:2:1: error: unknown type name 'unknown_type' unknown_type f(void*) ^ GCC 4.0 produces: t.c:2: error: syntax error before ‘f’ t.c: In function ‘f’: t.c:2: error: parameter name omitted and GCC 4.2: t.c:2: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘f’ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70016 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d21120294f4fef96d2954897e1af6eaf6b2f34e7 |
25-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
rename getNumParmVarDeclsFromType back to getNumParams(), remove a special case that was apparently for typeof() and generalize the code in SemaDecl that handles typedefs to handle any sugar type (including typedef, typeof, etc). Improve comment to make it more clear what is going on. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70015 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
1ad9b28e3217c2349a04f3d3bf14f9c73a99afa7 |
25-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
rename getNumParmVarDeclsFromType back to getNumParams(), remove a special case that was apparently for typeof() and generalize the code in SemaDecl that handles typedefs to handle any sugar type (including typedef, typeof, etc). Improve comment to make it more clear what is going on. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70015 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
c147c0354359cafabfc44c038f570f895d2499d2 |
25-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
in: typedef void foo(void); We get a typedef for a functiontypeproto with no arguments, not one with one argument and type void. This means the code being removed in SemaDecl is dead. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70013 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
7cbeef278d6206941630ea14585ea80f44d68d69 |
25-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
in: typedef void foo(void); We get a typedef for a functiontypeproto with no arguments, not one with one argument and type void. This means the code being removed in SemaDecl is dead. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70013 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
9230f9b1ca604c4e0283512ce82d72c1bc9d3564 |
25-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
set NewFD->setInvalidDecl() in one place, sharing code and ensuring that functions with prototypes get the bit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70011 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
584be45eb9f20231e7cdc372c607d46d07b101a9 |
25-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
set NewFD->setInvalidDecl() in one place, sharing code and ensuring that functions with prototypes get the bit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70011 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
b98860c39ac5162b4b628962bdc08dd3571cdc3a |
25-Apr-2009 |
Ted Kremenek <kremenek@apple.com> |
Add new checker-specific attribute 'objc_ownership_retain'. This isn't hooked up to the checker yet, but essentially it allows a user to specify that an Objective-C method or C function increments the reference count of a passed object. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70005 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
de9a81b92e9098daa8ca19df138e4807b4d8afe8 |
25-Apr-2009 |
Ted Kremenek <kremenek@apple.com> |
Add new checker-specific attribute 'objc_ownership_retain'. This isn't hooked up to the checker yet, but essentially it allows a user to specify that an Objective-C method or C function increments the reference count of a passed object. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70005 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
184f92d5e05df4089f17f49bfbcfe9f6405d4593 |
25-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
reject explicit pointer arithmetic on interface pointers in 64-bit objc ABI git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70004 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b5f1562d7b57a3dbe27a39b45995f59862973820 |
25-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
reject explicit pointer arithmetic on interface pointers in 64-bit objc ABI git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70004 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
aa6e3187858164dac3c4d950b07d5b7b63f2e3bd |
25-Apr-2009 |
Ted Kremenek <kremenek@apple.com> |
Add new checker-specific attribute 'objc_ownership_returns'. This isn't hooked up to the checker yet, but essentially it allows a user to specify that an Objective-C method or C function returns an owned an Objective-C object. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70001 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
0fc169e864aef7fc9a782e60b222a360f406704a |
25-Apr-2009 |
Ted Kremenek <kremenek@apple.com> |
Add new checker-specific attribute 'objc_ownership_returns'. This isn't hooked up to the checker yet, but essentially it allows a user to specify that an Objective-C method or C function returns an owned an Objective-C object. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70001 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
f3ce85763683f89305198db3af382d7b8fbe56e0 |
25-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
fix the sizeof error recovery issue (sizeof-interface.m:attributeRuns) by correctly propagating the fact that the type was invalid up to the attributeRuns decl, then returning an ExprError when attributeRuns is formed (like we do for normal declrefexprs). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69998 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
|
5cb10d3b1ad546b232e72275eaaf56d72823901d |
25-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
fix the sizeof error recovery issue (sizeof-interface.m:attributeRuns) by correctly propagating the fact that the type was invalid up to the attributeRuns decl, then returning an ExprError when attributeRuns is formed (like we do for normal declrefexprs). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69998 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
|
89f2c8b5f43ed711c43c5008b9424719451b3735 |
25-Apr-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix a pasto in the lookup of instance methods in the global pool git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69996 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
27a4566734582b81abbf9af8a949a9049098d344 |
25-Apr-2009 |
Douglas Gregor <dgregor@apple.com> |
Fix a pasto in the lookup of instance methods in the global pool git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69996 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
c3221aae610fea665bf76ddee6ea3fc260c3fd6d |
24-Apr-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
PCH support for the global method pool (= instance and factory method pools, combined). The methods in the global method pool are lazily loaded from an on-disk hash table when Sema looks into its version of the hash tables. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69989 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDeclObjC.cpp
emaExprObjC.cpp
|
f0aaf7a59729a4ae0146e3464ee987745be95829 |
24-Apr-2009 |
Douglas Gregor <dgregor@apple.com> |
PCH support for the global method pool (= instance and factory method pools, combined). The methods in the global method pool are lazily loaded from an on-disk hash table when Sema looks into its version of the hash tables. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69989 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDeclObjC.cpp
emaExprObjC.cpp
|
bf2b09573dae03f9b03f389a030d7ce2aa7e7d18 |
24-Apr-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Avoid issuing spurious errors as side-effect of diagnosing application of sizeof on an interface. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69980 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ced1e286765b4a1c568c8bf2ca41d863bf1584dd |
24-Apr-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Avoid issuing spurious errors as side-effect of diagnosing application of sizeof on an interface. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69980 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
af443ed8faff337a131a2dbf527717f3fb2aaaa7 |
24-Apr-2009 |
Anders Carlsson <andersca@mac.com> |
Add an ASTContext parameter to CXXTemporaryObjectExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69959 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
09c4abb1057f0eb53a9c2b5c2f22b1472362156e |
24-Apr-2009 |
Anders Carlsson <andersca@mac.com> |
Add an ASTContext parameter to CXXTemporaryObjectExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69959 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
ebbd7cd73877cc313f40e652958602ae290f6d78 |
24-Apr-2009 |
Anders Carlsson <andersca@mac.com> |
Add a VarDecl parameter to the CXXTemporaryObjectExpr constructor. It's unused for now, so no functionality change yet. Also, create CXXTempVarDecls to pass to the CXXTemporaryObjectExpr ctor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69957 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
26de54983e7977fad615c94012f2f67d0d1cf404 |
24-Apr-2009 |
Anders Carlsson <andersca@mac.com> |
Add a VarDecl parameter to the CXXTemporaryObjectExpr constructor. It's unused for now, so no functionality change yet. Also, create CXXTempVarDecls to pass to the CXXTemporaryObjectExpr ctor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69957 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
6a95cd170db65882a76c4abec0b8377951fd3bb6 |
24-Apr-2009 |
Anders Carlsson <andersca@mac.com> |
Create a CXXConstructExpr instead of a CXXTemporaryObjectExpr in InitializeVarWithConstructor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69956 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
49d44018436761c0cfdda80d609b7dcdf8431064 |
24-Apr-2009 |
Anders Carlsson <andersca@mac.com> |
Create a CXXConstructExpr instead of a CXXTemporaryObjectExpr in InitializeVarWithConstructor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69956 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
54713b64232275b33f57a354dc27a38159ed9142 |
24-Apr-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Eliminate Sema::ObjCAliasDecls. This is based on Steve's fix, but also updates name lookup so that we see through @compatibility_alias declarations to their underlying interfaces. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69950 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclObjC.cpp
emaLookup.cpp
|
516ff43cc4e20b637335d3dfa5b197ca8faa09cb |
24-Apr-2009 |
Douglas Gregor <dgregor@apple.com> |
Eliminate Sema::ObjCAliasDecls. This is based on Steve's fix, but also updates name lookup so that we see through @compatibility_alias declarations to their underlying interfaces. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69950 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclObjC.cpp
emaLookup.cpp
|
c7b7495847cc51708c2ced0b53fc1a25f8396065 |
24-Apr-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix Objective-C crashes git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69945 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
a4aa34d9f87decb2ad0e31eb136cda8df174a494 |
24-Apr-2009 |
Douglas Gregor <dgregor@apple.com> |
Fix Objective-C crashes git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69945 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
95933c17fa9f631b86cb17745a1642817378f5ad |
24-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
Fix rdar://6821047 - clang crashes on subscript of interface in 64-bit mode Several changes here: 1. We change Type::isIncompleteType to realize that forward declared interfaces are incomplete. This eliminate special case code for this from the sizeof path, and starts us rejecting P[4] when P is a pointer to an incomplete interface. 2. Explicitly reject P[4] when P points to an interface in non-fragile ABI mode. 3. Switch the sizeof(interface) diagnostic back to an error instead of a warning in non-fragile abi mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69943 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaType.cpp
|
1efaa9594a81709a17658fd80ae7e783e1026407 |
24-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
Fix rdar://6821047 - clang crashes on subscript of interface in 64-bit mode Several changes here: 1. We change Type::isIncompleteType to realize that forward declared interfaces are incomplete. This eliminate special case code for this from the sizeof path, and starts us rejecting P[4] when P is a pointer to an incomplete interface. 2. Explicitly reject P[4] when P points to an interface in non-fragile ABI mode. 3. Switch the sizeof(interface) diagnostic back to an error instead of a warning in non-fragile abi mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69943 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaType.cpp
|
453e11df8716cd7fcc304556dcd1ddb39eeac7ff |
24-Apr-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Eliminate Sema::ObjCInterfaceDecls git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69942 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
emaLookup.cpp
|
8b9fb3082bc54cf7ffe6c3772500a73388f53072 |
24-Apr-2009 |
Douglas Gregor <dgregor@apple.com> |
Eliminate Sema::ObjCInterfaceDecls git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69942 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
emaLookup.cpp
|
afd5eb3af38dafa1ca646d8a12946d6b74e02404 |
24-Apr-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Eliminate Sema::ObjCImplementations, relying instead on name lookup. What's good for uniformity is good for PCH (or is it the other way around?). As part of this, make ObjCImplDecl inherit from NamedDecl (since ObjCImplementationDecls now need to have names so that they can be found). This brings ObjCImplDecl very, very close to ObjCContainerDecl; we may be able to merge them soon. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69941 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
emaExpr.cpp
emaExprObjC.cpp
emaLookup.cpp
|
8fc463adf0116fdcbff86e9cca11955aad1649fe |
24-Apr-2009 |
Douglas Gregor <dgregor@apple.com> |
Eliminate Sema::ObjCImplementations, relying instead on name lookup. What's good for uniformity is good for PCH (or is it the other way around?). As part of this, make ObjCImplDecl inherit from NamedDecl (since ObjCImplementationDecls now need to have names so that they can be found). This brings ObjCImplDecl very, very close to ObjCContainerDecl; we may be able to merge them soon. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69941 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
emaExpr.cpp
emaExprObjC.cpp
emaLookup.cpp
|
e57c8cc462866bad1013b19612aecd732027d055 |
24-Apr-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Eliminate Sema::ObjCProtocols. Instead, we place ObjCProtocolDecls in their own namespace (IDNS_Protocol) and use the normal name-lookup routines to find them. Aside from the simplification this provides (one less DenseMap!), it means that protocols will be lazily deserialized from PCH files. Make the code size of the selector table block match the code size of the type and decl blocks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69939 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
emaExprObjC.cpp
emaLookup.cpp
|
6e378de1aebdfeb44f2a7677ed207b32b3a41fbf |
24-Apr-2009 |
Douglas Gregor <dgregor@apple.com> |
Eliminate Sema::ObjCProtocols. Instead, we place ObjCProtocolDecls in their own namespace (IDNS_Protocol) and use the normal name-lookup routines to find them. Aside from the simplification this provides (one less DenseMap!), it means that protocols will be lazily deserialized from PCH files. Make the code size of the selector table block match the code size of the type and decl blocks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69939 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
emaExprObjC.cpp
emaLookup.cpp
|
bb21d4b846f28e38fd204faca328dccd74eb4fa5 |
24-Apr-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
PCH support for all of the predefined Objective-C types, such as id, SEL, Class, Protocol, CFConstantString, and __objcFastEnumerationState. With this, we can now run the Objective-C methods and properties PCH tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69932 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDecl.cpp
|
319ac896a0fef7365d5589b8021db7e41207fe42 |
24-Apr-2009 |
Douglas Gregor <dgregor@apple.com> |
PCH support for all of the predefined Objective-C types, such as id, SEL, Class, Protocol, CFConstantString, and __objcFastEnumerationState. With this, we can now run the Objective-C methods and properties PCH tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69932 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDecl.cpp
|
f7f09ab961bae9fc369bb9377955853c8e5e6243 |
23-Apr-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Diagnose if an implementation implements a forward class declaration (and avoid issuing bogus error later on). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69928 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
77a6be4826d1752ba834fddbbf3114f70cda2be5 |
23-Apr-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Diagnose if an implementation implements a forward class declaration (and avoid issuing bogus error later on). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69928 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
9b6348dcc3aaa88b9b04dd51acb0d4c0bb35cf9b |
23-Apr-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix handling of C99 "extern inline" semantics when dealing with multiple declarations of the function. Should fix PR3989 and <rdar://problem/6818429>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69905 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
|
b3efa98e320590e8be9d62818e89e599303e65b4 |
23-Apr-2009 |
Douglas Gregor <dgregor@apple.com> |
Fix handling of C99 "extern inline" semantics when dealing with multiple declarations of the function. Should fix PR3989 and <rdar://problem/6818429>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69905 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
|
e00554f99372aecf418ec1f2da008a901f39c5df |
23-Apr-2009 |
Steve Naroff <snaroff@apple.com> |
Remove @compatibility_alias regression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69899 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
04c5f4f3c0e6e751d34351d1b517fb589232878c |
23-Apr-2009 |
Steve Naroff <snaroff@apple.com> |
Remove @compatibility_alias regression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69899 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
74b916a03f269222c7f5cdc7f61d92d3abf73e2f |
23-Apr-2009 |
Steve Naroff <snaroff@apple.com> |
More PushOnScopeChain() FIXME's. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69894 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
8f06f84e8be64962cc478e3e8867336768cac79b |
23-Apr-2009 |
Steve Naroff <snaroff@apple.com> |
More PushOnScopeChain() FIXME's. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69894 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
104956fba2bc122c5b1982ed7442169eaec563fc |
23-Apr-2009 |
Steve Naroff <snaroff@apple.com> |
Sema::ActOnStartClassInterface(): Use PushOnScopeChains(). This enables class recognition to work with PCH. I believe this means we can remove Sema::ObjCInterfaceDecls and it's usage within Sema::LookupName(). Will investigate. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69891 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
a7503a735d56473a67987880726f8bf731ee3463 |
23-Apr-2009 |
Steve Naroff <snaroff@apple.com> |
Sema::ActOnStartClassInterface(): Use PushOnScopeChains(). This enables class recognition to work with PCH. I believe this means we can remove Sema::ObjCInterfaceDecls and it's usage within Sema::LookupName(). Will investigate. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69891 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
087dbf396b59df6b944ef48f1fe55d5c15b8deb2 |
23-Apr-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
The ivars in an ObjCImplementationDecl are now stored in the DeclContext rather than in a separate list. This makes PCH (de-)serialization trivial, so that ivars can be loaded lazily. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69857 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
8f36aba016c2d236a90f9ecf0a66904209202202 |
23-Apr-2009 |
Douglas Gregor <dgregor@apple.com> |
The ivars in an ObjCImplementationDecl are now stored in the DeclContext rather than in a separate list. This makes PCH (de-)serialization trivial, so that ivars can be loaded lazily. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69857 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
cd19b57e8c03a742954680830bc440b8b0e08965 |
23-Apr-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Eliminate the three SmallVectors in ObjCImplDecl (for instance methods, class methods, and property implementations) and instead place all of these entities into the DeclContext. This eliminates more linear walks when looking for class or instance methods and should make PCH (de-)serialization of ObjCDecls trivial (and lazy). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69849 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
emaExpr.cpp
emaExprObjC.cpp
|
653f1b1bf293a9bd96fd4dd6372e779cc7af1597 |
23-Apr-2009 |
Douglas Gregor <dgregor@apple.com> |
Eliminate the three SmallVectors in ObjCImplDecl (for instance methods, class methods, and property implementations) and instead place all of these entities into the DeclContext. This eliminates more linear walks when looking for class or instance methods and should make PCH (de-)serialization of ObjCDecls trivial (and lazy). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69849 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
emaExpr.cpp
emaExprObjC.cpp
|
4dc7fa5290c28fa2eb21f40bc3c76f972a03b2c9 |
22-Apr-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Eliminate Sema::KnownFunctionIDs, so that Sema doesn't end up pulling in a bunch of declarations from the PCH file. We're down to loading very few declarations in Carbon-prefixed "Hello, World!": *** PCH Statistics: 6/20693 types read (0.028995%) 7/59230 declarations read (0.011818%) 50/44914 identifiers read (0.111324%) 0/32954 statements read (0.000000%) 5/6187 macros read (0.080815%) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69825 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
|
21e072b7faed62268074664e2b56e37d069200a7 |
22-Apr-2009 |
Douglas Gregor <dgregor@apple.com> |
Eliminate Sema::KnownFunctionIDs, so that Sema doesn't end up pulling in a bunch of declarations from the PCH file. We're down to loading very few declarations in Carbon-prefixed "Hello, World!": *** PCH Statistics: 6/20693 types read (0.028995%) 7/59230 declarations read (0.011818%) 50/44914 identifiers read (0.111324%) 0/32954 statements read (0.000000%) 5/6187 macros read (0.080815%) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69825 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
|
b64206c5f93e51a1857706eeab24cf945491ef42 |
22-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
ObjCQualifiedClass is dead, remove it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69783 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
068360e16fa4504a6fb80affebae5c5713629a96 |
22-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
ObjCQualifiedClass is dead, remove it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69783 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
8a447af1297f4751f102a7ec060c6b303be7ccb5 |
22-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
change implicit int warnings to point to the identifier, not the start of the declspec. The fixit still goes there, and we underline the declspec. This helps when the start of the declspec came from a macro that expanded from a system header. For example, we now produce: t.c:2:8: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] static x; ~~~~~~ ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69777 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaType.cpp
|
3f84ad22acc25353a47ee88f55ab05dffef5d9a9 |
22-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
change implicit int warnings to point to the identifier, not the start of the declspec. The fixit still goes there, and we underline the declspec. This helps when the start of the declspec came from a macro that expanded from a system header. For example, we now produce: t.c:2:8: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] static x; ~~~~~~ ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69777 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaType.cpp
|
11ac02512fb47e253ae0c72f7e3b60bb940aa960 |
22-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
Fix some mishandling of the attr(gnu_inline) mode when used with extern. Previously we would warn about it and ignore the attribute. This is incorrect, it should be handled as a c89 "extern inline" function. Many thanks to Matthieu Castet for pointing this out and beating me over the head until I got it. PR3988: extern inline function are not externally visible git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69756 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
d55a71d852d4d8b785122b8d033a0c06b187067b |
22-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
Fix some mishandling of the attr(gnu_inline) mode when used with extern. Previously we would warn about it and ignore the attribute. This is incorrect, it should be handled as a c89 "extern inline" function. Many thanks to Matthieu Castet for pointing this out and beating me over the head until I got it. PR3988: extern inline function are not externally visible git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69756 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
d331e75761638e0fdb33d3531acc45988a60e8f1 |
22-Apr-2009 |
Mike Stump <mrs@apple.com> |
Tighten up blocks type checking. This was discussed back in the r56595 timeframe, but left undone. Radar 6812711 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69745 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
25efa107ae8381458ffa464c5fc7d21135bbe52d |
22-Apr-2009 |
Mike Stump <mrs@apple.com> |
Tighten up blocks type checking. This was discussed back in the r56595 timeframe, but left undone. Radar 6812711 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69745 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
eb4d4a525d9ebc3c40249b57aa74d1ac83d8ccf1 |
22-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
Fix rdar://6814047, a crash on invalid in blocks code I noticed when working on the previous fix. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69742 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
5c59e2b5215eff79372b9498c3559da9d700588d |
22-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
Fix rdar://6814047, a crash on invalid in blocks code I noticed when working on the previous fix. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69742 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
0b4642514f048fa457c26656cbc972e62911e6d3 |
22-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
fix marking of nested blocks with the "hasBlockDeclRefExprs" to mark exactly the blocks which have references that are "live through". This fixes a rejects valid: rdar://6808730 - [sema] [blocks] block rejected at global scope git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69738 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
17f3a6d0d8026238830eacd0d765267a6ced4edc |
22-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
fix marking of nested blocks with the "hasBlockDeclRefExprs" to mark exactly the blocks which have references that are "live through". This fixes a rejects valid: rdar://6808730 - [sema] [blocks] block rejected at global scope git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69738 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
c713da9e66dd3c47ee7b0011172e03b59ff02420 |
22-Apr-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Lazy deserialization of the declaration chains associated with identifiers from a precompiled header. This patch changes the primary name lookup method for entities within a precompiled header. Previously, we would load all of the names of declarations at translation unit scope into a large DenseMap (inside the TranslationUnitDecl's DeclContext), and then perform a special "last resort" lookup into this DeclContext when we knew there was a PCH file (see Sema::LookupName). Now, when we see an identifier named for the first time, we load all of the declarations with that name that are visible from the translation unit into the IdentifierInfo's chain of declarations. Thus, the explicit "look into the translation unit's DeclContext" code is gone, and Sema effectively uses the same IdentifierInfo-based name lookup mechanism whether we are using a PCH file or not. This approach should help PCH scale with the size of the input program rather than the size of the PCH file. The "Hello, World!" application with Carbon.h as a PCH file now loads 20% of the identifiers in the PCH file rather than 85% of the identifiers. 90% of the 20% of identifiers loaded are actually loaded when we deserialize the preprocessor state. The next step is to make the preprocessor load macros lazily, which should drastically reduce the number of types, declarations, and identifiers loaded for "Hello, World". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69737 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
dentifierResolver.h
arseAST.cpp
emaLookup.cpp
|
668c1a4fdcc56bdd050256b1688e116fe84b72db |
22-Apr-2009 |
Douglas Gregor <dgregor@apple.com> |
Lazy deserialization of the declaration chains associated with identifiers from a precompiled header. This patch changes the primary name lookup method for entities within a precompiled header. Previously, we would load all of the names of declarations at translation unit scope into a large DenseMap (inside the TranslationUnitDecl's DeclContext), and then perform a special "last resort" lookup into this DeclContext when we knew there was a PCH file (see Sema::LookupName). Now, when we see an identifier named for the first time, we load all of the declarations with that name that are visible from the translation unit into the IdentifierInfo's chain of declarations. Thus, the explicit "look into the translation unit's DeclContext" code is gone, and Sema effectively uses the same IdentifierInfo-based name lookup mechanism whether we are using a PCH file or not. This approach should help PCH scale with the size of the input program rather than the size of the PCH file. The "Hello, World!" application with Carbon.h as a PCH file now loads 20% of the identifiers in the PCH file rather than 85% of the identifiers. 90% of the 20% of identifiers loaded are actually loaded when we deserialize the preprocessor state. The next step is to make the preprocessor load macros lazily, which should drastically reduce the number of types, declarations, and identifiers loaded for "Hello, World". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69737 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
dentifierResolver.h
arseAST.cpp
emaLookup.cpp
|
4d107bccf19ce4a94f3efba4c853f4f85e48c9a9 |
22-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
this is a warning now, return a well formed ast. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69731 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
5b54b88c4082bb81b8b341b622fda9a85cbd5fad |
22-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
this is a warning now, return a well formed ast. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69731 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
dbc8af7f9499e1508b1db68dd79d77051d7ecdd1 |
21-Apr-2009 |
Daniel Dunbar <daniel@zuster.org> |
Make sure to mark the interface as completed when we see an @implementation that closes a @class delcaration. - I don't know how to make a test case for this, but this strengthens the invariants that hold internally. The functionality change here is the edit to SemaDeclObjC.cpp. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69728 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
24c8991f4dd0ab86678b5ab11f05586687b55be9 |
21-Apr-2009 |
Daniel Dunbar <daniel@zuster.org> |
Make sure to mark the interface as completed when we see an @implementation that closes a @class delcaration. - I don't know how to make a test case for this, but this strengthens the invariants that hold internally. The functionality change here is the edit to SemaDeclObjC.cpp. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69728 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
51ba3b8da2cd039ab20c2d24b432295479f64703 |
21-Apr-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to diagnose use of objc's @defs in nonfragile abi. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69710 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
0468fb99068c40990a3b1451938fee5b90daf941 |
21-Apr-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to diagnose use of objc's @defs in nonfragile abi. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69710 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
e1127c4fa41b0ccc7fa5777aa6ba866549fb0aa2 |
21-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
reject sizeof(itf) when itf is a forward declared interface, or when in non-fragile abi mode. rdar://6811884 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69701 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ca790923930ca8df23bc1473fe925586e27387a6 |
21-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
reject sizeof(itf) when itf is a forward declared interface, or when in non-fragile abi mode. rdar://6811884 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69701 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
9cdb4a1f7769e97892b7b6ccb54b6f6914cd29ae |
21-Apr-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Explictly track tentative definitions within Sema, then hand those tentative definitions off to the ASTConsumer at the end of the translation unit. Eliminate CodeGen's internal tracking of tentative definitions, and instead hook into ASTConsumer::CompleteTentativeDefinition. Also, tweak the definition-deferal logic for C++, where there are no tentative definitions. Fixes <rdar://problem/6808352>, and will make it much easier for precompiled headers to cope with tentative definitions in the future. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69681 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
|
b6c8c8bd8d362c8a6cdb767415b0d21e62b77eb2 |
21-Apr-2009 |
Douglas Gregor <dgregor@apple.com> |
Explictly track tentative definitions within Sema, then hand those tentative definitions off to the ASTConsumer at the end of the translation unit. Eliminate CodeGen's internal tracking of tentative definitions, and instead hook into ASTConsumer::CompleteTentativeDefinition. Also, tweak the definition-deferal logic for C++, where there are no tentative definitions. Fixes <rdar://problem/6808352>, and will make it much easier for precompiled headers to cope with tentative definitions in the future. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69681 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
|
08d892fa735a012d19ebf06c24a9aa53e341ab25 |
21-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
implement semantic analysis for @synchronized, fixing a crash on invalid rdar://6810940 - @synchronized has no sema checks git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69670 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
a868a203a18571d091e5d226f5f100d4440f3d94 |
21-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
implement semantic analysis for @synchronized, fixing a crash on invalid rdar://6810940 - @synchronized has no sema checks git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69670 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
3f3d40ed12bf642798b8f8f2c02ccb606020c819 |
21-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
add support for goto checking and @synchronized blocks, rdar://6810106 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69667 91177308-0d34-0410-b5e6-96231b3b80d8
umpDiagnostics.cpp
emaStmt.cpp
|
46c3c4ba78766ac0f1c5ec631b424773e21f5271 |
21-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
add support for goto checking and @synchronized blocks, rdar://6810106 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69667 91177308-0d34-0410-b5e6-96231b3b80d8
umpDiagnostics.cpp
emaStmt.cpp
|
f5254bda2945bd427acad4a0f0f62026333b66ce |
21-Apr-2009 |
Daniel Dunbar <daniel@zuster.org> |
Kill ASTContext::[gs]etFieldForDecl, instead we just lookup things when we need them -- which is exactly what some code was already doing! - No intended functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69648 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
525c9b7baeeff022127cd1b167579f3bda73b3ed |
21-Apr-2009 |
Daniel Dunbar <daniel@zuster.org> |
Kill ASTContext::[gs]etFieldForDecl, instead we just lookup things when we need them -- which is exactly what some code was already doing! - No intended functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69648 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
7333b4925d5032304792f8b0a268549bbbc3a6ef |
20-Apr-2009 |
Steve Naroff <snaroff@apple.com> |
Add pch reader/writer support for ObjCContainerDecl, ObjCInterfaceDecl, & ObjCIvarDecl. Next step: Add selector support to PCHWriter::AddDeclarationName(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69619 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
33feeb019a5742b286eededd5446ec0fe87c5a61 |
20-Apr-2009 |
Steve Naroff <snaroff@apple.com> |
Add pch reader/writer support for ObjCContainerDecl, ObjCInterfaceDecl, & ObjCIvarDecl. Next step: Add selector support to PCHWriter::AddDeclarationName(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69619 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
15ce6cc75018b69a2fc849c9ee5bceb30e0e67c1 |
20-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
the __gnuc_inline__ attribute is actually named __gnu_inline__, PR4023 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69618 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
cf2a7211b4785068c7efa836baab90b198a4d2a6 |
20-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
the __gnuc_inline__ attribute is actually named __gnu_inline__, PR4023 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69618 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
cfe5157a5e74dbaa8d7c018c7b41dca582f21b61 |
20-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
clean up anonymous bitfield diagnostics, PR4017 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69608 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
df9bcd568c79779d92b2f8d04a24ca822c56523d |
20-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
clean up anonymous bitfield diagnostics, PR4017 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69608 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
87887da76ef2e4c5d22ce9bb45623b6b9a24cf19 |
20-Apr-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Introduce the notion of a SemaConsumer, which is an ASTConsumer that also gets access to the Sema object performing semantic analysis. This will be used by the PCH writer to serialize Sema state. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69595 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
|
e7785040107266d01ebdcc066365f70b7ace371f |
20-Apr-2009 |
Douglas Gregor <dgregor@apple.com> |
Introduce the notion of a SemaConsumer, which is an ASTConsumer that also gets access to the Sema object performing semantic analysis. This will be used by the PCH writer to serialize Sema state. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69595 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
|
79ea0e0d94f7bbe2f26ac0eaf995e420bb7298c9 |
20-Apr-2009 |
Steve Naroff <snaroff@apple.com> |
Add pch reader/writer support for ObjCMethodDecl. Test will be enabled with ObjCInterfaceDecl is added. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69594 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
53c9d8a4b8f0a76cb9dd2fdd8c433ccf110f2eec |
20-Apr-2009 |
Steve Naroff <snaroff@apple.com> |
Add pch reader/writer support for ObjCMethodDecl. Test will be enabled with ObjCInterfaceDecl is added. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69594 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
93ecce23988a627c66a654045fb6d17ed59a738d |
20-Apr-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Some cleanup and bug-fixing for address-of checking. This causes a couple of minor accepts-invalid regressions, but we weren't really rejecting them for the right reason. We really need a more general solution to detect all the cases of the promotion of arrays with a register storage class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69586 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
23d58ce9d103115fec4693285d0bcdbaccefea0f |
20-Apr-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Some cleanup and bug-fixing for address-of checking. This causes a couple of minor accepts-invalid regressions, but we weren't really rejecting them for the right reason. We really need a more general solution to detect all the cases of the promotion of arrays with a register storage class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69586 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
674d1b720cda1d24ff900869e7c5962819099914 |
19-Apr-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Conditional operator C++ checking complete. What issues remain are in more general code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69555 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaOverload.cpp
|
78eb874222b7653edf7182d0d899d717d5c592c1 |
19-Apr-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Conditional operator C++ checking complete. What issues remain are in more general code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69555 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaOverload.cpp
|
b34382785e1b8bafe77e52998e11a9bc0e7daad3 |
19-Apr-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Print an error for uses of __thread on targets which don't support it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69553 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
4fb71b0cc3c199cc0c736b4ec4fabdd01f56f4e8 |
19-Apr-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Print an error for uses of __thread on targets which don't support it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69553 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
5b3fcf8a56faf7c5c6234ba653562e5c41fbc7f9 |
19-Apr-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Bring member pointer operands of the conditional operator to a common type. We're getting there ... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69548 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
9bebfadb807aba0bc272197aff1cb4b2284c00a6 |
19-Apr-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Bring member pointer operands of the conditional operator to a common type. We're getting there ... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69548 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
1a3e74ccb00a3b0e61cf8debec8a20d274ab031f |
19-Apr-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Add more thorough/correct checking for invalid __thread specifiers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69542 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
63054b39a27ff333487e88247d495a444838b44a |
19-Apr-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Add more thorough/correct checking for invalid __thread specifiers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69542 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
42b81a2f638c98f75db1adee98d011405d18d4ff |
19-Apr-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Another piece of the conditional operator puzzle. We'll want to use FindCompositePointerType in some other places, too. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69534 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
|
d1bd7fc4cd88f8790c56620d22560e19717f468a |
19-Apr-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Another piece of the conditional operator puzzle. We'll want to use FindCompositePointerType in some other places, too. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69534 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
|
37dee04c0c9f7ed70b761b4add655972f1b82708 |
19-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
rearrange #include order. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69511 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
|
498603d6ea8a534ce7af3dfdcc0fa2c42d016025 |
19-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
rearrange #include order. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69511 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
|
e7765e1592ac660d18f360fc9db7910b00613067 |
19-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
run the jump checker on blocks, even though they don't have gotos, they do allow switches. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69510 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
17a783055a41a44fda76b1747ebe6fd8ac2ba00a |
19-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
run the jump checker on blocks, even though they don't have gotos, they do allow switches. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69510 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
c92920c075805873b27e7a475182ac126fb59fc9 |
19-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
add a new Sema::CurFunctionNeedsScopeChecking bool that is used to avoid calling into the jump checker when a function or method is known to contain no VLAs or @try blocks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69509 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclObjC.cpp
emaStmt.cpp
|
38c5ebd7b1b65304c7b5c7b9bf3f9162df22e77d |
19-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
add a new Sema::CurFunctionNeedsScopeChecking bool that is used to avoid calling into the jump checker when a function or method is known to contain no VLAs or @try blocks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69509 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclObjC.cpp
emaStmt.cpp
|
76b831a7e47e61ad8321d72c8a5e4903b40cf4bb |
19-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
move jump scope checking and related code out into its own file, SemaDecl.cpp is already too large. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69505 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
umpDiagnostics.cpp
ema.h
emaDecl.cpp
|
5af280ce21af061f96b5b5b752746871e364ba99 |
19-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
move jump scope checking and related code out into its own file, SemaDecl.cpp is already too large. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69505 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
umpDiagnostics.cpp
ema.h
emaDecl.cpp
|
604c7419e35c84e1f5a0d968c0a8c3424321df5c |
19-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
rewrite an O(N^2) algorithm to be O(n). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69500 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
e52a693787df6de250456a71c361d9c91fc40fd7 |
19-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
rewrite an O(N^2) algorithm to be O(n). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69500 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
a2eb46453acb0578d4bf6a4f455383031bf79df7 |
19-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
second half of indirect jump checking: make sure that any address taken labels are in function scope git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69499 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
b5cf1ea6f410f72290b9c7767a63717a944c7a8f |
19-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
second half of indirect jump checking: make sure that any address taken labels are in function scope git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69499 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
578689d178efcaf8ece43554c1bdd6e8abf28372 |
19-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
First half of jump scope checking for indirect goto. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69498 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
04ea2b633a1f8ee662b8a99d2903a11c1b68e1ed |
19-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
First half of jump scope checking for indirect goto. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69498 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
9ef9c284e6791a48278b3b76cfa85b05cc0c5a20 |
19-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
Add location info for indirect goto. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69497 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
ad56d684259f706b7c0ae5ad9c23adb4f2926817 |
19-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
Add location info for indirect goto. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69497 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
d811b5086aee643fb0814d530da3c264f1be35cc |
19-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
reimplement DeclStmt handling so that we correctly handle intermixed VLA's and statement expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69491 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
2b7b2ca64ad8d293d10909a7ac119fa3fc10c95c |
19-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
reimplement DeclStmt handling so that we correctly handle intermixed VLA's and statement expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69491 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
64af85e0d1b13e118f4cd2ba68227162405299b4 |
19-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
the scope checker does work with objc methods, add testcase. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69487 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
5223af8f05eff78bfba57cb154e28fb9def97b45 |
19-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
the scope checker does work with objc methods, add testcase. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69487 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
affa4e7566158b1c7b5b07aa73ebcb2402abc205 |
19-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
I didn't understand how @catches were chained. Now that I get it, fix the scope checker to not think @catches are nested in each other, eliminating some bogus notes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69486 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
dabbad04ee3173f76b324d3825ede0287a304022 |
19-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
I didn't understand how @catches were chained. Now that I get it, fix the scope checker to not think @catches are nested in each other, eliminating some bogus notes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69486 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
7c9f98218dd3d4158db54764b2ccba27eebda06c |
18-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
forgot to commit this before. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69480 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
cd99d9eac20ed2c9d671312996b3a3ce45505b86 |
18-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
forgot to commit this before. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69480 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
0ec3c6ad603fb0128360c59e7bad8cc1118bd33e |
18-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
reject invalid jumps among pieces of @try blocks. This seems to work reasonably well except for the problem that @catches are nested within each other in the AST, giving the ugly diagnostics in L8. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69477 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
07e775d5a1d5262a9cfe1ff333af713535b8cbab |
18-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
reject invalid jumps among pieces of @try blocks. This seems to work reasonably well except for the problem that @catches are nested within each other in the AST, giving the ugly diagnostics in L8. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69477 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
ae63fe186f2f09c648c481324e066c04c411b13b |
18-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
unconditionally check for goto correctness. This is because switch statements don't end up in the LabelMap so we don't have a quick way to filter them. We could add state to Sema (a "has vla" and "has jump" bit) to try to filter this out, but that would be sort of gross and I'm not convinced it is the best way. Thoughts welcome. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69476 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
b56593725243becfe2685f39eec47406299801ae |
18-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
unconditionally check for goto correctness. This is because switch statements don't end up in the LabelMap so we don't have a quick way to filter them. We could add state to Sema (a "has vla" and "has jump" bit) to try to filter this out, but that would be sort of gross and I'm not convinced it is the best way. Thoughts welcome. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69476 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
ee5a1a2714d0c83eca4b3aa84c876ed72ab11079 |
18-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
abstract the SwitchStack for blocks just like we do the goto labels. This fixes a crash on invalid (test10). rdar://6805469 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69465 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaStmt.cpp
|
bcfce66584e47bb07f49a86b7cb39b4fdd269a5a |
18-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
abstract the SwitchStack for blocks just like we do the goto labels. This fixes a crash on invalid (test10). rdar://6805469 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69465 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaStmt.cpp
|
d860cbd858409203c2d536e481e3a7f991f4bf2d |
18-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
fix two error paths out of ParseBlockLiteralExpression to call ActOnBlockError so that CurBlock gets popped. This fixes a crash on test/block-syntax-error.c when this new assertion is enabled. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69464 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
4f2aac33fe0e181c1c96bc9b502343935a794b5e |
18-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
fix two error paths out of ParseBlockLiteralExpression to call ActOnBlockError so that CurBlock gets popped. This fixes a crash on test/block-syntax-error.c when this new assertion is enabled. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69464 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
2616d8ca6b9ed258f4fc31e1f296993b46a18f5d |
18-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
refactor some code, adding a new getLabelMap() accessor method so that clients can't poke the function-local one when they really want the current block label. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69463 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaExpr.cpp
emaStmt.cpp
|
ea29a3a0d6948c4a51a261d19ec1a585d2a9c779 |
18-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
refactor some code, adding a new getLabelMap() accessor method so that clients can't poke the function-local one when they really want the current block label. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69463 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaExpr.cpp
emaStmt.cpp
|
2c8f7ce1c7bf941ba219bfef249e44084c0b0f9b |
18-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
Improve switch diagnostic to emit the "jump" message on the specific bad case instead of on the switch. Putting it on the switch means you don't know what case is the problem. For example: scope-check.c:54:3: error: illegal switch case into protected scope case 2: ^ scope-check.c:53:9: note: jump bypasses initialization of variable length array int a[x]; ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69462 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
a9768b72bb5ea061c9f10d6aa51b3be3241f3ec2 |
18-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
Improve switch diagnostic to emit the "jump" message on the specific bad case instead of on the switch. Putting it on the switch means you don't know what case is the problem. For example: scope-check.c:54:3: error: illegal switch case into protected scope case 2: ^ scope-check.c:53:9: note: jump bypasses initialization of variable length array int a[x]; ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69462 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
69a480e7fedc19bb8fb33db261bc1e36100e9246 |
18-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
first step to getting switches giving "jump into vla scope" errors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69461 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
366920a45e3e278d35cbc3bc74d9d0676ae87dfe |
18-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
first step to getting switches giving "jump into vla scope" errors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69461 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
9a9cc8103401942527b43a51504fe7c985052d21 |
18-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
fix error recovery in the case of a jump to a label with no definition to create a well formed AST instead of a dangling pointer. This resolves several fixme's. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69459 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
e32f74c7af4064a08aaf21fc181de72138450197 |
18-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
fix error recovery in the case of a jump to a label with no definition to create a well formed AST instead of a dangling pointer. This resolves several fixme's. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69459 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
e44e5cc7af9dd85746abdb6397446f0565e9d9d6 |
18-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
rewrite the goto scope checking code to be more efficient, simpler, produce better diagnostics, and be more correct in ObjC cases (fixing rdar://6803963). An example is that we now diagnose: int test1(int x) { goto L; int a[x]; int b[x]; L: return sizeof a; } with: scope-check.c:15:3: error: illegal goto into protected scope goto L; ^ scope-check.c:17:7: note: scope created by variable length array int b[x]; ^ scope-check.c:16:7: note: scope created by variable length array int a[x]; ^ instead of just saying "invalid jump". An ObjC example is: void test1() { goto L; @try { L: ; } @finally { } } t.m:6:3: error: illegal goto into protected scope goto L; ^ t.m:7:3: note: scope created by @try block @try { ^ There are a whole ton of fixme's for stuff to do, but I believe that this is a monotonic improvement over what we had. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69437 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
a5251fcf79ae9707680d656377a6e43dcbff6c25 |
18-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
rewrite the goto scope checking code to be more efficient, simpler, produce better diagnostics, and be more correct in ObjC cases (fixing rdar://6803963). An example is that we now diagnose: int test1(int x) { goto L; int a[x]; int b[x]; L: return sizeof a; } with: scope-check.c:15:3: error: illegal goto into protected scope goto L; ^ scope-check.c:17:7: note: scope created by variable length array int b[x]; ^ scope-check.c:16:7: note: scope created by variable length array int a[x]; ^ instead of just saying "invalid jump". An ObjC example is: void test1() { goto L; @try { L: ; } @finally { } } t.m:6:3: error: illegal goto into protected scope goto L; ^ t.m:7:3: note: scope created by @try block @try { ^ There are a whole ton of fixme's for stuff to do, but I believe that this is a monotonic improvement over what we had. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69437 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
51e2bd03be6fe6d6ab60b1cfc74a6d4b91884aef |
18-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
don't evaluate ->child_end() every time through the loop, or *i frequently within it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69431 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
9b0ed03691e309857b2742d039b217a0c9da3ef0 |
18-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
don't evaluate ->child_end() every time through the loop, or *i frequently within it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69431 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
c19c775f8a9fdcb5f07703fbe3944041c01da08c |
18-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
split code out into a new CheckFunctionJumpScopes routine, add some comments, change type from void* -> Stmt*, use smallvector instead of vector. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69430 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
e80f767a1deee63608df9864f80e237740a1039f |
18-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
split code out into a new CheckFunctionJumpScopes routine, add some comments, change type from void* -> Stmt*, use smallvector instead of vector. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69430 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
63f7dec929ac170012ff10641c4913e9b660ed37 |
18-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
make scope checking be static functions instead of sema methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69429 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
ab09436eb9dafc96ff84d75b87709ac230d140ca |
18-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
make scope checking be static functions instead of sema methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69429 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
e3241e9ede65d127bd9e98fa29d8aa7546288434 |
18-Apr-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
FunctionDecl::getBody() is getting an ASTContext argument for use in lazy PCH deserialization. Propagate that argument wherever it needs to be. No functionality change, except that I've tightened up a few PCH tests in preparation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69406 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
emaExpr.cpp
|
7297134f128423fce2e88f92421ed135bded7d4e |
18-Apr-2009 |
Douglas Gregor <dgregor@apple.com> |
FunctionDecl::getBody() is getting an ASTContext argument for use in lazy PCH deserialization. Propagate that argument wherever it needs to be. No functionality change, except that I've tightened up a few PCH tests in preparation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69406 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
emaExpr.cpp
|
5d231e397238feb9ea2f7e6903fbfdce0cde9dff |
18-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
tweak redefinition of a typedef a bit to fix a couple of problems: 1. We had logic in sema to decide whether or not to emit the error based on manually checking whether in a system header file. 2. we were allowing redefinitions of typedefs in class scope in C++ if in header file. 3. there was no way to force typedef redefinitions to be accepted by the C compiler, which annoys me when stripping linemarkers out of .i files. The fix is to split the C++ class typedef redefinition path from the C path, and change the C path to be a warning that normally maps to error. This causes it to properly be ignored in system headers, etc. and gives us a way to control it. Passing -Wtypedef-redefinition now turns the error into a warning. One behavior change is that we now diagnose cases where you redefine a typedef in your .c file that was defined in a header file. This seems like reasonable behavior, and the diagnostic now indicates that it can be controlled with -Wtypedef-redefinition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69391 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
32b06752d05630996b43c543c80796e1e16dadde |
18-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
tweak redefinition of a typedef a bit to fix a couple of problems: 1. We had logic in sema to decide whether or not to emit the error based on manually checking whether in a system header file. 2. we were allowing redefinitions of typedefs in class scope in C++ if in header file. 3. there was no way to force typedef redefinitions to be accepted by the C compiler, which annoys me when stripping linemarkers out of .i files. The fix is to split the C++ class typedef redefinition path from the C path, and change the C path to be a warning that normally maps to error. This causes it to properly be ignored in system headers, etc. and gives us a way to control it. Passing -Wtypedef-redefinition now turns the error into a warning. One behavior change is that we now diagnose cases where you redefine a typedef in your .c file that was defined in a header file. This seems like reasonable behavior, and the diagnostic now indicates that it can be controlled with -Wtypedef-redefinition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69391 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
75d69b6cfda344bc5c6e570e2cffabb85296da7f |
17-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
fix a crash on invalid by making ActOnDeclarator create decl with a dummy *function* type when it is recovering and knows it needs a function. rdar://6802350 - clang crash on invalid input git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69374 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
23a48cc69e7ed4f219996a8864cb7d3f24f1157f |
17-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
fix a crash on invalid by making ActOnDeclarator create decl with a dummy *function* type when it is recovering and knows it needs a function. rdar://6802350 - clang crash on invalid input git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69374 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d316913addcd81dcae78bef3296ae2e624ec2b33 |
17-Apr-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implement lvalue test for conditional expressions. Add a few commented lines to the test case that point out things that don't work yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69354 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExprCXX.cpp
|
76458501a8963fa11b91c9337a487de6871169b4 |
17-Apr-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implement lvalue test for conditional expressions. Add a few commented lines to the test case that point out things that don't work yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69354 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExprCXX.cpp
|
39a10dbbffb3f5f06c9412b24d32a6c6563d0af1 |
17-Apr-2009 |
Anders Carlsson <andersca@mac.com> |
Add support for the __has_trivial_destructor type trait. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69345 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
072abefcddea5fb65e435cea60921b3c21c1279d |
17-Apr-2009 |
Anders Carlsson <andersca@mac.com> |
Add support for the __has_trivial_destructor type trait. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69345 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
b1a2aab7ee88fb468fb10d45d1e7e681ebb0f4c0 |
17-Apr-2009 |
Mike Stump <mrs@apple.com> |
Fixup semantic analysis for nested blocks, and allow block literal expressions that can be of static duration to be returned. Radar 6786551 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69331 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExpr.cpp
|
397195bf3077fb42789b326f69f7d417227a0588 |
17-Apr-2009 |
Mike Stump <mrs@apple.com> |
Fixup semantic analysis for nested blocks, and allow block literal expressions that can be of static duration to be returned. Radar 6786551 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69331 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExpr.cpp
|
05e5965145ab6225a8112386391511bd8eb08e22 |
17-Apr-2009 |
Anders Carlsson <andersca@mac.com> |
If a class has a non-trivial constructor that doesn't take any arguments, we will now make an implicit CXXTemporaryObjectExpr. So struct S { S(); }; void f() { S s; } 's' here will implicitly be declared as. S s = S(); git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69326 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
930e8d0c2f0b30da3a6a9c440503976d8250e7cf |
17-Apr-2009 |
Anders Carlsson <andersca@mac.com> |
If a class has a non-trivial constructor that doesn't take any arguments, we will now make an implicit CXXTemporaryObjectExpr. So struct S { S(); }; void f() { S s; } 's' here will implicitly be declared as. S s = S(); git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69326 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
bd26196393e625829ded9aab83e56c39b65c9ed0 |
16-Apr-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Fix a crash bug when comparing overload quality of conversion operators with conversion constructors. Remove an atrocious amount of trailing whitespace in the overloaded operator mangler. Sorry, couldn't help myself. Change the DeclType parameter of Sema::CheckReferenceInit to be passed by value instead of reference. It wasn't changed anywhere. Let the parser handle C++'s irregular grammar around assignment-expression and conditional-expression. And finally, the reason for all this stuff: implement C++ semantics for the conditional operator. The implementation is complete except for determining lvalueness. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69299 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaOverload.cpp
emaOverload.h
|
3201f6beec688ab9fe8750527e28f52d5420e22d |
16-Apr-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Fix a crash bug when comparing overload quality of conversion operators with conversion constructors. Remove an atrocious amount of trailing whitespace in the overloaded operator mangler. Sorry, couldn't help myself. Change the DeclType parameter of Sema::CheckReferenceInit to be passed by value instead of reference. It wasn't changed anywhere. Let the parser handle C++'s irregular grammar around assignment-expression and conditional-expression. And finally, the reason for all this stuff: implement C++ semantics for the conditional operator. The implementation is complete except for determining lvalueness. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69299 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaOverload.cpp
emaOverload.h
|
bd45b55493db7ef4021eb092c2c4cca00127d8e2 |
16-Apr-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Attempt to fix a read-after-free running test/Sema/designated-initializers.c. Douglas, can you check that this is doing the right thing? git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69298 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
ba79fc2d1b742e34df104aadb2780725c2a882fc |
16-Apr-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Attempt to fix a read-after-free running test/Sema/designated-initializers.c. Douglas, can you check that this is doing the right thing? git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69298 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
77cf97945ae54e349254b079db8219d0995c5d49 |
16-Apr-2009 |
Anders Carlsson <andersca@mac.com> |
When we create an implicit CXXTemporaryObjectExpr we don't need to check that it's a valid init. Instead, just set it as the VarDecl's initializer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69292 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
098a3df455346a4c2ee3e0372dbb8ca7ff230f04 |
16-Apr-2009 |
Anders Carlsson <andersca@mac.com> |
When we create an implicit CXXTemporaryObjectExpr we don't need to check that it's a valid init. Instead, just set it as the VarDecl's initializer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69292 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
5af5b2a71d89f677bcfab6390fc5fc1c5368f3f2 |
16-Apr-2009 |
Anders Carlsson <andersca@mac.com> |
Disable the code I added before until I understand what's causing default2.cpp to fail. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69267 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
3cbc3cf55059f50ade9d47a4b222bfbe047638d2 |
16-Apr-2009 |
Anders Carlsson <andersca@mac.com> |
Disable the code I added before until I understand what's causing default2.cpp to fail. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69267 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
a5bcdba68268ce8933b79b3676450d804ddba196 |
16-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
use getDiagnosticLevel instead of getDiagnosticMapping, which is about to become private. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69262 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
6a7334d8101f323acec7d34ed083553c206a902f |
16-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
use getDiagnosticLevel instead of getDiagnosticMapping, which is about to become private. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69262 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
c636371070a906200e74097d5d940c9e29500d11 |
16-Apr-2009 |
Anders Carlsson <andersca@mac.com> |
Add support for the __has_trivial_constructor type trait. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69245 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
347ba89dec89091868982434154c3508085b727a |
16-Apr-2009 |
Anders Carlsson <andersca@mac.com> |
Add support for the __has_trivial_constructor type trait. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69245 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
9c7b4920305245bcea7d5e24f01159bada12e615 |
15-Apr-2009 |
Anders Carlsson <andersca@mac.com> |
When declaring a variable that has a constructor and a direct initializer, for example: struct X { X(int, int); }; X x(10, 10); we model that as X x = X(10, 10); inserting a temporary object expr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69227 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
ca29ad9fea0fd51ac622c3f2db1890fdc5dae201 |
15-Apr-2009 |
Anders Carlsson <andersca@mac.com> |
When declaring a variable that has a constructor and a direct initializer, for example: struct X { X(int, int); }; X x(10, 10); we model that as X x = X(10, 10); inserting a temporary object expr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69227 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
dca996f13719dcdff9625b6d7fd0b6f6a567eb13 |
15-Apr-2009 |
Daniel Dunbar <daniel@zuster.org> |
Add warning when a tentative array definition is assumed to have one element. - Also, fixed one to actually be one (instead of zero). :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69226 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
dbb4f21125699f207ce7accfc52fdd99f47ce352 |
15-Apr-2009 |
Daniel Dunbar <daniel@zuster.org> |
Add warning when a tentative array definition is assumed to have one element. - Also, fixed one to actually be one (instead of zero). :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69226 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
e06a81eef8f9b1bfc3d9e24ac2df366afb082e62 |
15-Apr-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6786597> varargs not supported for Blocks under clang. Teach Sema::SemaBuiltinVAStart() about blocks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69201 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
cd9c51433c06705645d1ee5a13da3c9a72d7d025 |
15-Apr-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6786597> varargs not supported for Blocks under clang. Teach Sema::SemaBuiltinVAStart() about blocks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69201 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
e6faa991de29ac1e860a97673e65625df194733b |
15-Apr-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to remove a bogus warning which pointed to underlying AST gen. issue for property in continuation class declared readwrite but which did not generate the declaration for the setter. Fix also removed a FIXME and resulted in code cleanup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69200 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
50c314cb045fef8d442426deb00b75be6f2a1ce3 |
15-Apr-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to remove a bogus warning which pointed to underlying AST gen. issue for property in continuation class declared readwrite but which did not generate the declaration for the setter. Fix also removed a FIXME and resulted in code cleanup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69200 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
d8437a1e44c908795a5f9671babd50c2f0f73c69 |
15-Apr-2009 |
Steve Naroff <snaroff@apple.com> |
Fixup http://llvm.org/viewvc/llvm-project?rev=69165&view=rev (based on feedback from Eli). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69184 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
3bf449796233175e0a696f17fad97fb6d72be48f |
15-Apr-2009 |
Steve Naroff <snaroff@apple.com> |
Fixup http://llvm.org/viewvc/llvm-project?rev=69165&view=rev (based on feedback from Eli). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69184 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d91d1f823adfe64af030707fff4807b104bf1d52 |
15-Apr-2009 |
Steve Naroff <snaroff@apple.com> |
Revert previous patch (will commit a fix soon). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69178 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
1b6823d48da16b64cfb13d818860a21472183ca0 |
15-Apr-2009 |
Steve Naroff <snaroff@apple.com> |
Revert previous patch (will commit a fix soon). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69178 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
a28867b932f50a31151b2157c847a578967239a6 |
15-Apr-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6789707> "warning: 'extern' variable has an initializer" not correct for __private_extern__. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69167 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
ee3899e1cabcbf70d9a316b33f9b79bf3189bd01 |
15-Apr-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6789707> "warning: 'extern' variable has an initializer" not correct for __private_extern__. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69167 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
74511702425bf4596e1c1cd7f4780f0370f237ce |
15-Apr-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6791490> [clang10 regression] [sema] invalid illegal jump diagnostic. caused by: <rdar://problem/6252084> [sema] jumps into Obj-C exception blocks should be disallowed. Sema::RecursiveCalcLabelScopes() and Sema::RecursiveCalcJumpScopes() need to pop the ScopeStack within the statement iteration loop (was outside the loop). Eli, please review (thanks). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69165 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
b25ddfb1559d5c340239c33d98c987386543a947 |
15-Apr-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6791490> [clang10 regression] [sema] invalid illegal jump diagnostic. caused by: <rdar://problem/6252084> [sema] jumps into Obj-C exception blocks should be disallowed. Sema::RecursiveCalcLabelScopes() and Sema::RecursiveCalcJumpScopes() need to pop the ScopeStack within the statement iteration loop (was outside the loop). Eli, please review (thanks). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69165 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
cc94ab72501999e1d61a538f9891523603f9236c |
15-Apr-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement support for designated initializers that refer to members of anonymous structs or unions. Fixes PR3778. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69153 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaInit.cpp
|
ffb4b6e299069139908540ce97be4462e16b53a4 |
15-Apr-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement support for designated initializers that refer to members of anonymous structs or unions. Fixes PR3778. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69153 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaInit.cpp
|
aa3572798c5ccf8e609ee7609d630d4bd5857327 |
15-Apr-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Switch designated-initializer checking from using designator iterators to using designator indices. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69147 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
711997184366d584c9c437102cae1e9d9927b986 |
15-Apr-2009 |
Douglas Gregor <dgregor@apple.com> |
Switch designated-initializer checking from using designator iterators to using designator indices. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69147 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
f7fa9dcd32818f9ed2932c690b460724e2f5c9f2 |
15-Apr-2009 |
Daniel Dunbar <daniel@zuster.org> |
Improve "assignment to cast" diagnostic. - Strip off extra parens when looking for casts. - Change the location info to point at the cast (instead of the assignment). For example, on int *b; #define a ((void*) b) void f0() { a = 10; } we now emit: /tmp/t.c:4:3: error: assignment to cast is illegal, lvalue casts are not supported a = 10; ^ ~ /tmp/t.c:2:12: note: instantiated from: #define a ((void*) b) ~^~~~~~~~~~ instead of: /tmp/t.c:4:5: error: expression is not assignable a = 10; ~ ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69114 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
44e35f7b2b5da1eb338639e46bf0b5522e75c5f3 |
15-Apr-2009 |
Daniel Dunbar <daniel@zuster.org> |
Improve "assignment to cast" diagnostic. - Strip off extra parens when looking for casts. - Change the location info to point at the cast (instead of the assignment). For example, on int *b; #define a ((void*) b) void f0() { a = 10; } we now emit: /tmp/t.c:4:3: error: assignment to cast is illegal, lvalue casts are not supported a = 10; ^ ~ /tmp/t.c:2:12: note: instantiated from: #define a ((void*) b) ~^~~~~~~~~~ instead of: /tmp/t.c:4:5: error: expression is not assignable a = 10; ~ ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69114 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
0a4ea0e386ba03a794973c3d7244bbfb2302275d |
15-Apr-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Diagnose properties which have no implementations; either unimplemented setter/getter or no implementation directive. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69098 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
12bac2566e3136d4bd9d42e6aabe27e1038f7793 |
15-Apr-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Diagnose properties which have no implementations; either unimplemented setter/getter or no implementation directive. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69098 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
7e3ec6da85aaacde8eb5c73e0c3f8d438d52b172 |
14-Apr-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6252084> [sema] jumps into Obj-C exception blocks should be disallowed. This builds on Eli's work from http://llvm.org/viewvc/llvm-project?view=rev&revision=65678. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69073 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
1fc5194039fc01e84af46342bf6e0790f0ebb58c |
14-Apr-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6252084> [sema] jumps into Obj-C exception blocks should be disallowed. This builds on Eli's work from http://llvm.org/viewvc/llvm-project?view=rev&revision=65678. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69073 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
2a3e43d3efc6ded9f8e6bf87af565cbd931f3823 |
14-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
implement some sema for gnuc_inline attribute. Reject always_inline and no_inline on objc methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69051 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
c51974328b3a378c3c40b1fa527ecb928ed2bfda |
14-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
implement some sema for gnuc_inline attribute. Reject always_inline and no_inline on objc methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69051 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
429e56a918f44f517850a651cbb283d9f9f19fae |
14-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
recognize the gnuc_inline attribute. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69044 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
26e25545b26ec06f5d674dbae00fb168e6688d90 |
14-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
recognize the gnuc_inline attribute. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69044 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
e0d5c560565d3a702385b33d790ff2eed6bef62f |
14-Apr-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When building a PCH file, don't perform end-of-translation-unit wrap-up (e.g., turning tentative definitions into definitions). Also, very that, when we actually use the PCH file, we get the ride code generation for tentative definitions and definitions that show up in the PCH file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69043 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
ema.cpp
ema.h
|
f807fe0d1a865f4c6ba7e494cf4ae360c4173521 |
14-Apr-2009 |
Douglas Gregor <dgregor@apple.com> |
When building a PCH file, don't perform end-of-translation-unit wrap-up (e.g., turning tentative definitions into definitions). Also, very that, when we actually use the PCH file, we get the ride code generation for tentative definitions and definitions that show up in the PCH file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69043 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
ema.cpp
ema.h
|
e9bc433d82d11956c68e57678f4b05cd67d3cfdd |
14-Apr-2009 |
Mike Stump <mrs@apple.com> |
Use hasAttr instead of getAttr for conditionals. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69021 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f0c9083c04d9c7d7aa099813f06d339bdbb5eab9 |
14-Apr-2009 |
Mike Stump <mrs@apple.com> |
Use hasAttr instead of getAttr for conditionals. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69021 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
644c15e1dab2d3c7db731143ead7831646c2f348 |
14-Apr-2009 |
Daniel Dunbar <daniel@zuster.org> |
Audit __private_extern__ handling. - Exposed quite a few Sema issues and a CodeGen crash. - See FIXMEs in test case, and in SemaDecl.cpp (PR3983). I'm skeptical that __private_extern__ should actually be a storage class value. I think that __private_extern__ basically amounts to extern A __attribute__((visibility("hidden"))) and would be better off handled (a) as that, or (b) with an extra bit in the VarDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69020 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclObjC.cpp
|
5466c7b0ca8ce662e2c0bc295cecba2b78d6957d |
14-Apr-2009 |
Daniel Dunbar <daniel@zuster.org> |
Audit __private_extern__ handling. - Exposed quite a few Sema issues and a CodeGen crash. - See FIXMEs in test case, and in SemaDecl.cpp (PR3983). I'm skeptical that __private_extern__ should actually be a storage class value. I think that __private_extern__ basically amounts to extern A __attribute__((visibility("hidden"))) and would be better off handled (a) as that, or (b) with an extra bit in the VarDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69020 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclObjC.cpp
|
f41021d40f46f1577ec42ce20a1c270354bc0768 |
14-Apr-2009 |
Mike Stump <mrs@apple.com> |
Fixup CodeGen for __weak __block variables. Radar 6756266 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69010 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f33651c2d79d47d8d05908185613fe33a3e18d89 |
14-Apr-2009 |
Mike Stump <mrs@apple.com> |
Fixup CodeGen for __weak __block variables. Radar 6756266 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69010 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
631f6c64882b5254c5e4dbde6ec604dd4b96fd23 |
14-Apr-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When writing a PCH file, keep track of all of the non-static, non-inline external definitions (and tentative definitions) that are found at the top level. The corresponding declarations are stored in a record in the PCH file, so that they can be provided to the ASTConsumer (via HandleTopLevelDecl) when the PCH file is read. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69005 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
|
fdd0172ca1b3c837f8c2b37d69cc2085234e09fa |
14-Apr-2009 |
Douglas Gregor <dgregor@apple.com> |
When writing a PCH file, keep track of all of the non-static, non-inline external definitions (and tentative definitions) that are found at the top level. The corresponding declarations are stored in a record in the PCH file, so that they can be provided to the ASTConsumer (via HandleTopLevelDecl) when the PCH file is read. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69005 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
|
0d0545a483d229bc67ba9f3c0d30aa372e938e19 |
13-Apr-2009 |
Eli Friedman <eli.friedman@gmail.com> |
PR3461: reject initializer for incomplete type. Based on patch by Tim Northover. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68991 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
a31fecaf63dc589af70bc1604f6d2aabeb7769f7 |
13-Apr-2009 |
Eli Friedman <eli.friedman@gmail.com> |
PR3461: reject initializer for incomplete type. Based on patch by Tim Northover. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68991 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
9c9dc527f0bb4daa54a9d7e1aacb8f076ad92fb6 |
13-Apr-2009 |
Steve Naroff <snaroff@apple.com> |
Move/update recent FIXME (wrt UTF-8 checking for ObjC @-strings). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68982 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
fd942628abfe30e30427875db953222ae99b4325 |
13-Apr-2009 |
Steve Naroff <snaroff@apple.com> |
Move/update recent FIXME (wrt UTF-8 checking for ObjC @-strings). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68982 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
1b85c5054320bd3b7d0593a0ab1f43db7ed01bc5 |
13-Apr-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
In objc2's None-Fragile ABI, one cannot use the super class ivar for setter/getter synthesis. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68976 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
29da66ec56b56db03ed4d48be3e1415f2dbf8995 |
13-Apr-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
In objc2's None-Fragile ABI, one cannot use the super class ivar for setter/getter synthesis. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68976 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
03d555746a43d4c69b2d1e4db808ea2feaa96ec8 |
13-Apr-2009 |
Steve Naroff <snaroff@apple.com> |
Change diagnostic as a result of researching <rdar://problem/6779809> missing interface name in "error: cannot declare variable inside a class, protocol or category ''. Since ObjC 2.0 class "extensions" have a null name, the diagnostic above is actually "correct". Nevertheless, it is confusing. Decided to remove the name entirely (from my perspective, it didn't add any value). Also simplified the text of the diagnostic a bit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68967 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
87454161a6377b573d4fc3ff45e7b3ec193e860c |
13-Apr-2009 |
Steve Naroff <snaroff@apple.com> |
Change diagnostic as a result of researching <rdar://problem/6779809> missing interface name in "error: cannot declare variable inside a class, protocol or category ''. Since ObjC 2.0 class "extensions" have a null name, the diagnostic above is actually "correct". Nevertheless, it is confusing. Decided to remove the name entirely (from my perspective, it didn't add any value). Also simplified the text of the diagnostic a bit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68967 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
449808bbe9054c6be74400418b6b93901753a827 |
13-Apr-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Make the selection of type declarations in Sema::getTypeName deterministic when faced with an ambiguity. This eliminates the annoying test/SemaCXX/using-directive.cpp failure. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68952 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
841b53c5021152fa930e517d66e02e97ae47c34b |
13-Apr-2009 |
Douglas Gregor <dgregor@apple.com> |
Make the selection of type declarations in Sema::getTypeName deterministic when faced with an ambiguity. This eliminates the annoying test/SemaCXX/using-directive.cpp failure. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68952 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
c37a63828450d643c173795b08701607ad6ef929 |
13-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
if we already know that a decl is invalid in an @catch, don't verify its type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68925 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
93c4945c9ead2d374fe3fc528e3017c7167265be |
13-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
if we already know that a decl is invalid in an @catch, don't verify its type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68925 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
d6c780916a75bb1f7a6efb1ed8e36aac2b32168d |
13-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
fix some out of date comments pointed out by Sebastian git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68923 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
b6688e02d2cea9a1e2519654133ac2aa81fd8055 |
13-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
fix some out of date comments pointed out by Sebastian git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68923 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
b8f746865cb6dde04d4d03557be5ccad693a8a81 |
13-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
fix another case that assumed that GetTypeForDeclarator would never return null. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68918 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
6491f47670661c7c9e546cbc3ca7bae2f9850f21 |
13-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
fix another case that assumed that GetTypeForDeclarator would never return null. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68918 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
3b547d17ed66c9ceb818e84602313f0d3a06b136 |
13-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
fix code that incorrectly assumed that GetTypeForDeclarator cannot return null. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68916 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
798d5696ef5b4e3f47a6bed3c4f68f34c4810745 |
13-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
fix code that incorrectly assumed that GetTypeForDeclarator cannot return null. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68916 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
197b4343435266ed64cbed114d030078292cdd6f |
12-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
Diagnose invalid uses of tagged types with a missing tag. For example, in: 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68914 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
4c97d762d8c5a84f6554e5bfb31d28c90df64158 |
12-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
Diagnose invalid uses of tagged types with a missing tag. For example, in: 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68914 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
6de1e00128621100e384853cb1b3a995d600dc34 |
12-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
fix a valgrind problem I noticed while developing another patch, 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68913 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
5186872629d6c9a48433bafe62dc06975bbbf7af |
12-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
fix a valgrind problem I noticed while developing another patch, 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68913 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
5140b9832b2a844ecea92c250bbe95f50d190baa |
12-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
add a new isNull() method to DeclGroupRef. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68909 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
20401698e3bd93a24bb5d9e18e435895cefe5fd1 |
12-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
add a new isNull() method to DeclGroupRef. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68909 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
dc3f18e15ac97ae283c9f65420827e90a30a233f |
12-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
a few cleanups to StatementCreatesScope: unnest the whole thing, exit at the first decl found that creates a scope, don't evaluate decl_end() every iteration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68908 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
bfc861e703895cc6d1ec2403dfebf68b90ae0992 |
12-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
a few cleanups to StatementCreatesScope: unnest the whole thing, exit at the first decl found that creates a scope, don't evaluate decl_end() every iteration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68908 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
a55834a91ff6bdf483aba26c5da64669b2464e2f |
12-Apr-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Parse deleted member functions. Parsing member declarations goes through a 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68902 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExprCXX.cpp
emaOverload.cpp
emaStmt.cpp
|
e2b6833d445c7a4ce64f1816c05f176ba1740aca |
12-Apr-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Parse deleted member functions. Parsing member declarations goes through a 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68902 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExprCXX.cpp
emaOverload.cpp
emaStmt.cpp
|
79e9a42d4fa1e0bae4e66e030214b77945ed7249 |
12-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
Fix rdar://6770142 - Class and qualified id's are compatible, just like Class and unqualified id's are. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68899 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprObjC.cpp
|
2c4463f744487e242f7c88b6daa0abf5cb24219e |
12-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
Fix rdar://6770142 - Class and qualified id's are compatible, just like Class and unqualified id's are. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68899 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprObjC.cpp
|
e6dcfc256117d505f9459a293256a214ba240358 |
12-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
Fix rdar://6771034: don't warn on use of forward declared protocol in protocol list of another protocol definition. This warning is very noisy and GCC doesn't produce it so existing code doesn't expect it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68894 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
58fe03bc8083b92b606c31431feb361c45266cc2 |
12-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
Fix rdar://6771034: don't warn on use of forward declared protocol in protocol list of another protocol definition. This warning is very noisy and GCC doesn't produce it so existing code doesn't expect it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68894 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
81f00ed9267bca789b5074d89a6723631968e500 |
12-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
implement rdar://6780761, making sema reject some code that otherwise crashes codegen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68891 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprObjC.cpp
emaOverload.cpp
|
312531a8cd69c562d5687bd69fd334be99d87320 |
12-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
implement rdar://6780761, making sema reject some code that otherwise crashes codegen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68891 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprObjC.cpp
emaOverload.cpp
|
6e48be2000e32ec13e68a8e8de10c56a650929b0 |
11-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
improve location info for property stuff. In a property like this: @property int x; associate the location of X with the property decl, not the location of the @. Also, pass this info along to the synthesized ParmVarDecls so that redefinition and other diagnostics can use it. This eliminates a fixme. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68880 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
d1e0f5a8ec5d5d5770e18b1d1db0bd7b849dc713 |
11-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
improve location info for property stuff. In a property like this: @property int x; associate the location of X with the property decl, not the location of the @. Also, pass this info along to the synthesized ParmVarDecls so that redefinition and other diagnostics can use it. This eliminates a fixme. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68880 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
7e4c91b78ac49c43ab16006187b70912bad77e18 |
11-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
improve the 'conflicting types' diagnostics to include correct location info, now that it is plumbed through Sema. On a file from growl, we used to emit: t.mi:107059:1: warning: conflicting types for 'removePluginHandler:forPluginTypes:' - (void) removePluginHandler:(id <GrowlPluginHandler>)handler forPluginTypes:(NSSet *)extensions { ^ t.mi:105280:1: note: previous definition is here - (void) removePluginHandler:(id <NSObject>)handler forPluginTypes:(NSSet *)types; ^ now we produce: t.mi:107059:55: warning: conflicting parameter types in implementation of 'removePluginHandler:forPluginTypes:': 'id<NSObject>' vs 'id<GrowlPluginHandler>' - (void) removePluginHandler:(id <GrowlPluginHandler>)handler forPluginTypes:(NSSet *)extensions { ^ t.mi:105280:45: note: previous definition is here - (void) removePluginHandler:(id <NSObject>)handler forPluginTypes:(NSSet *)types; ^ We still don't have proper loc info for properties, hence the FIXME. rdar://6782494 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68879 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
3aff919532fd807ed678b9cfa4b7eca7b04adcf9 |
11-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
improve the 'conflicting types' diagnostics to include correct location info, now that it is plumbed through Sema. On a file from growl, we used to emit: t.mi:107059:1: warning: conflicting types for 'removePluginHandler:forPluginTypes:' - (void) removePluginHandler:(id <GrowlPluginHandler>)handler forPluginTypes:(NSSet *)extensions { ^ t.mi:105280:1: note: previous definition is here - (void) removePluginHandler:(id <NSObject>)handler forPluginTypes:(NSSet *)types; ^ now we produce: t.mi:107059:55: warning: conflicting parameter types in implementation of 'removePluginHandler:forPluginTypes:': 'id<NSObject>' vs 'id<GrowlPluginHandler>' - (void) removePluginHandler:(id <GrowlPluginHandler>)handler forPluginTypes:(NSSet *)extensions { ^ t.mi:105280:45: note: previous definition is here - (void) removePluginHandler:(id <NSObject>)handler forPluginTypes:(NSSet *)types; ^ We still don't have proper loc info for properties, hence the FIXME. rdar://6782494 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68879 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
4f0496b8025f102e67a908ed2319a41753135f80 |
11-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
Set proper location info on objc method arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68877 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
7db638d1222bfb2517ac54388e83169a4c76cf7e |
11-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
Set proper location info on objc method arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68877 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
761b72ff014980a0c52c752cfac6cc83e60964dd |
11-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
simplify code to use adjustParameterType, apply objc arg attributes to their arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68876 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclObjC.cpp
|
f97e8fa2966e3e49eac433336450f24ccbdf8b4a |
11-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
simplify code to use adjustParameterType, apply objc arg attributes to their arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68876 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclObjC.cpp
|
c65b8bb647364ff1d8dfc1eec15ee2a26e7de726 |
11-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
fix blocks to reject objc interfaces returned by value. Also, a block without a prototype should still coerce a return in it to use the declared return type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68875 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
9097af160e647df10829cdd548a06c84649f0231 |
11-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
fix blocks to reject objc interfaces returned by value. Also, a block without a prototype should still coerce a return in it to use the declared return type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68875 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
8932f923452e95f3185b7c138b812bb207e6593a |
11-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
diagnose attempts to return objc interfaces by-value from C functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68873 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
bb74982f30e295d91c2282a16862d674f88d636a |
11-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
diagnose attempts to return objc interfaces by-value from C functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68873 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
7621073d070b38162151ebfa5464ef9e55d50eec |
11-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
Improve the 'cannot pass objc interface by value' diagnostic: 1) improve localizability by not passing english strings in. 2) improve location for arguments. 3) print the objc type being passed. Before: method-bad-param.m:15:1: error: Objective-C type cannot be passed by value -(void) my_method:(foo) my_param ^ after: method-bad-param.m:15:25: error: Objective-C interface type 'foo' cannot be passed by value -(void) my_method:(foo) my_param ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68872 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclObjC.cpp
|
2dd979fbd59938babbed76e2376116511b403c93 |
11-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
Improve the 'cannot pass objc interface by value' diagnostic: 1) improve localizability by not passing english strings in. 2) improve location for arguments. 3) print the objc type being passed. Before: method-bad-param.m:15:1: error: Objective-C type cannot be passed by value -(void) my_method:(foo) my_param ^ after: method-bad-param.m:15:25: error: Objective-C interface type 'foo' cannot be passed by value -(void) my_method:(foo) my_param ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68872 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclObjC.cpp
|
612a2f7b260691c0eb74930977f19b78e2b36260 |
11-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
change the interface to ActOnMethodDeclaration to pass down argument information in a little struct instead of individually. While we're at it, add per-argument loc info and attribute info. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68871 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
e294d3fbaffcbc0cf5f16067ab31d2b2763d25e9 |
11-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
change the interface to ActOnMethodDeclaration to pass down argument information in a little struct instead of individually. While we're at it, add per-argument loc info and attribute info. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68871 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
b95aea0cdda9fe1854c642a09023cefa4a29d81b |
11-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
simplify this code to not bother stripping to canonical types, and indent code properly git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68866 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
5272b7f6ac343bbfc1638ed414fe474d763b3f88 |
11-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
simplify this code to not bother stripping to canonical types, and indent code properly git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68866 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
b3a04c8b6ed5c93e1358246ff80dc869ca2a0efd |
11-Apr-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Compare the predefines buffer in the PCH file with the predefines buffer generated for the current translation unit. If they are different, complain and then ignore the PCH file. This effectively checks for all compilation options that somehow would affect preprocessor state (-D, -U, -include, the dreaded -imacros, etc.). When we do accept the PCH file, throw away the contents of the predefines buffer rather than parsing them, since all of the results of that parsing are already stored in the PCH file. This eliminates the ugliness with the redefinition of __builtin_va_list, among other things. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68838 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
e1d918e9fe55e3b34401fd5d420c47ea0f9572c9 |
11-Apr-2009 |
Douglas Gregor <dgregor@apple.com> |
Compare the predefines buffer in the PCH file with the predefines buffer generated for the current translation unit. If they are different, complain and then ignore the PCH file. This effectively checks for all compilation options that somehow would affect preprocessor state (-D, -U, -include, the dreaded -imacros, etc.). When we do accept the PCH file, throw away the contents of the predefines buffer rather than parsing them, since all of the results of that parsing are already stored in the PCH file. This eliminates the ugliness with the redefinition of __builtin_va_list, among other things. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68838 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
18411916282e06f05c4a03832a2f48261faa08d8 |
11-Apr-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Fix another fallout from defining __weak unconditionally. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68834 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
0a9217f5462d067435e4fc32307c018350d59d38 |
11-Apr-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Fix another fallout from defining __weak unconditionally. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68834 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
a550a647cf074a9685d85bf9fb9786b82c33704d |
10-Apr-2009 |
Ted Kremenek <kremenek@apple.com> |
Use getDeclName() instead of getIdentifier() (safe against null pointers) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68804 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
5a11295a7d8d8899522111668b5973c27ea7c6b2 |
10-Apr-2009 |
Ted Kremenek <kremenek@apple.com> |
Use getDeclName() instead of getIdentifier() (safe against null pointers) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68804 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
ac8f280704e948b8051e8e9bd7f557127d31624b |
10-Apr-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Various minor fixes to PCH reading and writing, with general cleanup. Aside from a minor tweak to the PCH file format, no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68793 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
8038d5182b72dcdef292f6fb8539ad77f338855a |
10-Apr-2009 |
Douglas Gregor <dgregor@apple.com> |
Various minor fixes to PCH reading and writing, with general cleanup. Aside from a minor tweak to the PCH file format, no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68793 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
1ce91f2da99710e0d14f15efc8c26d0fd8b24c4d |
10-Apr-2009 |
Ted Kremenek <kremenek@apple.com> |
Implement attribute "analyzer_noreturn" (<rdar://problem/6777003>). This allows clients of the analyzer to designate custom assertion routines as "noreturn" functions from the analyzer's perspective but not the compiler's. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68746 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
b725232b46e92f3e36b03a32a6fc75748c312122 |
10-Apr-2009 |
Ted Kremenek <kremenek@apple.com> |
Implement attribute "analyzer_noreturn" (<rdar://problem/6777003>). This allows clients of the analyzer to designate custom assertion routines as "noreturn" functions from the analyzer's perspective but not the compiler's. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68746 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
c34897dac02ae4ac32e65601c9b175fa17edf1f6 |
10-Apr-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implementation of pre-compiled headers (PCH) based on lazy de-serialization of abstract syntax trees. PCH support serializes the contents of the abstract syntax tree (AST) to a bitstream. When the PCH file is read, declarations are serialized as-needed. For example, a declaration of a variable "x" will be deserialized only when its VarDecl can be found by a client, e.g., based on name lookup for "x" or traversing the entire contents of the owner of "x". This commit provides the framework for serialization and (lazy) deserialization, along with support for variable and typedef declarations (along with several kinds of types). More declarations/types, along with important auxiliary structures (source manager, preprocessor, etc.), will follow. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68732 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaLookup.cpp
|
2cf2634ffdb4f7c8d46cef3f8e60a55993f1c57a |
10-Apr-2009 |
Douglas Gregor <dgregor@apple.com> |
Implementation of pre-compiled headers (PCH) based on lazy de-serialization of abstract syntax trees. PCH support serializes the contents of the abstract syntax tree (AST) to a bitstream. When the PCH file is read, declarations are serialized as-needed. For example, a declaration of a variable "x" will be deserialized only when its VarDecl can be found by a client, e.g., based on name lookup for "x" or traversing the entire contents of the owner of "x". This commit provides the framework for serialization and (lazy) deserialization, along with support for variable and typedef declarations (along with several kinds of types). More declarations/types, along with important auxiliary structures (source manager, preprocessor, etc.), will follow. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68732 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaLookup.cpp
|
c55b0b035289cd7702034bad930c71302bc80836 |
09-Apr-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Propagate the ASTContext to various AST traversal and lookup functions. No functionality change (really). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68726 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaInherit.cpp
emaInit.cpp
emaLookup.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
6ab3524f72a6e64aa04973fa9433b5559abb3525 |
09-Apr-2009 |
Douglas Gregor <dgregor@apple.com> |
Propagate the ASTContext to various AST traversal and lookup functions. No functionality change (really). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68726 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaInherit.cpp
emaInit.cpp
emaLookup.cpp
emaOverload.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
83bd9caf5c2d72d035f185f4a247553a391504b4 |
09-Apr-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Add some FIXMEs for missing checks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68725 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d296836d0d5570fe634cfe65580dc57fdd2bc8f1 |
09-Apr-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Add some FIXMEs for missing checks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68725 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
49fd7ad55f63f6241e2a1818a5d4b10b925afa33 |
09-Apr-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6770998> make cast of super illegal (again:-) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68659 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
a0c3e9cde1581b1b4d43ca89fdf413cd84eaec1f |
09-Apr-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6770998> make cast of super illegal (again:-) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68659 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
6ba226808459888c545a6a100813e7866169c830 |
08-Apr-2009 |
Steve Naroff <snaroff@apple.com> |
Sema::CheckConditionalOperands(): Soften pointer/integer mismatch from error->warning. Fixes <rdar://problem/6762239> [sema] gcc incompatibility; error on incompatible operand types in ?:. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68617 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
9158804749356f88be8c5a3bade75b761846273c |
08-Apr-2009 |
Steve Naroff <snaroff@apple.com> |
Sema::CheckConditionalOperands(): Soften pointer/integer mismatch from error->warning. Fixes <rdar://problem/6762239> [sema] gcc incompatibility; error on incompatible operand types in ?:. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68617 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
3a8992206cfed30f135260f616753685d9932ad1 |
08-Apr-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
-Wmissing-prototypes shouldn't complain about main() missing a prototype. Fixes <rdar://problem/6759522> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68611 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
2c2d9dc382a561553a05bf0e96ab67e403beff09 |
08-Apr-2009 |
Douglas Gregor <dgregor@apple.com> |
-Wmissing-prototypes shouldn't complain about main() missing a prototype. Fixes <rdar://problem/6759522> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68611 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
dc150fb818077f3879e80fd251fcaee33079f0f4 |
07-Apr-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Now that we have __weak defined as attribute in all modes, we must not issue gc-specific errors in non-gc mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68551 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
c8bafd7242763b7029a7bed898690ea44a59ae4a |
07-Apr-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Now that we have __weak defined as attribute in all modes, we must not issue gc-specific errors in non-gc mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68551 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
f834eaff447215c2bb25961757e7aa0184c6f3a7 |
07-Apr-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Diagnose uses of function specifiers on declarations which don't declare functions. Fixes PR3941. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68541 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
85a5319ea4b5c916d7dd665e84af61e4a8a0b9c2 |
07-Apr-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Diagnose uses of function specifiers on declarations which don't declare functions. Fixes PR3941. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68541 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
0119fd2f90de3e3b7757dc65936ca1851d7a32b9 |
07-Apr-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Fixes method name lookup when method appears in the base implementations (and not in current implementation). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68527 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
ef79bc9b079d838ba2cc91b37760d297025eb3e6 |
07-Apr-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Fixes method name lookup when method appears in the base implementations (and not in current implementation). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68527 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
56d0e89c6d0f3402373a99108b8f6b95102ff1ae |
07-Apr-2009 |
Steve Naroff <snaroff@apple.com> |
Tweak Sema::ActOnInstanceMessage() to look for a class method when dealing with qualified id's. This change is motivated by our desire to not support the "Class<foo>" idiom. Note that the change makes perfect sense (since all ObjC classes are also id/instances). This allow us to document a simple migration path...change "Class <foo>" to "id <foo>". This effects: - <rdar://problem/6761939> TASK: File source change radars for "qualified Class" errors - <rdar://problem/6761864> Protocol qualified Class is unsupported git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68517 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
ebaa768521cfd5318d77f1efaf7ae47020863a9d |
07-Apr-2009 |
Steve Naroff <snaroff@apple.com> |
Tweak Sema::ActOnInstanceMessage() to look for a class method when dealing with qualified id's. This change is motivated by our desire to not support the "Class<foo>" idiom. Note that the change makes perfect sense (since all ObjC classes are also id/instances). This allow us to document a simple migration path...change "Class <foo>" to "id <foo>". This effects: - <rdar://problem/6761939> TASK: File source change radars for "qualified Class" errors - <rdar://problem/6761864> Protocol qualified Class is unsupported git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68517 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
e2caf22f16afe3dff9280b1a0099311fea85cf21 |
07-Apr-2009 |
Steve Naroff <snaroff@apple.com> |
Change the type of ObjC @ string constants (from NSConstantString->NSString). This fixes <rdar://problem/6757102> clang type for @"xxx" is "NSConstantString *" (GCC type is "NSString *"). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68514 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
d9fd7647e286723d100db4cfeab31ec022eec629 |
07-Apr-2009 |
Steve Naroff <snaroff@apple.com> |
Change the type of ObjC @ string constants (from NSConstantString->NSString). This fixes <rdar://problem/6757102> clang type for @"xxx" is "NSConstantString *" (GCC type is "NSString *"). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68514 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
6819955c0da56c4ec39f80e83982374dca4cd38d |
07-Apr-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Warn instead of error on duplicate protocol definitions. Be kind to so many projects which are doing this (and be like gcc). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68474 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
e2573e529d8630e1586e8fb1230938d6e1d799e5 |
07-Apr-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Warn instead of error on duplicate protocol definitions. Be kind to so many projects which are doing this (and be like gcc). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68474 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
a0bd8a94fb46edac5aa60a1373bcd735790cb2f6 |
07-Apr-2009 |
Steve Naroff <snaroff@apple.com> |
Make casting 'super' a deprecated warning (instead of a hard error). This will simplify clang adoption, and is probably better "etiquette" (since gcc has always accepted this idiom without warning). Once we are over the adoption hurdle, we can turn this into an error. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68468 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
fc479d793b5daa20bbf54651b83a90e77e907949 |
07-Apr-2009 |
Steve Naroff <snaroff@apple.com> |
Make casting 'super' a deprecated warning (instead of a hard error). This will simplify clang adoption, and is probably better "etiquette" (since gcc has always accepted this idiom without warning). Once we are over the adoption hurdle, we can turn this into an error. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68468 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
1f12c353e30a1ea1fba19e6543dbd174d596529c |
06-Apr-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Fixed the Fix-It hints for comparison against a string literal. Thanks, Chris! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68454 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
a86b832906d04e9867b792128ad19af39f7cc06b |
06-Apr-2009 |
Douglas Gregor <dgregor@apple.com> |
Fixed the Fix-It hints for comparison against a string literal. Thanks, Chris! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68454 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
745fd89c8fefb3e56e69c43b24d0faea8539200b |
06-Apr-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Fixed visibility issues related to objc2's synthesized ivars. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68453 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
77c9fd2eee4cdac3c5a38a353788f308990598af |
06-Apr-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Fixed visibility issues related to objc2's synthesized ivars. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68453 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
cb9469d0dff4e2999f5dfb7087a08c0d8e6d7bdd |
06-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
Daniel convinced me that accepting "const va_list" arguments to va_arg is a really really bad idea. Now that we emit an error about the unpromoted type, users should be able to understand what is going on. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68447 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
3f419761288f6ce8ffc284e9e241c28b536fce35 |
06-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
Daniel convinced me that accepting "const va_list" arguments to va_arg is a really really bad idea. Now that we emit an error about the unpromoted type, users should be able to understand what is going on. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68447 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
bfdf9db2e893a31c709a52ef8204f9282df05159 |
06-Apr-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
writable property in a category of class's superclass makes the property writable in the current class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68446 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
50efe0483563b12dc8e005068c85d68dc1f7d9ae |
06-Apr-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
writable property in a category of class's superclass makes the property writable in the current class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68446 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
da139485e194d69203305a3b280c31578cc5b1e1 |
05-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
in va_arg diagnostics, print out the unpromoted type. This makes the diagnostic use the va_list typedef more often, see the difference in the changed testcase. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68441 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
0d20b8a6d8af041edeb27cc4c68392454297e308 |
05-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
in va_arg diagnostics, print out the unpromoted type. This makes the diagnostic use the va_list typedef more often, see the difference in the changed testcase. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68441 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
89a72c56e87128c3e86051131b510335bc0f09e0 |
05-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
Add a warning for questionable va_args usage. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68435 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
9dc8f19a5394c4268727f0d755623f8d56416e7c |
05-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
Add a warning for questionable va_args usage. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68435 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
269498481abb050d2627602ee100ef9370a6fd04 |
05-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
GCC compatibility: gcc allows applying va_args to const va_lists for some reason. This fixes rdar://6726818 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68434 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
f502691c86299ed23b7e121e27610ba5bb44a1ee |
05-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
GCC compatibility: gcc allows applying va_args to const va_lists for some reason. This fixes rdar://6726818 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68434 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
5f079ba63941e718a26749c9de9651a96f871b08 |
04-Apr-2009 |
Anton Korobeynikov <asl@math.spbu.ru> |
Extend possible handled regparm(N) value git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68424 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
348f28ab6a574df6501ff8b76f9fc6753c155bad |
04-Apr-2009 |
Anton Korobeynikov <asl@math.spbu.ru> |
Extend possible handled regparm(N) value git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68424 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
2431e605018b816767570dc53eae345183d9f8e6 |
04-Apr-2009 |
Anton Korobeynikov <asl@math.spbu.ru> |
Basic support for regparm codegen git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68414 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
1102f4282ceb430dbc9fcedb9dd2ad25898a09e8 |
04-Apr-2009 |
Anton Korobeynikov <asl@math.spbu.ru> |
Basic support for regparm codegen git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68414 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
8fcffeb6ce16ac977e11f965077e8dfbb62dd4bd |
04-Apr-2009 |
Anton Korobeynikov <asl@math.spbu.ru> |
Provide sema proper values of maximal number of arguments passed in registers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68413 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
264a76cdf382c507f4d43e64c89f1503f003ac95 |
04-Apr-2009 |
Anton Korobeynikov <asl@math.spbu.ru> |
Provide sema proper values of maximal number of arguments passed in registers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68413 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
30ecfb7ecbbbac25fd6c76595e5635ecb5869529 |
03-Apr-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Real corener case of a method declared in a protocol used in a class which declares a property of the same name. This should not result in an unimplemented method warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68409 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
b072b7125b3e2c03da66179704bff9c16808178a |
03-Apr-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Real corener case of a method declared in a protocol used in a class which declares a property of the same name. This should not result in an unimplemented method warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68409 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
66549c46330647bceec3c2fb4189e0bb076a254b |
03-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
improve the string literal comparison warning to not call @encode's "string literals". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68407 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
95f49fb26637e0f271bca580e8e20ce3c08ac2e9 |
03-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
improve the string literal comparison warning to not call @encode's "string literals". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68407 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
304f7c7625d09aeac371cc12f4fc66a46132deff |
02-Apr-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Fix up lookup rules for properties declared in objc's continuation class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68339 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
d09a456e466597fe1667ea5e757bfe53be2cba7d |
02-Apr-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Fix up lookup rules for properties declared in objc's continuation class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68339 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
a8f2ae69c8ca9cfdbce4f7c45709e6d6f22229fa |
02-Apr-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When calling a function without a prototype for which we have a definition, warn if there are too many/too few function call arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68318 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
74734d576b1dd082f623abb76ab204d69970dadb |
02-Apr-2009 |
Douglas Gregor <dgregor@apple.com> |
When calling a function without a prototype for which we have a definition, warn if there are too many/too few function call arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68318 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
9f52b2a46fc7ec69fc1baa7944a7f8a444643c7e |
02-Apr-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Clean up -fixit output slightly git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68278 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
261034861d2c8cfbd6036e56f22f57d7a3736861 |
02-Apr-2009 |
Douglas Gregor <dgregor@apple.com> |
Clean up -fixit output slightly git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68278 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
133d2554efb2245f1757becfd369cb298495f0bc |
02-Apr-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Introduce a "-fixit" mode to clang-cc that applies code-modification hints. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68268 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
558cb56caf8906e0adbe643e3febbef0b7af1b9f |
02-Apr-2009 |
Douglas Gregor <dgregor@apple.com> |
Introduce a "-fixit" mode to clang-cc that applies code-modification hints. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68268 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
3faaa81f0ad6ec851c64050c6e10f01b5c623748 |
02-Apr-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Add some more code modification hints git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68261 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaInit.cpp
emaTemplate.cpp
|
a3a835149ed4b183e3b009a1f94a6123779d696b |
02-Apr-2009 |
Douglas Gregor <dgregor@apple.com> |
Add some more code modification hints git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68261 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaInit.cpp
emaTemplate.cpp
|
89aa1e00c37171f12a4bc24e47b2a17cb0cbf79b |
02-Apr-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Fix a bug in declaration of property in continuation class which was exposed by implementation of objc2's nonfragile abi code gen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68259 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
22b6e0682d69173b4282853aded2f9253f3e2c15 |
02-Apr-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Fix a bug in declaration of property in continuation class which was exposed by implementation of objc2's nonfragile abi code gen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68259 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
d7cb037d4b143f66083a4bca56b8b9e51606f9f0 |
01-Apr-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Make parsing a semantic analysis a little more robust following Sema failures that involve malformed types, e.g., "typename X::foo" where "foo" isn't a type, or "std::vector<void>" that doens't instantiate properly. Similarly, be a bit smarter in our handling of ambiguities that occur in Sema::getTypeName, to eliminate duplicate error messages about ambiguous name lookup. This eliminates two XFAILs in test/SemaCXX, one of which was crying out to us, trying to tell us that we were producing repeated error messages. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68251 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaInherit.cpp
emaInherit.h
emaLookup.cpp
emaTemplate.cpp
|
31a19b6989bbf326d2de5ae12e712e2a65ca9c34 |
01-Apr-2009 |
Douglas Gregor <dgregor@apple.com> |
Make parsing a semantic analysis a little more robust following Sema failures that involve malformed types, e.g., "typename X::foo" where "foo" isn't a type, or "std::vector<void>" that doens't instantiate properly. Similarly, be a bit smarter in our handling of ambiguities that occur in Sema::getTypeName, to eliminate duplicate error messages about ambiguous name lookup. This eliminates two XFAILs in test/SemaCXX, one of which was crying out to us, trying to tell us that we were producing repeated error messages. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68251 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaInherit.cpp
emaInherit.h
emaLookup.cpp
emaTemplate.cpp
|
5e6084cc603111587df403ce188b17e5928e5ac9 |
01-Apr-2009 |
Steve Naroff <snaroff@apple.com> |
CodeGenModule::GetAddrOfConstantCFString(): - Finish up support for converting UTF8->UTF16 to support ObjC @"string" constants. Remove warning from CheckObjCString. As the FIXME in the test case indicates, I still have a bug to work out (apparently with \u handling). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68245 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
b59212a6e494d2c364b54462f545833902c29158 |
01-Apr-2009 |
Steve Naroff <snaroff@apple.com> |
CodeGenModule::GetAddrOfConstantCFString(): - Finish up support for converting UTF8->UTF16 to support ObjC @"string" constants. Remove warning from CheckObjCString. As the FIXME in the test case indicates, I still have a bug to work out (apparently with \u handling). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68245 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
da0c4d26ecb98b02a0f22bde39a1a45dbc2f6d3f |
01-Apr-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Give Type::getDesugaredType a "for-display" mode that can apply more heuristics to determine when it's useful to desugar a type for display to the user. Introduce two C++-specific heuristics: - For a qualified type (like "foo::bar"), only produce a new desugred type if desugaring the qualified type ("bar", in this case) produces something interesting. For example, if "foo::bar" refers to a class named "bar", don't desugar. However, if "foo::bar" refers to a typedef of something else, desugar to that something else. This gives some useful desugaring such as "foo::bar (aka 'int')". - Don't desugar class template specialization types like "basic_string<char>" down to their underlying "class basic_string<char, char_traits<char>, allocator<char>>, etc."; it's better just to leave such types alone. Update diagnostics.html with some discussion and examples of type preservation in C++, showing qualified names and class template specialization types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68207 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
969c689d893a248eca4f049f5b89f747e66e4bff |
01-Apr-2009 |
Douglas Gregor <dgregor@apple.com> |
Give Type::getDesugaredType a "for-display" mode that can apply more heuristics to determine when it's useful to desugar a type for display to the user. Introduce two C++-specific heuristics: - For a qualified type (like "foo::bar"), only produce a new desugred type if desugaring the qualified type ("bar", in this case) produces something interesting. For example, if "foo::bar" refers to a class named "bar", don't desugar. However, if "foo::bar" refers to a typedef of something else, desugar to that something else. This gives some useful desugaring such as "foo::bar (aka 'int')". - Don't desugar class template specialization types like "basic_string<char>" down to their underlying "class basic_string<char, char_traits<char>, allocator<char>>, etc."; it's better just to leave such types alone. Update diagnostics.html with some discussion and examples of type preservation in C++, showing qualified names and class template specialization types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68207 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
77da58034d00866f3261d2c657a5823578f73028 |
01-Apr-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Parsing, semantic analysis, and template instantiation for typename specifiers that terminate in a simple-template-id, e.g., typename MetaFun::template apply<T1, T2> Also, implement template instantiation for dependent nested-name-specifiers that involve unresolved identifiers, e.g., typename T::type::type git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68166 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaTemplateInstantiate.cpp
|
1734317845d60307d474b5da8a8d33adbaf5e723 |
01-Apr-2009 |
Douglas Gregor <dgregor@apple.com> |
Parsing, semantic analysis, and template instantiation for typename specifiers that terminate in a simple-template-id, e.g., typename MetaFun::template apply<T1, T2> Also, implement template instantiation for dependent nested-name-specifiers that involve unresolved identifiers, e.g., typename T::type::type git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68166 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaTemplateInstantiate.cpp
|
aed9804d13f675e5739e1139938bcc2cac8c6e3b |
31-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Some cleanup and renaming. No functionality change git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68140 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
9bde77309fd2f9f7a53446e374472c48c81f5182 |
31-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Some cleanup and renaming. No functionality change git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68140 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
15a928580f936a76dc09f5f57c055122d32d763d |
31-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement template instantiation for template names, including both template template parameters and dependent template names. For example, the oft-mentioned typename MetaFun::template apply<T1, T2>::type can now be instantiated, with the appropriate name lookup for "apply". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68128 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateInstantiate.cpp
|
de650ae96b53eb6109f29fdb5ee51c514259e6e4 |
31-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement template instantiation for template names, including both template template parameters and dependent template names. For example, the oft-mentioned typename MetaFun::template apply<T1, T2>::type can now be instantiated, with the appropriate name lookup for "apply". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68128 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateInstantiate.cpp
|
cd7ac6f1cb1dfd52004718038c227ba5e4d28da4 |
31-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement -Wmissing-prototypes. Fixes PR3911. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68110 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
8499f3f5ff8d5f95ece8047780030a3daad1b6fa |
31-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement -Wmissing-prototypes. Fixes PR3911. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68110 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
84ad8330bbb9b5d1adf611ff5087e7333559fe1f |
31-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
reduce nesting. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68091 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
a3d2524e701b40b2c0cb3688017f153fd1d36bfe |
31-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
reduce nesting. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68091 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
10687e3da97d5ffb3a7466acdf19269342f92e4b |
31-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
Codegen sometimes crashes on comparisons that aren't legal, just disable this feature for now, to err on the side of rejecting instead of sometimes crashing. rdar://6326239 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68088 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
d013aa1ee78d8ead93179c179b7c0746e8d97dbb |
31-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
Codegen sometimes crashes on comparisons that aren't legal, just disable this feature for now, to err on the side of rejecting instead of sometimes crashing. rdar://6326239 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68088 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
aabb850022fc6b16f63f4199e2f5496ccb49ac24 |
31-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Parsing and AST representation for dependent template names that occur within nested-name-specifiers, e.g., for the "apply" in typename MetaFun::template apply<T1, T2>::type At present, we can't instantiate these nested-name-specifiers, so our testing is sketchy. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68081 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaTemplateInstantiate.cpp
|
c45c232440dfafedca1a3773b904fb42609b1b19 |
31-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Parsing and AST representation for dependent template names that occur within nested-name-specifiers, e.g., for the "apply" in typename MetaFun::template apply<T1, T2>::type At present, we can't instantiate these nested-name-specifiers, so our testing is sketchy. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68081 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaTemplateInstantiate.cpp
|
c625fa9911a35cf67fa0c73b8d0446d2dcbb02fd |
31-Mar-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
fe support for objc2's nonfragile-abi synthesized ivars. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68077 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
af3e72285238369c2ea4ebd40a1c9a87bd3eabb7 |
31-Mar-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
fe support for objc2's nonfragile-abi synthesized ivars. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68077 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
dd13e8468462e60971487bcd5915419762dab814 |
31-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve the representation of template names in the AST. This representation handles the various ways in which one can name a template, including unqualified references ("vector"), qualified references ("std::vector"), and dependent template names ("MetaFun::template apply"). One immediate effect of this change is that the representation of nested-name-specifiers in type names for class template specializations (e.g., std::vector<int>) is more accurate. Rather than representing std::vector<int> as std::(vector<int>) we represent it as (std::vector)<int> which more closely follows the C++ grammar. Additionally, templates are no longer represented as declarations (DeclPtrTy) in Parse-Sema interactions. Instead, I've introduced a new OpaquePtr type (TemplateTy) that holds the representation of a TemplateName. This will simplify the handling of dependent template-names, once we get there. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68074 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaTemplateInstantiate.cpp
|
7532dc66648cfe7432c9fe66dec5225f0ab301c6 |
31-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Improve the representation of template names in the AST. This representation handles the various ways in which one can name a template, including unqualified references ("vector"), qualified references ("std::vector"), and dependent template names ("MetaFun::template apply"). One immediate effect of this change is that the representation of nested-name-specifiers in type names for class template specializations (e.g., std::vector<int>) is more accurate. Rather than representing std::vector<int> as std::(vector<int>) we represent it as (std::vector)<int> which more closely follows the C++ grammar. Additionally, templates are no longer represented as declarations (DeclPtrTy) in Parse-Sema interactions. Instead, I've introduced a new OpaquePtr type (TemplateTy) that holds the representation of a TemplateName. This will simplify the handling of dependent template-names, once we get there. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68074 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaTemplateInstantiate.cpp
|
9bc16add08417a7ba2ff3c591eb47019a6273373 |
30-Mar-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Hopefully fix the rval regressions. Thanks to Chris for pointing out that valgrind complains. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68021 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
85002394ca152cc794d2aecd31ed0ec9586838d6 |
30-Mar-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Hopefully fix the rval regressions. Thanks to Chris for pointing out that valgrind complains. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68021 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
a17991fc70d5f5d774a4ea21feefcfc64b1f73a3 |
29-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
Push DeclGroup much farther throughout the compiler. Now the various productions (except the already broken ObjC cases like @class X,Y;) in the parser that can produce more than one Decl return a DeclGroup instead of a Decl, etc. This allows elimination of the Decl::NextDeclarator field, and exposes various clients that should look at all decls in a group, but which were only looking at one (such as the dumper, printer, etc). These have been fixed. Still TODO: 1) there are some FIXME's in the code about potentially using DeclGroup for better location info. 2) ParseObjCAtDirectives should return a DeclGroup due to @class etc. 3) I'm not sure what is going on with StmtIterator.cpp, or if it can be radically simplified now. 4) I put a truly horrible hack in ParseTemplate.cpp. I plan to bring up #3/4 on the mailing list, but don't plan to tackle #1/2 in the short term. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68002 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaStmt.cpp
|
682bf92db408a6cbc3d37b5496a99b6ef85041ec |
29-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
Push DeclGroup much farther throughout the compiler. Now the various productions (except the already broken ObjC cases like @class X,Y;) in the parser that can produce more than one Decl return a DeclGroup instead of a Decl, etc. This allows elimination of the Decl::NextDeclarator field, and exposes various clients that should look at all decls in a group, but which were only looking at one (such as the dumper, printer, etc). These have been fixed. Still TODO: 1) there are some FIXME's in the code about potentially using DeclGroup for better location info. 2) ParseObjCAtDirectives should return a DeclGroup due to @class etc. 3) I'm not sure what is going on with StmtIterator.cpp, or if it can be radically simplified now. 4) I put a truly horrible hack in ParseTemplate.cpp. I plan to bring up #3/4 on the mailing list, but don't plan to tackle #1/2 in the short term. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68002 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaStmt.cpp
|
dfc303325f3db63d9596883379f8c7296d5ea716 |
29-Mar-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Reintroduce r67870 (rval ref overloading), since I can't reproduce any test failures on i386 or x86_64. If this fails for someone, please contact me. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67999 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaOverload.cpp
emaOverload.h
|
a98458054d9004ad414a8518057f8ce08f23ae70 |
29-Mar-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Reintroduce r67870 (rval ref overloading), since I can't reproduce any test failures on i386 or x86_64. If this fails for someone, please contact me. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67999 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaOverload.cpp
emaOverload.h
|
330a05b88b1d39fcef6c65b9387e74b5e8ddb98d |
29-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
various cleanups git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67981 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExprObjC.cpp
|
64540d71b4aaab07d93cb3593ce462d26a83d326 |
29-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
various cleanups git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67981 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExprObjC.cpp
|
3afb2dffef785f4e16e386d36f78066e4e904c84 |
29-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
tighten this up, the decl *must* be a declcontext, no need for the dynamic check. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67978 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
32d3f9cee651b8f7feb34f99ccce00e6fc33d6a0 |
29-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
tighten this up, the decl *must* be a declcontext, no need for the dynamic check. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67978 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
f0bb03c1043d736c09f447a1c00ce8dfdd590853 |
29-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
QualType can go in SmallPtrSet now, simplify code that used to have to work around this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67968 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
e37b94c718169ca429acfb1ffe50f7e9b987512b |
29-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
QualType can go in SmallPtrSet now, simplify code that used to have to work around this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67968 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
7c1c548eff618ce83ac38616f75ba5f2c6271b69 |
29-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
More improvements to namespace aliases. We now support everything except aliases in using directives. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67966 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaDeclCXX.cpp
|
81c85c421197a602523781a6ef730639c4c6ea51 |
29-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
More improvements to namespace aliases. We now support everything except aliases in using directives. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67966 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaDeclCXX.cpp
|
1cd05f55e997f6c47a66eaa8b9d54c45cc8e7261 |
29-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Fix lookup bug git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67964 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
dd729fce03899ed03a212a49d7b03e043ce6ed40 |
29-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Fix lookup bug git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67964 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
ddb1d8b3f23921c8e46127e9ffe065f1b3618a9b |
28-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Create AST nodes for namespace aliases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67962 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
68771c73f4293620dc1a99154ec02111e6490e28 |
28-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Create AST nodes for namespace aliases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67962 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
26de7885f94c72ffa2df696ecb102a12ea2b0733 |
28-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Parse the location of the 'namespace' token to ActOnNamespaceAliasDef. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67961 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
03bd5a1e9a54b62b10ae8aeb6eb5245e2031d98b |
28-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Parse the location of the 'namespace' token to ActOnNamespaceAliasDef. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67961 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
5261d0c6a3046b35512b0950a247a49d9130da87 |
28-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
Introduce a new OpaquePtr<N> struct type, which is a simple POD wrapper for a pointer. Its purpose in life is to be a glorified void*, but which does not implicitly convert to void* or other OpaquePtr's with a different UID. Introduce Action::DeclPtrTy which is a typedef for OpaquePtr<0>. Change the entire parser/sema interface to use DeclPtrTy instead of DeclTy*. This makes the C++ compiler enforce that these aren't convertible to other opaque types. We should also convert ExprTy, StmtTy, TypeTy, AttrTy, BaseTy, etc, but I don't plan to do that in the short term. The one outstanding known problem with this patch is that we lose the bitmangling optimization where ActionResult<DeclPtrTy> doesn't know how to bitmangle the success bit into the low bit of DeclPtrTy. I will rectify this with a subsequent patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67952 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
arseAST.cpp
ema.cpp
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaLookup.cpp
emaOverload.cpp
emaStmt.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
|
b28317a8e5e0e2953d1e5406d753d6c3c7f1e7d2 |
28-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
Introduce a new OpaquePtr<N> struct type, which is a simple POD wrapper for a pointer. Its purpose in life is to be a glorified void*, but which does not implicitly convert to void* or other OpaquePtr's with a different UID. Introduce Action::DeclPtrTy which is a typedef for OpaquePtr<0>. Change the entire parser/sema interface to use DeclPtrTy instead of DeclTy*. This makes the C++ compiler enforce that these aren't convertible to other opaque types. We should also convert ExprTy, StmtTy, TypeTy, AttrTy, BaseTy, etc, but I don't plan to do that in the short term. The one outstanding known problem with this patch is that we lose the bitmangling optimization where ActionResult<DeclPtrTy> doesn't know how to bitmangle the success bit into the low bit of DeclPtrTy. I will rectify this with a subsequent patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67952 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
arseAST.cpp
ema.cpp
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaLookup.cpp
emaOverload.cpp
emaStmt.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
|
91e2cf8a8587e8a4c3c6ea9eb4f3684cf5c4b140 |
28-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
As Eli pointed out, it is possible that a namespace lookup is ambiguous! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67932 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
a1a1b306946e5730f7a47f7be920061cfd7e7259 |
28-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
As Eli pointed out, it is possible that a namespace lookup is ambiguous! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67932 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
279ebc40930071ace03e81739ac16793588fe4af |
28-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Check that the alias points to a valid namespace. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67925 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
5721c68299edddd6d6dc32f6ea5441bcfa20dfd8 |
28-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Check that the alias points to a valid namespace. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67925 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
4a9a85e7edac3b86b7bddc70b193de210ae0517a |
28-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
rename some methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67923 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
7e24e82a70a2c681f4291a3397bcd1e1005f251a |
28-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
rename some methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67923 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
640eb7c2664e94b8027c0f1788f841433b464b45 |
28-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Check that the namespace alias doesn't conflict with a previous declaration in this scope. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67921 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
8d7ba402ba062994e242c97719685d6d66a056dd |
28-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Check that the namespace alias doesn't conflict with a previous declaration in this scope. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67921 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
8cffcd6bdefbd5191c07d91f5ff3d027ca91f51d |
28-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Add an ActOnNamespaceAliasDef action and have the parser call it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67915 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
dbb0094f441d2f15dd6eee581e1569244a26009f |
28-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Add an ActOnNamespaceAliasDef action and have the parser call it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67915 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
f4fbc448d069f2e72f90f3d94795480eb9f5dac9 |
28-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
push more ASTContext goodness out through interfaces that use TranslationUnit git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67913 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
|
557c5b1717bc8919b1b40cf2064b51491ec53a44 |
28-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
push more ASTContext goodness out through interfaces that use TranslationUnit git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67913 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
|
164293fad0f1d4e41b68304c1d90828c3aed7933 |
28-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Revert Sebastian's rvalue patch (r67870) since it caused test failures in SemaCXX//overload-member-call.cpp SemaCXX//overloaded-operator.cpp SemaTemplate//instantiate-method.cpp git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67912 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaDeclCXX.cpp
emaInherit.h
emaOverload.cpp
emaOverload.h
|
14734f7d2a69f9076e8a06954f06d3313063e7f9 |
28-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Revert Sebastian's rvalue patch (r67870) since it caused test failures in SemaCXX//overload-member-call.cpp SemaCXX//overloaded-operator.cpp SemaTemplate//instantiate-method.cpp git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67912 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaDeclCXX.cpp
emaInherit.h
emaOverload.cpp
emaOverload.h
|
07b08c010d3d91d378642b1faa5082e6bed4299e |
28-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
remove TranslationUnit from ParseAST. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67911 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
|
3599dbe94ed8229b4a0eca0b066129e381ccb277 |
28-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
remove TranslationUnit from ParseAST. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67911 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
|
2a594d0d2a5c1fe506608f75b7d135d743b56911 |
28-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
change HandleTranslationUnit to take an ASTContext instead of TranslationUnit git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67910 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
|
dacbc5d46aaeea817742b8c76c987b87d2490c85 |
28-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
change HandleTranslationUnit to take an ASTContext instead of TranslationUnit git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67910 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
|
fb88a5f60c9366bcb62fa604e9a49021b6771c6a |
28-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
eliminate ASTConsumer::InitializeTU, all clients are happy with just ASTContext, they don't need a TU. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67894 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
|
7bb0da001fc579410035cec00b6bca499251a318 |
28-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
eliminate ASTConsumer::InitializeTU, all clients are happy with just ASTContext, they don't need a TU. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67894 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
|
143fd6d9ec67b67192ee6661da47820c4771c3ce |
28-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
simplify ParseAST by sucking -disable-free handling logic up into clang.cpp git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67890 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
|
9ecd26ad19875e410e76476b36f77c47069ba04c |
28-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
simplify ParseAST by sucking -disable-free handling logic up into clang.cpp git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67890 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
|
3cd92880b42cd67bcb631c769a7ab62068e9aac9 |
28-Mar-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Change compound assignment operators to keep track of both the promoted LHS type and the computation result type; this encodes information into the AST which is otherwise non-obvious. Fix Sema to always come up with the right answer for both of these types. Fix IRGen and the analyzer to account for these changes. This fixes PR2601. The approach is inspired by PR2601 comment 2. Note that this changes real *= complex in CodeGen from a silent miscompilation to an explicit error. I'm not really sure that the analyzer changes are correct, or how to test them... someone more familiar with the analyzer should check those changes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67889 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
ab3a852ae713189444dcbf75e70accf1e8c2b7f2 |
28-Mar-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Change compound assignment operators to keep track of both the promoted LHS type and the computation result type; this encodes information into the AST which is otherwise non-obvious. Fix Sema to always come up with the right answer for both of these types. Fix IRGen and the analyzer to account for these changes. This fixes PR2601. The approach is inspired by PR2601 comment 2. Note that this changes real *= complex in CodeGen from a silent miscompilation to an explicit error. I'm not really sure that the analyzer changes are correct, or how to test them... someone more familiar with the analyzer should check those changes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67889 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
6e98fd68651a7da7a20015894749e9480c5ea160 |
28-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Implement access checking for protected base classes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67887 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaInherit.h
|
e5194ff24c224fa8ee83064dff73f62f745a4469 |
28-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Implement access checking for protected base classes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67887 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaInherit.h
|
5f34f0ee70302e8ce1fb6dd8ba4c03e873762476 |
28-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Make our diagnostics about the obsolete GNU designated-initializer syntax into extension warnings, and provide code-modification hints showing how to fix the problem. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67885 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaInit.cpp
|
eeae8f072748affce25ab4064982626361293390 |
28-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Make our diagnostics about the obsolete GNU designated-initializer syntax into extension warnings, and provide code-modification hints showing how to fix the problem. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67885 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaInit.cpp
|
d30226003ea60119b19901b7813821c7ec3d7e55 |
28-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Initial implementation of parsing, semantic analysis, and template instantiation for C++ typename-specifiers such as typename T::type The parsing of typename-specifiers is relatively easy thanks to annotation tokens. When we see the "typename", we parse the typename-specifier and produce a typename annotation token. There are only a few places where we need to handle this. We currently parse the typename-specifier form that terminates in an identifier, but not the simple-template-id form, e.g., typename T::template apply<U, V> Parsing of nested-name-specifiers has a similar problem, since at this point we don't have any representation of a class template specialization whose template-name is unknown. Semantic analysis is only partially complete, with some support for template instantiation that works for simple examples. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67875 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
|
d57959af02b4af695276f4204443afe6e5d86bd8 |
28-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Initial implementation of parsing, semantic analysis, and template instantiation for C++ typename-specifiers such as typename T::type The parsing of typename-specifiers is relatively easy thanks to annotation tokens. When we see the "typename", we parse the typename-specifier and produce a typename annotation token. There are only a few places where we need to handle this. We currently parse the typename-specifier form that terminates in an identifier, but not the simple-template-id form, e.g., typename T::template apply<U, V> Parsing of nested-name-specifiers has a similar problem, since at this point we don't have any representation of a class template specialization whose template-name is unknown. Semantic analysis is only partially complete, with some support for template instantiation that works for simple examples. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67875 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
|
3ac39e1f5683d28dedffc68e6c655dc9e8499bd3 |
27-Mar-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Better overload resolution for rvalue references. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67870 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaOverload.cpp
emaOverload.h
|
f8738782e3322923501c8c185b152f0553a37463 |
27-Mar-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Better overload resolution for rvalue references. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67870 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaOverload.cpp
emaOverload.h
|
404adca9e6daa75b26b07f23b63b2deedec55b06 |
27-Mar-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Finish off semantic analysis for regparm, and remove the warning. Also remove a redundant error in CodeGen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67868 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
55d3aaf9a537888734762170823daf750ea9036d |
27-Mar-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Finish off semantic analysis for regparm, and remove the warning. Also remove a redundant error in CodeGen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67868 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
81379307b0c9fd512fa435868961dc55e01e24d7 |
27-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
It is OK to cast to a private base class if the current member belongs to the class that the private base class is a base of: class A {}; class B : private A { void f(B *b) { A* a = b; } }; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67860 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
f8080a39e6e576a820dadb7a4e0bcf5e7c8ffa35 |
27-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
It is OK to cast to a private base class if the current member belongs to the class that the private base class is a base of: class A {}; class B : private A { void f(B *b) { A* a = b; } }; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67860 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
4abe1246e5950cc4f6888d74dea810310b11ee13 |
27-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Add a Class field to the base path element structure. This holds the record decl of the class taht the base is a base of. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67859 91177308-0d34-0410-b5e6-96231b3b80d8
emaInherit.cpp
emaInherit.h
|
77bd57c4ac7cfdef0b263784ba227ba399e9d69b |
27-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Add a Class field to the base path element structure. This holds the record decl of the class taht the base is a base of. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67859 91177308-0d34-0410-b5e6-96231b3b80d8
emaInherit.cpp
emaInherit.h
|
97703437b51ac8fdbd4adbc8edb33ad6cc161a08 |
27-Mar-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Besides the warning, issue unsupported diagnostics in ir gen. No intended change in functionality. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67857 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
ee760330a415635369556796a97afcfd6207f4dc |
27-Mar-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Besides the warning, issue unsupported diagnostics in ir gen. No intended change in functionality. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67857 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
501c2a9c75db9c1169e16f50df29593c0d41b6e7 |
27-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Implement checking for base class access. Right now it's overly conservative but that will change. (Also, protected isn't implemented right now). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67827 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
c4f1e87138bfe5d3aaccff13c86b383a255bca42 |
27-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Implement checking for base class access. Right now it's overly conservative but that will change. (Also, protected isn't implemented right now). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67827 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
|
762da55b1e7d4a95ee2185d49007c19a61aa50e4 |
27-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
If the user is trying to apply the -> or . member reference operator to a function or function pointer, it's probably because the user forgot to put in parentheses () to call the function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67826 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
214f31a347d7824eb92e6a3f5dce4d4047fd5ae0 |
27-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
If the user is trying to apply the -> or . member reference operator to a function or function pointer, it's probably because the user forgot to put in parentheses () to call the function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67826 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
33c50ae1d675ebf4fe2ea322ccb66f43429db040 |
27-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Update CMake git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67824 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
|
5758be2f50dd19de6efc76bb13b7eebcecd55b1d |
27-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Update CMake git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67824 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
|
3ac7861aefc7558d0a2343c1bd5354d122f87ee4 |
27-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Remove the code insertion hint for implicit int. Too often, we're wrong about this hint, so it loses its usefulness. Maybe some day we can make the hint smart enough to be useful. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67823 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
d17a9e5a29ef076e31d012d7254b526769c386f6 |
27-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Remove the code insertion hint for implicit int. Too often, we're wrong about this hint, so it loses its usefulness. Maybe some day we can make the hint smart enough to be useful. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67823 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
9aa04121bbf77f8cb794be479c190c0f1da34062 |
27-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Add a stubbed out CheckBaseClassAccess method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67821 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaAccess.cpp
emaInherit.cpp
|
29f006be830fbbcaa0c1cf7c7399bb5080dc7f32 |
27-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Add a stubbed out CheckBaseClassAccess method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67821 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaAccess.cpp
emaInherit.cpp
|
ae9c08cfbed8d0e8ed158c8ee484d1acfceb124d |
27-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Move Sema::SetMemberAccessSpecifier to SemaAccess.cpp git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67820 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaDeclCXX.cpp
|
c60e88819a273d54faa71a2cd6c3d79dd48c12e0 |
27-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Move Sema::SetMemberAccessSpecifier to SemaAccess.cpp git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67820 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaDeclCXX.cpp
|
b9b485c39be385550902ea9de9d39a272a3e53f4 |
27-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Add SemaAccess.cpp git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67819 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaInherit.cpp
|
60d6b0d35e3c7c09554f8a4618b97a5d8d0c67a6 |
27-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Add SemaAccess.cpp git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67819 91177308-0d34-0410-b5e6-96231b3b80d8
emaAccess.cpp
emaInherit.cpp
|
869cabfb18978c6cd759b31eaa29a69ce73fd486 |
27-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve recovery when a constructor fails to type-check. Test case from Anders git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67818 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
332975661d287082f64d260ef6ac5f36499d478f |
27-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Improve recovery when a constructor fails to type-check. Test case from Anders git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67818 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
d3c7859aad9ff0fce4cb04b3c2441e651aa666e2 |
27-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Tests and fixes for templates declared within (non-template) classes. Test case from Anders Carlsson, fix from Piotr Rak! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67817 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
551f48c2d96c8a519feb195d34a691c8b97b3994 |
27-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Tests and fixes for templates declared within (non-template) classes. Test case from Anders Carlsson, fix from Piotr Rak! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67817 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
c14c7f0fda52d3bb363788b42a38405720a21e48 |
27-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
Fix rdar://6719156 - clang should emit a better error when blocks are disabled but are used anyway by changing blocks from being disabled in the parser to being disabled in Sema. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67816 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaType.cpp
|
9af5500f3f132f9a2f9abbe82113a7c7bb751472 |
27-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
Fix rdar://6719156 - clang should emit a better error when blocks are disabled but are used anyway by changing blocks from being disabled in the parser to being disabled in Sema. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67816 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaType.cpp
|
041e929321e7b8550735acdcbceef54dde881bd7 |
27-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Simplify CXXScopeSpec a lot. No more weird SmallVector-like hacks here git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67800 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
emaExpr.cpp
emaType.cpp
|
3507369940bfb269551bfa1fec812481f60e3552 |
27-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Simplify CXXScopeSpec a lot. No more weird SmallVector-like hacks here git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67800 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
emaExpr.cpp
emaType.cpp
|
1e589cc31d339860b9df61870930961601d68120 |
27-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Revamp our representation of C++ nested-name-specifiers. We now have a uniqued representation that should both save some memory and make it far easier to properly build canonical types for types involving dependent nested-name-specifiers, e.g., "typename T::Nested::type". This approach will greatly simplify the representation of CXXScopeSpec. That'll be next. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67799 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateExpr.cpp
emaType.cpp
|
ab452ba8323d1985e08bade2bced588cddf2cc28 |
27-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Revamp our representation of C++ nested-name-specifiers. We now have a uniqued representation that should both save some memory and make it far easier to properly build canonical types for types involving dependent nested-name-specifiers, e.g., "typename T::Nested::type". This approach will greatly simplify the representation of CXXScopeSpec. That'll be next. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67799 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateExpr.cpp
emaType.cpp
|
e8dcd92a726d835d52374e818436a239868d9c19 |
27-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Add const DiagnosticBuilder &operator<<(const DiagnosticBuilder &DB, AccessSpecifier AS); so we can easily add access specifiers to diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67795 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
05bf2c79770927c66ca725e9bb589048ed3f069e |
27-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Add const DiagnosticBuilder &operator<<(const DiagnosticBuilder &DB, AccessSpecifier AS); so we can easily add access specifiers to diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67795 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
8c56ee0afc0781402f55312680ab0d9b703b09b1 |
26-Mar-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6697053> instance variable is protected. Treat @package the same as @public. The documentation for @package says it is analogous to private_extern for variables/functions. Fully implementing this requires some kind of linker support (so access is denied to code outside the classes executable image). I don't believe GCC fully implements this semantic. Will discuss with Fariborz offline. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67755 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
8bfd1b8c36c88fd15c39185b3494dd30a001cfb3 |
26-Mar-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6697053> instance variable is protected. Treat @package the same as @public. The documentation for @package says it is analogous to private_extern for variables/functions. Fully implementing this requires some kind of linker support (so access is denied to code outside the classes executable image). I don't believe GCC fully implements this semantic. Will discuss with Fariborz offline. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67755 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
fc20c6b70655082f369e2513278109686bf32d4b |
26-Mar-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Sanity-check argument to indirect goto. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67746 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
33083823342649b1fccec856c1f239c09fc0d7e1 |
26-Mar-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Sanity-check argument to indirect goto. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67746 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
4ca4349b5f36175fc8742135fec4fed9b9f7a866 |
26-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Set the access specifier for templates inside classes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67726 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
4cbe82c7c82ca0106f60296a60951d41f7d2ec7d |
26-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Set the access specifier for templates inside classes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67726 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
1f8232879e3dd7a9ba98a84ab21e05156c7d605f |
26-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Factor the member access specifier setting code into its own function. No intended functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67725 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
0cf8830a45115176ef5ba5416b7ad7aa9d5cb255 |
26-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Factor the member access specifier setting code into its own function. No intended functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67725 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
ed20fb93b83794139c15c9914ffb0cc4739855c1 |
26-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Handle parsing of templates in member declarations. Pass the AccessSpecifier all the way down to ActOnClassTemplate. Doug, Sebastian: Plz review! :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67723 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
|
5aeccdbb4bdc94e48c04cacc59fa812af32109b2 |
26-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Handle parsing of templates in member declarations. Pass the AccessSpecifier all the way down to ActOnClassTemplate. Doug, Sebastian: Plz review! :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67723 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
|
bccb4bce64483b3e5f9305d8c3df64ca7f4e7e95 |
26-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Check that the access specifier of a member redeclaration is the same as the original declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67722 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
50713450f61b85805e1ca97e547a4082b7798bd3 |
26-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Check that the access specifier of a member redeclaration is the same as the original declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67722 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
4b99aba67202bdb6b8ff079d7269a8cf8c98aec4 |
26-Mar-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix for PR3869: actually enforce that the argument of an indirect goto is of type void*. I'll try to add the appropriate checking later. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67721 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
bbf462314b1dc8e422b7c4dd4cac47e566aedf6d |
26-Mar-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix for PR3869: actually enforce that the argument of an indirect goto is of type void*. I'll try to add the appropriate checking later. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67721 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
55216ac1d698c5d24c5d6a9f0986404cdc703762 |
26-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
The injected-class-name of class templates and class template specializations can be treated as a template. Finally, we can parse and process the first implementation of Fibonacci I wrote! Note that this code does not handle all of the cases where injected-class-names can be treated as templates. In particular, there's an ambiguity case that we should be able to handle (but can't), e.g., template <class T> struct Base { }; template <class T> struct Derived : Base<int>, Base<char> { typename Derived::Base b; // error: ambiguous typename Derived::Base<double> d; // OK }; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67720 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
befc20e1dc869edb0e7b560e69f32d5c71f867ab |
26-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
The injected-class-name of class templates and class template specializations can be treated as a template. Finally, we can parse and process the first implementation of Fibonacci I wrote! Note that this code does not handle all of the cases where injected-class-names can be treated as templates. In particular, there's an ambiguity case that we should be able to handle (but can't), e.g., template <class T> struct Base { }; template <class T> struct Derived : Base<int>, Base<char> { typename Derived::Base b; // error: ambiguous typename Derived::Base<double> d; // OK }; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67720 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaTemplate.cpp
emaTemplateInstantiateDecl.cpp
|
8ea6a3293085bfc0d8bae39057dd918f839ab424 |
26-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Tighten the setAccess assert. We now allow AS_none if the decl contex is not a C++ record decl. Also, fix fallout from the change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67717 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
1329c274628cc8c4e8ad472b41d1a78c8123f611 |
26-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Tighten the setAccess assert. We now allow AS_none if the decl contex is not a C++ record decl. Also, fix fallout from the change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67717 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
afb094afd67f294248dbd60d4d064fe226e7679f |
26-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement template instantiation for static data members of class templates, including in-class initializers. For example: template<typename T, T Divisor> class X { public: static const T value = 10 / Divisor; }; instantiated with, e.g., X<int, 5>::value to get the value '2'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67715 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplateInstantiateDecl.cpp
|
3d7a12a50558c31d4351e923c15ab57688f4fdf2 |
26-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement template instantiation for static data members of class templates, including in-class initializers. For example: template<typename T, T Divisor> class X { public: static const T value = 10 / Divisor; }; instantiated with, e.g., X<int, 5>::value to get the value '2'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67715 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplateInstantiateDecl.cpp
|
0c793bb0ab1ed0c1265ccfb77904fd247a11f209 |
25-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Pass access specifiers through to member classes and member enums. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67710 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplateInstantiateDecl.cpp
|
06c0fecd197fef21e265a41bca8dc5022de1f864 |
25-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Pass access specifiers through to member classes and member enums. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67710 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplateInstantiateDecl.cpp
|
42c48528bb01a1403c0ec0bb947558105bf5433c |
25-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix notes regarding the instantiation of member classes (and test 'em). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67708 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
d048bb79f5c3b3751878aec038bce28a5ce0f439 |
25-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Fix notes regarding the instantiation of member classes (and test 'em). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67708 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
cc88797aac66319a370847d204aef5de70c43f65 |
25-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Instantiation for member classes of class templates. Note that only the declarations of member classes are instantiated when the owning class template is instantiated. The definitions of such member classes are instantiated when a complete type is required. This change also introduces the injected-class-name into a class template specialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67707 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
|
d475b8d9e6f5ff0e6ab8d15667ce8a64c7cb9a4d |
25-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Instantiation for member classes of class templates. Note that only the declarations of member classes are instantiated when the owning class template is instantiated. The definitions of such member classes are instantiated when a complete type is required. This change also introduces the injected-class-name into a class template specialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67707 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
|
43bfaafb142657ceee76b65396075a57e195d8d1 |
25-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Predicate to detect when a RecordDecl is really the injected-class-name git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67687 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
c9b5b4074bd73d4af76e69cccf8ecd365fdd1008 |
25-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Predicate to detect when a RecordDecl is really the injected-class-name git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67687 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
1818a0a232ab948fd810404cf5cc9f1d4b5aee2b |
25-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Stub out some declaration kinds that cannot ever be instantiated git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67686 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
4f722be4587a7a0dece399fb5405dda158971ae1 |
25-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Stub out some declaration kinds that cannot ever be instantiated git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67686 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
7e96f801dc47d88fcacb001cb9bb990b4c075ccf |
25-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Minor refactoring to eliminate an extra switch during template instantiation git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67684 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
6477b69cc93e0a0ff15036d60d604f3544da0f29 |
25-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Minor refactoring to eliminate an extra switch during template instantiation git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67684 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
c7f8720d22f898d5885f872b060e270f9d464e16 |
25-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Improve handling of base initializers. We now parse initializers in out of line decls, such as: class C { C() { } int a; }; C::C() : a(10) { } We also diagnose when initializers are used on declarations that aren't constructors: t.cpp:1:10: error: only constructors take base initializers void f() : a(10) { } ^ Doug and/or Sebastian: I'd appreciate a review, especially the nested-name-spec test results (from the looks of it we now match gcc in that test.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67672 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
a7b3521ef52d983bd0e7fa562bb9ef1393f14634 |
25-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Improve handling of base initializers. We now parse initializers in out of line decls, such as: class C { C() { } int a; }; C::C() : a(10) { } We also diagnose when initializers are used on declarations that aren't constructors: t.cpp:1:10: error: only constructors take base initializers void f() : a(10) { } ^ Doug and/or Sebastian: I'd appreciate a review, especially the nested-name-spec test results (from the looks of it we now match gcc in that test.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67672 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
a5dfe70968c7c09deb3f82fe1599401120706cbe |
25-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Template instantiation for conversion functions git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67664 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
bb969ed4193e2eadabfaa0dfd0b94312b6146349 |
25-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Template instantiation for conversion functions git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67664 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
d0591af8dbda7c4f023e250bf67868204866a730 |
25-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Move template instantiation for expressions into a separate file git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67660 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
emaTemplateInstantiate.cpp
emaTemplateInstantiateExpr.cpp
|
aa6af22a3e041768f554659e78f93473b3b1bc7f |
25-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Move template instantiation for expressions into a separate file git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67660 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
emaTemplateInstantiate.cpp
emaTemplateInstantiateExpr.cpp
|
c5d6fa7539cdd5f00ca102783df46f68ae82da18 |
25-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
In Parser::ParseClassSpecifier, don't conflate a NULL declaration with failure to perform a declaration. Instead, explicitly note semantic failures that occur during template parsing with a DeclResult. Fixes PR3872. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67659 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
|
212e81cc5151b3c42346e43cfd42499a53ffd39a |
25-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
In Parser::ParseClassSpecifier, don't conflate a NULL declaration with failure to perform a declaration. Instead, explicitly note semantic failures that occur during template parsing with a DeclResult. Fixes PR3872. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67659 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
|
a8cecf66e3d8ebbd30501d92692c912cc843160b |
24-Mar-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Parse deleted function definitions and hook them up to Doug's machinery. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67653 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
50de12f5783b57c74fd30ebfa3945181313625ff |
24-Mar-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Parse deleted function definitions and hook them up to Doug's machinery. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67653 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
26ea122d7b08fc76c2135ef2609af311d951dac3 |
24-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Type::isObjectType now implements the (more sensible) C++ definition of "object type" rather than the C definition of "object type". The difference is that C's "object type" excludes incomplete types such as struct X; However, C's definition also makes it far too easy to use isObjectType as a means to detect incomplete types when in fact we should use other means (e.g., Sema::RequireCompleteType) that cope with C++ semantics, including template instantiation. I've already audited every use of isObjectType and isIncompleteType to ensure that they are doing the right thing for both C and C++, so this is patch does not change any functionality. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67648 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaTemplate.cpp
emaType.cpp
|
bad0e656c3732e3539a9cd6525de721d7e47408b |
24-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Type::isObjectType now implements the (more sensible) C++ definition of "object type" rather than the C definition of "object type". The difference is that C's "object type" excludes incomplete types such as struct X; However, C's definition also makes it far too easy to use isObjectType as a means to detect incomplete types when in fact we should use other means (e.g., Sema::RequireCompleteType) that cope with C++ semantics, including template instantiation. I've already audited every use of isObjectType and isIncompleteType to ensure that they are doing the right thing for both C and C++, so this is patch does not change any functionality. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67648 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaTemplate.cpp
emaType.cpp
|
cde3a2d585f80c567c3367ffcbcde0b1b041368f |
24-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix a few isObjectTypes that really need to be isIncompleteOrObject types; add another use of RequireCompleteType. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67644 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprCXX.cpp
emaNamedCast.cpp
emaTemplate.cpp
|
8dcb29db8483d4dcaeeecc0e653b642b0a41cd2c |
24-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Fix a few isObjectTypes that really need to be isIncompleteOrObject types; add another use of RequireCompleteType. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67644 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprCXX.cpp
emaNamedCast.cpp
emaTemplate.cpp
|
05e28f67bcd6f3da0eb2cf9916a9fbadcde4257d |
24-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Make sure to use RequireCompleteType rather than testing for incomplete types. RequireCompleteType is needed when the type may be completed by instantiating a template. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67643 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
emaExprCXX.cpp
|
e7450f5dbd5bed63b8ef9db86350a8fc3db011e8 |
24-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Make sure to use RequireCompleteType rather than testing for incomplete types. RequireCompleteType is needed when the type may be completed by instantiating a template. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67643 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
emaExprCXX.cpp
|
de9e789310f9ef5259324d341c2fef5354b5aea4 |
24-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Fix the bug that Eli noticed where we wouldn't look at function decls outside the class declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67627 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
e65a3c8f181adc42786e0a409cd1e827f4ab37ff |
24-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Fix the bug that Eli noticed where we wouldn't look at function decls outside the class declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67627 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
ad7d18115a5a93e32609a099464bb087d5a2200d |
24-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Template instantiation for constructors git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67623 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
|
615c5d4674355ba830b9978f462ca7a8c5d15f85 |
24-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Template instantiation for constructors git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67623 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaTemplateInstantiateDecl.cpp
|
ce9240e800681c82205965614e631cf9e8cd049e |
24-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Handle pointers to arrays of abstract types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67598 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
5eff73c7679349f39e3602e05fff1ff347a28858 |
24-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Handle pointers to arrays of abstract types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67598 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
412c34014b576ee253e5026e1e74a5ef62a41135 |
24-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
More work on diagnosing abstract classes. We can now handle cases like class C { void g(C c); virtual void f() = 0; }; In this case, C is not known to be abstract when doing semantic analysis on g. This is done by recursively traversing the abstract class and checking the types of member functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67594 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaTemplateInstantiateDecl.cpp
|
8211effbd3abc5948a5d6924c87e72323016a376 |
24-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
More work on diagnosing abstract classes. We can now handle cases like class C { void g(C c); virtual void f() = 0; }; In this case, C is not known to be abstract when doing semantic analysis on g. This is done by recursively traversing the abstract class and checking the types of member functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67594 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
emaTemplateInstantiateDecl.cpp
|
03132d9f627833508ccfaaacc86e0386c4ac5d80 |
24-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Cleanup template instantiation for methods, destructors git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67585 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
5545e166a956a20d7a6b58408e251a1119025485 |
24-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Cleanup template instantiation for methods, destructors git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67585 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
467b1c9bc1b214ee80ae010df4b4a6d6b1876a03 |
24-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Template instantiation for destructors. This is somewhat repetitive; eliminating the duplication is next on the list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67579 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
03b2b07aaef3a585aec13048a33356c7f635de72 |
24-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Template instantiation for destructors. This is somewhat repetitive; eliminating the duplication is next on the list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67579 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiateDecl.cpp
|
f5328192d836730032934d70ae51bd121843afe6 |
24-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Another use of adjustParameterType. Plus, GetTypeForDeclarator will always get ParmVarDecls with already-adjusted types. Assert it. Thanks, Anders! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67576 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
beb58cb83bd53b79b80fc6f9952efd985934cbfc |
24-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Another use of adjustParameterType. Plus, GetTypeForDeclarator will always get ParmVarDecls with already-adjusted types. Assert it. Thanks, Anders! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67576 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
a689727f7bb7673c4b655874fe77113b23f54d7b |
24-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Template instantiation for the declarations of member functions within a class template. At present, we can only instantiation normal methods, but not constructors, destructors, or conversion operators. As ever, this contains a bit of refactoring in Sema's type-checking. In particular: - Split ActOnFunctionDeclarator into ActOnFunctionDeclarator (handling the declarator itself) and CheckFunctionDeclaration (checking for the the function declaration), the latter of which is also used by template instantiation. - We were performing the adjustment of function parameter types in three places; collect those into a single new routine. - When the type of a parameter is adjusted, allocate an OriginalParmVarDecl to keep track of the type as it was written. - Eliminate a redundant check for out-of-line declarations of member functions; hide more C++-specific checks on function declarations behind if(getLangOptions().CPlusPlus). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67575 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
|
2dc0e64e57b2a1786fa53a7dbd1d5c8e255eadb0 |
24-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Template instantiation for the declarations of member functions within a class template. At present, we can only instantiation normal methods, but not constructors, destructors, or conversion operators. As ever, this contains a bit of refactoring in Sema's type-checking. In particular: - Split ActOnFunctionDeclarator into ActOnFunctionDeclarator (handling the declarator itself) and CheckFunctionDeclaration (checking for the the function declaration), the latter of which is also used by template instantiation. - We were performing the adjustment of function parameter types in three places; collect those into a single new routine. - When the type of a parameter is adjusted, allocate an OriginalParmVarDecl to keep track of the type as it was written. - Eliminate a redundant check for out-of-line declarations of member functions; hide more C++-specific checks on function declarations behind if(getLangOptions().CPlusPlus). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67575 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplateInstantiateDecl.cpp
emaType.cpp
|
d6be6c8a17054e9cc44099c8e6d9a1d24163c83d |
23-Mar-2009 |
Ted Kremenek <kremenek@apple.com> |
Deallocate 'DeclRefExpr's in correctly formed '#pragma unused' git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67573 91177308-0d34-0410-b5e6-96231b3b80d8
emaAttr.cpp
|
45a3c05640b1b08e7f7f69f633f899fd0e792f3c |
23-Mar-2009 |
Ted Kremenek <kremenek@apple.com> |
Deallocate 'DeclRefExpr's in correctly formed '#pragma unused' git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67573 91177308-0d34-0410-b5e6-96231b3b80d8
emaAttr.cpp
|
86a631bda5c8483192c6f7674a60d0df5016d855 |
23-Mar-2009 |
Ted Kremenek <kremenek@apple.com> |
Implement '#pragma unused'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67569 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaAttr.cpp
|
4726d03ab3abce41911c31d1354a18f1258cae4d |
23-Mar-2009 |
Ted Kremenek <kremenek@apple.com> |
Implement '#pragma unused'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67569 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaAttr.cpp
|
c263c9b4f637559a7ee79d80ae96e120b88e1528 |
23-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
More improvements to abstract type checking. Handle arrays correctly, and make sure to check parameter types before they decay. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67550 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
|
11f21a08cd40caec93e088c404bbf3136917a035 |
23-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
More improvements to abstract type checking. Handle arrays correctly, and make sure to check parameter types before they decay. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67550 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
|
d5a949898d4547babb07823bae45ed8324bef9de |
23-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
It's an error to try to allocate an abstract object using new. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67542 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
|
b9bbe49f513080b3307e88bdee0d383f4b8c1d4e |
23-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
It's an error to try to allocate an abstract object using new. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67542 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
|
1e23a5fcf5d96f1504fbf57860d2709b1628c1fc |
23-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix PR3855. When we encounter an incompatible redeclaration of a library function, accept this declaration and pretend that we do not know that this is a library function. autoconf depends on this (broken) behavior. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67541 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
374e156647e4250274eb66102839abf0ee9d7fe8 |
23-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Fix PR3855. When we encounter an incompatible redeclaration of a library function, accept this declaration and pretend that we do not know that this is a library function. autoconf depends on this (broken) behavior. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67541 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
11578179e813f5db02e04c626b99fa64b8d4da7e |
23-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Tighten up the determination of whether a function declaration has a prototype. Thanks Eli! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67533 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d1659a6bd96132ffab70613b23f5716424fa364f |
23-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Tighten up the determination of whether a function declaration has a prototype. Thanks Eli! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67533 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
b71bc2701174236cd97fc1898e88f10ac1fe6800 |
23-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Thanks to Eli for pointing out my misreading of 6.2.2p5 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67530 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
38179b29df101e3f55dbdff4d15d4d55cd82e2bd |
23-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Thanks to Eli for pointing out my misreading of 6.2.2p5 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67530 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
2b12832863fe3c79694ac143f5b5abe8d52364b9 |
23-Mar-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Add some FIXMEs relating to incomplete types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67497 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b1d796d587033ec2e59313ac5d87be57d5272438 |
23-Mar-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Add some FIXMEs relating to incomplete types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67497 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
6ca28cbcda9115d6063e293c24e4905dda9c8248 |
23-Mar-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Partial implementation of PR3342: break out pointer sign incompatibilities in assignments from other pointer incompatibilities. Based off of the patch in PR3342. (This doesn't implement -Wno-pointer-sign, but I don't know the driver code very well.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67494 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
f05c05d2e1a2952e6cc7c3e54366fb8d99ff579c |
23-Mar-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Partial implementation of PR3342: break out pointer sign incompatibilities in assignments from other pointer incompatibilities. Based off of the patch in PR3342. (This doesn't implement -Wno-pointer-sign, but I don't know the driver code very well.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67494 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
8a8b351ed149696f31d5a115e65493667031ad52 |
23-Mar-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Disallow catching exceptions by rvalue reference. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67492 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaOverload.cpp
|
f2e21e5ad5e816d88e048c89dc775a9d4547c089 |
23-Mar-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Disallow catching exceptions by rvalue reference. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67492 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaOverload.cpp
|
9c2b33f762fccde17b1d088fa352a0fe159d1096 |
23-Mar-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix code to mark block variables as const to actually work. Fix isObjCObjectPointerType to work with qualified types. Adjust test for changes. If the SemaExpr changes are wrong or break existing code, feel free to delete the "ExprTy.addConst();" line and revert my changes to test/Sema/block-literal.c. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67489 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
5fdeae17da443c50c62f602733d06193a71b170f |
23-Mar-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix code to mark block variables as const to actually work. Fix isObjCObjectPointerType to work with qualified types. Adjust test for changes. If the SemaExpr changes are wrong or break existing code, feel free to delete the "ExprTy.addConst();" line and revert my changes to test/Sema/block-literal.c. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67489 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
103c6c7d5921f42e2fa3d72ed1ec59a626e7ed8c |
22-Mar-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implement static_cast from lvalue to rvalue reference. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67487 91177308-0d34-0410-b5e6-96231b3b80d8
emaNamedCast.cpp
|
157be839ade8312389b20d02a3d470c0487fd756 |
22-Mar-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implement static_cast from lvalue to rvalue reference. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67487 91177308-0d34-0410-b5e6-96231b3b80d8
emaNamedCast.cpp
|
83dec9e0a6adc212e3a07dc68eb176165fa6f597 |
22-Mar-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Check that the return/argument types of calls are complete. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67485 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e7c6f7aa7e8ee1f0acacc314dcf59d5dadff1524 |
22-Mar-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Check that the return/argument types of calls are complete. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67485 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
16ac38f3b97a262ace77a1060a3fcfe76eb54079 |
22-Mar-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Fix build from r67476 and address the easy part of Doug's comments on rvalue refs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67480 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaType.cpp
|
dfe292dbebe84bc3a19dba83e9eef52d56492b0a |
22-Mar-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Fix build from r67476 and address the easy part of Doug's comments on rvalue refs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67480 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaType.cpp
|
e1299b3edca565a8418a88828d4f7357abed772a |
22-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Disallow abstract types where appropriate. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67476 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
4681ebd429846ed98e7beaf49934fa347ff22152 |
22-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Disallow abstract types where appropriate. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67476 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
1dae87f4b8750e107fde542377d457e462b6c9b1 |
22-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Keep track of whether a class is abstract or not. This is currently only used for the __is_abstract type trait. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67461 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
67e4dd2e9936d828d68b20e01922b6442c6ce31b |
22-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Keep track of whether a class is abstract or not. This is currently only used for the __is_abstract type trait. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67461 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
1e5c776a03e7ead2e6a43afbabbe00379a11c953 |
21-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix a thinko in the pre-allocation strategy for structured initializer lists. The code wasn't accounting for the distinction between the top-level call to getStructuredSubobjectInit and later calls that occur deeper in the hierarchy. This problem manifested itself as over-allocation in cases where we have large arrays of small structures (<rdar://problem/6707362>). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67452 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
08457737b60ba2e7f58ecf3062010843268fc6ea |
21-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Fix a thinko in the pre-allocation strategy for structured initializer lists. The code wasn't accounting for the distinction between the top-level call to getStructuredSubobjectInit and later calls that occur deeper in the hierarchy. This problem manifested itself as over-allocation in cases where we have large arrays of small structures (<rdar://problem/6707362>). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67452 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
ca277321b9f701b45abbd450657bdbfb72428d0f |
21-Mar-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Issue error if variables are defined inside an objc class, category or protocol. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67450 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
b31cb7f1752ea011fd06ac9574ce24667d11cbdb |
21-Mar-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Issue error if variables are defined inside an objc class, category or protocol. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67450 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
ee0792c36716c6104957542be022949d99629d62 |
21-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When building the structured initializer list, pre-allocate storage in its vectors based on the subobject type we're initializing and the (unstructured) initializer list. This eliminates some malloc thrashing when parsing initializers (from 117 vector reallocations down to 0 when parsing Cocoa.h). We can't always pre-allocate the right amount of storage, since designated initializers can cause us to initialize in non-predictable patterns. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67421 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
fa2192042f223b5122a9e17719930f77634fd31f |
21-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
When building the structured initializer list, pre-allocate storage in its vectors based on the subobject type we're initializing and the (unstructured) initializer list. This eliminates some malloc thrashing when parsing initializers (from 117 vector reallocations down to 0 when parsing Cocoa.h). We can't always pre-allocate the right amount of storage, since designated initializers can cause us to initialize in non-predictable patterns. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67421 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
3a45f668dfd4187637ef83ddac66efd2a34f2e56 |
21-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
InitListDesignations hasn't been used (ever). Eliminate it, and simplify the parsing and action interface for designated initializers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67415 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
5908a9293b88a3da57ae59b522275d05e1ab11e0 |
21-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
InitListDesignations hasn't been used (ever). Eliminate it, and simplify the parsing and action interface for designated initializers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67415 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
46970ed35b8989a3c1b787beab82125493ccbd1a |
20-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Eliminate post-diagnostic hooks. Instead, implement a Sema-specific variant of DiagnosticBuilder that emits the template instantiation backtrace when needed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67413 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaTemplateInstantiate.cpp
|
25a88bbf042317976f0d9cbfa87dfe89426e8393 |
20-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Eliminate post-diagnostic hooks. Instead, implement a Sema-specific variant of DiagnosticBuilder that emits the template instantiation backtrace when needed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67413 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaTemplateInstantiate.cpp
|
51787c77ed35d2d402efb8bc97c3dcf09aedda89 |
20-Mar-2009 |
Ted Kremenek <kremenek@apple.com> |
Fix <rdar://problem/6704086> by allowing the format string checking in Sema to allow non-literal format strings that are variables that (a) permanently bind to a string constant and (b) whose string constants are resolvable within the same translation unit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67404 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
|
082d936a5b8323ac2c04558d8bca277a647831a3 |
20-Mar-2009 |
Ted Kremenek <kremenek@apple.com> |
Fix <rdar://problem/6704086> by allowing the format string checking in Sema to allow non-literal format strings that are variables that (a) permanently bind to a string constant and (b) whose string constants are resolvable within the same translation unit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67404 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
|
264b5cbbc23f62b556c0f62a009309dbc11c0129 |
20-Mar-2009 |
Ted Kremenek <kremenek@apple.com> |
Remove unneeded radar reference. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67394 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
9ecede735e6b180676846e95844a846ff7c251e0 |
20-Mar-2009 |
Ted Kremenek <kremenek@apple.com> |
Remove unneeded radar reference. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67394 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
f042dc6c65345b02bc7bbda6a57a4554c1135676 |
20-Mar-2009 |
Ted Kremenek <kremenek@apple.com> |
Fix <rdar://problem/6703892> by not warning about self-comparisons of enum constants. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67390 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b82dcd827495592a8748692ce4bf80402f21b8d4 |
20-Mar-2009 |
Ted Kremenek <kremenek@apple.com> |
Fix <rdar://problem/6703892> by not warning about self-comparisons of enum constants. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67390 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
cd2c52736917f6a0abc8604413e0ddfd48fbe9b1 |
20-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Allow flexible array initializers that are not surrounded by braces. We now build the appropriate fully-structured initializer list for such things. Per PR3618, verified that we're getting the right code generation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67353 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
a6457963cf7ffe71498c408dd590d9d1acb9513c |
20-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Allow flexible array initializers that are not surrounded by braces. We now build the appropriate fully-structured initializer list for such things. Per PR3618, verified that we're getting the right code generation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67353 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
3d3732e278ed7586870606c96175e43d6326e2cc |
19-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Variables marked as "extern" can actually have internal linkage if there is a previous declaration marked "static". This fixes PR3645. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67336 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
5ef122e9449a86e4a6466ea07ed7f5ba5f6a48bc |
19-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Variables marked as "extern" can actually have internal linkage if there is a previous declaration marked "static". This fixes PR3645. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67336 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
6768427a4451c176c0c5b9b2e478ff61dd94e5ee |
19-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Add a clarifying comment about HasPrototype's computation git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67316 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d874def0f9003cb8582e97452345b2a3a4a18b6d |
19-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Add a clarifying comment about HasPrototype's computation git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67316 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
854f400bbf3e9da263581199211d0f178577996d |
19-Mar-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
When looking for property name (or getter method) in a dot-syntax expression after earching the list of protocols in the qualified-id, must keep searching the protocol list of each of the protocols in the list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67314 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
2ce1be03e25eed3f5bf7762367b7cdb7221b0a51 |
19-Mar-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
When looking for property name (or getter method) in a dot-syntax expression after earching the list of protocols in the qualified-id, must keep searching the protocol list of each of the protocols in the list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67314 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
2527a0749d1d55f0dc5df7aea78b1abdb96557f1 |
19-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
If a function is declared as, e.g., F f; where F is a typedef of a function type, then the function "f" has a prototype. This is a slight tweak to Chris's suggested fix in PR3817. Fixes PR3817 and PR3840. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67313 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
13d7a32774c51af4c314c9d1fa6229d0e1d099da |
19-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
If a function is declared as, e.g., F f; where F is a typedef of a function type, then the function "f" has a prototype. This is a slight tweak to Chris's suggested fix in PR3817. Fixes PR3817 and PR3840. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67313 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
47bde7c68e2935358db5cffa7d6a3986bb5bcec8 |
19-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Introduce a new expression type, UnresolvedDeclRefExpr, that describes dependent qualified-ids such as Fibonacci<N - 1>::value where N is a template parameter. These references are "unresolved" because the name is dependent and, therefore, cannot be resolved to a declaration node (as we would do for a DeclRefExpr or QualifiedDeclRefExpr). UnresolvedDeclRefExprs instantiate to DeclRefExprs, QualifiedDeclRefExprs, etc. Also, be a bit more careful about keeping only a single set of specializations for a class template, and instantiating from the definition of that template rather than a previous declaration. In general, we need a better solution for this for all TagDecls, because it's too easy to accidentally look at a declaration that isn't the definition. We can now process a simple Fibonacci computation described as a template metaprogram. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67308 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaDecl.cpp
emaExpr.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
|
5953d8b37f92f0cf548941f617c9b0a7703df33b |
19-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Introduce a new expression type, UnresolvedDeclRefExpr, that describes dependent qualified-ids such as Fibonacci<N - 1>::value where N is a template parameter. These references are "unresolved" because the name is dependent and, therefore, cannot be resolved to a declaration node (as we would do for a DeclRefExpr or QualifiedDeclRefExpr). UnresolvedDeclRefExprs instantiate to DeclRefExprs, QualifiedDeclRefExprs, etc. Also, be a bit more careful about keeping only a single set of specializations for a class template, and instantiating from the definition of that template rather than a previous declaration. In general, we need a better solution for this for all TagDecls, because it's too easy to accidentally look at a declaration that isn't the definition. We can now process a simple Fibonacci computation described as a template metaprogram. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67308 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaDecl.cpp
emaExpr.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
|
7e50826d3559f284eee6659f0aa159c68f504b34 |
19-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Generalize printing of nested-name-specifier sequences for use in both QualifiedNameType and QualifiedDeclRefExpr. We now keep track of the exact nested-name-specifier spelling for a QualifiedDeclRefExpr, and use that spelling when printing ASTs. This fixes PR3493. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67283 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
bad351822117eaf280081494e3dbe4a06c0dbfcf |
19-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Generalize printing of nested-name-specifier sequences for use in both QualifiedNameType and QualifiedDeclRefExpr. We now keep track of the exact nested-name-specifier spelling for a QualifiedDeclRefExpr, and use that spelling when printing ASTs. This fixes PR3493. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67283 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
8c795a1c478fc18ab94ecbed3ca203b819d95eb1 |
19-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Extend the use of QualifiedNameType to the creation of class template specialization names. This way, we keep track of sugared types like std::vector<Real> I believe we are now using QualifiedNameTypes everywhere we can. Next step: QualifiedDeclRefExprs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67268 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplate.cpp
emaType.cpp
|
e6258936178b4c52b43b3b9dbec13552961cd645 |
19-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Extend the use of QualifiedNameType to the creation of class template specialization names. This way, we keep track of sugared types like std::vector<Real> I believe we are now using QualifiedNameTypes everywhere we can. Next step: QualifiedDeclRefExprs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67268 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplate.cpp
emaType.cpp
|
734b4baa8e7677d03085a3d3716fa550fb40be63 |
19-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Introduce a representation for types that we referred to via a qualified name, e.g., foo::x so that we retain the nested-name-specifier as written in the source code and can reproduce that qualified name when printing the types back (e.g., in diagnostics). This is PR3493, which won't be complete until finished the other tasks mentioned near the end of this commit. The parser's representation of nested-name-specifiers, CXXScopeSpec, is now a bit fatter, because it needs to contain the scopes that precede each '::' and keep track of whether the global scoping operator '::' was at the beginning. For example, we need to keep track of the leading '::', 'foo', and 'bar' in ::foo::bar::x The Action's CXXScopeTy * is no longer a DeclContext *. It's now the opaque version of the new NestedNameSpecifier, which contains a single component of a nested-name-specifier (either a DeclContext * or a Type *, bitmangled). The new sugar type QualifiedNameType composes a sequence of NestedNameSpecifiers with a representation of the type we're actually referring to. At present, we only build QualifiedNameType nodes within Sema::getTypeName. This will be extended to other type-constructing actions (e.g., ActOnClassTemplateId). Also on the way: QualifiedDeclRefExprs will also store a sequence of NestedNameSpecifiers, so that we can print out the property nested-name-specifier. I expect to also use this for handling dependent names like Fibonacci<I - 1>::value. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67265 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaLookup.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaType.cpp
|
e4e5b054b4917f0ee493bb2fda5b1ec749bfb9a1 |
19-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Introduce a representation for types that we referred to via a qualified name, e.g., foo::x so that we retain the nested-name-specifier as written in the source code and can reproduce that qualified name when printing the types back (e.g., in diagnostics). This is PR3493, which won't be complete until finished the other tasks mentioned near the end of this commit. The parser's representation of nested-name-specifiers, CXXScopeSpec, is now a bit fatter, because it needs to contain the scopes that precede each '::' and keep track of whether the global scoping operator '::' was at the beginning. For example, we need to keep track of the leading '::', 'foo', and 'bar' in ::foo::bar::x The Action's CXXScopeTy * is no longer a DeclContext *. It's now the opaque version of the new NestedNameSpecifier, which contains a single component of a nested-name-specifier (either a DeclContext * or a Type *, bitmangled). The new sugar type QualifiedNameType composes a sequence of NestedNameSpecifiers with a representation of the type we're actually referring to. At present, we only build QualifiedNameType nodes within Sema::getTypeName. This will be extended to other type-constructing actions (e.g., ActOnClassTemplateId). Also on the way: QualifiedDeclRefExprs will also store a sequence of NestedNameSpecifiers, so that we can print out the property nested-name-specifier. I expect to also use this for handling dependent names like Fibonacci<I - 1>::value. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67265 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaLookup.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaType.cpp
|
f4df7dad5fc8058f6c7c9a008b38790b2dd6001d |
19-Mar-2009 |
Gabor Greif <ggreif@gmail.com> |
Use the instantiated expressions to build the ConditionalOperator. This addresses the second part of review feedback. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67259 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
eb26eea4cfb9c9b121bdd7d678d8670689819ae0 |
19-Mar-2009 |
Gabor Greif <ggreif@gmail.com> |
Use the instantiated expressions to build the ConditionalOperator. This addresses the second part of review feedback. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67259 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
2c7de6dabb766d0ab8350090fc9afc18743378de |
18-Mar-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
objc: Implemented variables declared in class interface whose sema decl is at the translation unit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67249 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
38e24c782c17b6058bf61d635747bbde19fb1bc7 |
18-Mar-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
objc: Implemented variables declared in class interface whose sema decl is at the translation unit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67249 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
f85b8eaa15764b741b04e86691cfb50db4b8243d |
18-Mar-2009 |
Gabor Greif <ggreif@gmail.com> |
incorporate review comment (about the optimization when we have a non-typedependent expression) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67226 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
299e829512641ef07e996db626994c281f22e2de |
18-Mar-2009 |
Gabor Greif <ggreif@gmail.com> |
incorporate review comment (about the optimization when we have a non-typedependent expression) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67226 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
6c24c7f967aeb8d95f1db3a02f3faccd8cf3d7f2 |
18-Mar-2009 |
Gabor Greif <ggreif@gmail.com> |
simplify logic, isInvalid check is redundant git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67216 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
9c3b3d0987ecbe9efb16e07e81d96667d8702fae |
18-Mar-2009 |
Gabor Greif <ggreif@gmail.com> |
simplify logic, isInvalid check is redundant git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67216 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
1ba365c56a004d308dd4cb97275c9691e457f75e |
18-Mar-2009 |
Mike Stump <mrs@apple.com> |
Be sure to not add weak import, if we are ignoring it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67214 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
1c90f4dc686ab872013544664c797604a309c563 |
18-Mar-2009 |
Mike Stump <mrs@apple.com> |
Be sure to not add weak import, if we are ignoring it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67214 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
874a016f1df559512bab79496b0c4cc166144de0 |
18-Mar-2009 |
Mike Stump <mrs@apple.com> |
Ignore weak import on properties. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67205 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
862a2c55c45ffcb0fa3dfa6b8d3dee8d30e305cf |
18-Mar-2009 |
Mike Stump <mrs@apple.com> |
Ignore weak import on properties. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67205 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
76368bbd3f5a8433a863798727e41af9afbf598d |
18-Mar-2009 |
Gabor Greif <ggreif@gmail.com> |
cleanup instantiation code, tighten testcase git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67148 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
6c473c8ce72634b0ee07fb06ad6392317bf94ae3 |
18-Mar-2009 |
Gabor Greif <ggreif@gmail.com> |
cleanup instantiation code, tighten testcase git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67148 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
8a0659c213ac62a4dcaa7d25c7c3825212bc763d |
18-Mar-2009 |
Gabor Greif <ggreif@gmail.com> |
instantiate ?: expressions git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67145 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
087edcfb1d6dcb500675cac1636dca2219cb2b75 |
18-Mar-2009 |
Gabor Greif <ggreif@gmail.com> |
instantiate ?: expressions git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67145 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
253fc4d146d4815c9a4ef15a7196edb2e7831865 |
18-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
The scope representation can now be either a DeclContext pointer or a Type pointer. This allows our nested-name-specifiers to retain more information about the actual spelling (e.g., which typedef did the user name, or what exact template arguments were used in the template-id?). It will also allow us to have dependent nested-name-specifiers that don't map to any DeclContext. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67140 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaLookup.cpp
emaTemplate.cpp
emaType.cpp
|
ca5e77fefc4ac06aa787d7e777957ba6b7a03c60 |
18-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
The scope representation can now be either a DeclContext pointer or a Type pointer. This allows our nested-name-specifiers to retain more information about the actual spelling (e.g., which typedef did the user name, or what exact template arguments were used in the template-id?). It will also allow us to have dependent nested-name-specifiers that don't map to any DeclContext. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67140 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaLookup.cpp
emaTemplate.cpp
emaType.cpp
|
4a424a1a25133e8f3eb92c242ad062d84d888301 |
18-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
pull a nested conditional + comment out into its own variable, no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67128 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
0d48bf9eb5eee5b75b413098c84b5170ca84a62e |
18-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
pull a nested conditional + comment out into its own variable, no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67128 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
1925278b252f9d2674f59271558d8e2aa775458e |
18-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
don't crash when sentinel attribute is used on function without a prototype, discovered as part of PR3817 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67127 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
897cd90fef4cd5139999585f3af31d85c2d07720 |
18-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
don't crash when sentinel attribute is used on function without a prototype, discovered as part of PR3817 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67127 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
1b39ef49e647e821486916cafab07d641277c054 |
17-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Refactor instantiation of declarations within a template into a much cleaner visitor framework. Added a visitor for declarations, which is quite similar to the visitor for statatements. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67104 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
ema.h
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
8dbc2694424b4e842b1d5ea39744a137b58600c3 |
17-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Refactor instantiation of declarations within a template into a much cleaner visitor framework. Added a visitor for declarations, which is quite similar to the visitor for statatements. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67104 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
ema.h
emaTemplateInstantiate.cpp
emaTemplateInstantiateDecl.cpp
|
3ae974b9372804f1e5f4911a1c70c8af8e4be2ae |
17-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement instantiation of enums within class templates. This isn't quite as great as it sounds, because, while we can refer to the enumerator values outside the template, e.g., adder<long, 3, 4>::value we can't yet refer to them with dependent names, so no Fibonacci (yet). InstantiateClassTemplateSpecialization is getting messy; next commit will put it into a less-ugly state. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67092 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplateInstantiate.cpp
|
879fd49f99742e61965f7fefecf1f3b4ba90e197 |
17-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement instantiation of enums within class templates. This isn't quite as great as it sounds, because, while we can refer to the enumerator values outside the template, e.g., adder<long, 3, 4>::value we can't yet refer to them with dependent names, so no Fibonacci (yet). InstantiateClassTemplateSpecialization is getting messy; next commit will put it into a less-ugly state. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67092 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplateInstantiate.cpp
|
121bcadc867a0a4e01777840cb5bbaebae1f0d66 |
17-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Handle ImplicitCastExprs when instantiating templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67063 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
0cde0a39feaecf6f9ccc7d4326f8fa23e5c58e54 |
17-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Handle ImplicitCastExprs when instantiating templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67063 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
3b27cc7179cf4809e88a0c6a426fe50a515c8ecf |
17-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix a problem noticed by Anders, where we were creating IntegerLiterals during instantiation when we should be creating either a boolean literal (CXXBoolLiteralExpr) or a character literal (CharacterLiteral). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67061 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
1ac02dcb60177c1c1b36526323be76a57efcc468 |
17-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Fix a problem noticed by Anders, where we were creating IntegerLiterals during instantiation when we should be creating either a boolean literal (CXXBoolLiteralExpr) or a character literal (CharacterLiteral). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67061 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
ce6fff0486d0e15bc969fb0e3e4850c0784e997f |
17-Mar-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Almost complete implementation of rvalue references. One bug, and a few unclear areas. Maybe Doug can shed some light on some of the fixmes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67059 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExprCXX.cpp
emaInit.cpp
emaNamedCast.cpp
emaOverload.cpp
emaTemplateInstantiate.cpp
emaType.cpp
|
7c80bd64032e610c0dbd74fc0ef6ea334447f2fd |
17-Mar-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Almost complete implementation of rvalue references. One bug, and a few unclear areas. Maybe Doug can shed some light on some of the fixmes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67059 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExprCXX.cpp
emaInit.cpp
emaNamedCast.cpp
emaOverload.cpp
emaTemplateInstantiate.cpp
emaType.cpp
|
026a2ef889178bbf6707465b73909aa38aaf7e6b |
17-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Build system changes to use TableGen to generate the various diagnostics. This builds on the patch that Sebastian committed and then revert. Major differences are: - We don't remove or use the current ".def" files. Instead, for now, we just make sure that we're building the ".inc" files. - Fixed CMake makefiles to run TableGen and build the ".inc" files when needed. Tested with both the Xcode and Makefile generators provided by CMake, so it should be solid. - Fixed normal makefiles to handle out-of-source builds that involve the ".inc" files. I'll send a separate patch to the list with Sebastian's changes that eliminate the use of the .def files. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67058 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
akefile
|
a393e9eedcc28b25f521a4feceb3b56e3d0d360f |
17-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Build system changes to use TableGen to generate the various diagnostics. This builds on the patch that Sebastian committed and then revert. Major differences are: - We don't remove or use the current ".def" files. Instead, for now, we just make sure that we're building the ".inc" files. - Fixed CMake makefiles to run TableGen and build the ".inc" files when needed. Tested with both the Xcode and Makefile generators provided by CMake, so it should be solid. - Fixed normal makefiles to handle out-of-source builds that involve the ".inc" files. I'll send a separate patch to the list with Sebastian's changes that eliminate the use of the .def files. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67058 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
akefile
|
d9e643a52419672489e2883366f6ed6b5b34c63b |
16-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Check signedness of bitfield sizes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67045 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f257b619059e05906c4d93f3dc134857f818f44c |
16-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Check signedness of bitfield sizes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67045 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
149f27887f8ddeb8e9b7fc784b927e2b3a850808 |
15-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
(Hopefully) instantiate dependent array types correctly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67032 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
76b1c842c3932d3f83b3abf999dd9622e3e5fb12 |
15-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
(Hopefully) instantiate dependent array types correctly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67032 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
c45057a4b1aae40e5b63424444cb2615a1bc4399 |
15-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Handle static_asserts when instantiating structs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67031 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaTemplateInstantiate.cpp
|
94b15fbc3a10cdfb1639528a8a773b66a1e7cd9e |
15-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Handle static_asserts when instantiating structs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67031 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaTemplateInstantiate.cpp
|
7f2e7440faa9260d23fcbc0a0368d10f9538b462 |
15-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Add the ability to clone integer and string literals. Use it when instantiating template expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67030 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateInstantiate.cpp
|
a135fb43eb94524a6529768596a4533eed9aa70d |
15-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Add the ability to clone integer and string literals. Use it when instantiating template expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67030 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateInstantiate.cpp
|
76bb8ec9aab1ccfcf2b5665ce7e8ed9e591ad143 |
15-Mar-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Convert a bunch of actions to smart pointers, and also bring PrintParserCallbacks a bit more in line with reality. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67029 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaNamedCast.cpp
emaTemplateInstantiate.cpp
|
f53597fb16142bdb4a66901f8c0b768db4f2a548 |
15-Mar-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Convert a bunch of actions to smart pointers, and also bring PrintParserCallbacks a bit more in line with reality. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67029 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaNamedCast.cpp
emaTemplateInstantiate.cpp
|
365e972d70f16aedb9d17a23d08cc28bda00196d |
15-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix bitfield-instantiation ownership bug noticed by Anders git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67028 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
3e287c2a53e88d583fa2e0cafc33dbb49772db05 |
15-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Fix bitfield-instantiation ownership bug noticed by Anders git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67028 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
0f4942b00c33c338c12bd8a22d022e3682613f75 |
15-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Make sure to release the expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67027 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
77d81422f8db885bbe4740eb90debf4248478890 |
15-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Make sure to release the expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67027 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
8b842c59fa60cb49daa0bdf07b591b80ff32ad96 |
14-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Handle dependent types/exprs in static_assert expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66997 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
c3082413e4207173b32c118e922d63149df6261f |
14-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Handle dependent types/exprs in static_assert expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66997 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
ed69156f9911f1107f284a0b62bdc62295979867 |
14-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
More static_assert work. Check that the assert expr is valid and show an error if it's false. Create the declaration and add it to the current context. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66995 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
fb311762bb52dc015c02cb257d2913f104b556f8 |
14-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
More static_assert work. Check that the assert expr is valid and show an error if it's false. Create the declaration and add it to the current context. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66995 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
afc86944eda447fb5bb71ab1a664e594b712f8c7 |
14-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Check for overflow and signedness problems with template arguments. Eliminates a FIXME. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66993 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
f80a9d5c2ccc465211178223799217f7a42774ae |
14-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Check for overflow and signedness problems with template arguments. Eliminates a FIXME. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66993 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
7c568a445f1fa9278ff887e4a5ffd19ad05ee0f7 |
14-Mar-2009 |
Ted Kremenek <kremenek@apple.com> |
Make Selector::getIdentifierInfo() private. I took a first attempt at this last week in: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20090302/013580.html That patch caused the output of the diagnostics to change. Since 'DeclarationName' can already reason about Selectors and the Diagnostics logic reasons about DeclarationName, there is no additional code needed to get the diagnostics working by making Selector::getIdentifierInfo() private. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66992 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
8af2c16571f3aade6d47ce81fa3857d01d375719 |
14-Mar-2009 |
Ted Kremenek <kremenek@apple.com> |
Make Selector::getIdentifierInfo() private. I took a first attempt at this last week in: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20090302/013580.html That patch caused the output of the diagnostics to change. Since 'DeclarationName' can already reason about Selectors and the Diagnostics logic reasons about DeclarationName, there is no additional code needed to get the diagnostics working by making Selector::getIdentifierInfo() private. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66992 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
544cda6467e24d0ced693fbb52f800405de610e7 |
14-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Make sure that the canonical representation of integral template arguments uses the bitwidth and signedness of the template parameter git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66990 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
5b0f752655cc94b970113235110b56a722eb40d4 |
14-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Make sure that the canonical representation of integral template arguments uses the bitwidth and signedness of the template parameter git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66990 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
c78182dea4396fba411d2526a1386ca994eee6c0 |
14-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement template instantiation for the prefix unary operators. As always, refactored the existing logic to tease apart the parser action and the semantic analysis shared by the parser and template instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66987 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaOverload.cpp
emaTemplateInstantiate.cpp
|
bc736fceca6f0bca31d16003a7587857190408fb |
14-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement template instantiation for the prefix unary operators. As always, refactored the existing logic to tease apart the parser action and the semantic analysis shared by the parser and template instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66987 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaOverload.cpp
emaTemplateInstantiate.cpp
|
396f114b5e704ed6d0ca7f89caf377322f287ead |
13-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement template instantiation for several more kinds of expressions: - C++ function casts, e.g., T(foo) - sizeof(), alignof() More importantly, this allows us to verify that we're performing overload resolution during template instantiation, with argument-dependent lookup and the "cached" results of name lookup from the template definition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66947 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprCXX.cpp
emaLookup.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
|
ba49817c5b9f502602672861cf369fd0e53966e8 |
13-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement template instantiation for several more kinds of expressions: - C++ function casts, e.g., T(foo) - sizeof(), alignof() More importantly, this allows us to verify that we're performing overload resolution during template instantiation, with argument-dependent lookup and the "cached" results of name lookup from the template definition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66947 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprCXX.cpp
emaLookup.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
|
b242a08f27033408abd9e154230166d1c892a781 |
13-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Remove an already-fixed FIXME git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66924 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
1d65fa7918a7762ac285e65985badd2bdf6678e9 |
13-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Remove an already-fixed FIXME git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66924 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
00fe3f63604d2be2fafbf42fe5df0795d7d29116 |
13-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Refactor the way we handle operator overloading and template instantiation for binary operators. This change moves most of the operator-overloading code from the parser action ActOnBinOp to a new, parser-independent semantic checking routine CreateOverloadedBinOp. Of particular importance is the fact that CreateOverloadedBinOp does *not* perform any name lookup based on the current parsing context (it doesn't take a Scope*), since it has to be usable during template instantiation, when there is no scope information. Rather, it takes a pre-computed set of functions that are visible from the context or via argument-dependent lookup, and adds to that set any member operators and built-in operator candidates. The set of functions is computed in the parser action ActOnBinOp based on the current context (both operator name lookup and argument-dependent lookup). Within a template, the set computed by ActOnBinOp is saved within the type-dependent AST node and is augmented with the results of argument-dependent name lookup at instantiation time (see TemplateExprInstantiator::VisitCXXOperatorCallExpr). Sadly, we can't fully test this yet. I'll follow up with template instantiation for sizeof so that the real fun can begin. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66923 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaOverload.cpp
emaTemplateInstantiate.cpp
|
063daf6e196c51f162e0485478355d8e280eef5c |
13-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Refactor the way we handle operator overloading and template instantiation for binary operators. This change moves most of the operator-overloading code from the parser action ActOnBinOp to a new, parser-independent semantic checking routine CreateOverloadedBinOp. Of particular importance is the fact that CreateOverloadedBinOp does *not* perform any name lookup based on the current parsing context (it doesn't take a Scope*), since it has to be usable during template instantiation, when there is no scope information. Rather, it takes a pre-computed set of functions that are visible from the context or via argument-dependent lookup, and adds to that set any member operators and built-in operator candidates. The set of functions is computed in the parser action ActOnBinOp based on the current context (both operator name lookup and argument-dependent lookup). Within a template, the set computed by ActOnBinOp is saved within the type-dependent AST node and is augmented with the results of argument-dependent name lookup at instantiation time (see TemplateExprInstantiator::VisitCXXOperatorCallExpr). Sadly, we can't fully test this yet. I'll follow up with template instantiation for sizeof so that the real fun can begin. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66923 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaOverload.cpp
emaTemplateInstantiate.cpp
|
1e3eedb7a8ef93f39107d9da4a5bba25899ab50d |
13-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
introduce a new -fheinous-gnu-extensions flag that enables really really horrible extensions that are disabled by default but that can be accepted by -fheinous-gnu-extensions (but which always emit a warning when enabled). As our first instance of this, implement PR3788/PR3794, which allows non-lvalues in inline asms in contexts where lvalues are required. bleh. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66910 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
810f6d5d6223adaab0ccf0139f40de6484ad1bb5 |
13-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
introduce a new -fheinous-gnu-extensions flag that enables really really horrible extensions that are disabled by default but that can be accepted by -fheinous-gnu-extensions (but which always emit a warning when enabled). As our first instance of this, implement PR3788/PR3794, which allows non-lvalues in inline asms in contexts where lvalues are required. bleh. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66910 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
494cb0fa1fd613f3dff87a25ab47049f1d9201f9 |
13-Mar-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6675489> BlockDecl should not use llvm::smallvector. Also changed BlockDecl API to be more consistent (wrt FunctionDecl). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66904 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e78b809bbcd92928a63da81f2cd843faad3e4dfd |
13-Mar-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6675489> BlockDecl should not use llvm::smallvector. Also changed BlockDecl API to be more consistent (wrt FunctionDecl). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66904 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ff9ecaffe7be6bf4465c19ee5b0b4835add6166d |
13-Mar-2009 |
Steve Naroff <snaroff@apple.com> |
Reimplement fix for <rdar://problem/6451399> problems with labels and blocks. This solution is much simpler (and doesn't add any per-scope overhead, which concerned Chris). The only downside is the LabelMap is now declared in two places (Sema and BlockSemaInfo). My original fix tried to unify the LabelMap in "Scope" (which would support nested functions in general). In any event, this fixes the bug given the current language definition. If/when we decide to support GCC style nested functions, this will need to be tweaked. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66896 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaStmt.cpp
|
d8eb456289a81728f9aac77ac0a4db0ea9cc231a |
13-Mar-2009 |
Steve Naroff <snaroff@apple.com> |
Reimplement fix for <rdar://problem/6451399> problems with labels and blocks. This solution is much simpler (and doesn't add any per-scope overhead, which concerned Chris). The only downside is the LabelMap is now declared in two places (Sema and BlockSemaInfo). My original fix tried to unify the LabelMap in "Scope" (which would support nested functions in general). In any event, this fixes the bug given the current language definition. If/when we decide to support GCC style nested functions, this will need to be tweaked. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66896 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaStmt.cpp
|
b88d81c0e720bd43335c2776841fa7597c3ca66d |
13-Mar-2009 |
Steve Naroff <snaroff@apple.com> |
Remove ActiveScope (revert http://llvm.org/viewvc/llvm-project?view=rev&revision=65694 and http://llvm.org/viewvc/llvm-project?view=rev&revision=66741). Will replace with something better today... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66893 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaStmt.cpp
|
caaacecb2b64e6d2e402533baffda4cb540f4145 |
13-Mar-2009 |
Steve Naroff <snaroff@apple.com> |
Remove ActiveScope (revert http://llvm.org/viewvc/llvm-project?view=rev&revision=65694 and http://llvm.org/viewvc/llvm-project?view=rev&revision=66741). Will replace with something better today... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66893 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaStmt.cpp
|
3fc092fead94ef6753b163765fce8219cfa3b8b8 |
13-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve the representation of operator expressions like "x + y" within C++ templates. In particular, keep track of the overloaded operators that are visible from the template definition, so that they can be merged with those operators visible via argument-dependent lookup at instantiation time. Refactored the lookup routines for argument-dependent lookup and for operator name lookup, so they can be called without immediately adding the results to an overload set. Instantiation of these expressions is completely wrong. I'll work on that next. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66851 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaLookup.cpp
emaOverload.cpp
emaTemplateInstantiate.cpp
|
3fd95ce225393fe4a3623e429766a8c3f487ff9d |
13-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Improve the representation of operator expressions like "x + y" within C++ templates. In particular, keep track of the overloaded operators that are visible from the template definition, so that they can be merged with those operators visible via argument-dependent lookup at instantiation time. Refactored the lookup routines for argument-dependent lookup and for operator name lookup, so they can be called without immediately adding the results to an overload set. Instantiation of these expressions is completely wrong. I'll work on that next. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66851 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaLookup.cpp
emaOverload.cpp
emaTemplateInstantiate.cpp
|
535f3128251761f07f24aec0cc21f1a6d0240a51 |
12-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Eliminate some unused default cases in switches on the binary operator kind git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66837 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
baf534875ed0a55c6342636ff3f4602b8ac22b69 |
12-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Eliminate some unused default cases in switches on the binary operator kind git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66837 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
5b5b669715b9a820c1a10cb4fbfa017f10854006 |
12-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement template instantiation for builtin binary operators git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66835 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplateInstantiate.cpp
|
df0325110bb07ab62b808c8db8be2f6eee9b3476 |
12-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement template instantiation for builtin binary operators git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66835 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplateInstantiate.cpp
|
63f5d6002bbb0d6b594e320c5522ac03cfb1b6e8 |
12-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Store the type of the integral value within a TemplateArgument, so that we can more efficiently reconstruct an IntegerLiteral from it during template instantiation git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66833 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateInstantiate.cpp
|
c971f8694661776ecdec2ccc33fbe0333eeaf191 |
12-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Store the type of the integral value within a TemplateArgument, so that we can more efficiently reconstruct an IntegerLiteral from it during template instantiation git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66833 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
emaTemplateInstantiate.cpp
|
95ba1285f8e6e161f171f7fce558d3cff983666c |
12-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Use StmtVisitor to handle the decoding of expressions for instantiation. This is roughly the structure we want to expression instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66816 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
313a81dd820c9b2c0203bdcd974c781a81e4f0cf |
12-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Use StmtVisitor to handle the decoding of expressions for instantiation. This is roughly the structure we want to expression instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66816 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
309160771eaf06afd1159cc299a2d462924bd040 |
12-Mar-2009 |
Ted Kremenek <kremenek@apple.com> |
API fix: All "bodies" for functions, Objective-C methods, blocks, are assumed to be CompoundStmts. I think this is a valid assumption, and felt that the API should reflect it. Others please validate this assumption to make sure I didn't break anything. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66814 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
eaab20669b6a9910a5deb0110fdd8f7581d86a36 |
12-Mar-2009 |
Ted Kremenek <kremenek@apple.com> |
API fix: All "bodies" for functions, Objective-C methods, blocks, are assumed to be CompoundStmts. I think this is a valid assumption, and felt that the API should reflect it. Others please validate this assumption to make sure I didn't break anything. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66814 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
bd30031a95c6c0f7e2ef760eb3c7856f7f1916a6 |
12-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Straw man for instantiation of expressions. Use it to instantiate the width of bitfields. I'll be burning this down and replacing it with a properly-dispatched implementation like the one used for types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66796 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateInstantiate.cpp
|
a0e500db61f5fcf3ff6de6af1494f0cea9f6f8db |
12-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Straw man for instantiation of expressions. Use it to instantiate the width of bitfields. I'll be burning this down and replacing it with a properly-dispatched implementation like the one used for types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66796 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateInstantiate.cpp
|
c1408eab9269f8e174bf72b4c6793ff79ec3173d |
12-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Properly restore ActiveScope when we exit parsing of a block. This should fix the largest problem in <rdar://problem/6669847>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66741 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
4a471aa85d9539421e5cff11a24dd01f000c760a |
12-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Properly restore ActiveScope when we exit parsing of a block. This should fix the largest problem in <rdar://problem/6669847>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66741 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
8c4ecbc17014d6782ae8d808c5dae6b4ac5f9ab7 |
12-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix various problems with matching out-of-line definitions of static class members to the corresponding in-class declaration. Diagnose the erroneous use of 'static' on out-of-line definitions of class members. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66740 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
656de633acefb7ced01a4b573dbd4f70b4300097 |
12-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Fix various problems with matching out-of-line definitions of static class members to the corresponding in-class declaration. Diagnose the erroneous use of 'static' on out-of-line definitions of class members. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66740 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
8f53bb70407ca1f3f4d769b7a1bc2eb7a2592c6e |
12-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Move most of the checking from ActOnCXXMemberDeclarator to other, more general routines. This is a step toward separating the checking logic from Declarators, which in turn is required for template instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66734 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
021c3b372c58f5423b4fa2a5be6933d1c7ecc663 |
12-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Move most of the checking from ActOnCXXMemberDeclarator to other, more general routines. This is a step toward separating the checking logic from Declarators, which in turn is required for template instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66734 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
2f0ecef758239e25d7aba53dc2f93b3f75af51e6 |
11-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Make sure that we set the access specifier for an instantiated FieldDecl, and that the aggregate and POD flags for an instantiated class template are updated based on instantiation of a FieldDecl git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66701 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaTemplateInstantiate.cpp
|
4dd55f511d1fba732f2968f430ce999fc8293896 |
11-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Make sure that we set the access specifier for an instantiated FieldDecl, and that the aggregate and POD flags for an instantiated class template are updated based on instantiation of a FieldDecl git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66701 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaTemplateInstantiate.cpp
|
26561a01cea14e8e768bd616fe764dd8e8727154 |
11-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Eliminate CXXClassMemberWrapper git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66698 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
ff7fea809bab2badd0cb241703b14ac20ac258cb |
11-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Eliminate CXXClassMemberWrapper git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66698 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
006605882f997a37ee104cd5f30d0b523ef32d44 |
11-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Eliminate CXXClassVarDecl. It doesn't add anything git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66696 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
|
2d2e9cfdc1dbb6e4a22f8c0b1abcd30437e3795d |
11-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Eliminate CXXClassVarDecl. It doesn't add anything git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66696 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
|
6f9e59f4c8f690eb72f1e0f178389f2ed78205f9 |
11-Mar-2009 |
Steve Naroff <snaroff@apple.com> |
Implement FIXME related to <rdar://problem/6496506> Implement class setter/getter for properties. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66689 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
335c6808aabff7cb043ea02b72754fd580ce9712 |
11-Mar-2009 |
Steve Naroff <snaroff@apple.com> |
Implement FIXME related to <rdar://problem/6496506> Implement class setter/getter for properties. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66689 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
0e518af1dd811e427394b66efe3f488c7c4394b4 |
11-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement basic template instantiation for fields. Reshuffle checking for FieldDecls so that the parser and the template instantiation make use of the same semantic checking module. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66685 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaTemplateInstantiate.cpp
|
3cf538d5c49bbebac1afa6f4a5010e3d877440bb |
11-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement basic template instantiation for fields. Reshuffle checking for FieldDecls so that the parser and the template instantiation make use of the same semantic checking module. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66685 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaTemplateInstantiate.cpp
|
6e7c27cbc6917fcf9507e9d68d051c5c01275484 |
11-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Add basic, hackish support for instantiation of typedefs in a class template. More importantly, start to sort out the issues regarding complete types and nested-name-specifiers, especially the question of: when do we instantiate a class template specialization that occurs to the left of a '::' in a nested-name-specifier? git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66662 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaDecl.cpp
emaExpr.cpp
emaLookup.cpp
emaTemplateInstantiate.cpp
|
4fdf1faedbca40787fd277a6fbd5061fd69b2708 |
11-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Add basic, hackish support for instantiation of typedefs in a class template. More importantly, start to sort out the issues regarding complete types and nested-name-specifiers, especially the question of: when do we instantiate a class template specialization that occurs to the left of a '::' in a nested-name-specifier? git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66662 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaDecl.cpp
emaExpr.cpp
emaLookup.cpp
emaTemplateInstantiate.cpp
|
d6bceef6e3b5841404ef86eb74951f87f760ca8b |
11-Mar-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6655054> clang issues bogus error on property usage in a dot-syntax. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66659 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
f178728e8cb972a8a8923ba75b4ef7367b641626 |
11-Mar-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6655054> clang issues bogus error on property usage in a dot-syntax. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66659 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
dede0c9a8cbcb2a10a2dd72be04fbd754acd8fed |
11-Mar-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6578665> user declared setter method should be used when using property syntx. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66658 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
1ca6694b5b37470ac736737a26da09b088a18d5d |
11-Mar-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6578665> user declared setter method should be used when using property syntx. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66658 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
c0da38d31b153df641a2f8aab21c49777a9273a2 |
11-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
position the caret properly on asm string diagnostics, e.g.: Sema/asm.c:64:9: error: invalid % escape in inline assembly string asm("%!" : ); // expected-error {{invalid % escape in inline assembly string}} ~~^~ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66606 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
2ff0f42a962fec5a6300b5986297b417db173e6a |
11-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
position the caret properly on asm string diagnostics, e.g.: Sema/asm.c:64:9: error: invalid % escape in inline assembly string asm("%!" : ); // expected-error {{invalid % escape in inline assembly string}} ~~^~ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66606 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
2f728b2144bb3e5cfc3b954a95b17f8da81d1448 |
11-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Add type checking for tentative definitions at the end of the translation unit. Thread the various declarations of variables via VarDecl::getPreviousDeclaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66601 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
|
275a369f003f25bd22c00c1c0fc0251c7208caf4 |
11-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Add type checking for tentative definitions at the end of the translation unit. Thread the various declarations of variables via VarDecl::getPreviousDeclaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66601 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
|
c516473346d49d9613d2931fc3caa64e52a5d17c |
11-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
add plumbing to report diagnostics back through sema for malformed asmstrings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66598 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
fb5058ef67c054296c88db18ab1b3717845cb71d |
11-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
add plumbing to report diagnostics back through sema for malformed asmstrings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66598 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
3dc4b328691ee88e21849f5a8cf9a47989bc9315 |
10-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Partial fix for PR3310, concerning type-checking for tentative definitions. We were rejecting tentative definitions of incomplete (which is bad), and now we don't. This fix is partial because we don't do the end-of-translation-unit initialization for tentative definitions that don't ever have any initializers specified. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66584 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
a03aca82de5259846d4ef38db11b8116398d2222 |
10-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Partial fix for PR3310, concerning type-checking for tentative definitions. We were rejecting tentative definitions of incomplete (which is bad), and now we don't. This fix is partial because we don't do the end-of-translation-unit initialization for tentative definitions that don't ever have any initializers specified. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66584 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
56d25a726f0bdb4db08021b9e98782ada5241eaf |
10-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Extend the notion of active template instantiations to include the context of a template-id for which we need to instantiate default template arguments. In the TextDiagnosticPrinter, don't suppress the caret diagnostic if we are producing a non-note diagnostic that follows a note diagnostic with the same location, because notes are (conceptually) a part of the warning or error that comes before them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66572 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaTemplateInstantiate.cpp
|
df667e71b1daadeacb230cf94fc717843f1a138a |
10-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Extend the notion of active template instantiations to include the context of a template-id for which we need to instantiate default template arguments. In the TextDiagnosticPrinter, don't suppress the caret diagnostic if we are producing a non-note diagnostic that follows a note diagnostic with the same location, because notes are (conceptually) a part of the warning or error that comes before them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66572 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaTemplateInstantiate.cpp
|
d9572a1c8864013c2c929175693a4eb8a51dd972 |
10-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
If we run into multiple errors within the same template instantiation, only print the template instantiation backtrace for the first error. Also, if a base class has failed to type-check during instantiation, just drop that base class and continue on to check other base classes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66563 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateInstantiate.cpp
|
27b152fa7443f4e24630b997c07def6b0c23925a |
10-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
If we run into multiple errors within the same template instantiation, only print the template instantiation backtrace for the first error. Also, if a base class has failed to type-check during instantiation, just drop that base class and continue on to check other base classes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66563 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateInstantiate.cpp
|
043857897d48206826fd57f10060d7e9eee0657c |
10-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Add pretty-printing for class template specializations, e.g., 'struct A<double, int>' In the "template instantiation depth exceeded" message, print "-ftemplate-depth-N" rather than "-ftemplate-depth=N". An unnamed tag type that is declared with a typedef, e.g., typedef struct { int x, y; } Point; can be used as a template argument. Allow this, and check that we get sensible pretty-printing for such things. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66560 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
98137534e612c274ba270af99d73429043957e53 |
10-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Add pretty-printing for class template specializations, e.g., 'struct A<double, int>' In the "template instantiation depth exceeded" message, print "-ftemplate-depth-N" rather than "-ftemplate-depth=N". An unnamed tag type that is declared with a typedef, e.g., typedef struct { int x, y; } Point; can be used as a template argument. Allow this, and check that we get sensible pretty-printing for such things. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66560 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
fee85d6b7303d9a7ac28836141ded2fcf9bd07a9 |
10-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Add a notion of "post-diagnostic hooks", which are callbacks attached to a diagnostic that will be invoked after the diagnostic (if it is not suppressed). The hooks are allowed to produce additional diagnostics (typically notes) that provide more information. We should be able to use this to help diagnostic clients link notes back to the diagnostic they clarify. Comments welcome; I'll write up documentation and convert other clients (e.g., overload resolution failures) if there are no screams of protest. As the first client of post-diagnostic hooks, we now produce a template instantiation backtrace when a failure occurs during template instantiation. There's still more work to do to make this output pretty, if that's even possible. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66557 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateInstantiate.cpp
|
ee1828a6b5ae1bc4ea300e48f3840ac1ec5be295 |
10-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Add a notion of "post-diagnostic hooks", which are callbacks attached to a diagnostic that will be invoked after the diagnostic (if it is not suppressed). The hooks are allowed to produce additional diagnostics (typically notes) that provide more information. We should be able to use this to help diagnostic clients link notes back to the diagnostic they clarify. Comments welcome; I'll write up documentation and convert other clients (e.g., overload resolution failures) if there are no screams of protest. As the first client of post-diagnostic hooks, we now produce a template instantiation backtrace when a failure occurs during template instantiation. There's still more work to do to make this output pretty, if that's even possible. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66557 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateInstantiate.cpp
|
a60a4005a980c01741cb5b01b8b904b51b54fa59 |
10-Mar-2009 |
Steve Naroff <snaroff@apple.com> |
Simplify SelectorTable::constructSetterName() usage... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66551 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprObjC.cpp
|
fdc92b7877535e6264fe43cfbdc8f01e9b224f81 |
10-Mar-2009 |
Steve Naroff <snaroff@apple.com> |
Simplify SelectorTable::constructSetterName() usage... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66551 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprObjC.cpp
|
fdaed4c5837a0e7e66e063705a5b8c1e57fbca34 |
10-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Address Doug's comments wrt the mangler and fix Eli's test case git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66549 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
4843e584b54460973b8445d38907bab0401ebb0c |
10-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Address Doug's comments wrt the mangler and fix Eli's test case git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66549 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
375733c3941a6107c2c2c971a0fbf1a8dd7f8d0d |
10-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Limit the template instantiation depth to some user-configurable value (default: 99). Beyond this limit, produce an error and consider the current template instantiation a failure. The stack we're building to track the instantiations will, eventually, be used to produce instantiation backtraces from diagnostics within template instantiation. However, we're not quite there yet. This adds a new Clang driver option -ftemplate-depth=NNN, which should eventually be generated from the GCC command-line operation -ftemplate-depth-NNN (note the '-' rather than the '='!). I did not make the driver changes to do this mapping. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66513 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaTemplateInstantiate.cpp
|
26dce44534602660ea9f4152bffc5436fc5fe3b2 |
10-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Limit the template instantiation depth to some user-configurable value (default: 99). Beyond this limit, produce an error and consider the current template instantiation a failure. The stack we're building to track the instantiations will, eventually, be used to produce instantiation backtraces from diagnostics within template instantiation. However, we're not quite there yet. This adds a new Clang driver option -ftemplate-depth=NNN, which should eventually be generated from the GCC command-line operation -ftemplate-depth-NNN (note the '-' rather than the '='!). I did not make the driver changes to do this mapping. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66513 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaTemplateInstantiate.cpp
|
f9ff4b14cfc4ee2c4e43dbb71242aa85446ecc2a |
10-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement template instantiation for ClassTemplateSpecializationTypes, such as replacing 'T' in vector<T>. There are a few aspects to this: - Extend TemplateArgument to allow arbitrary expressions (an Expr*), and switch ClassTemplateSpecializationType to store TemplateArguments rather than it's own type-or-expression representation. - ClassTemplateSpecializationType can now store dependent types. In that case, the canonical type is another ClassTemplateSpecializationType (with default template arguments expanded) rather than a declaration (we don't build Decls for dependent types). - Split ActOnClassTemplateId into ActOnClassTemplateId (called from the parser) and CheckClassTemplateId (called from ActOnClassTemplateId and InstantiateType). They're smart enough to handle dependent types, now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66509 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
|
40808ce6ac04b102c3b56244a635d6b98eed6d97 |
10-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement template instantiation for ClassTemplateSpecializationTypes, such as replacing 'T' in vector<T>. There are a few aspects to this: - Extend TemplateArgument to allow arbitrary expressions (an Expr*), and switch ClassTemplateSpecializationType to store TemplateArguments rather than it's own type-or-expression representation. - ClassTemplateSpecializationType can now store dependent types. In that case, the canonical type is another ClassTemplateSpecializationType (with default template arguments expanded) rather than a declaration (we don't build Decls for dependent types). - Split ActOnClassTemplateId into ActOnClassTemplateId (called from the parser) and CheckClassTemplateId (called from ActOnClassTemplateId and InstantiateType). They're smart enough to handle dependent types, now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66509 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
|
8ccad8aaaa92ac2e92df235a78e03acbfeae07e8 |
09-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
Fix PR3766, a really nasty silent miscompilation case where we emitted a warning and then threw away the AST. While I'm in there, tighten up the code to actually reject completely bogus cases (sending a message to a struct). We still allow sending a message to an int, which doesn't make sense but GCC allows it and is easy to support. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66468 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
0c73f37f0a48a1512bc0477a71f0d6cffcb78fc0 |
09-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
Fix PR3766, a really nasty silent miscompilation case where we emitted a warning and then threw away the AST. While I'm in there, tighten up the code to actually reject completely bogus cases (sending a message to a struct). We still allow sending a message to an int, which doesn't make sense but GCC allows it and is easy to support. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66468 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
73ec9325c26807fae7e2d7271229cf5ba37d547c |
09-Mar-2009 |
Steve Naroff <snaroff@apple.com> |
Implement property '.' notation on Factory/Class objects. Parser changes aren't very pretty:-( This fixes <rdar://problem/6496506> Implement class setter/getter for properties. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66465 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprObjC.cpp
|
61f72cbd037e58f12cfe90cd442373f44092f030 |
09-Mar-2009 |
Steve Naroff <snaroff@apple.com> |
Implement property '.' notation on Factory/Class objects. Parser changes aren't very pretty:-( This fixes <rdar://problem/6496506> Implement class setter/getter for properties. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66465 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprObjC.cpp
|
448fcd3ef60a19c539f30f23238f4db387571d5b |
09-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Revert r66423, which was not the right fix for this issue. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66431 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
8d21721fe9672a6742ad5430f48ea3aa4518528a |
09-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Revert r66423, which was not the right fix for this issue. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66431 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
6aaae51a0350fc7ae6a7ed76d59c952be507f73a |
09-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix a little FIXME, thanks to Sebastian git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66423 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
b964c1d84bdbad2ebdfce7081a619fbfe276b5f4 |
09-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Fix a little FIXME, thanks to Sebastian git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66423 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
8b90e8e67d992bd23631e684be0ebc692da06f64 |
09-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Mark a non-type template parameter invalid if there was a problem with its type git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66422 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
ceef30c9baef888dbf2cc2b3efc67c276f1fd815 |
09-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Mark a non-type template parameter invalid if there was a problem with its type git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66422 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
c84d8932d3aa17fdc92933d7ed550c7bdff3d050 |
09-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Rename DiagnoseIncompleteType to RequireCompleteType, and update the documentation to reflect the fact that we can instantiate templates here git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66421 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaNamedCast.cpp
emaType.cpp
|
86447ec25fa34aa3c2f48ebc49ec09bc1f03f002 |
09-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Rename DiagnoseIncompleteType to RequireCompleteType, and update the documentation to reflect the fact that we can instantiate templates here git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66421 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaNamedCast.cpp
emaType.cpp
|
f1e5d4aa0076eea0aa1719439f7bf6f79492b63f |
09-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
do not warn about -=/=- confusion with macros, thanks to rdogra for a testcase. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66416 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
3e87209798bcc3fe39254c1b700b0c8251623b98 |
09-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
do not warn about -=/=- confusion with macros, thanks to rdogra for a testcase. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66416 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
4e479f95909a4edc651fbecc3100d138d26fa5e9 |
08-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
implement PR3753, warning about comparisons with a string literal. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66387 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
55660a74897bf42111a8ae61c1f617645e5a9274 |
08-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
implement PR3753, warning about comparisons with a string literal. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66387 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
d8213ec7732c25df29c2cf74e06b55c1add172e6 |
08-Mar-2009 |
Steve Naroff <snaroff@apple.com> |
Remove dead clause (we decided not to support protocol qualified 'Class'). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66385 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
64949d3a2ef5e4e38d4ec4dc9e980085c09ae01a |
08-Mar-2009 |
Steve Naroff <snaroff@apple.com> |
Remove dead clause (we decided not to support protocol qualified 'Class'). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66385 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
9d8dc2b5c50f38d00da080c8e67a84301f90a23f |
08-Mar-2009 |
Steve Naroff <snaroff@apple.com> |
Improvements to private method lookup. Patch by Jean-Daniel Dupas. Thanks! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66383 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprObjC.cpp
|
5609ec04ed9a4fd58c3203d210cf32e9283feb5e |
08-Mar-2009 |
Steve Naroff <snaroff@apple.com> |
Improvements to private method lookup. Patch by Jean-Daniel Dupas. Thanks! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66383 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprObjC.cpp
|
55a17246d8d061ec346e7fd20a991e2b9ebbfc8c |
08-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
refine the "use of unary operator that may be intended as compound assignment (+=)" warning to only trigger when there is whitespace or something else after the + as suggested by Eli. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66370 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
399bd1bc2b801ad85e4575e2401bb43919fcbee8 |
08-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
refine the "use of unary operator that may be intended as compound assignment (+=)" warning to only trigger when there is whitespace or something else after the + as suggested by Eli. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66370 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
9cc59542e9852e097b6563c46ceda2c734f0a3e6 |
07-Mar-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Some struct/class mismatch fixes, to silence MSVC warnings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66335 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
|
43af76e845c95be160c088ec11ba3c43e2527fa8 |
07-Mar-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Some struct/class mismatch fixes, to silence MSVC warnings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66335 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
|
fe7a4d335b3e6c627769a95d9a63c78129cf47e6 |
07-Mar-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Don't discard increment/decrement on function pointers. It's kind of difficult to come up with a testcase because the code generation for this construct is broken. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66325 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
25a30d0c3337a4f7bd1fb585e2becc6736e806fa |
07-Mar-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Don't discard increment/decrement on function pointers. It's kind of difficult to come up with a testcase because the code generation for this construct is broken. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66325 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
8be6f744bc18836256beffedd2440a67b6a229c2 |
07-Mar-2009 |
Ted Kremenek <kremenek@apple.com> |
Revert my last couple patches until I can get them to not make the tests fail. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66317 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
d42ffbd22fc7eb61321f6a88173ee424991f01c6 |
07-Mar-2009 |
Ted Kremenek <kremenek@apple.com> |
Revert my last couple patches until I can get them to not make the tests fail. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66317 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
a732e852da1662171989ebccaa025bc3170efa8e |
07-Mar-2009 |
Ted Kremenek <kremenek@apple.com> |
Teach Diagnostic about Selector. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66314 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
b9eb3afc9eafbb1c6815c8b63633065f370be6a5 |
07-Mar-2009 |
Ted Kremenek <kremenek@apple.com> |
Teach Diagnostic about Selector. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66314 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
a05c34b7b0c4c529ac9349c28cd0996d384ba8c3 |
07-Mar-2009 |
Ted Kremenek <kremenek@apple.com> |
Selector: (changes made after discussing this more with Steve Naroff) - Make Selector::getAsIdentifierInfo() private. Using IdentifierInfo* in Selector is an implementation detail that clients shouldn't think about. - Modify diagnostic emission in Sema::ProcessPropertyDecl to not use Selector::getAsIdentifierInfo() (which could crash when IdentifierInfo* is null) and instead use Selector::getAsString(). - Tidy up Selector::getAsString() implementation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66313 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
150ec292a6e7995a711cedbe7a10a25d664a6c6b |
07-Mar-2009 |
Ted Kremenek <kremenek@apple.com> |
Selector: (changes made after discussing this more with Steve Naroff) - Make Selector::getAsIdentifierInfo() private. Using IdentifierInfo* in Selector is an implementation detail that clients shouldn't think about. - Modify diagnostic emission in Sema::ProcessPropertyDecl to not use Selector::getAsIdentifierInfo() (which could crash when IdentifierInfo* is null) and instead use Selector::getAsString(). - Tidy up Selector::getAsString() implementation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66313 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
df4ae57a422ec2e608718336a4ba78655796d3df |
07-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Downgrade complaints about the use of variable-sized types within a struct to an extension warning to match the behavior of GNU C, which addresses the Sema part of PR3671. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66308 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
e4f3e069e5e43d466954989dd7509ed371914bd0 |
07-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Downgrade complaints about the use of variable-sized types within a struct to an extension warning to match the behavior of GNU C, which addresses the Sema part of PR3671. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66308 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
95818139d5e8ae2b98a8b53b3852f45b76cc37e7 |
07-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Use the 'declaration does not declare anything' error when we see an anonymous struct/union declaration outside of a struct or union in C git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66303 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
a71c129fb8052a143cbf548963a8db2150b0078e |
07-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Use the 'declaration does not declare anything' error when we see an anonymous struct/union declaration outside of a struct or union in C git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66303 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
6a83969807530ebdb24ed97917eb644a4e724b14 |
06-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement GNU C semantics for K&R function definitions that follow a prototype of the same function, where the promoted parameter types in the K&R definition are not compatible with the types in the prototype. Fixes PR2821. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66301 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
c837656ca6d2a5b434923d7e2fd11d3a3c3bfa74 |
06-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement GNU C semantics for K&R function definitions that follow a prototype of the same function, where the promoted parameter types in the K&R definition are not compatible with the types in the prototype. Fixes PR2821. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66301 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
5997d89f4346d27633c35cb82fcc0e0f9157b422 |
06-Mar-2009 |
Daniel Dunbar <daniel@zuster.org> |
Handle #pragma pack(0). I left this out of diagnostic because users should really use pack() instead. - <rdar://problem/6650243> clang warns about '#pragma pack(0)' git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66287 91177308-0d34-0410-b5e6-96231b3b80d8
emaAttr.cpp
|
79cd11620c6f05dbf7bb706744eba354574e8b54 |
06-Mar-2009 |
Daniel Dunbar <daniel@zuster.org> |
Handle #pragma pack(0). I left this out of diagnostic because users should really use pack() instead. - <rdar://problem/6650243> clang warns about '#pragma pack(0)' git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66287 91177308-0d34-0410-b5e6-96231b3b80d8
emaAttr.cpp
|
195492c6255addeac6fa546243b5fc08c8efcb95 |
06-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve recovery from ill-formed scope specifiers. Fixes PR3670. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66286 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
9fa14a547881e7abbe1edcdb92e6d3084be8d8bc |
06-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Improve recovery from ill-formed scope specifiers. Fixes PR3670. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66286 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
dfd78349aaacaa77299c9b48134f7d8ba28ca4f6 |
06-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement the GNU semantics for forward declarations of enum types in C and C++. Fixes PR3688. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66282 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
80711a22fa06b734a68d719ac85d4e443a51cb09 |
06-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement the GNU semantics for forward declarations of enum types in C and C++. Fixes PR3688. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66282 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
42e4139c17210534e71cf72b9a7a2f8b5a972fd4 |
06-Mar-2009 |
Daniel Dunbar <daniel@zuster.org> |
Add Parse/Sema support for weak_import attribute. - Also, diagnose weak applied to types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66259 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
6e775dbafba2ab6634decc489eb3b4301b4b506b |
06-Mar-2009 |
Daniel Dunbar <daniel@zuster.org> |
Add Parse/Sema support for weak_import attribute. - Also, diagnose weak applied to types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66259 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
2e9eb0477039797d8c3bb2e651a0e044a24d3576 |
06-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
add source range for type of super cast, giving something like: SemaObjC/call-super-2.m:78:29: error: cannot cast 'super' (it isn't an expression) return [(Object <Func> *)super instance_func0]; ~~~~~~~~~~~~~~~~~^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66215 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e6ee6bab61ab61eeceb3572bd5a9f85a9424eb9f |
06-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
add source range for type of super cast, giving something like: SemaObjC/call-super-2.m:78:29: error: cannot cast 'super' (it isn't an expression) return [(Object <Func> *)super instance_func0]; ~~~~~~~~~~~~~~~~~^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66215 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e384c18821df5e086d453463236b5b66454e7a28 |
06-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
more minor simplifications. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66214 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
6f8ce146b52eace27f33bf6e0788f4be4f104404 |
06-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
more minor simplifications. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66214 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
432780cf116423246d49f5f08384fb4a96d7a2a7 |
06-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
refactor C++ bitfield checking a bit (haha) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66213 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
8b963ef99be6235f1e9fe866180fff7dbbe5e85b |
06-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
refactor C++ bitfield checking a bit (haha) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66213 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
9cffefc74e12b59d4148d0d875ef29386f328a59 |
05-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
fix PR3607 and a fixme, by checking bitfield constraints more consistently. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66210 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
247936605913c718f4141f845aec6cb6e169fb37 |
05-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
fix PR3607 and a fixme, by checking bitfield constraints more consistently. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66210 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
e3aa06fb6298a0b7f5e42cc59671a22c990e42a1 |
05-Mar-2009 |
Steve Naroff <snaroff@apple.com> |
Partial fix <rdar://problem/6301205> [irgen] dot-syntax on super isn't supported. Tweak Sema::ActOnMemberReferenceExpr() and Sema::ActOnDeclarationNameExpr() to handle "super." notation for Class methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66185 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
dd53eb55b2467d38ce4857b979589347d5e3732c |
05-Mar-2009 |
Steve Naroff <snaroff@apple.com> |
Partial fix <rdar://problem/6301205> [irgen] dot-syntax on super isn't supported. Tweak Sema::ActOnMemberReferenceExpr() and Sema::ActOnDeclarationNameExpr() to handle "super." notation for Class methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66185 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
f16c1def93371cb18a92150ec666ceed34096b00 |
05-Mar-2009 |
Steve Naroff <snaroff@apple.com> |
Tweak diag for <rdar://problem/5982579> [clang on xcode] (using arch=x86_64): synthesized property 'sdkPath' must either be named the same as a compatible ivar or must explicitly name an ivar. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66162 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
fbffca65a95e26b198c084a81a33b9cdfcd01101 |
05-Mar-2009 |
Steve Naroff <snaroff@apple.com> |
Tweak diag for <rdar://problem/5982579> [clang on xcode] (using arch=x86_64): synthesized property 'sdkPath' must either be named the same as a compatible ivar or must explicitly name an ivar. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66162 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
fe56a63075f2a8407d61a8766e52ab822841a629 |
05-Mar-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6144382> [sema] gcc inconsistency w.r.t. forward protocol declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66161 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
61d6852f67b4416bb96f1613c1aa589c8cbc17db |
05-Mar-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6144382> [sema] gcc inconsistency w.r.t. forward protocol declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66161 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
d042d0f0e2c699e6ea045c34d564974c6416b01e |
05-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
When parsing a function body, add it to the crash stack, giving us something like: Stack dump: 0. t.c:5:10: in compound statement ('{}') 1. t.c:3:12: in compound statement ('{}') 2. t.c:3:12: parsing function body 'foo' 3. clang t.c Abort git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66118 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
21ff9c99d3df1e4a13e6820fc2aa7a8cc6673198 |
05-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
When parsing a function body, add it to the crash stack, giving us something like: Stack dump: 0. t.c:5:10: in compound statement ('{}') 1. t.c:3:12: in compound statement ('{}') 2. t.c:3:12: parsing function body 'foo' 3. clang t.c Abort git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66118 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
da15cbd8bc67a6cc399e7104fc8ee1142401d5b2 |
05-Mar-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Removed an unfortunate cut and paste left-over. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66099 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
e61b988febb3409c294d2ec6b6f931f6f08f67b3 |
05-Mar-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Removed an unfortunate cut and paste left-over. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66099 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
0cc2ac1a06a920ac92d88f0376a0f379277792a6 |
04-Mar-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Implemented access check for ivars accessed inside c-style functions declared inside objc @implementations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66087 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
a6e3ac514c924879699c6b0b1201028f0091044f |
04-Mar-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Implemented access check for ivars accessed inside c-style functions declared inside objc @implementations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66087 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
f96065763cd39674635dc75b2441e5391ded8f94 |
04-Mar-2009 |
Steve Naroff <snaroff@apple.com> |
Partial fix for <rdar://problem/6645157> [clang on Xcode; regression]: error: instance variable 'someField' is private. A recent regression caused by http://llvm.org/viewvc/llvm-project?rev=65912&view=rev. This commit isn't fully baked. Nevertheless, it should cause Xcode to compile again. Will speak with Fariborz offline. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66045 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b06d875594361dd384d2b08c5ab7f10cfdac0f6b |
04-Mar-2009 |
Steve Naroff <snaroff@apple.com> |
Partial fix for <rdar://problem/6645157> [clang on Xcode; regression]: error: instance variable 'someField' is private. A recent regression caused by http://llvm.org/viewvc/llvm-project?rev=65912&view=rev. This commit isn't fully baked. Nevertheless, it should cause Xcode to compile again. Will speak with Fariborz offline. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66045 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
271f9068c4194a18bddc87dac830040a2a1f1c8d |
04-Mar-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Some refactoring of recent code. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66041 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprObjC.cpp
|
175ba1e8180083927aabd7cc8137baa16be75646 |
04-Mar-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Some refactoring of recent code. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66041 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprObjC.cpp
|
cb3a77b0d59997cea67b254ecf23f0c8c7a122b8 |
04-Mar-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Fix a corner case of message lookup looking for class methods. If all else failed, find the message in class's root's list of instacne methods! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66040 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
b1006c7f5647025541b1b1cc64a196a417e6c6ac |
04-Mar-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Fix a corner case of message lookup looking for class methods. If all else failed, find the message in class's root's list of instacne methods! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66040 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
ff6c8029fd774de17d64b83fa522955fe00015dd |
04-Mar-2009 |
Steve Naroff <snaroff@apple.com> |
Finish up some fixes related to <rdar://problem/6497631> Message lookup is sometimes different than gcc's. - Disallow casting 'super'. GCC allows this, however it doesn't make sense (super isn't an expression and the cast won't alter lookup/dispatch). - Tighten up lookup when messaging 'self'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66033 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprObjC.cpp
|
6b9dfd4257b85c388a9e3cd345cf28acb7351006 |
04-Mar-2009 |
Steve Naroff <snaroff@apple.com> |
Finish up some fixes related to <rdar://problem/6497631> Message lookup is sometimes different than gcc's. - Disallow casting 'super'. GCC allows this, however it doesn't make sense (super isn't an expression and the cast won't alter lookup/dispatch). - Tighten up lookup when messaging 'self'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66033 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprObjC.cpp
|
c003cb20921831dbee63d498475975d54353870e |
04-Mar-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Check that the return type for function definitions is complete. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66027 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
7f0f5dce3adcfce88d5c9a0ad0146a33c01a1e8f |
04-Mar-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Check that the return type for function definitions is complete. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66027 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
16ded577897389958dd317b6c743b046ecad77fd |
04-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
Switch attributes to be allocated from the declcontext bump pointer just like decls. This reduces the number of calls to malloc on cocoa.h with pth and -disable-free from 15958 to 12444 times (down ~3500). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66023 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
emaDecl.cpp
emaDeclAttr.cpp
|
0b2b6e1cb1573bb295c0a65813dc4df8d57f305b |
04-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
Switch attributes to be allocated from the declcontext bump pointer just like decls. This reduces the number of calls to malloc on cocoa.h with pth and -disable-free from 15958 to 12444 times (down ~3500). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66023 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
emaDecl.cpp
emaDeclAttr.cpp
|
0fc6d64bb2d40359557cf2ba7dc1c19aeb39ca02 |
04-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
add an a Attr::Destroy method and force clients to go through it. As part of this, make DeclBase::Destroy destroy attributes instead of the DeclBase dtor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66020 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
cc5814732edc0c382d0136ab57ec6149566043e2 |
04-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
add an a Attr::Destroy method and force clients to go through it. As part of this, make DeclBase::Destroy destroy attributes instead of the DeclBase dtor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66020 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
c13b27faee8e444716e90d34ee450c9111454cda |
04-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
simplify Sema::AddInstanceMethodToGlobalPool, no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66016 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
b25df3577cf0560592599609fba7b8ff7557ce84 |
04-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
simplify Sema::AddInstanceMethodToGlobalPool, no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66016 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
daac694b37c04664d2626d708c1faf3458cf4fce |
04-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
Change Parser::ParseCaseStatement to use an iterative approach to parsing multiple sequential case statements instead of doing it with recursion. This fixes a problem where we run out of stack space parsing 100K directly nested cases. There are a couple other problems that prevent this from being useful in practice (right now the example only parses correctly with -disable-free and doesn't work with -emit-llvm), but this is a start. I'm not including a testcase because it is large and uninteresting for regtesting. Sebastian, I would appreciate it if you could scrutinize the smart pointer gymnastics I do. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66011 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaStmt.cpp
|
24e1e707b4c362f18e371e2bbf054a8345b57bfa |
04-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
Change Parser::ParseCaseStatement to use an iterative approach to parsing multiple sequential case statements instead of doing it with recursion. This fixes a problem where we run out of stack space parsing 100K directly nested cases. There are a couple other problems that prevent this from being useful in practice (right now the example only parses correctly with -disable-free and doesn't work with -emit-llvm), but this is a start. I'm not including a testcase because it is large and uninteresting for regtesting. Sebastian, I would appreciate it if you could scrutinize the smart pointer gymnastics I do. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66011 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaStmt.cpp
|
e54d4eb6ca0d137b7f8a5c6978c5e6425eb619dc |
04-Mar-2009 |
Steve Naroff <snaroff@apple.com> |
Change a warning to an error... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65978 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
d198abae5938262e501a409e833bf01ca8b8253e |
04-Mar-2009 |
Steve Naroff <snaroff@apple.com> |
Change a warning to an error... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65978 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
ba0041b18b99fc8deb1f98292ff0fd8db65a5995 |
03-Mar-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Implement an important missing warning when a selector is searched for in the global pool. It already uncovered a clang bug in message selection. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65974 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
268bc8c1f3a27d2fbd73c3115e4d633d31422ca5 |
03-Mar-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Implement an important missing warning when a selector is searched for in the global pool. It already uncovered a clang bug in message selection. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65974 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
92aeef3b1841e66096878422358fb1934744fda8 |
03-Mar-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/5982579> [clang on xcode] (using arch=x86_64): synthesized property 'sdkPath' must either be named the same as a compatible ivar or must explicitly name an ivar. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65973 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
f4c00ffdfdaacf0e3f664e5b535191a9efa1443a |
03-Mar-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/5982579> [clang on xcode] (using arch=x86_64): synthesized property 'sdkPath' must either be named the same as a compatible ivar or must explicitly name an ivar. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65973 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
30db0042513e2bdd3690e6491ac855fe1ee7d9d2 |
03-Mar-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6252237> [sema] qualified id should be disallowed in @catch statements. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65969 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
9d40ee50f8a013e5253101648092cf0daa76c335 |
03-Mar-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6252237> [sema] qualified id should be disallowed in @catch statements. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65969 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
45c237da51b90936307eefdd5a276649800c9995 |
03-Mar-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6632061> [sema] non object types should not be allowed in @catch statements. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65968 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
f50cb369273c6bd26c9629df92ee53f1d8af4149 |
03-Mar-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6632061> [sema] non object types should not be allowed in @catch statements. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65968 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
0e8b96abd2515a746cefe47cbc92feacc8c5b841 |
03-Mar-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6640991> Exception handling executes wrong clause (Daniel, please verify). Also necessary to fix: <rdar://problem/6632061> [sema] non object types should not be allowed in @catch statements <rdar://problem/6252237> [sema] qualified id should be disallowed in @catch statements git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65964 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaStmt.cpp
|
7ba138abd329e591a8f6d5001f60dd7082f71b3b |
03-Mar-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6640991> Exception handling executes wrong clause (Daniel, please verify). Also necessary to fix: <rdar://problem/6632061> [sema] non object types should not be allowed in @catch statements <rdar://problem/6252237> [sema] qualified id should be disallowed in @catch statements git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65964 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaStmt.cpp
|
2567c9e9d0b0a12f1e8436a9d7b895877569f9be |
03-Mar-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6497242> Inherited overridden protocol declared objects don't work. Change Sema::DiagnosePropertyMismatch() to check for type compatibility (rather than type equivalence, which is too strict). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65949 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
emaExprObjC.cpp
|
15edf0de6b5bc9ae227bcc9658a157ac30efd92e |
03-Mar-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6497242> Inherited overridden protocol declared objects don't work. Change Sema::DiagnosePropertyMismatch() to check for type compatibility (rather than type equivalence, which is too strict). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65949 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
emaExprObjC.cpp
|
58d0d6f5e9f0bfcc00a756946c5898a7e028c558 |
03-Mar-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6497608> clang does not catch ivar type mismatches in @implementation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65948 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
ca33129bb28b05938c3e6c9f8a66165b5cceb4dd |
03-Mar-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6497608> clang does not catch ivar type mismatches in @implementation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65948 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
29fa426c91e71397f45daf6fd1b166f8f1a6517e |
03-Mar-2009 |
Eli Friedman <eli.friedman@gmail.com> |
PR3691: Add support for complex modes. I also tossed in support for XF while I was at it. There are still a lot of diagnostics missing from this code, and it isn't completely correct for anything other than x86, but it should work correctly on x86 for valid cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65935 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
73397496fec250f565f49e27f8ba79f94f4e7427 |
03-Mar-2009 |
Eli Friedman <eli.friedman@gmail.com> |
PR3691: Add support for complex modes. I also tossed in support for XF while I was at it. There are still a lot of diagnostics missing from this code, and it isn't completely correct for anything other than x86, but it should work correctly on x86 for valid cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65935 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
ed3a398adc9a7745c2acc3fa0ad4a906149ef2de |
03-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement the basics of implicit instantiation of class templates, in response to attempts to diagnose an "incomplete" type. This will force us to use DiagnoseIncompleteType more regularly (rather than looking at isIncompleteType), but that's also a good thing. Implicit instantiation is still very simplistic, and will create a new definition for the class template specialization (as it should) but it only actually instantiates the base classes and attaches those. Actually instantiating class members will follow. Also, instantiate the types of non-type template parameters before checking them, allowing, e.g., template<typename T, T Value> struct Constant; to work properly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65924 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaType.cpp
|
2943aed177b33ae3f14273b11a7b398e5276ec62 |
03-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement the basics of implicit instantiation of class templates, in response to attempts to diagnose an "incomplete" type. This will force us to use DiagnoseIncompleteType more regularly (rather than looking at isIncompleteType), but that's also a good thing. Implicit instantiation is still very simplistic, and will create a new definition for the class template specialization (as it should) but it only actually instantiates the base classes and attaches those. Actually instantiating class members will follow. Also, instantiate the types of non-type template parameters before checking them, allowing, e.g., template<typename T, T Value> struct Constant; to work properly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65924 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaType.cpp
|
dd71e75bc6811906b458ee93b18a350fa758b00e |
03-Mar-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Check of ivar access access control. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65912 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
935fd768f95edc21f03c6c61f8b48ee99ff8bab6 |
03-Mar-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Check of ivar access access control. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65912 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
5fc6a6efe0d012d0ac69c7a3c6eadf59292d8119 |
03-Mar-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6635908> crash on invalid git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65909 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
c97fb9a394ce2cc5e664fcb472e93553528378ad |
03-Mar-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6635908> crash on invalid git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65909 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
67502dbd17bc68146a47cbb1db745d047bafac8a |
02-Mar-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Diagnose a variety of access of ivars when they conflict with local or global variables in instance/class methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65879 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
077c1e7377edeef3438ba59cd8151177868b62d4 |
02-Mar-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Diagnose a variety of access of ivars when they conflict with local or global variables in instance/class methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65879 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
38a1accf357c391e571b58cec7a682392e9bebb2 |
02-Mar-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Fixed a typo. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65855 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
78c39c76103a36e37a05b1e40da93850ea64647b |
02-Mar-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Fixed a typo. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65855 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
ffb688254e3bc636c0af9425aa846bbfb5c6ee0c |
02-Mar-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Check for duplicate declaration of method of a class in its extension. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65854 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
b7f95f5b29ea4ba4231cbcbe581502ece5033795 |
02-Mar-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Check for duplicate declaration of method of a class in its extension. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65854 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
e6b5d1d42712aaf3652b84e433c0488abe2cc193 |
02-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Rework the way we find locally-scoped external declarations when we need them to evaluate redeclarations or call a function that hasn't already been declared. We now keep a DenseMap of these locally-scoped declarations so that they are not visible but can be quickly found, e.g., when we're looking for previous declarations or before we go ahead and implicitly declare a function that's being called. Fixes PR3672. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65792 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
dentifierResolver.h
ema.h
emaDecl.cpp
emaExpr.cpp
|
6393519272ce727f4d26e71bbefb5de712274d0e |
02-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Rework the way we find locally-scoped external declarations when we need them to evaluate redeclarations or call a function that hasn't already been declared. We now keep a DenseMap of these locally-scoped declarations so that they are not visible but can be quickly found, e.g., when we're looking for previous declarations or before we go ahead and implicitly declare a function that's being called. Fixes PR3672. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65792 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
dentifierResolver.h
ema.h
emaDecl.cpp
emaExpr.cpp
|
aa3ee07f675338d1618dba1a7947a84fa5130a4c |
01-Mar-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6248764> parser rejects: bad receiver type 'CFStringRef'. Downgrade an error to a warning (for GCC compatibility). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65779 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
8e2945ad9104f0ce4928c386faf458b6b83d9060 |
01-Mar-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6248764> parser rejects: bad receiver type 'CFStringRef'. Downgrade an error to a warning (for GCC compatibility). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65779 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
ea765e10104ba45ddbbb733256fb7fde206135f4 |
01-Mar-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix PR3509 by providing correct starting locations for initializer lists git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65777 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
ed8a93d17b8936dc7978cdc37f3f00fc49d24f71 |
01-Mar-2009 |
Douglas Gregor <dgregor@apple.com> |
Fix PR3509 by providing correct starting locations for initializer lists git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65777 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
d23d9922e00dd86aab5349208a00c8ea52b556a7 |
01-Mar-2009 |
Daniel Dunbar <daniel@zuster.org> |
ObjCAtCatchStmt's ParamStmt is always a DeclStmt. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65759 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
93b2bdb866d49e3dab4623a822db281042e87382 |
01-Mar-2009 |
Daniel Dunbar <daniel@zuster.org> |
ObjCAtCatchStmt's ParamStmt is always a DeclStmt. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65759 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
7cc13bfd6c8f6b0ea1f0989fe87fc3e8428b1c8c |
01-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
"This patch uses the new ObjCImplDecl class to merge Sema::ImplMethodsVsClassMethods and Sema::ImplCategoryMethodsVsIntfMethods methods. And now, when clang check a class implementation to find unimplemented methods, it also checks all methods from the class extensions (unnamed categories). There is also a test case to check this warning. This patch contains also a minor update for ObjCImplDecl . getNameAsCString and getNameAsString now returns an empty string instead of crashing for unnamed categories." Patch by Jean-Daniel Dupas! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65744 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
cddc88800bbd1213ec70ae5153c6a7f2e380fd8d |
01-Mar-2009 |
Chris Lattner <sabre@nondot.org> |
"This patch uses the new ObjCImplDecl class to merge Sema::ImplMethodsVsClassMethods and Sema::ImplCategoryMethodsVsIntfMethods methods. And now, when clang check a class implementation to find unimplemented methods, it also checks all methods from the class extensions (unnamed categories). There is also a test case to check this warning. This patch contains also a minor update for ObjCImplDecl . getNameAsCString and getNameAsString now returns an empty string instead of crashing for unnamed categories." Patch by Jean-Daniel Dupas! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65744 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
585dcdb15fd181ac467e87bcdd034b80a16c1fb2 |
01-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Whoops, actually remove the VLA/VM check in FinalizeDeclaratorGroup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65737 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
0db28c59266808b9bf4fb72c2db80ce9f2948b74 |
01-Mar-2009 |
Anders Carlsson <andersca@mac.com> |
Whoops, actually remove the VLA/VM check in FinalizeDeclaratorGroup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65737 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
fa31d3c714bd49569c47340c2252648a38183023 |
28-Feb-2009 |
Anders Carlsson <andersca@mac.com> |
Fix invalid VLAs/VMs in Sema::ActOnVariableDeclarator, so that the variable will have the right type by the time the initializer is checked. This ensures that code like int a[(int)(1.0 / 1.0) = { 1 } will work. Eli, please review. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65725 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
1a7acfa0de7364b24599be4329d7ee2944540428 |
28-Feb-2009 |
Anders Carlsson <andersca@mac.com> |
Fix invalid VLAs/VMs in Sema::ActOnVariableDeclarator, so that the variable will have the right type by the time the initializer is checked. This ensures that code like int a[(int)(1.0 / 1.0) = { 1 } will work. Eli, please review. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65725 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
5cd38432a45b9aa6be8a7bf4ba9b78a84f57ddab |
28-Feb-2009 |
Steve Naroff <snaroff@apple.com> |
Remove PrevFunctionScope slot (it isn't needed)...use getParent() instead. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65718 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
b098c14c525894702994d5dc4b58a4283ac25c63 |
28-Feb-2009 |
Steve Naroff <snaroff@apple.com> |
Remove PrevFunctionScope slot (it isn't needed)...use getParent() instead. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65718 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
23d42f2ec2338c5d7bd74ab477f6b826c73ea1c6 |
28-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
Fix a crash in test/Parser/control-scope.c that testrunner didn't notice because it was a negative test with a fix suggested by Jean-Daniel Dupas. Convert the test from a negative to a positive test to catch stuff like this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65708 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f306f86d2b85e820f5d1f397e4441d52373823d6 |
28-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
Fix a crash in test/Parser/control-scope.c that testrunner didn't notice because it was a negative test with a fix suggested by Jean-Daniel Dupas. Convert the test from a negative to a positive test to catch stuff like this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65708 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
8df46020beb7d40a80fecedc59c8435df261ecd1 |
28-Feb-2009 |
Steve Naroff <snaroff@apple.com> |
Minor name change (move the ObjC prefix to a more appropriate place). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65695 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
ebf6443a4f493233f7e8d92b3a991848c8b1c00d |
28-Feb-2009 |
Steve Naroff <snaroff@apple.com> |
Minor name change (move the ObjC prefix to a more appropriate place). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65695 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
313c41696f1ab0f4ed13398c2f425eec421c304c |
28-Feb-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6451399> problems with labels and blocks. - Move the 'LabelMap' from Sema to Scope. To avoid layering problems, the second element is now a 'StmtTy *', which makes the LabelMap a bit more verbose to deal with. - Add 'ActiveScope' to Sema. Managed by ActOnStartOfFunctionDef(), ObjCActOnStartOfMethodDef(), ActOnBlockStmtExpr(). - Changed ActOnLabelStmt(), ActOnGotoStmt(), ActOnAddrLabel(), and ActOnFinishFunctionBody() to use the new ActiveScope. - Added FIXME to workaround in ActOnFinishFunctionBody() (for dealing with C++ nested functions). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65694 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaStmt.cpp
|
f3cf89737965352ee02026992e2dc735824e185e |
28-Feb-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6451399> problems with labels and blocks. - Move the 'LabelMap' from Sema to Scope. To avoid layering problems, the second element is now a 'StmtTy *', which makes the LabelMap a bit more verbose to deal with. - Add 'ActiveScope' to Sema. Managed by ActOnStartOfFunctionDef(), ObjCActOnStartOfMethodDef(), ActOnBlockStmtExpr(). - Changed ActOnLabelStmt(), ActOnGotoStmt(), ActOnAddrLabel(), and ActOnFinishFunctionBody() to use the new ActiveScope. - Added FIXME to workaround in ActOnFinishFunctionBody() (for dealing with C++ nested functions). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65694 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaStmt.cpp
|
ea9172926dd98489ca5f2ec814826fcbe1faef8e |
28-Feb-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Check a few more kinds of declarations that make a scope. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65680 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
709fa15defbc0208b33707b3da3a628df5a9b7b9 |
28-Feb-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Check a few more kinds of declarations that make a scope. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65680 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
9c0e6f93e60bc4cd6e43cb0cdf65bc49b1740dc3 |
28-Feb-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Start of checking for gotos which jump to an illegal destination. As far as I know, this catches all cases of jumping into the scope of a variable with a variably modified type (excluding statement expressions) in C. This is missing some stuff we probably want to check (other kinds of variably modified declarations, statement expressions, indirect gotos/addresses of labels in a scope, ObjC @try/@finally, cleanup attribute), the diagnostics aren't very good, and it's not particularly efficient, but it's a decent start. This patch is a slightly modified version of the patch I attached to PR3259, and it fixes that bug. I was sort of planning on improving it, but I think it's okay as-is, especially since it looks like CodeGen doesn't have any use for this sort of data structure. The only significant change I can think of from the version I attached to PR3259 is that this version skips running the checking code when a function doesn't contain any labels. This patch doesn't cover case statements, which also need similar checking; I'm not sure how we should deal with that. Extending the goto checking to also check case statements wouldn't be too hard; it's just a matter of keeping track of the scope of the closest switch and checking that the scope of every case is the same as the scope of the switch. That said, it would likely be a performance hit to run this check on every function (it's an extra pass over the entire function), so we probably want some other solution. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65678 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
8f17b66c8d383d458e04cada4c9e2452139b0b39 |
28-Feb-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Start of checking for gotos which jump to an illegal destination. As far as I know, this catches all cases of jumping into the scope of a variable with a variably modified type (excluding statement expressions) in C. This is missing some stuff we probably want to check (other kinds of variably modified declarations, statement expressions, indirect gotos/addresses of labels in a scope, ObjC @try/@finally, cleanup attribute), the diagnostics aren't very good, and it's not particularly efficient, but it's a decent start. This patch is a slightly modified version of the patch I attached to PR3259, and it fixes that bug. I was sort of planning on improving it, but I think it's okay as-is, especially since it looks like CodeGen doesn't have any use for this sort of data structure. The only significant change I can think of from the version I attached to PR3259 is that this version skips running the checking code when a function doesn't contain any labels. This patch doesn't cover case statements, which also need similar checking; I'm not sure how we should deal with that. Extending the goto checking to also check case statements wouldn't be too hard; it's just a matter of keeping track of the scope of the closest switch and checking that the scope of every case is the same as the scope of the switch. That said, it would likely be a performance hit to run this check on every function (it's an extra pass over the entire function), so we probably want some other solution. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65678 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
2e0475984442f3da3e8359ca453d430ba7b2b2d1 |
28-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Eliminate CXXRecordType git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65671 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaInherit.cpp
emaInherit.h
emaInit.cpp
emaLookup.cpp
emaNamedCast.cpp
emaOverload.cpp
emaTemplateInstantiate.cpp
|
c1efaecf0373f1a55c5ef4c234357cf726fc0600 |
28-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Eliminate CXXRecordType git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65671 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaInherit.cpp
emaInherit.h
emaInit.cpp
emaLookup.cpp
emaNamedCast.cpp
emaOverload.cpp
emaTemplateInstantiate.cpp
|
2f680f2b3996261bebf6aed76d9f65b30b89874d |
28-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Add a FIXME for something I can't look at just yet git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65669 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
aca13a7df407b32a6ee497a0646f83184edefb49 |
28-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Add a FIXME for something I can't look at just yet git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65669 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
c0139cac0ce30f7fd36fd739e361dd49635b325e |
28-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Template instantiation for function types git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65668 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateInstantiate.cpp
emaType.cpp
|
724651c3523e25fbf2f6cd0419bc3466e0afdb07 |
28-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Template instantiation for function types git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65668 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplateInstantiate.cpp
emaType.cpp
|
f57dcd00b6b3b9eb4e02ae699618dbb8015db950 |
28-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement template instantiation for pointer, reference, and (some) array types. Semantic checking for the construction of these types has been factored out of GetTypeForDeclarator and into separate subroutines (BuildPointerType, BuildReferenceType, BuildArrayType). We'll be doing the same thing for all other types (and declarations and expressions). As part of this, moved the type-instantiation functions into a class in an anonymous namespace. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65663 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaType.cpp
|
cd281c3ded486ced5aad29dd7c3fa22b7514c3d8 |
28-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement template instantiation for pointer, reference, and (some) array types. Semantic checking for the construction of these types has been factored out of GetTypeForDeclarator and into separate subroutines (BuildPointerType, BuildReferenceType, BuildArrayType). We'll be doing the same thing for all other types (and declarations and expressions). As part of this, moved the type-instantiation functions into a class in an anonymous namespace. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65663 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaTemplateInstantiate.cpp
emaType.cpp
|
50956e4675a87c2f9f81b6f8367146e066e8f8eb |
27-Feb-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Diagnose gc attribute mismatch of property and its ivar. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65656 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
9bc77b2423e75b9361f597d6fa7c024a53e504cd |
27-Feb-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Diagnose gc attribute mismatch of property and its ivar. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65656 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
7bde6a25122fb2e4b5bc7258349a974d10e5723d |
27-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
Give a code insertion hint for how to fix 'implicit int' warnings and errors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65653 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
173144affecc3f97b73b075c44752aff8cfcfc3a |
27-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
Give a code insertion hint for how to fix 'implicit int' warnings and errors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65653 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
f2793b041d10e391d74d08041ae1fe5c784955e0 |
27-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix a typo git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65652 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
8c633a09ec67a9bef4bebb7dcb254b2b89e680fe |
27-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Fix a typo git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65652 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplateInstantiate.cpp
|
3bdcdd86d206e652b955502f5746668f6ac727f9 |
27-Feb-2009 |
Ted Kremenek <kremenek@apple.com> |
In BuildAnonymousStructUnionMemberReference, we shouldn't invalidate OpLoc when building nested member expressions. This location is used to determine the range of the entire expression, and the expression itself already has its location inherited from its Base. This fixes <rdar://problem/6629829>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65650 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
a97b6666d2e08027e89a01ed718affbf969fad19 |
27-Feb-2009 |
Ted Kremenek <kremenek@apple.com> |
In BuildAnonymousStructUnionMemberReference, we shouldn't invalidate OpLoc when building nested member expressions. This location is used to determine the range of the entire expression, and the expression itself already has its location inherited from its Base. This fixes <rdar://problem/6629829>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65650 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
7429654ea581f10ed2ddb400efddad928bd5a051 |
27-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement the basic approach for instantiating types, with a lot of FIXME'd stubs for those types we don't yet know how to instantiate (everything that isn't a template parameter!). We now instantiate default arguments for template type parameters when needed. This will be our testbed while I fill out the remaining type-instantiation logic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65649 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
ema.h
emaTemplate.cpp
emaTemplateInstantiate.cpp
|
99ebf651f1c3fd11eb648dc8d736c192c753f2cf |
27-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement the basic approach for instantiating types, with a lot of FIXME'd stubs for those types we don't yet know how to instantiate (everything that isn't a template parameter!). We now instantiate default arguments for template type parameters when needed. This will be our testbed while I fill out the remaining type-instantiation logic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65649 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
ema.h
emaTemplate.cpp
emaTemplateInstantiate.cpp
|
bab9de8fa320b9ec4f6537006f0628d2c98d1491 |
27-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
upgrade various 'implicit int' warnings from an ext-warn to warning when not in C89 mode. This makes it enabled by default instead of only enabled with -pedantic. Clang defaults to c99 mode, so people will see this more often than with GCC, but they can always use -std=c89 if they really want c89. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65647 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
35d276f443462249b436951c1c663820569e1768 |
27-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
upgrade various 'implicit int' warnings from an ext-warn to warning when not in C89 mode. This makes it enabled by default instead of only enabled with -pedantic. Clang defaults to c99 mode, so people will see this more often than with GCC, but they can always use -std=c89 if they really want c89. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65647 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
fec9c154e7d54b43ddd35408ad0547a5fda69066 |
27-Feb-2009 |
Ted Kremenek <kremenek@apple.com> |
When checking printf-arguments for functions with '__attribute__ ((format (printf, X, Y)))' set HasVAListArg to true when 'Y' is 0 (i.e., ignore the data arguments). This fixes <rdar://problem/6623513>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65642 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
3d692df4b9c58895f9843b03543ec57447c93679 |
27-Feb-2009 |
Ted Kremenek <kremenek@apple.com> |
When checking printf-arguments for functions with '__attribute__ ((format (printf, X, Y)))' set HasVAListArg to true when 'Y' is 0 (i.e., ignore the data arguments). This fixes <rdar://problem/6623513>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65642 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
61be3601335d62fc5bd59ea89d6efff7576bf58d |
27-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Clean up and document code modification hints. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65641 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
b2fb6de9070fea9abc56c8e8d5469066e964cefe |
27-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Clean up and document code modification hints. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65641 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
342d943fa54d78948ac52237dafdba3629618f42 |
27-Feb-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Change the AST generated for offsetof a bit so that it looks like a normal expression, and change Evaluate and IRGen to evaluate it like a normal expression. This simplifies the code significantly, and fixes PR3396. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65622 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
35183aca180a2b9b2c637cd625a40a7e147d6a32 |
27-Feb-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Change the AST generated for offsetof a bit so that it looks like a normal expression, and change Evaluate and IRGen to evaluate it like a normal expression. This simplifies the code significantly, and fixes PR3396. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65622 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
a99d685b4d93012cbbc64291498256a83ccbb220 |
27-Feb-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix minor memory leak. Add comment describing what we need to do for strict constant initializer checking. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65612 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
3b8a36aea7c4d93c5f7cd772c5c9cde28647b3f0 |
27-Feb-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix minor memory leak. Add comment describing what we need to do for strict constant initializer checking. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65612 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
4fa58905062efa6a12137b1983a1367220182a20 |
27-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Create a new TypeNodes.def file that enumerates all of the types, giving them rough classifications (normal types, never-canonical types, always-dependent types, abstract type representations) and making it far easier to make sure that we've hit all of the cases when decoding types. Switched some switch() statements on the type class over to using this mechanism, and filtering out those things we don't care about. For example, CodeGen should never see always-dependent or non-canonical types, while debug info generation should never see always-dependent types. More switch() statements on the type class need to be moved over to using this approach, so that we'll get warnings when we add a new type then fail to account for it somewhere in the compiler. As part of this, some types have been renamed: TypeOfExpr -> TypeOfExprType FunctionTypeProto -> FunctionProtoType FunctionTypeNoProto -> FunctionNoProtoType There shouldn't be any functionality change... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65591 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaLookup.cpp
emaOverload.cpp
emaType.cpp
|
72564e73277e29f6db3305d1f27ba408abb7ed88 |
27-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Create a new TypeNodes.def file that enumerates all of the types, giving them rough classifications (normal types, never-canonical types, always-dependent types, abstract type representations) and making it far easier to make sure that we've hit all of the cases when decoding types. Switched some switch() statements on the type class over to using this mechanism, and filtering out those things we don't care about. For example, CodeGen should never see always-dependent or non-canonical types, while debug info generation should never see always-dependent types. More switch() statements on the type class need to be moved over to using this approach, so that we'll get warnings when we add a new type then fail to account for it somewhere in the compiler. As part of this, some types have been renamed: TypeOfExpr -> TypeOfExprType FunctionTypeProto -> FunctionProtoType FunctionTypeNoProto -> FunctionNoProtoType There shouldn't be any functionality change... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65591 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaLookup.cpp
emaOverload.cpp
emaType.cpp
|
ff065f766bb57b5368b3463cf6a5980ffe5109dd |
27-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
fix a bozobug. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65589 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
220b6369d7717bfe6894b46cef055d3e763827f2 |
27-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
fix a bozobug. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65589 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
b1fe04714a3f2088fadcdfb7fbd451c487946cfa |
27-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
ok, not as broken as I thought, just confusing. This allows initialization of wchar_t arrays with wide strings, and generalizes wchar_size.c to work on all targets. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65586 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
19753cfa6059b237880a91f21ef58f2d8984845f |
27-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
ok, not as broken as I thought, just confusing. This allows initialization of wchar_t arrays with wide strings, and generalizes wchar_size.c to work on all targets. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65586 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
7a7c1452e4d2d66f4f5671e9bb2f17ced96ecefb |
27-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
allow wide strings to initialize arrays compatible with wchar_t. Unfortunately this doesn't work yet because wchar_t is completely broken in C. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65585 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
8879e3b29d2527260c401bce0ed0e401901ef601 |
27-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
allow wide strings to initialize arrays compatible with wchar_t. Unfortunately this doesn't work yet because wchar_t is completely broken in C. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65585 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
14032226751d936ceec4d385eb61853ee9861ff4 |
27-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
fix some sema problems with wide strings and hook up basic codegen for them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65582 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
dbb1ecc32ca122b07b7c98fd0a8f6f53985adacc |
27-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
fix some sema problems with wide strings and hook up basic codegen for them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65582 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
9c7825b737617339724d43bd04960852271f08e2 |
26-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Make the type associated with a ClassTemplateSpecializationDecl be a nicely sugared type that shows how the user wrote the actual specialization. This sugared type won't actually show up until we start doing instantiations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65577 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
fc705b84347e6fb4746a1a7e26949f64c2f2f358 |
26-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Make the type associated with a ClassTemplateSpecializationDecl be a nicely sugared type that shows how the user wrote the actual specialization. This sugared type won't actually show up until we start doing instantiations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65577 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
3bb3000049dd841d51cfad730bd056d1467f92f0 |
26-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Introduce code modification hints into the diagnostics system. When we know how to recover from an error, we can attach a hint to the diagnostic that states how to modify the code, which can be one of: - Insert some new code (a text string) at a particular source location - Remove the code within a given range - Replace the code within a given range with some new code (a text string) Right now, we use these hints to annotate diagnostic information. For example, if one uses the '>>' in a template argument in C++98, as in this code: template<int I> class B { }; B<1000 >> 2> *b1; we'll warn that the behavior will change in C++0x. The fix is to insert parenthese, so we use code insertion annotations to illustrate where the parentheses go: test.cpp:10:10: warning: use of right-shift operator ('>>') in template argument will require parentheses in C++0x B<1000 >> 2> *b1; ^ ( ) Use of these annotations is partially implemented for HTML diagnostics, but it's not (yet) producing valid HTML, which may be related to PR2386, so it has been #if 0'd out. In this future, we could consider hooking this mechanism up to the rewriter to actually try to fix these problems during compilation (or, after a compilation whose only errors have fixes). For now, however, I suggest that we use these code modification hints whenever we can, so that we get better diagnostics now and will have better coverage when we find better ways to use this information. This also fixes PR3410 by placing the complaint about missing tokens just after the previous token (rather than at the location of the next token). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65570 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaTemplate.cpp
|
4b2d3f7bcc4df31157df443af1b80bcaa9b58bba |
26-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Introduce code modification hints into the diagnostics system. When we know how to recover from an error, we can attach a hint to the diagnostic that states how to modify the code, which can be one of: - Insert some new code (a text string) at a particular source location - Remove the code within a given range - Replace the code within a given range with some new code (a text string) Right now, we use these hints to annotate diagnostic information. For example, if one uses the '>>' in a template argument in C++98, as in this code: template<int I> class B { }; B<1000 >> 2> *b1; we'll warn that the behavior will change in C++0x. The fix is to insert parenthese, so we use code insertion annotations to illustrate where the parentheses go: test.cpp:10:10: warning: use of right-shift operator ('>>') in template argument will require parentheses in C++0x B<1000 >> 2> *b1; ^ ( ) Use of these annotations is partially implemented for HTML diagnostics, but it's not (yet) producing valid HTML, which may be related to PR2386, so it has been #if 0'd out. In this future, we could consider hooking this mechanism up to the rewriter to actually try to fix these problems during compilation (or, after a compilation whose only errors have fixes). For now, however, I suggest that we use these code modification hints whenever we can, so that we get better diagnostics now and will have better coverage when we find better ways to use this information. This also fixes PR3410 by placing the complaint about missing tokens just after the previous token (rather than at the location of the next token). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65570 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaTemplate.cpp
|
f6c06ce852b5d95179b2b34ce97dc2a93ade88c0 |
26-Feb-2009 |
Daniel Dunbar <daniel@zuster.org> |
Drop uses of getAsPointerLikeType. - No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65563 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaType.cpp
|
bb71001d287fda144c4bcf096124d8e3667d6930 |
26-Feb-2009 |
Daniel Dunbar <daniel@zuster.org> |
Drop uses of getAsPointerLikeType. - No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65563 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaType.cpp
|
b0bf2c9465c618c547e4199a8a454679624340a0 |
26-Feb-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6574319> clang issues error on 'readonly' property with a defaul setter attribute. Needed to make isPropertyReadonly() non-const (for this fix to compile). I imagine there's a way to retain the const-ness, however I have more important fish to fry. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65562 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
22dc0b04351f5d3feeb6e121f330fb8ae18090e3 |
26-Feb-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6574319> clang issues error on 'readonly' property with a defaul setter attribute. Needed to make isPropertyReadonly() non-const (for this fix to compile). I imagine there's a way to retain the const-ness, however I have more important fish to fry. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65562 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
cc19b1327582d6b9e5a6cc12e1fe3db0fb3bdd29 |
26-Feb-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6614945> method not found. This was a fairly recent regression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65547 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
1f484f4aef0ea52b920e568e0c1fa2cbdfe98957 |
26-Feb-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6614945> method not found. This was a fairly recent regression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65547 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
4b1291544b58ea265abb261b737963410c1aa2e4 |
26-Feb-2009 |
Steve Naroff <snaroff@apple.com> |
Fix http://llvm.org/bugs/show_bug.cgi?id=3544. The code for looking up local/private method in Sema::ActOnInstanceMessage() was not handling categories properly. Sema::ActOnClassMessage() didn't have this bug. Created a helper with the correct logic and changed both methods to use it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65532 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprObjC.cpp
|
f1afaf6fe2d94ab265299853f288b676694f7554 |
26-Feb-2009 |
Steve Naroff <snaroff@apple.com> |
Fix http://llvm.org/bugs/show_bug.cgi?id=3544. The code for looking up local/private method in Sema::ActOnInstanceMessage() was not handling categories properly. Sema::ActOnClassMessage() didn't have this bug. Created a helper with the correct logic and changed both methods to use it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65532 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprObjC.cpp
|
6fdb28daa0eec6739149b82c275c5720009d628f |
26-Feb-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Make more AST nodes and semantic checkers dependent-expression-aware. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65529 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprCXX.cpp
|
2850784bda09416fc7e9d57f5baa36c9351c757c |
26-Feb-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Make more AST nodes and semantic checkers dependent-expression-aware. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65529 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprCXX.cpp
|
255b882d90820546dae787e107ab17ec4c131108 |
26-Feb-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Zap the Sema constant initializer checking code that we aren't using anymore. If we want to reuse bits and pieces to add strict checking for constant initializers, we can dig them out of SVN history; the existing code won't be useful as-is. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65502 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
21298280988072f3bcfca2fb65335b58b88f88b7 |
26-Feb-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Zap the Sema constant initializer checking code that we aren't using anymore. If we want to reuse bits and pieces to add strict checking for constant initializers, we can dig them out of SVN history; the existing code won't be useful as-is. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65502 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
d553d4cb957f23bb129d3174108a1ee6d54a1e4a |
26-Feb-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix for PR3663/3669: use TryToFixInvalidVariablyModifiedType for variable declarations where applicable. Also, a few fixes to TryToFixInvalidVariablyModifiedType for issues that this exposed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65500 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
bc592e6e56f16f5d06fc70c3931f7d9d33f7b3cd |
26-Feb-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix for PR3663/3669: use TryToFixInvalidVariablyModifiedType for variable declarations where applicable. Also, a few fixes to TryToFixInvalidVariablyModifiedType for issues that this exposed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65500 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
50113cae2f3845bef7b52b45ea26d684e9125351 |
25-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve location information on "reused" class template specialization decls. Test and document the semantic location of class template specialization definitions that occur within a scope enclosing the scope of the class template. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65478 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
6bc9f7e286913fb1df95fa3fdcac7aab2628eaeb |
25-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Improve location information on "reused" class template specialization decls. Test and document the semantic location of class template specialization definitions that occur within a scope enclosing the scope of the class template. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65478 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
0d93f69b8f742e1172f65b5843c15c51216d89f0 |
25-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Perform additional semantic checking of class template specializations. In particular: - Make sure class template specializations have a "template<>" header, and complain if they don't. - Make sure class template specializations are declared/defined within a valid context. (e.g., you can't declare a specialization std::vector<MyType> in the global namespace). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65476 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
|
88b7094185b9d4fe9820c731b6936d8d37f6143e |
25-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Perform additional semantic checking of class template specializations. In particular: - Make sure class template specializations have a "template<>" header, and complain if they don't. - Make sure class template specializations are declared/defined within a valid context. (e.g., you can't declare a specialization std::vector<MyType> in the global namespace). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65476 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
|
0c281a89b43f1e71e906d8b9733c2eb0303e87dc |
25-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement parsing of nested-name-specifiers that involve template-ids, e.g., std::vector<int>::allocator_type When we parse a template-id that names a type, it will become either a template-id annotation (which is a parsed representation of a template-id that has not yet been through semantic analysis) or a typename annotation (where semantic analysis has resolved the template-id to an actual type), depending on the context. We only produce a type in contexts where we know that we only need type information, e.g., in a type specifier. Otherwise, we create a template-id annotation that can later be "upgraded" by transforming it into a typename annotation when the parser needs a type. This occurs, for example, when we've parsed "std::vector<int>" above and then see the '::' after it. However, it means that when writing something like this: template<> class Outer::Inner<int> { ... }; We have two tokens to represent Outer::Inner<int>: one token for the nested name specifier Outer::, and one template-id annotation token for Inner<int>, which will be passed to semantic analysis to define the class template specialization. Most of the churn in the template tests in this patch come from an improvement in our error recovery from ill-formed template-ids. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65467 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaTemplate.cpp
|
39a8de10c18365bde7062d8959b7ed525449c561 |
25-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement parsing of nested-name-specifiers that involve template-ids, e.g., std::vector<int>::allocator_type When we parse a template-id that names a type, it will become either a template-id annotation (which is a parsed representation of a template-id that has not yet been through semantic analysis) or a typename annotation (where semantic analysis has resolved the template-id to an actual type), depending on the context. We only produce a type in contexts where we know that we only need type information, e.g., in a type specifier. Otherwise, we create a template-id annotation that can later be "upgraded" by transforming it into a typename annotation when the parser needs a type. This occurs, for example, when we've parsed "std::vector<int>" above and then see the '::' after it. However, it means that when writing something like this: template<> class Outer::Inner<int> { ... }; We have two tokens to represent Outer::Inner<int>: one token for the nested name specifier Outer::, and one template-id annotation token for Inner<int>, which will be passed to semantic analysis to define the class template specialization. Most of the churn in the template tests in this patch come from an improvement in our error recovery from ill-formed template-ids. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65467 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaTemplate.cpp
|
a6860dddc9656aa27b367cc70b2329d7dd2a3492 |
25-Feb-2009 |
Anders Carlsson <andersca@mac.com> |
Use CheckAssignmentConstraints for checking the cleanup attr function. Fixes PR3656. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65461 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
b90052a8cc4745126f7bb2e6573f07e22f24b840 |
25-Feb-2009 |
Anders Carlsson <andersca@mac.com> |
Use CheckAssignmentConstraints for checking the cleanup attr function. Fixes PR3656. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65461 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
1f88aa7eb94035348cc67f3071d5882ae4853a3f |
25-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
C99 DR #316 implies that the function parameter types that are known only from a function definition (that does not have a prototype) are only used to determine the compatible with other declarations of that same function. In particular, when referencing the function we pretend as if it does not have a prototype. Implement this behavior, which fixes PR3626. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65460 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
emaExprCXX.cpp
|
2224f84658fb9b3725a31f2680edb64ae73bf705 |
25-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
C99 DR #316 implies that the function parameter types that are known only from a function definition (that does not have a prototype) are only used to determine the compatible with other declarations of that same function. In particular, when referencing the function we pretend as if it does not have a prototype. Implement this behavior, which fixes PR3626. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65460 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
emaExprCXX.cpp
|
c5898308f362979becca7f57af38d373dcf9699a |
25-Feb-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Minor cleanup for IntToBlockPointer so it applies to all callers of Sema::CheckAssignmentConstraints; not really visible, but the right thing to do. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65428 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
d8f4f4330031f893b647662bd5ff1b9ae3da694f |
25-Feb-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Minor cleanup for IntToBlockPointer so it applies to all callers of Sema::CheckAssignmentConstraints; not really visible, but the right thing to do. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65428 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
19ae2fc5516d8bed71eb91facf8db508a56f6657 |
25-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
handle @encode interactions with array initializers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65401 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
79e079d3caecc0ddd7128dc038d3f8960bbab62e |
25-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
handle @encode interactions with array initializers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65401 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
d20fac4aa682cd6a67ae5659802aa8b9d1afe350 |
25-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
rename CheckStringLiteralInit to CheckStringInit and pass in the string size as an argument. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65400 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
19da8cdfb3d5cd31e06d02c7bab1eb1bd41a7949 |
25-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
rename CheckStringLiteralInit to CheckStringInit and pass in the string size as an argument. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65400 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
2e2766aeef2ba29bbee19f4e0b043b0bd41d467d |
24-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
make SemaRef be a reference to sema, not a pointer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65399 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
0820254f97bb8925d933a3664ea1c6fca3997b97 |
24-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
make SemaRef be a reference to sema, not a pointer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65399 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
e76e9bf008ee503d2f367cb1f02c2dabd647dc58 |
24-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
move InitListChecker to be private to SemaInit.cpp git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65398 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaInit.cpp
|
8b419b9b5f21cf948cf6fe788f67bf1efd97524c |
24-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
move InitListChecker to be private to SemaInit.cpp git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65398 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaInit.cpp
|
160da07d905706cc6f6273fd048f87cfceffb3be |
24-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
Make CheckSingleInitializer a static function in SemaInit.cpp git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65397 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaInit.cpp
|
95e8d658fbea5b53c5e77c48f883fe6c9f7f620f |
24-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
Make CheckSingleInitializer a static function in SemaInit.cpp git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65397 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaInit.cpp
|
45d6fd6dd25289220483396d92ba6d43dafea367 |
24-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
make CheckStringLiteralInit a static function in SemaInit.cpp git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65396 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaInit.cpp
|
f71ae8d8024561f92dd7916363e7a791684563cc |
24-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
make CheckStringLiteralInit a static function in SemaInit.cpp git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65396 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaInit.cpp
|
89b9107f18a1774c83ff9d677a384826f769f2d7 |
24-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
change IsStringLiteralInit into a static function in SemaInit.cpp git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65395 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaInit.cpp
|
6c291a88bce9852225328b7b37a7ce1d1edec3c1 |
24-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
change IsStringLiteralInit into a static function in SemaInit.cpp git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65395 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaInit.cpp
|
d3a00502cbc6df1c890915a90457a33b06ec8fb6 |
24-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
move some initialization checking code from SemaDecl.cpp to SemaInit.cpp, no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65394 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaInit.cpp
|
dd8e0065207e953bb28b95ad9cb6b2c13f56b3b8 |
24-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
move some initialization checking code from SemaDecl.cpp to SemaInit.cpp, no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65394 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaInit.cpp
|
c5d3263682ab5aa9d7f0b7cb3a46200f6ea23287 |
24-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
first wave of fixes for @encode sema support. This is part of PR3648. The big difference here is that (like string literal) @encode has array type, not pointer type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65391 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExprObjC.cpp
|
eaf2bb89eb2aad3b80673de30febe52df43c10ec |
24-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
first wave of fixes for @encode sema support. This is part of PR3648. The big difference here is that (like string literal) @encode has array type, not pointer type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65391 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExprObjC.cpp
|
4e59897513709621f6a34f38bd70d0ae041cb365 |
24-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
some minor cleanups, handle ObjCEncodeExpr in a couple places. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65389 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
111c2ee5fe984219d1950b389ea4d2dcabaf83da |
24-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
some minor cleanups, handle ObjCEncodeExpr in a couple places. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65389 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
1c52c63c8a4d5e809b76299d201f8bd4dda392d4 |
24-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When we're declaring an object or function with linkage, teach name lookup to skip over names without linkage. This finishes <rdar://problem/6127293>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65386 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaLookup.cpp
|
d6f7e9dccd0fa8a5a15d7478324c0ae229fc5e1e |
24-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
When we're declaring an object or function with linkage, teach name lookup to skip over names without linkage. This finishes <rdar://problem/6127293>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65386 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaLookup.cpp
|
92c4791333c8ae5d32cf06cd4b5e26297c41bcd3 |
24-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Extend the implicit declaration and checking against out-of-scope external declarations to also support external variable declarations. Unified the code for these two cases into two new subroutines. Note that we fail to diagnose cases like the one Neil pointed out, where a visible non-external declaration hides an external declaration by the same name. That will require some reshuffling of name lookup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65385 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
8f30105fda579f8e6db339cb88cdec2bef6350bd |
24-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Extend the implicit declaration and checking against out-of-scope external declarations to also support external variable declarations. Unified the code for these two cases into two new subroutines. Note that we fail to diagnose cases like the one Neil pointed out, where a visible non-external declaration hides an external declaration by the same name. That will require some reshuffling of name lookup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65385 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
6f8c368336189b34ac8d53373d8a9efda44fc0c2 |
24-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
In C, when we see a function declaration within a local scope, export that declaration to global scope so that it can be found from other scopes. This allows us to diagnose redeclaration errors for external declarations across scopes. We also warn when name lookup finds such an out-of-scope declaration. This is part of <rdar://problem/6127293>; we'll also need to do the same thing for variables. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65373 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
|
25d944af5d8d665611e09956954f10896c1071f6 |
24-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
In C, when we see a function declaration within a local scope, export that declaration to global scope so that it can be found from other scopes. This allows us to diagnose redeclaration errors for external declarations across scopes. We also warn when name lookup finds such an out-of-scope declaration. This is part of <rdar://problem/6127293>; we'll also need to do the same thing for variables. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65373 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
|
af6820210f1dcee448b3a0edfdd3d5717d0f5953 |
24-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve merging of function declarations. Specifically: - When we are declaring a function in local scope, we can merge with a visible declaration from an outer scope if that declaration refers to an entity with linkage. This behavior now works in C++ and properly ignores entities without linkage. - Diagnose the use of "static" on a function declaration in local scope. - Diagnose the declaration of a static function after a non-static declaration of the same function. - Propagate the storage specifier to a function declaration from a prior declaration (PR3425) - Don't name-mangle "main" git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65360 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
04495c859f81e440748a9b86baa2913461652bb0 |
24-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Improve merging of function declarations. Specifically: - When we are declaring a function in local scope, we can merge with a visible declaration from an outer scope if that declaration refers to an entity with linkage. This behavior now works in C++ and properly ignores entities without linkage. - Diagnose the use of "static" on a function declaration in local scope. - Diagnose the declaration of a static function after a non-static declaration of the same function. - Propagate the storage specifier to a function declaration from a prior declaration (PR3425) - Don't name-mangle "main" git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65360 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
9513cfd6f6df9ccc4e6478dc226a899ded93ff58 |
23-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
fix rdar://6611778, a redefinition of an interface was causing an assertion when the ivars and method list was reset into the existing interface. To fix this, mark decls as invalid when they are redefined, and don't insert ivars/methods into invalid decls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65340 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclObjC.cpp
|
1829a6db2ec19e08061f0bb2f4c52a8e5e4efaf0 |
23-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
fix rdar://6611778, a redefinition of an interface was causing an assertion when the ivars and method list was reset into the existing interface. To fix this, mark decls as invalid when they are redefined, and don't insert ivars/methods into invalid decls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65340 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclObjC.cpp
|
5fd818bec0c21e3072679d1a9a522be2649405d8 |
23-Feb-2009 |
Steve Naroff <snaroff@apple.com> |
- Generate error for protocol qualifiers on 'Class'. - Generate error for protocol qualifiers on non-ObjC types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65333 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
4262a07621043c19292f5fd90b1e426d65cd366c |
23-Feb-2009 |
Steve Naroff <snaroff@apple.com> |
- Generate error for protocol qualifiers on 'Class'. - Generate error for protocol qualifiers on non-ObjC types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65333 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
6805fc44a1b5179f6390a160c807dfb4480d7138 |
23-Feb-2009 |
Steve Naroff <snaroff@apple.com> |
Revert http://llvm.org/viewvc/llvm-project?view=rev&revision=65244. Remove support for "Class<P>". Will be making this an error. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65332 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaType.cpp
|
d461777e23204fe8c480302d8ff76f5847605da6 |
23-Feb-2009 |
Steve Naroff <snaroff@apple.com> |
Revert http://llvm.org/viewvc/llvm-project?view=rev&revision=65244. Remove support for "Class<P>". Will be making this an error. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65332 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaType.cpp
|
670901af5f9ccf321a5331f8095d8c4746bf7ee1 |
23-Feb-2009 |
Steve Naroff <snaroff@apple.com> |
Remove isSuperExpr(), which ignores any casts on 'super'. I don't think casting super makes any sense (since it won't effect method lookup). Will discuss with other offline and decide what to do. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65317 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
279d896d4972417f62537fe4a87a8c3c3d675108 |
23-Feb-2009 |
Steve Naroff <snaroff@apple.com> |
Remove isSuperExpr(), which ignores any casts on 'super'. I don't think casting super makes any sense (since it won't effect method lookup). Will discuss with other offline and decide what to do. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65317 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
a3d6042fa05490645c751891ce058e0a19ba5446 |
23-Feb-2009 |
Steve Naroff <snaroff@apple.com> |
Sema::ActOnInstanceMessage(): Tighen up the lookup rules for handling messages to 'Class'. Also improve "super" handling. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65300 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
d526c2f2ef28643c15589135b59eb4a8d9f9414c |
23-Feb-2009 |
Steve Naroff <snaroff@apple.com> |
Sema::ActOnInstanceMessage(): Tighen up the lookup rules for handling messages to 'Class'. Also improve "super" handling. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65300 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
cb1774c40b241655ee86961f0355a1e4d518b4d7 |
22-Feb-2009 |
Steve Naroff <snaroff@apple.com> |
Minor cleanup, replace bool with qual_empty(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65293 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
ac1337d33197d770157b38812ed5c1ae7cc620c5 |
22-Feb-2009 |
Steve Naroff <snaroff@apple.com> |
Minor cleanup, replace bool with qual_empty(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65293 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
d85ba92f4127367a1d025f50089ae8e1d464dcc0 |
22-Feb-2009 |
Steve Naroff <snaroff@apple.com> |
Contains the following (related to problems found while investigting <rdar://problem/6497631> Message lookup is sometimes different than gcc's). - Implement instance/class overloading in ObjCContainerDecl (removing a FIXME). This involved hacking NamedDecl::declarationReplaces(), which took awhile to figure out (didn't realize replace was the default). - Changed Sema::ActOnInstanceMessage() to remove redundant warnings when dealing with protocols. For now, I've omitted the "protocol" term in the diagnostic. It simplifies the code flow and wan't always 100% accurate (e.g. "Foo<Prot>" looks in the class interface, not just the protocol). - Changed several test cases to jive with the above changes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65292 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
0de21fd85d79bccd32f04256f5b3328ab5ed7c95 |
22-Feb-2009 |
Steve Naroff <snaroff@apple.com> |
Contains the following (related to problems found while investigting <rdar://problem/6497631> Message lookup is sometimes different than gcc's). - Implement instance/class overloading in ObjCContainerDecl (removing a FIXME). This involved hacking NamedDecl::declarationReplaces(), which took awhile to figure out (didn't realize replace was the default). - Changed Sema::ActOnInstanceMessage() to remove redundant warnings when dealing with protocols. For now, I've omitted the "protocol" term in the diagnostic. It simplifies the code flow and wan't always 100% accurate (e.g. "Foo<Prot>" looks in the class interface, not just the protocol). - Changed several test cases to jive with the above changes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65292 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
083fb6630d35281f91956adcd735064aca9faaed |
22-Feb-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Throw the switch to exclusively use Evaluate (along with the small helper isConstantInitializer) to check whether an initializer is constant. This passes tests, but it's possible that it'll cause regressions with real-world code. Future work: 1. The diagnostics obtained this way are lower quality at the moment; some work both here and in Evaluate is needed for accurate diagnostics. 2. We probably need some extra code when we're in -pedantic mode so we can strictly enforce the rules in C99 6.6p7. 3. Dead code cleanup (this should wait until after 2, because we might want to re-use some of the code). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65265 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
578a97249c10eb83f25b408de1edfb70f5a4233c |
22-Feb-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Throw the switch to exclusively use Evaluate (along with the small helper isConstantInitializer) to check whether an initializer is constant. This passes tests, but it's possible that it'll cause regressions with real-world code. Future work: 1. The diagnostics obtained this way are lower quality at the moment; some work both here and in Evaluate is needed for accurate diagnostics. 2. We probably need some extra code when we're in -pedantic mode so we can strictly enforce the rules in C99 6.6p7. 3. Dead code cleanup (this should wait until after 2, because we might want to re-use some of the code). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65265 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
87bd165ca211d9d42b5320d903d5fd710fb26735 |
22-Feb-2009 |
Steve Naroff <snaroff@apple.com> |
Remove debugging statement. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65257 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
8b1527b7b9a3c5687e336f08f1e18263af0e107d |
22-Feb-2009 |
Steve Naroff <snaroff@apple.com> |
Remove debugging statement. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65257 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
14125b0929b70775c0a41dc22cbabe127f3f8e8e |
22-Feb-2009 |
Anders Carlsson <andersca@mac.com> |
Match gcc and always perform array/function conversion for asm input exprs. Fixes PR3641. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65256 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
6032979a5d091e5607c7c467400449727d9beb5a |
22-Feb-2009 |
Anders Carlsson <andersca@mac.com> |
Match gcc and always perform array/function conversion for asm input exprs. Fixes PR3641. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65256 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
d305a86f087fd359cf0f033eba0c968e55a61ff4 |
21-Feb-2009 |
Steve Naroff <snaroff@apple.com> |
More work to integrate newly added ObjCQualifiedClassType into the type system. This is necessary 'plumbing' to fix <rdar://problem/6497631> Message lookup is sometimes different than gcc's. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65248 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprObjC.cpp
|
f7f52e7bf5a4dc36d45b98531e0b21e343fc19de |
21-Feb-2009 |
Steve Naroff <snaroff@apple.com> |
More work to integrate newly added ObjCQualifiedClassType into the type system. This is necessary 'plumbing' to fix <rdar://problem/6497631> Message lookup is sometimes different than gcc's. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65248 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprObjC.cpp
|
262a5dd7735667460dc4fcf0bef0b5df0ef5335e |
21-Feb-2009 |
Steve Naroff <snaroff@apple.com> |
Add support for GCC ObjC extension "Class<protocol>". Sigh. Found while researching <rdar://problem/6497631> Message lookup is sometimes different than gcc's. Will never be seen in user code. Needed to pass dejagnu testsuite. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65244 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
15509f4fe73f0e11a8cec602bce4d99d9454b7f6 |
21-Feb-2009 |
Steve Naroff <snaroff@apple.com> |
Add support for GCC ObjC extension "Class<protocol>". Sigh. Found while researching <rdar://problem/6497631> Message lookup is sometimes different than gcc's. Will never be seen in user code. Needed to pass dejagnu testsuite. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65244 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
c84582b18e31a5eb250c93935e654fc8daebe1cb |
21-Feb-2009 |
Steve Naroff <snaroff@apple.com> |
Warn about bogus protocol qualifiers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65241 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
8dfb0c57ddb700b163afa89e3ab160f1de26753d |
21-Feb-2009 |
Steve Naroff <snaroff@apple.com> |
Warn about bogus protocol qualifiers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65241 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
235e0bb2f79c241e48480447301a7e0d19f9ccb8 |
21-Feb-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Warn on use of __weak attribute on local variable (objc2 gc specific). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65240 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
7b5b3170d9be39f462194d456051a7ca81babe28 |
21-Feb-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Warn on use of __weak attribute on local variable (objc2 gc specific). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65240 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
0bbc135a8d04570e8709ebd6b672eaa8e6fc9269 |
21-Feb-2009 |
Steve Naroff <snaroff@apple.com> |
This fixes <rdar://problem/6497650> More type mismatches issues with clang. Move two key ObjC typechecks from Sema::CheckPointerTypesForAssignment() to ASTContext::mergeTypes(). This allows us to take advantage of the recursion in ASTContext::mergeTypes(), removing some bogus warnings. This test case I've added includes an example where we still warn (and GCC doesn't). Need to talk with folks and decide what to do. At this point, the major bogosities should be fixed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65231 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
5fd659db11922fc12a58e478f7b745f9656b15a7 |
21-Feb-2009 |
Steve Naroff <snaroff@apple.com> |
This fixes <rdar://problem/6497650> More type mismatches issues with clang. Move two key ObjC typechecks from Sema::CheckPointerTypesForAssignment() to ASTContext::mergeTypes(). This allows us to take advantage of the recursion in ASTContext::mergeTypes(), removing some bogus warnings. This test case I've added includes an example where we still warn (and GCC doesn't). Need to talk with folks and decide what to do. At this point, the major bogosities should be fixed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65231 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
73cd1e8ed0b9381a4b1a21ce32259788230255e3 |
21-Feb-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Slight tweak to last commit: make sure to copy CVR qualifiers for fixed pointer types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65210 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
61125c81cc73f7011bab091611dd08b2f38819ae |
21-Feb-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Slight tweak to last commit: make sure to copy CVR qualifiers for fixed pointer types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65210 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d4314285852c5c6959cafe743ceff55d622eead6 |
21-Feb-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Re-fix r65140 correctly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65208 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaType.cpp
|
1ca4813ddae54deead43252fe2f2d79fa5b7ad48 |
21-Feb-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Re-fix r65140 correctly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65208 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaType.cpp
|
a442ad9937af48010e6d1716a497c9de5e49c96a |
20-Feb-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6500554> missing objc error message. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65198 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclObjC.cpp
|
ccef371a67756233aa97770e4fccdfa868b3e2d0 |
20-Feb-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6500554> missing objc error message. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65198 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclObjC.cpp
|
a5d4771dc45c6c2d5e0c19861b75642173ec813d |
20-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
fix indentation git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65170 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
f25df99486d22d03dfde6cfe3a55341c9bfc4493 |
20-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
fix indentation git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65170 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
320dff238a66f84d8e95359f4e555f6e6ab436ea |
20-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
silence some warnings in no asserts mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65169 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
fe90de70e598b2e8a8f33b26b2ac8025d40ea993 |
20-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
silence some warnings in no asserts mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65169 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
df6133ba4bc02ffe030dc3941c67514aa837b773 |
20-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
add plumbing to get ASTContext& down to allocation/deallocation points in ObjCList, but don't start using it yet. Renamed some methods to be more consistent. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65168 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclObjC.cpp
|
38af2deb27cdfa1a95bde96e30dab15dce53fcef |
20-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
add plumbing to get ASTContext& down to allocation/deallocation points in ObjCList, but don't start using it yet. Renamed some methods to be more consistent. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65168 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclObjC.cpp
|
97e84d6d5c44ee7fbe193b3b2d514e8c0375dfa8 |
20-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
move the @implementation ivar list to being an ObjCList, which prevents it from being leaked, among other things. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65150 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
7a21bd046fe57629ab074980cf8193f5e0c15735 |
20-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
move the @implementation ivar list to being an ObjCList, which prevents it from being leaked, among other things. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65150 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
9fcefea44db26c359db0423aa979920be600fd98 |
20-Feb-2009 |
Anders Carlsson <andersca@mac.com> |
Always try to fold array sizes, and warn if we could fold something that isn't an ICE. This makes us compatible with GCC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65140 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaType.cpp
|
540b146d013b3b6d5ab7c485b9e692a866173e15 |
20-Feb-2009 |
Anders Carlsson <andersca@mac.com> |
Always try to fold array sizes, and warn if we could fold something that isn't an ICE. This makes us compatible with GCC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65140 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaType.cpp
|
5c6b2c638375da5002f93373e5e0f890d300aeb9 |
20-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
remove some more methods from objc decls, using the iterator interfaces more consistently. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65138 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaDeclObjC.cpp
emaExprObjC.cpp
emaType.cpp
|
89951a86b594513c2a013532ed45d197413b1087 |
20-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
remove some more methods from objc decls, using the iterator interfaces more consistently. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65138 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaDeclObjC.cpp
emaExprObjC.cpp
emaType.cpp
|
466a8f20221f8e4a29c73cdd3c2146de68ab02d0 |
20-Feb-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6586239> bitfield constraints not enforced (for ObjC) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65128 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
63359c80b0ff4bd3e898f38efe88be3c01581320 |
20-Feb-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6586239> bitfield constraints not enforced (for ObjC) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65128 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f4756c2b6c5e6cf68c4d3358caaa3ecac674847f |
20-Feb-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Suppress constant initializer checking when the declaration isn't valid. This prevents emitting diagnostics which are almost certainly useless. (Note that the test is checking that we emit only one diagnostic.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65101 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
da153239bb6e69722fdd82914e729bb39f5821c5 |
20-Feb-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Suppress constant initializer checking when the declaration isn't valid. This prevents emitting diagnostics which are almost certainly useless. (Note that the test is checking that we emit only one diagnostic.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65101 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
0b53af20d4a56a5ec3bc5072aaa3a14f6d6fecd1 |
20-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
replace a dirty hack with a clean solution. Too bad we can't use Blocks for our callbacks ;-) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65083 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
92dd386e3f05d176b45a638199d51f536bd9d1c4 |
20-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
replace a dirty hack with a clean solution. Too bad we can't use Blocks for our callbacks ;-) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65083 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
2bd4a5a5a36b49a146e66088d099f7f6f2985ac4 |
20-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
Fix a long standard problem with clang retaining "too much" sugar information about types. We often print diagnostics where we say "foo_t" is bad, but the user doesn't know how foo_t is declared (because it is a typedef). Fix this by expanding sugar when present in a diagnostic (and not one of a few special cases, like vectors). Before: t.m:5:2: error: invalid operands to binary expression ('typeof(P)' and 'typeof(F)') MAX(P, F); ^~~~~~~~~ t.m:1:78: note: instantiated from: #define MAX(A,B) ({ __typeof__(A) __a = (A); __typeof__(B) __b = (B); __a < __b ? __b : __a; }) ^ After: t.m:5:2: error: invalid operands to binary expression ('typeof(P)' (aka 'struct mystruct') and 'typeof(F)' (aka 'float')) MAX(P, F); ^~~~~~~~~ t.m:1:78: note: instantiated from: #define MAX(A,B) ({ __typeof__(A) __a = (A); __typeof__(B) __b = (B); __a < __b ? __b : __a; }) ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65081 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
d0344a4a6182ad704881cbbaa21cca14913d2296 |
20-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
Fix a long standard problem with clang retaining "too much" sugar information about types. We often print diagnostics where we say "foo_t" is bad, but the user doesn't know how foo_t is declared (because it is a typedef). Fix this by expanding sugar when present in a diagnostic (and not one of a few special cases, like vectors). Before: t.m:5:2: error: invalid operands to binary expression ('typeof(P)' and 'typeof(F)') MAX(P, F); ^~~~~~~~~ t.m:1:78: note: instantiated from: #define MAX(A,B) ({ __typeof__(A) __a = (A); __typeof__(B) __b = (B); __a < __b ? __b : __a; }) ^ After: t.m:5:2: error: invalid operands to binary expression ('typeof(P)' (aka 'struct mystruct') and 'typeof(F)' (aka 'float')) MAX(P, F); ^~~~~~~~~ t.m:1:78: note: instantiated from: #define MAX(A,B) ({ __typeof__(A) __a = (A); __typeof__(B) __b = (B); __a < __b ? __b : __a; }) ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65081 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
21759476f47209730bee74145c1c6c4ede72a1e8 |
20-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
GetTypeForDeclarator can return null on error now, handle this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65076 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
83aa61f600456228d4087d7cf160708453b9c9b0 |
20-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
GetTypeForDeclarator can return null on error now, handle this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65076 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
ae93d65fa7478040fffc73e3fa11181b527c7aa2 |
19-Feb-2009 |
Mike Stump <mrs@apple.com> |
Add enough checking to ensure that non-constant block literals don't appear to be constant. I'll probably redo this and throw it all away later once we have codegen for BlockDeclRefExprs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65070 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
b83d287bc7f47d36fb0751a481e2ef9308b37252 |
19-Feb-2009 |
Mike Stump <mrs@apple.com> |
Add enough checking to ensure that non-constant block literals don't appear to be constant. I'll probably redo this and throw it all away later once we have codegen for BlockDeclRefExprs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65070 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
5ac4dff56e4d241ec47d086fcc646aca4caf9ffd |
19-Feb-2009 |
Daniel Dunbar <daniel@zuster.org> |
Arguments to unordered comparison builtins may need implicit casts. - <rdar://problem/6094103> sema fails to promote type arguments to __builtin_isgreater (and friends) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65059 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
403bc2bd9edffe51d73776643fa87696c9417678 |
19-Feb-2009 |
Daniel Dunbar <daniel@zuster.org> |
Arguments to unordered comparison builtins may need implicit casts. - <rdar://problem/6094103> sema fails to promote type arguments to __builtin_isgreater (and friends) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65059 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
eb12e78ddbe63baed47cb92fb281d6d1aa689b1c |
19-Feb-2009 |
Anders Carlsson <andersca@mac.com> |
Add sema support for the noinline attribute. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65055 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
5bab788d40026ad6e932a3cd9b86bc13f8a27661 |
19-Feb-2009 |
Anders Carlsson <andersca@mac.com> |
Add sema support for the noinline attribute. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65055 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
f7687944a88b6e5117443af2c8518cdd8fe77161 |
19-Feb-2009 |
Anders Carlsson <andersca@mac.com> |
Emit the correct diagnostics when we constant fold an array size to a negative value. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65023 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
1c17689a6703331c656ae79bb756bf606d63f71a |
19-Feb-2009 |
Anders Carlsson <andersca@mac.com> |
Emit the correct diagnostics when we constant fold an array size to a negative value. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65023 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
676c86a3449a52bc0c9abd811b418f8b38e79f6f |
19-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
fix another typo gabor noticed git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65006 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b4650c178e4ece69431706ff88eb2d3daf44a661 |
19-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
fix another typo gabor noticed git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65006 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
9afab10e450ae244c9a1b407b1f675e616c7d71a |
19-Feb-2009 |
Mike Stump <mrs@apple.com> |
Fit 80col and fix indentation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65000 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
eed9cacc7af03953c16fedc9a9d96a6ba4f36df2 |
19-Feb-2009 |
Mike Stump <mrs@apple.com> |
Fit 80col and fix indentation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65000 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
6d8e57345f77cc1802f22426d98773292045d4b0 |
19-Feb-2009 |
Mike Stump <mrs@apple.com> |
Fix spacing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64998 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
488e25b980800c5f6d5b9cb4345d0f0d92942889 |
19-Feb-2009 |
Mike Stump <mrs@apple.com> |
Fix spacing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64998 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
8d103496105145ae16ba8884075b91112fa47027 |
19-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Provide a proper source location when building an implicit dereference. Fixes PR3600 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64993 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
611a8c49c6a5848aed17eced8f2f3f7b1b7577a1 |
19-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Provide a proper source location when building an implicit dereference. Fixes PR3600 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64993 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
85534581967bd50a73c25ae76c96d39b05854a05 |
19-Feb-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Couple of helpers for objc's gc attributes. No change in functionality. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64989 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f6123ca578eb8aabb76ecce7df6857482017f502 |
19-Feb-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Couple of helpers for objc's gc attributes. No change in functionality. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64989 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
9c4e2fa91d172e55e6a0639c5a049c8b45b3eeb1 |
19-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
fariborz already fixed this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64975 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
67a6b6bf004661182e1654edd24942c067701f8b |
19-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
fariborz already fixed this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64975 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
d9b85c3422d18737d8ff36f95edeafa1a99004c4 |
18-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
minor name changes, no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64972 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
3b6b83b8311ecdfa43cbb37ccc38c107d3b8d88b |
18-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
minor name changes, no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64972 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
c25bf6d949f81d248750b1d2289a4b5905e39500 |
18-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Downgrade the "excess elements in initializer" errors to warnings *in C*. They're required errors in C++. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64964 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
7c53ca6e03833adab4465462b7d5c888741b715d |
18-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Downgrade the "excess elements in initializer" errors to warnings *in C*. They're required errors in C++. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64964 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
1fc4791c3be994d661401a4ce134831ba442ebc2 |
18-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
rip out __builtin_overload git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64961 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
1e4db7c468c002c58f07e059ff7925384f053e85 |
18-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
rip out __builtin_overload git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64961 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
6b3cca625d7ff43c84e2bae7496902c29141196c |
18-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Return true on errors, return true on errors, return true on errors git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64957 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
c2b6a8239326456753cd7d636656e420feaecb40 |
18-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Return true on errors, return true on errors, return true on errors git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64957 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
aa57e866832a9a31351214c33de9b40a49510d84 |
18-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Downgrade complaints about calling unavailable functions to a warning (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 :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64955 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaOverload.cpp
emaTemplate.cpp
|
48f3bb9f780f6e64ab71ba0202ca04b07473805a |
18-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Downgrade complaints about calling unavailable functions to a warning (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 :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64955 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaOverload.cpp
emaTemplate.cpp
|
e892c04ec45a3a80edc32f3e93276e67d5542f0a |
18-Feb-2009 |
Daniel Dunbar <daniel@zuster.org> |
__attribute__((aligned)) was being ignored! This knocks out another 8 gcc/compat/i386 & x86_64 failures. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64947 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
7549c5589ac0d2087e55f2bdd4854adef23f29fd |
18-Feb-2009 |
Daniel Dunbar <daniel@zuster.org> |
__attribute__((aligned)) was being ignored! This knocks out another 8 gcc/compat/i386 & x86_64 failures. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64947 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
f6d4472f2a7c081fb431f7c470b975247d477813 |
18-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
final string diagnostic issue (that I know about): 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); ^ ~~~~~~~~~~~~ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64941 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
443e53c7845f01c8ed693ccd137abb0bd76564f6 |
18-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
final string diagnostic issue (that I know about): 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); ^ ~~~~~~~~~~~~ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64941 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
be93e79e38e89e164a40892ecee7c22665e79023 |
18-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
Next step toward making string diagnostics correct: handle 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64940 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
719e61573f27c11057ecfe0dd8f141621602c571 |
18-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
Next step toward making string diagnostics correct: handle 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64940 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
81df846c489d31325918a95bf8a2ee14508755a8 |
18-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
Fix some issues handling sub-token locations that come from macro expansions. 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64936 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
2197c963543397777919cec22b65feb31a9ddf79 |
18-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
Fix some issues handling sub-token locations that come from macro expansions. 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64936 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
31804e14ac2c60f459c42367c7c6a1a7424392bb |
18-Feb-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Start generating gc'able code using the new objc gc type attributes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64935 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
5934e75d98d99374f72722a69c5eefe026f35c74 |
18-Feb-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Start generating gc'able code using the new objc gc type attributes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64935 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
4ec7a0552b11c645a6baf114dfc26015e237e7b9 |
18-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
only get the spelling of a token to get its length if it needs cleaning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64932 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
0150cdfe9486686e899cf038f1c6a6083e7f8094 |
18-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
only get the spelling of a token to get its length if it needs cleaning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64932 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
30183b0014019f2051cf739d8df0e4043cb21134 |
18-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
use the full spelling of a string literal token so that trigraphs 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); ^ ~~~~~~~~~~~~ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64930 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
d0d082f2eba4e3ed4eb467d76fd227c6dcd6cce7 |
18-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
use the full spelling of a string literal token so that trigraphs 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); ^ ~~~~~~~~~~~~ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64930 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
2062bb28f937c38e1957384a9628b2b1f5f317bb |
18-Feb-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Make warn-weak-field.m test pass again. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64927 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
ed7e9ef19915fc9ee775cd00d45ce673defc378f |
18-Feb-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Make warn-weak-field.m test pass again. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64927 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
80ff83cc9136a4737632dc84ad8d124e82f45b76 |
18-Feb-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Cleanup objc's gc attributes code no longer needed. This make warn-weak-field.m to fail (subject of a followup patch). attr-objc-gc.m no passes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64925 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaType.cpp
|
ba372b85524f712e5b97a176f6ce0197d365835d |
18-Feb-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Cleanup objc's gc attributes code no longer needed. This make warn-weak-field.m to fail (subject of a followup patch). attr-objc-gc.m no passes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64925 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaType.cpp
|
f17cb369ac6ed77e876f0b0a3996a12ffb48921a |
18-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
Start improving diagnostics that relate to subcharacters of string literals. 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64924 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
|
60800081361b0ffc114877b8abbc81cb57b4edf6 |
18-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
Start improving diagnostics that relate to subcharacters of string literals. 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64924 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
|
6c0f406617091070a4a29ff14883057964f8549c |
18-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Update Parser::ParseTypeName to return a TypeResult, which also tells 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64922 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
809070a886684cb5b92eb0e00a6581ab1fa6b17a |
18-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Update Parser::ParseTypeName to return a TypeResult, which also tells 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64922 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
1f9e60f94d6505e884940fb99b0832cb1fe6411a |
18-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
nothing says "ted was here" like a random url dropped in a header :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64903 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
|
da425ebf61e605437e71bfb3fb626d08c8f5f590 |
18-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
nothing says "ted was here" like a random url dropped in a header :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64903 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
|
88a25f851e1fa531a65919ca37abe31b7fb564c8 |
18-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Allow "overloadable" functions in C to be declared as variadic without 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). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64902 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaType.cpp
|
965acbb321e94e36aa5365126eee46b97745fdbb |
18-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Allow "overloadable" functions in C to be declared as variadic without 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). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64902 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaType.cpp
|
3c24ef106a82eae0135f11136be660a8e5b7bfc4 |
18-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
fix the ownership issues and location tracking in Sema::ParseObjCStringLiteral. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64900 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
39c28bbbf235533e9ae7d06fb9b13371dfcc542d |
18-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
fix the ownership issues and location tracking in Sema::ParseObjCStringLiteral. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64900 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
aa491196c84d3707be32ad06f19c18bfcfbef21a |
18-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
privatize all of the string literal memory allocation/creation stuff behind a private static function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64898 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprObjC.cpp
|
2085fd6cd22ec5c268175251db10d7c60caf7aaa |
18-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
privatize all of the string literal memory allocation/creation stuff behind a private static function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64898 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprObjC.cpp
|
7f49ea29f8bfec0a3df9eba324f72127880bf496 |
18-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Don't allow calls to functions marked "unavailable". There's more work 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64897 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
|
c6666f8e9bbb7f31bf2e52f97137e738c4ca01d0 |
18-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Don't allow calls to functions marked "unavailable". There's more work 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64897 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
|
4ae4a912bbae40edb6bd79aba0f9691cea042b03 |
18-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
add some comments describing what is happening here. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64896 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
f4b136fb40aeedeaaa6ce7cdff22f375eb76c47b |
18-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
add some comments describing what is happening here. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64896 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
ecc8da307856c2fd004512b21194bd142c587805 |
18-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
simplify the code used to compute the type of an objc string. This makes it faster in the common case when NSConstantString is around. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64895 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
a0af1fe67da29343cd182c51cd48d91b740ecef2 |
18-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
simplify the code used to compute the type of an objc string. This makes it faster in the common case when NSConstantString is around. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64895 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
81f5be228ed67e67c6f74e7678de8f21c27dd447 |
18-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
rename CheckBuiltinCFStringArgument -> CheckObjCString git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64894 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
emaExprObjC.cpp
|
690398188ea5b428f06aa13c7d4ce6eb741ad4f9 |
18-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
rename CheckBuiltinCFStringArgument -> CheckObjCString git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64894 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
emaExprObjC.cpp
|
c314474f0e1eb9b9e3c541dbc068b6cc95c74e2c |
18-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
change the StringLiteral AST node to track all of the SourceLocations of the various PPTokens that are pasted together to make it. In the course of working on this, I discovered ParseObjCStringLiteral which needs some work. I'll tackle it next. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64892 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprObjC.cpp
|
726e168dc09fb23f53c7b004f8e919421ee91806 |
18-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
change the StringLiteral AST node to track all of the SourceLocations of the various PPTokens that are pasted together to make it. In the course of working on this, I discovered ParseObjCStringLiteral which needs some work. I'll tackle it next. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64892 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprObjC.cpp
|
af23809cb5b961cd4624785e94f339e0a0f5f49e |
18-Feb-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Representation of objc gc's attribute using ExtQualType. Note that one test attr-objc-gc.m fails. I will fix this after removing these attributes from the Decl nodes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64889 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
d33d9c0cc0cfdcd0b10f35a6acdfb25da4a64f19 |
18-Feb-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Representation of objc gc's attribute using ExtQualType. Note that one test attr-objc-gc.m fails. I will fix this after removing these attributes from the Decl nodes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64889 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
9c039b5b9394e1037292f5dc5ee173b8ca3d9303 |
18-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
fix rdar://6597252: two exactly identical pointer types are always compatible, even if they are weird implicit objc pointer types like Class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64885 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
a119a3b07372888a2f5b9ec693c52daae7c0f522 |
18-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
fix rdar://6597252: two exactly identical pointer types are always compatible, even if they are weird implicit objc pointer types like Class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64885 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e28972651d051f6d552a9d5cebf2053b64e3b8f1 |
18-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
rename some variables, no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64884 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
efdc39d4f5e61df2d0b41a5de8e744f252b5aff3 |
18-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
rename some variables, no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64884 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
a08b6c79bf6fc9efef2ae2db8b747bac60ee0fae |
18-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement basic parsing and semantic analysis for explicit specialization of class templates, e.g., template<typename T> class X; template<> class X<int> { /* blah */ }; Each specialization is a different *Decl node (naturally), and can have different members. We keep track of forward declarations and definitions as for other class/struct/union types. This is only the basic framework: we still have to deal with checking the template headers properly, improving recovery when there are failures, handling nested name specifiers, etc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64848 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
|
cc636688c4fd10b1732ce3e33b2b106024d545ca |
18-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement basic parsing and semantic analysis for explicit specialization of class templates, e.g., template<typename T> class X; template<> class X<int> { /* blah */ }; Each specialization is a different *Decl node (naturally), and can have different members. We keep track of forward declarations and definitions as for other class/struct/union types. This is only the basic framework: we still have to deal with checking the template headers properly, improving recovery when there are failures, handling nested name specifiers, etc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64848 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
|
3ccaa82ee88c3c6078539775c63720b820b41e29 |
17-Feb-2009 |
Ted Kremenek <kremenek@apple.com> |
Attribute 'iboutlet' can be applied to Objective-C property declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64831 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
327426076e1acc8217307cb236269ccf08c18fe6 |
17-Feb-2009 |
Ted Kremenek <kremenek@apple.com> |
Attribute 'iboutlet' can be applied to Objective-C property declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64831 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
d4618b1d05301d7a62c5ee00c958a559000836f5 |
17-Feb-2009 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Remove one more redundant dyn_cast. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64808 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
afcc7b425bcdc8ef8092f5f510486d2f246c2d86 |
17-Feb-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Remove one more redundant dyn_cast. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64808 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
b50464f6665ba9e50579bb5edc2abc573107dbfc |
17-Feb-2009 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Remove some redundant Decl -> Decl castings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64804 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d311f376c364e5a6c88b63b1d5c53f560ea5e650 |
17-Feb-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Remove some redundant Decl -> Decl castings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64804 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
6c5636843bafdc5d44266496970208b97adc6b34 |
17-Feb-2009 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Now that ObjC decls have DeclContexts too, remove an ugly hack from IdentifierResolver. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64802 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
dentifierResolver.h
|
7fd46dac4ab51de4d224f6bc7ce197913220a70c |
17-Feb-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Now that ObjC decls have DeclContexts too, remove an ugly hack from IdentifierResolver. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64802 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
dentifierResolver.h
|
96e79bfae502212f22148a4ae4fae85244373245 |
17-Feb-2009 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
All Decls have a DeclContext now, hooray! Fans of consistency rejoice. Pass the DeclContext to ObjCIvarDecls as well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64801 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
0c00aac5d618f39afc406c5b2e07642930af1d56 |
17-Feb-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
All Decls have a DeclContext now, hooray! Fans of consistency rejoice. Pass the DeclContext to ObjCIvarDecls as well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64801 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
b60352aa80d17026f445267940db558ab9cfb92e |
17-Feb-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Renamed ASQualType to ExtQualType to reflect its more general use; as for, objc2's gc type attributes. No change in functionality. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64778 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaType.cpp
|
f11284ac87daa613bc7b30db9f54bd716d123222 |
17-Feb-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Renamed ASQualType to ExtQualType to reflect its more general use; as for, objc2's gc type attributes. No change in functionality. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64778 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaType.cpp
|
fe3ccfa91de59de8cd51a6dc063cd72316c2c4fc |
17-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Remove the error about redefining library functions. It's causing too much pain when compiling the Linux kernel (PR3592). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64767 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
655753a757b3eae4306cf59e84a63b78ebb2b9a7 |
17-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Remove the error about redefining library functions. It's causing too much pain when compiling the Linux kernel (PR3592). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64767 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
57e5f7e45f23d176cbd610bb2ff16cc307c3df2c |
17-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
emit: 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 :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64759 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
ba27e2a5c2ba49c0f3d84118508f761bf8fb762d |
17-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
emit: 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 :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64759 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
4a52611fac19ce74b42ba052d332b67f11116cc2 |
17-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
remove "; candidates are/is:" from various ambiguity diagnostics. 2 out of 2 people on irc prefer them gone :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64749 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExprCXX.cpp
emaOverload.cpp
|
4330d65797e10618e39817ca59e8772671c3de59 |
17-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
remove "; candidates are/is:" from various ambiguity diagnostics. 2 out of 2 people on irc prefer them gone :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64749 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExprCXX.cpp
emaOverload.cpp
|
4d6b10281bd79f4e45894923b85e0d37f63da82a |
17-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Static variables and functions won't collide with standard library 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64736 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
9add31798f621f843233dbff8bba103fca64447b |
17-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Static variables and functions won't collide with standard library 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64736 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
a8699569d73a60d8e7bad27bae5fff7fd87b047a |
17-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
Make PragmaPackStack be a private class in SemaAttr and make its instance in Sema be a pimpl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64718 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaAttr.cpp
emaDecl.cpp
|
574aa40703ffb2fddad5b076cec1c2fc27f0b2d3 |
17-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
Make PragmaPackStack be a private class in SemaAttr and make its instance in Sema be a pimpl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64718 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaAttr.cpp
emaDecl.cpp
|
ad964b3c41f4fc5fb7e19a0ce28b200e137bab84 |
17-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Added ClassTemplateSpecializationDecl, which is a subclass of 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64716 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
|
3e00bad490f1bae8a2c60f934e7eb5dbb9752c5d |
17-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Added ClassTemplateSpecializationDecl, which is a subclass of 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64716 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
|
767678f28987b3ccb8f6eaa8bb19d4e03049c57c |
17-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
copying and assignment of sema seem unwise :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64712 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
|
f50adff9997578a021c5fb1689852949e8e4d9b4 |
17-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
copying and assignment of sema seem unwise :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64712 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
|
fe847ea7de775c3ae92aea3804362bc036572a7f |
17-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
move attribute(packed) sema support out of SemaDecl into a new SemaAttr.cpp file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64711 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
emaAttr.cpp
emaDecl.cpp
|
5a0c35150102f95ab270f741cdab5907c9bd9017 |
17-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
move attribute(packed) sema support out of SemaDecl into a new SemaAttr.cpp file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64711 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
emaAttr.cpp
emaDecl.cpp
|
3ed413a52fa22c13b72a2be1986f0cfc2400274e |
17-Feb-2009 |
Daniel Dunbar <daniel@zuster.org> |
Diagnose non-power-of-2 arguments to attribute aligned. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64700 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
396b2a22788b0134018760d6a476de1e20f81334 |
17-Feb-2009 |
Daniel Dunbar <daniel@zuster.org> |
Diagnose non-power-of-2 arguments to attribute aligned. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64700 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
fd46ea2d06cfd25a032c1202d129b8f86f740f66 |
16-Feb-2009 |
Daniel Dunbar <daniel@zuster.org> |
Support IRgen of sqrt -> llvm.sqrt, pow -> llvm.pow. - 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64689 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
ef2abfee3ea16ec74942dc09e9e425f46aeb2582 |
16-Feb-2009 |
Daniel Dunbar <daniel@zuster.org> |
Support IRgen of sqrt -> llvm.sqrt, pow -> llvm.pow. - 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64689 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
ae17c7aa7f431e4c797133f272d47bbd027a957d |
16-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Make "implicit int" an error in C++ (unless we're allowing Microsoft extensions). This caught a couple bugs in our test suite :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64686 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
4310f4ee260e6c7ceeaf299e240f4d789ecc730d |
16-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Make "implicit int" an error in C++ (unless we're allowing Microsoft extensions). This caught a couple bugs in our test suite :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64686 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
31ccf0a3c3ff93419b6d0af093a5fc900b30bc2f |
16-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
diagnose uses of deprecated typenames and tags. We now pass all the deprecation tests in the objc.dg suite. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64679 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclObjC.cpp
|
22bd905673a73ccb9b5e45a7038ec060c9650ffe |
16-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
diagnose uses of deprecated typenames and tags. We now pass all the deprecation tests in the objc.dg suite. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64679 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclObjC.cpp
|
2e8a7aa7c15274813f876f4b2ca6ce38382c56c4 |
16-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Supply the header corresponding to a library builtin as a separate argument to the LIBBUILTIN macro git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64676 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
b1152d842c6599e41581302a85a0f53928253add |
16-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Supply the header corresponding to a library builtin as a separate argument to the LIBBUILTIN macro git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64676 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
6d0d87103df3a1642b3a6806d4a64ffce17df1bf |
16-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
random cleanup git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64673 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
ecb81f28cb279b7d8e84296445a4131fa80b69a9 |
16-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
random cleanup git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64673 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
7699a5341df4e660611d8918874f1d9e70ea9bf2 |
16-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
warn about interfaces that inherit from deprecated classes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64671 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
c7984ddeda4655e3e9e6acf2424acfc55173d5e2 |
16-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
warn about interfaces that inherit from deprecated classes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64671 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
de3fea83b8aa3a45cb49930e111dc50f500f36ce |
16-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
warn about categories that implement deprecated interfaces. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64670 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
16b34b416a68be507017051c211c90b246cd5066 |
16-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
warn about categories that implement deprecated interfaces. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64670 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
1fa7f62d863c1862a91230dab76284aa2cc418a0 |
16-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
early exit on error. This code is creating an invalid decl on error. This is dubious, but at least mark it as an invalid decl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64668 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
70f1954659b1c0e3e7675f0f688ee0f384846148 |
16-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
early exit on error. This code is creating an invalid decl on error. This is dubious, but at least mark it as an invalid decl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64668 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
09020eed49ea73a177a1ff116c2736065bb000de |
16-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
enhance ExtVectorElementExpr to allow V->xxyy to work like (*V).xxyy git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64667 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
73525de7fd9bdd534382dc89a24f1f76db3e04b9 |
16-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
enhance ExtVectorElementExpr to allow V->xxyy to work like (*V).xxyy git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64667 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ca9f52e2ab8cd1e82f16a9d1e9e1756baecd916e |
16-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When merging from a function with a prototype to a function without a prototype, synthesize ParmVarDecls for prototype-less FunctionDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64666 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
450da9832b31d9b2e90af7708d197e5b9e1af8c8 |
16-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
When merging from a function with a prototype to a function without a prototype, synthesize ParmVarDecls for prototype-less FunctionDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64666 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
17b71d2161fd24282fa759cd8f0e91b60cb9e731 |
16-Feb-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Remove an unused variable (which caused a warning). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64660 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
4247c078b92ef853ed7f462d97abcebc999d82c5 |
16-Feb-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Remove an unused variable (which caused a warning). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64660 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
fb1bb82fd7209daa5fe9b6050097a57b0072e9c5 |
16-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
do not warn about uses of deprecated decls when in an out-of-line objc method whose declaration was declared as deprecated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64658 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
f15970cff7d53cd29f7f85aa6edeec2cac0d2d59 |
16-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
do not warn about uses of deprecated decls when in an out-of-line objc method whose declaration was declared as deprecated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64658 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
beae78eb8dac8bc954e89d17f9c7fe55faba8981 |
16-Feb-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Remove FindIvarDeclaration. Use lookupInstanceVariable is is functionally the same. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64657 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclObjC.cpp
|
a5afdd0ef9ff4a7a3f26145b6536a84dd340c897 |
16-Feb-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Remove FindIvarDeclaration. Use lookupInstanceVariable is is functionally the same. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64657 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclObjC.cpp
|
e2d88fdfd7c44d9ff3d97112d51e8d49162a1611 |
16-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When inside an Objective-C++ method, name lookup should look into the interface for ivars before assuming that this is an unresolved function name. Fixes <rdar://problem/6590445>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64653 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
c71e28c6a5a50d7eb00bd5f703d9a09b59412d6b |
16-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
When inside an Objective-C++ method, name lookup should look into the interface for ivars before assuming that this is an unresolved function name. Fixes <rdar://problem/6590445>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64653 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
5e3f21735559fe4b23ec1e0cc08800789c983f02 |
16-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
add assertion git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64652 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
ffed163be5e1e6304f738da90c6047c393e38565 |
16-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
add assertion git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64652 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
2840008ec3711501aab8b5008f2df9b1a7a44dc7 |
16-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
code cleanup git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64651 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
bdbde4db74ea9751e02081d720f415eae9718662 |
16-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
code cleanup git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64651 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
51f6fb3c3ede38fb20a9ed97d33cf11ca4ab98be |
16-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
Add support for deprecating ObjC properties. Unlike GCC, we warn that the property is deprecated, not the getter/setter if the attribute is on the property. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64644 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
7eba82e4be8f437120d9089f4424e2f516c6e060 |
16-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
Add support for deprecating ObjC properties. Unlike GCC, we warn that the property is deprecated, not the getter/setter if the attribute is on the property. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64644 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
2206340db50e2826ece200234696ae2f14243408 |
16-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
propagate attributes onto property decls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64643 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
97a588715d6c896158106d6ca732196d3fee857b |
16-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
propagate attributes onto property decls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64643 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
f119670d2ac5fb343b6adf4fdf2544e160f2f747 |
16-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When a function with a prototype is redeclared without a prototype, merge the prototype into the redeclaration (and make a note in the declaration). Fixes PR3588. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64641 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
6871981fbccba9e8a63997d58245ec0add114f49 |
16-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
When a function with a prototype is redeclared without a prototype, merge the prototype into the redeclaration (and make a note in the declaration). Fixes PR3588. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64641 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
083c23e9acbb8322201e8a318f0fe00823b5d181 |
16-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Adopt a more principled approach to invalid declarations: - If a declaration is an invalid redeclaration of an existing name, complain about the invalid redeclaration then avoid adding it to the AST (we can still parse the definition or initializer, if any). - If the declaration is invalid but there is no prior declaration with that name, introduce the invalid declaration into the AST (for later error recovery). - If the declaration is an invalid redeclaration of a builtin that starts with __builtin_, we produce an error and drop the redeclaration. If it is an invalid redeclaration of a library builtin (e.g., malloc, printf), warn (don't error!) and drop the redeclaration. If a user attempts to define a builtin, produce an error and (if it's a library builtin like malloc) suggest -ffreestanding. This addresses <rdar://problem/6097585> and PR2892. However, PR3588 is still going to cause some problems when builtins are redeclared without a prototype. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64639 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
cda9c674998aedeb9319e95a0284f4d266dcef32 |
16-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Adopt a more principled approach to invalid declarations: - If a declaration is an invalid redeclaration of an existing name, complain about the invalid redeclaration then avoid adding it to the AST (we can still parse the definition or initializer, if any). - If the declaration is invalid but there is no prior declaration with that name, introduce the invalid declaration into the AST (for later error recovery). - If the declaration is an invalid redeclaration of a builtin that starts with __builtin_, we produce an error and drop the redeclaration. If it is an invalid redeclaration of a library builtin (e.g., malloc, printf), warn (don't error!) and drop the redeclaration. If a user attempts to define a builtin, produce an error and (if it's a library builtin like malloc) suggest -ffreestanding. This addresses <rdar://problem/6097585> and PR2892. However, PR3588 is still going to cause some problems when builtins are redeclared without a prototype. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64639 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
2a3bef90ab8c9d15237142d622f01216c64d36ea |
16-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
add support for deprecated objc ivars. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64637 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
553905db4c758883345efa3c4c07e1dba2c74a2f |
16-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
add support for deprecated objc ivars. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64637 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b63f813acd2ac7d039c60dd8a1a43c1c195da4ee |
16-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
Add support for deprecated members of RecordDecls (e.g. struct fields). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64634 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
cfdff38e8e931c0020dff10a32221d8fedb287a6 |
16-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
Add support for deprecated members of RecordDecls (e.g. struct fields). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64634 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
74d601ee57a17138be1aef9e2c61fb961790bc30 |
16-Feb-2009 |
Ben Laurie <benl@google.com> |
Untabify. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64628 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
9af5e6737db0af6b9c6a722c55ac43115c14add9 |
16-Feb-2009 |
Ben Laurie <benl@google.com> |
Untabify. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64628 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
a9187ab8dc8cc49c74340c4e8d7e394b8b5a7aad |
15-Feb-2009 |
Nate Begeman <natebegeman@mac.com> |
Don't allow taking the address of an element in an ext_vector git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64614 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b104b1f6ca76cefab25c6ecb5df3bf87a0f875d3 |
15-Feb-2009 |
Nate Begeman <natebegeman@mac.com> |
Don't allow taking the address of an element in an ext_vector git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64614 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
7dd239cabd29ed5090e81db0e51b874b3ab94a20 |
15-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
lots of trailing whitespace git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64613 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
8e9dcb720bbc373ac6a152322f99a5ec46629c2e |
15-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
lots of trailing whitespace git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64613 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
2cb744bafa562600ca2142a262a97a90febe4041 |
15-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
Refactor the deprecated and unavailable checks into a new DiagnoseUseOfDeprecatedDecl method. This ensures that they are treated consistently. This gets us 'unavailable' support on a few new types of decls, and makes sure we consistently silence deprecated when the caller is also deprecated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64612 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaExpr.cpp
emaExprObjC.cpp
|
76a642ff4fce7a0648c79a1f01324a8c3880e251 |
15-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
Refactor the deprecated and unavailable checks into a new DiagnoseUseOfDeprecatedDecl method. This ensures that they are treated consistently. This gets us 'unavailable' support on a few new types of decls, and makes sure we consistently silence deprecated when the caller is also deprecated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64612 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaExpr.cpp
emaExprObjC.cpp
|
488a9f6f9385522cce9cbcbca4e7d2a7a3a15ea9 |
15-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
implement support for attribute(unavailable) on objc methods. This implements gcc/testsuite/objc.dg/method-attribute-1.m git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64581 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
1251bb85d2fa607079f65f2d5bbc9dcf074a93a2 |
15-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
implement support for attribute(unavailable) on objc methods. This implements gcc/testsuite/objc.dg/method-attribute-1.m git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64581 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
d9037477c88b36ceae804f4a25ef4fa4e519ca1a |
15-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
allow implementations of deprecated functions to use deprecated symbols. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64572 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
61a0f17301f889260de739219c3e1d4c8039210e |
15-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
allow implementations of deprecated functions to use deprecated symbols. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64572 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
91ca7f0bdda2f93b56a94f0f1cf9ac917bc06cd7 |
14-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Add a test case for -ffreestanding that redefines malloc. Warn that complex numbers are an extension in a freestanding C99 implementation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64568 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
f244cd7e54753caf6edb76df430dea2f43bb82a8 |
14-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Add a test case for -ffreestanding that redefines malloc. Warn that complex numbers are an extension in a freestanding C99 implementation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64568 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
31c9402eefc10e6edea697e5be914f54528ad4be |
14-Feb-2009 |
Cédric Venet <cedric.venet@laposte.net> |
Add svn:eol-style=native to some files Correct two files with inconsistent lines endings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64564 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
|
3d658640abc128dcc84a5a5201456395c86c4fa6 |
14-Feb-2009 |
Cedric Venet <cedric.venet@laposte.net> |
Add svn:eol-style=native to some files Correct two files with inconsistent lines endings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64564 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
|
02ee8a1bfd776194915eadad0cc6a0066b990c38 |
14-Feb-2009 |
Anders Carlsson <andersca@mac.com> |
Add support for deprecated Obj-C methods. The semantics mostly match what gcc has. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64562 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
59843ad8835d497cd3c17ff91aa039e31d607791 |
14-Feb-2009 |
Anders Carlsson <andersca@mac.com> |
Add support for deprecated Obj-C methods. The semantics mostly match what gcc has. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64562 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
b5af738b7338a799a7885b1fe2eebdba858b96cb |
14-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Add hook to add attributes to function declarations that we know about, whether they are builtins or not. Use this to add the appropriate "format" attribute to NSLog, NSLogv, asprintf, and vasprintf, and to translate builtin attributes (from Builtins.def) into actual attributes on the function declaration. Use the "printf" format attribute on function declarations to determine whether we should do format string checking, rather than looking at an ad hoc list of builtins and "known" function names. Be a bit more careful about when we consider a function a "builtin" in C++. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64561 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaChecking.cpp
emaDecl.cpp
emaExpr.cpp
emaUtil.h
|
3c385e5f8d9008fff18597ca302be19fa86e51f6 |
14-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Add hook to add attributes to function declarations that we know about, whether they are builtins or not. Use this to add the appropriate "format" attribute to NSLog, NSLogv, asprintf, and vasprintf, and to translate builtin attributes (from Builtins.def) into actual attributes on the function declaration. Use the "printf" format attribute on function declarations to determine whether we should do format string checking, rather than looking at an ad hoc list of builtins and "known" function names. Be a bit more careful about when we consider a function a "builtin" in C++. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64561 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaChecking.cpp
emaDecl.cpp
emaExpr.cpp
emaUtil.h
|
b42900d8e7cb447efb9cb7e275a251f2fd345dac |
14-Feb-2009 |
Anders Carlsson <andersca@mac.com> |
Pass the location of the start of the selector to ActOnClassMessage/ActOnInstanceMessage. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64560 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprObjC.cpp
|
ff975cfab9ada27df86038286d1678084aeb3428 |
14-Feb-2009 |
Anders Carlsson <andersca@mac.com> |
Pass the location of the start of the selector to ActOnClassMessage/ActOnInstanceMessage. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64560 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprObjC.cpp
|
faaad13bee82f1f0aaf645ad7232d4f8c31baebf |
14-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
simplify some code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64548 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
45ce5c38dd347564bea942c5be3b53dd4a6240c7 |
14-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
simplify some code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64548 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
a9b9846bc55c2ec1f776a553f6e20e588acdebcc |
14-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
add parser and type checking support for attribute((objc_exception)). We don't have "zero cost" exceptions for ObjC yet, so there is no codegen support required. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64546 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
0db29ece81d360dcefbe912339c34abe5917f6a9 |
14-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
add parser and type checking support for attribute((objc_exception)). We don't have "zero cost" exceptions for ObjC yet, so there is no codegen support required. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64546 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
d2c6655c7ca33f6985a6b73db0ad7c65d1cf5fae |
14-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
Several related changes: 1) implement parser and sema support for reading and verifying attribute(warnunusedresult). 2) rename hasLocalSideEffect to isUnusedResultAWarning, inverting the sense of its result. 3) extend isUnusedResultAWarning to directly return the loc and range info that should be reported to the user. Make it substantially more precise in some cases than what was previously reported. 4) teach isUnusedResultAWarning about CallExpr to decls that are pure/const/warnunusedresult, fixing a fixme. 5) change warn_attribute_wrong_decl_type to not pass in english strings, instead, pass in integers and use %select. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64543 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaStmt.cpp
|
026dc96ac6ece60da5e1b98e2a71bd0ff0939fd8 |
14-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
Several related changes: 1) implement parser and sema support for reading and verifying attribute(warnunusedresult). 2) rename hasLocalSideEffect to isUnusedResultAWarning, inverting the sense of its result. 3) extend isUnusedResultAWarning to directly return the loc and range info that should be reported to the user. Make it substantially more precise in some cases than what was previously reported. 4) teach isUnusedResultAWarning about CallExpr to decls that are pure/const/warnunusedresult, fixing a fixme. 5) change warn_attribute_wrong_decl_type to not pass in english strings, instead, pass in integers and use %select. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64543 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaStmt.cpp
|
e50fb0ba752b020e08709e1b8b1d6eed081221e7 |
14-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
reduce nesting. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64542 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
90e150d7f40e24ed6f8d268e7d83b2f15153c1ee |
14-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
reduce nesting. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64542 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
1fa246d43b7a24a18ac4f37e83b962277e6ebbb3 |
14-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Make it possible for builtins to expression FILE* arguments, so that we can define builtins such as fprintf, vfprintf, and __builtin___fprintf_chk. Give a nice error message when we need to implicitly declare a function like fprintf. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64526 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaChecking.cpp
emaDecl.cpp
|
370ab3f1373841d70582feac9e35c3c6b3489f63 |
14-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Make it possible for builtins to expression FILE* arguments, so that we can define builtins such as fprintf, vfprintf, and __builtin___fprintf_chk. Give a nice error message when we need to implicitly declare a function like fprintf. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64526 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaChecking.cpp
emaDecl.cpp
|
17429039570353adb36354bd873240d037f09343 |
14-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Extend builtin "attribute" syntax to include a notation for printf-like functions, both builtin functions and those in the C library. The function-call checker now queries this attribute do determine if we have a printf-like function, rather than scanning through the list of "known functions IDs". However, there are 5 functions they are not yet "builtins", so the function-call checker handles them specifically still: - fprintf and vfprintf: the builtins mechanism cannot (yet) express FILE* arguments, so these can't be encoded. - NSLog: the builtins mechanism cannot (yet) express NSString* arguments, so this (and NSLogv) can't be encoded. - asprintf and vasprintf: these aren't part of the C99 standard library, so we really shouldn't be defining them as builtins in the general case (and we don't seem to have the machinery to make them builtins only on certain targets and depending on whether extensions are enabled). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64512 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaChecking.cpp
emaDecl.cpp
|
a316e7b735b12ce6b34961a9dcfaae34f4b08d29 |
14-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Extend builtin "attribute" syntax to include a notation for printf-like functions, both builtin functions and those in the C library. The function-call checker now queries this attribute do determine if we have a printf-like function, rather than scanning through the list of "known functions IDs". However, there are 5 functions they are not yet "builtins", so the function-call checker handles them specifically still: - fprintf and vfprintf: the builtins mechanism cannot (yet) express FILE* arguments, so these can't be encoded. - NSLog: the builtins mechanism cannot (yet) express NSString* arguments, so this (and NSLogv) can't be encoded. - asprintf and vasprintf: these aren't part of the C99 standard library, so we really shouldn't be defining them as builtins in the general case (and we don't seem to have the machinery to make them builtins only on certain targets and depending on whether extensions are enabled). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64512 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaChecking.cpp
emaDecl.cpp
|
411889e15e0335f6951d2410c5bd67839c4fff66 |
14-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implicitly declare certain C library functions (malloc, strcpy, memmove, etc.) when we perform name lookup on them. This ensures that we produce the correct signature for these functions, which has two practical impacts: 1) When we're supporting the "implicit function declaration" feature of C99, these functions will be implicitly declared with the right signature rather than as a function returning "int" with no prototype. See PR3541 for the reason why this is important (hint: GCC always predeclares these functions). 2) If users attempt to redeclare one of these library functions with an incompatible signature, we produce a hard error. This patch does a little bit of work to give reasonable error messages. For example, when we hit case #1 we complain that we're implicitly declaring this function with a specific signature, and then we give a note that asks the user to include the appropriate header (e.g., "please include <stdlib.h> or explicitly declare 'malloc'"). In case #2, we show the type of the implicit builtin that was incorrectly declared, so the user can see the problem. We could do better here: for example, when displaying this latter error message we say something like: 'strcpy' was implicitly declared here with type 'char *(char *, char const *)' but we should really print out a fake code line showing the declaration, like this: 'strcpy' was implicitly declared here as: char *strcpy(char *, char const *) This would also be good for printing built-in candidates with C++ operator overloading. The set of C library functions supported by this patch includes all functions from the C99 specification's <stdlib.h> and <string.h> that (a) are predefined by GCC and (b) have signatures that could cause codegen issues if they are treated as functions with no prototype returning and int. Future work could extend this set of functions to other C library functions that we know about. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64504 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
emaDecl.cpp
emaExpr.cpp
emaLookup.cpp
emaUtil.h
|
3e41d60eb627dc227c770f1c1c87d06909cf05fd |
14-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Implicitly declare certain C library functions (malloc, strcpy, memmove, etc.) when we perform name lookup on them. This ensures that we produce the correct signature for these functions, which has two practical impacts: 1) When we're supporting the "implicit function declaration" feature of C99, these functions will be implicitly declared with the right signature rather than as a function returning "int" with no prototype. See PR3541 for the reason why this is important (hint: GCC always predeclares these functions). 2) If users attempt to redeclare one of these library functions with an incompatible signature, we produce a hard error. This patch does a little bit of work to give reasonable error messages. For example, when we hit case #1 we complain that we're implicitly declaring this function with a specific signature, and then we give a note that asks the user to include the appropriate header (e.g., "please include <stdlib.h> or explicitly declare 'malloc'"). In case #2, we show the type of the implicit builtin that was incorrectly declared, so the user can see the problem. We could do better here: for example, when displaying this latter error message we say something like: 'strcpy' was implicitly declared here with type 'char *(char *, char const *)' but we should really print out a fake code line showing the declaration, like this: 'strcpy' was implicitly declared here as: char *strcpy(char *, char const *) This would also be good for printing built-in candidates with C++ operator overloading. The set of C library functions supported by this patch includes all functions from the C99 specification's <stdlib.h> and <string.h> that (a) are predefined by GCC and (b) have signatures that could cause codegen issues if they are treated as functions with no prototype returning and int. Future work could extend this set of functions to other C library functions that we know about. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64504 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
emaDecl.cpp
emaExpr.cpp
emaLookup.cpp
emaUtil.h
|
d0cc52446e0097c53b73a1e5af6e832c9c3f2a2e |
13-Feb-2009 |
Daniel Dunbar <daniel@zuster.org> |
Warn about attribute used ignored on "extern int a __attribute__((used))". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64499 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
186204bfcf9c53d48143ec300d4c3d036fed4140 |
13-Feb-2009 |
Daniel Dunbar <daniel@zuster.org> |
Warn about attribute used ignored on "extern int a __attribute__((used))". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64499 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
fd57eccba47e389223b6cf68f98843724e9bcdb3 |
13-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
If x is an invalid field decl, don't construct an expression for P->x, just silently return an error to avoid bogus diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64491 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
56cd21bd52aed7a32f3ff11b7e480f664d0b4262 |
13-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
If x is an invalid field decl, don't construct an expression for P->x, just silently return an error to avoid bogus diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64491 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b88b4f7a2b97817fe9937dcf1226ca1f5796ecaf |
13-Feb-2009 |
Daniel Dunbar <daniel@zuster.org> |
Sema/AST support for attribute used. Patch by Anders Johnson (with small tweaks & test case)! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64478 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
b805dad4aa386aeae0f72512895bd238678d37a5 |
13-Feb-2009 |
Daniel Dunbar <daniel@zuster.org> |
Sema/AST support for attribute used. Patch by Anders Johnson (with small tweaks & test case)! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64478 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
fb0cac21679fcc724c2c0c1f67fe4deed77e3639 |
13-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Remove DeclGroupOwningRef, since we intend for declarations to be owned by DeclContexts (always) rather than by statements. DeclContext currently goes out of its way to avoid destroying any Decls that might be owned by a DeclGroupOwningRef. However, in an error-recovery situation, a failure in a declaration statement can cause all of the decls in a DeclGroupOwningRef to be destroyed after they've already be added into the DeclContext. Hence, DeclContext is left with already-destroyed declarations, and bad things happen. This problem was causing failures that showed up as assertions on x86 Linux in test/Parser/objc-forcollection-neg-2.m. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64474 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
9653db7bd0e3665b955a0445859285f2e1e7dacd |
13-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Remove DeclGroupOwningRef, since we intend for declarations to be owned by DeclContexts (always) rather than by statements. DeclContext currently goes out of its way to avoid destroying any Decls that might be owned by a DeclGroupOwningRef. However, in an error-recovery situation, a failure in a declaration statement can cause all of the decls in a DeclGroupOwningRef to be destroyed after they've already be added into the DeclContext. Hence, DeclContext is left with already-destroyed declarations, and bad things happen. This problem was causing failures that showed up as assertions on x86 Linux in test/Parser/objc-forcollection-neg-2.m. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64474 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
888ad7e286c0e4818895b6c78bb22d63fe79c600 |
13-Feb-2009 |
Anders Carlsson <andersca@mac.com> |
Start warning about unknown attributes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64447 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
b235caa53b6743fda9f749a8218760c024e4cf9e |
13-Feb-2009 |
Anders Carlsson <andersca@mac.com> |
Start warning about unknown attributes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64447 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
402735d4fb6e296334ba1e0a448fd786374db9ce |
13-Feb-2009 |
Anders Carlsson <andersca@mac.com> |
Add a new Ignored attribute type, and use it for may_alias. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64446 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
05f8e471aae971c9867dbac148eba1275a570814 |
13-Feb-2009 |
Anders Carlsson <andersca@mac.com> |
Add a new Ignored attribute type, and use it for may_alias. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64446 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
7300779bb741ba8b64a3bbba14a8b60b58560898 |
13-Feb-2009 |
Anders Carlsson <andersca@mac.com> |
Add CodeGen support for the nodebug attribute. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64445 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
e896d98548b02223c7740d807a0aa6e20fba7079 |
13-Feb-2009 |
Anders Carlsson <andersca@mac.com> |
Add CodeGen support for the nodebug attribute. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64445 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
f607f531905e9df9f6907cd81fe97a96fb7956c5 |
13-Feb-2009 |
Anders Carlsson <andersca@mac.com> |
Add sema support for the nodebug attribute. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64441 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
d87df37e0adaba0d5e33da7b1a14d7f1d94c5eef |
13-Feb-2009 |
Anders Carlsson <andersca@mac.com> |
Add sema support for the nodebug attribute. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64441 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
ff3fcdf47370a4577d971a2adefd259807152078 |
13-Feb-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Initial implementation of arbitrary fixed-width integer types. Currently only used for 128-bit integers. Note that we can't use the fixed-width integer types for other integer modes without other changes because glibc headers redefines (u)int*_t and friends using the mode attribute. For example, this means that uint64_t has to be compatible with unsigned __attribute((mode(DI))), and uint64_t is currently defined to long long. And I have a feeling we'll run into issues if we try to define uint64_t as something which isn't either long or long long. This doesn't get the alignment right in most cases, including the 128-bit integer case; I'll file a PR shortly. The gist of the issue is that the targets don't really expose the information necessary to figure out the alignment outside of the target description, so there's a non-trivial amount of work involved in getting it working right. That said, the alignment used is conservative, so the only issue with the current implementation is ABI compatibility. This makes it trivial to add some sort of "bitwidth" attribute to make arbitrary-width integers; I'll do that in a followup. We could also use this for stuff like the following for compatibility with gcc, but I have a feeling it would be a better idea for clang to be consistent between C and C++ modes rather than follow gcc's example for C mode. struct {unsigned long long x : 33;} x; unsigned long long a(void) {return x.x+1;} git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64434 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
f98aba35e6c3da5aae61843fc01334939e4e12ec |
13-Feb-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Initial implementation of arbitrary fixed-width integer types. Currently only used for 128-bit integers. Note that we can't use the fixed-width integer types for other integer modes without other changes because glibc headers redefines (u)int*_t and friends using the mode attribute. For example, this means that uint64_t has to be compatible with unsigned __attribute((mode(DI))), and uint64_t is currently defined to long long. And I have a feeling we'll run into issues if we try to define uint64_t as something which isn't either long or long long. This doesn't get the alignment right in most cases, including the 128-bit integer case; I'll file a PR shortly. The gist of the issue is that the targets don't really expose the information necessary to figure out the alignment outside of the target description, so there's a non-trivial amount of work involved in getting it working right. That said, the alignment used is conservative, so the only issue with the current implementation is ABI compatibility. This makes it trivial to add some sort of "bitwidth" attribute to make arbitrary-width integers; I'll do that in a followup. We could also use this for stuff like the following for compatibility with gcc, but I have a feeling it would be a better idea for clang to be consistent between C and C++ modes rather than follow gcc's example for C mode. struct {unsigned long long x : 33;} x; unsigned long long a(void) {return x.x+1;} git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64434 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
fa3a832f26a79b56599f9d304c2d9ac8bbdff86a |
13-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Tighten checking of the "overloadable" attribute. If any function by a given name in a given scope is marked as "overloadable", every function declaration and definition with that same name and in that same scope needs to have the "overloadable" attribute. Essentially, the "overloadable" attribute is not part of attribute merging, so it must be specified even for redeclarations. This keeps users from trying to be too sneaky for their own good: double sin(double) __attribute__((overloadable)); // too sneaky #include <math.h> Previously, this would have made "sin" overloadable, and therefore given it a mangled name. Now, we get an error inside math.h when we see a (re)declaration of "sin" that doesn't have the "overloadable" attribute. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64414 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
ae17094c001972a5949944a0a77ef6adf2a92c8f |
13-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Tighten checking of the "overloadable" attribute. If any function by a given name in a given scope is marked as "overloadable", every function declaration and definition with that same name and in that same scope needs to have the "overloadable" attribute. Essentially, the "overloadable" attribute is not part of attribute merging, so it must be specified even for redeclarations. This keeps users from trying to be too sneaky for their own good: double sin(double) __attribute__((overloadable)); // too sneaky #include <math.h> Previously, this would have made "sin" overloadable, and therefore given it a mangled name. Now, we get an error inside math.h when we see a (re)declaration of "sin" that doesn't have the "overloadable" attribute. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64414 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
9fc9cb51db16d32c554780fda83de872457eb59e |
12-Feb-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6499801> clang does not detect objc type mismatch in conditional expr git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64393 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
1fd03615dc8303ac3f03525758ef172cf88b2051 |
12-Feb-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6499801> clang does not detect objc type mismatch in conditional expr git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64393 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
0ecc9e9bd22decf2a02a3359d69802a72b7a632e |
12-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix a bug with designated initializers where we were stepping out of a union subobject initialization before checking whether the next initiailizer was actually a designated initializer. This led to spurious "excess elements in union initializer" errors. Thanks to rdivacky for reporting the bug! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64392 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
dfb5e597e033c8fa09c0e178bd93cfcdf060862e |
12-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Fix a bug with designated initializers where we were stepping out of a union subobject initialization before checking whether the next initiailizer was actually a designated initializer. This led to spurious "excess elements in union initializer" errors. Thanks to rdivacky for reporting the bug! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64392 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
644567e0422a219ad4da3006b28e54cb292314db |
12-Feb-2009 |
Steve Naroff <snaroff@apple.com> |
Sema::ActOnObjCAtThrowStmt(): return from recently added errors. Thanks Chris! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64389 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
4ab2414f297fab1b290e77bfc3b049ccf45eda81 |
12-Feb-2009 |
Steve Naroff <snaroff@apple.com> |
Sema::ActOnObjCAtThrowStmt(): return from recently added errors. Thanks Chris! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64389 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
17c0382b4b42417de088ae2ce467aa74b16fca65 |
12-Feb-2009 |
Steve Naroff <snaroff@apple.com> |
Several cleanups: - rename isObjCIdType/isObjCClassType -> isObjCIdStructType/isObjCClassStructType. The previous name didn't do what you would expect. - add back isObjCIdType/isObjCClassType to do what you would expect. Not currently used, however many of the isObjCIdStructType/isObjCClassStructType clients could be converted over time. - move static Sema function areComparableObjCInterfaces to ASTContext (renamed to areComparableObjCPointerTypes, since it now operates on pointer types). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64385 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprObjC.cpp
emaOverload.cpp
|
389bf46ae41241a656ed71b00ac2177d7f385651 |
12-Feb-2009 |
Steve Naroff <snaroff@apple.com> |
Several cleanups: - rename isObjCIdType/isObjCClassType -> isObjCIdStructType/isObjCClassStructType. The previous name didn't do what you would expect. - add back isObjCIdType/isObjCClassType to do what you would expect. Not currently used, however many of the isObjCIdStructType/isObjCClassStructType clients could be converted over time. - move static Sema function areComparableObjCInterfaces to ASTContext (renamed to areComparableObjCPointerTypes, since it now operates on pointer types). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64385 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprObjC.cpp
emaOverload.cpp
|
9750972322487f439c511244b303ad3e849b193d |
12-Feb-2009 |
Daniel Dunbar <daniel@zuster.org> |
Support __attribute__(section(<name>)) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64380 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
17f194f4393a67fd28ad822c06d32b8cb99bad3f |
12-Feb-2009 |
Daniel Dunbar <daniel@zuster.org> |
Support __attribute__(section(<name>)) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64380 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
9a8739a03fe76229de9a460f2512fffb4e53f0a9 |
12-Feb-2009 |
Steve Naroff <snaroff@apple.com> |
Turn warning into error. Minor incompatibility with GCC (for scalar types, GCC only produces a warning). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64375 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
3dcfe10a6801eb52f4c20f1242bea0a3a98aa146 |
12-Feb-2009 |
Steve Naroff <snaroff@apple.com> |
Turn warning into error. Minor incompatibility with GCC (for scalar types, GCC only produces a warning). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64375 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
4ff48513061bd54a0baa74d270c8eb25cb089e8c |
12-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Expand the definition of a complex promotion to include complex -> complex conversions where the conversion between the real types is an integral promotion. This is how G++ handles complex promotions for its complex integer extension. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64344 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
b7b5d13de34272b31681e7eafa9851e39bde2ef9 |
12-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Expand the definition of a complex promotion to include complex -> complex conversions where the conversion between the real types is an integral promotion. This is how G++ handles complex promotions for its complex integer extension. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64344 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
e819cafc0493bbdeda9e6af897aaaf9db02ceef3 |
12-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Introduce _Complex conversions into the function overloading system. Since C99 doesn't have overloading and C++ doesn't have _Complex, there is no specification for this. Here's what I think makes sense. Complex conversions come in several flavors: - Complex promotions: a complex -> complex conversion where the underlying real-type conversion is a floating-point promotion. GCC seems to call this a promotion, EDG does something else. This is given "promotion" rank for determining the best viable function. - Complex conversions: a complex -> complex conversion that is not a complex promotion. This is given "conversion" rank for determining the best viable function. - Complex-real conversions: a real -> complex or complex -> real conversion. This is given "conversion" rank for determining the best viable function. These rules are the same for C99 (when using the "overloadable" attribute) and C++. However, there is one difference in the handling of floating-point promotions: in C99, float -> long double and double -> long double are considered promotions (so we give them "promotion" rank), while C++ considers these conversions ("conversion" rank). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64343 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
emaOverload.cpp
emaOverload.h
|
5cdf82164dd7c2b2320d6735c63ace4331e0716d |
12-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Introduce _Complex conversions into the function overloading system. Since C99 doesn't have overloading and C++ doesn't have _Complex, there is no specification for this. Here's what I think makes sense. Complex conversions come in several flavors: - Complex promotions: a complex -> complex conversion where the underlying real-type conversion is a floating-point promotion. GCC seems to call this a promotion, EDG does something else. This is given "promotion" rank for determining the best viable function. - Complex conversions: a complex -> complex conversion that is not a complex promotion. This is given "conversion" rank for determining the best viable function. - Complex-real conversions: a real -> complex or complex -> real conversion. This is given "conversion" rank for determining the best viable function. These rules are the same for C99 (when using the "overloadable" attribute) and C++. However, there is one difference in the handling of floating-point promotions: in C99, float -> long double and double -> long double are considered promotions (so we give them "promotion" rank), while C++ considers these conversions ("conversion" rank). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64343 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
emaOverload.cpp
emaOverload.h
|
e0b7e0375abaf3b652f32d34065d2d3038711be0 |
12-Feb-2009 |
Mike Stump <mrs@apple.com> |
Fix comment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64337 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
1a35fdee6c1c86dc5f56db7738695aad21a3c488 |
12-Feb-2009 |
Mike Stump <mrs@apple.com> |
Fix comment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64337 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
fcb1919cf2625e2fd209dabd7bba8b06fff94821 |
12-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Initial implementation of function overloading in C. This commit adds a new attribute, "overloadable", that enables C++ function overloading in C. The attribute can only be added to function declarations, e.g., int *f(int) __attribute__((overloadable)); If the "overloadable" attribute exists on a function with a given name, *all* functions with that name (and in that scope) must have the "overloadable" attribute. Sets of overloaded functions with the "overloadable" attribute then follow the normal C++ rules for overloaded functions, e.g., overloads must have different parameter-type-lists from each other. When calling an overloaded function in C, we follow the same overloading rules as C++, with three extensions to the set of standard conversions: - A value of a given struct or union type T can be converted to the type T. This is just the identity conversion. (In C++, this would go through a copy constructor). - A value of pointer type T* can be converted to a value of type U* if T and U are compatible types. This conversion has Conversion rank (it's considered a pointer conversion in C). - A value of type T can be converted to a value of type U if T and U are compatible (and are not both pointer types). This conversion has Conversion rank (it's considered to be a new kind of conversion unique to C, a "compatible" conversion). Known defects (and, therefore, next steps): 1) The standard-conversion handling does not understand conversions involving _Complex or vector extensions, so it is likely to get these wrong. We need to add these conversions. 2) All overloadable functions with the same name will have the same linkage name, which means we'll get a collision in the linker (if not sooner). We'll need to mangle the names of these functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64336 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
emaExpr.cpp
emaExprCXX.cpp
emaLookup.cpp
emaOverload.cpp
emaOverload.h
|
f9201e0ff1779567150b70856753d9f2c6a91467 |
12-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Initial implementation of function overloading in C. This commit adds a new attribute, "overloadable", that enables C++ function overloading in C. The attribute can only be added to function declarations, e.g., int *f(int) __attribute__((overloadable)); If the "overloadable" attribute exists on a function with a given name, *all* functions with that name (and in that scope) must have the "overloadable" attribute. Sets of overloaded functions with the "overloadable" attribute then follow the normal C++ rules for overloaded functions, e.g., overloads must have different parameter-type-lists from each other. When calling an overloaded function in C, we follow the same overloading rules as C++, with three extensions to the set of standard conversions: - A value of a given struct or union type T can be converted to the type T. This is just the identity conversion. (In C++, this would go through a copy constructor). - A value of pointer type T* can be converted to a value of type U* if T and U are compatible types. This conversion has Conversion rank (it's considered a pointer conversion in C). - A value of type T can be converted to a value of type U if T and U are compatible (and are not both pointer types). This conversion has Conversion rank (it's considered to be a new kind of conversion unique to C, a "compatible" conversion). Known defects (and, therefore, next steps): 1) The standard-conversion handling does not understand conversions involving _Complex or vector extensions, so it is likely to get these wrong. We need to add these conversions. 2) All overloadable functions with the same name will have the same linkage name, which means we'll get a collision in the linker (if not sooner). We'll need to mangle the names of these functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64336 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
emaExpr.cpp
emaExprCXX.cpp
emaLookup.cpp
emaOverload.cpp
emaOverload.h
|
c5363f4963c1b315686df39b34b3f3c1d4e725e5 |
11-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Appease the language lawyers git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64321 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
1bc6913e7af08bb400150ebb31a54cdfd8cde9f9 |
11-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Appease the language lawyers git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64321 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
590fe48c82027cd363976db2eec0c797a052ee41 |
11-Feb-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6243503> [sema] @throw; accepted outside catch block. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64318 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaStmt.cpp
|
e21dd6ffef4585fa43cd3586ed971217d65bf56c |
11-Feb-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6243503> [sema] @throw; accepted outside catch block. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64318 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaStmt.cpp
|
6b3a0baf1fc45cd404d99a297de38c2945d4f37e |
11-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Finished semantic analysis of non-type template arguments, to check for non-external names whose address becomes the template argument. This completes C++ [temp.arg.nontype]p1. Note that our interpretation of C++ [temp.arg.nontype]p1b3 differs from EDG's interpretation (we're stricter, and GCC agrees with us). They're opening a core issue about the matter. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64317 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
|
cc45cb3630b42c5245e26593e385097c220bc859 |
11-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Finished semantic analysis of non-type template arguments, to check for non-external names whose address becomes the template argument. This completes C++ [temp.arg.nontype]p1. Note that our interpretation of C++ [temp.arg.nontype]p1b3 differs from EDG's interpretation (we're stricter, and GCC agrees with us). They're opening a core issue about the matter. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64317 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
|
98cb72a9036171a0f2d6298764afe9bd469e7771 |
11-Feb-2009 |
Mike Stump <mrs@apple.com> |
Avoid bogus warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64313 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
5fa77e9662e0cade8b4f491588c14c70c48e0987 |
11-Feb-2009 |
Mike Stump <mrs@apple.com> |
Avoid bogus warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64313 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
0ea4e306c61cdf9896f4c943ae44241659bbc0a3 |
11-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Reverted r64307. Moved hasSameType and hasSameUnqualifiedType from Sema to ASTContext. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64312 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
8e6563ba097732dc1fffcfc85f8dbbceac899a80 |
11-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Reverted r64307. Moved hasSameType and hasSameUnqualifiedType from Sema to ASTContext. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64312 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
c347d8e05699f9d50ce23c16487c99f9a049fd41 |
11-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Allow the use of default template arguments when forming a class template specialization (e.g., std::vector<int> would now be well-formed, since it relies on a default argument for the Allocator template parameter). This is much less interesting than one might expect, since (1) we're not actually using the default arguments for anything important, such as naming an actual Decl, and (2) we'll often need to instantiate the default arguments to check their well-formedness. The real fun will come later. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64310 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
62cb18dd11472965e03374d40bc27d650bc331b6 |
11-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Allow the use of default template arguments when forming a class template specialization (e.g., std::vector<int> would now be well-formed, since it relies on a default argument for the Allocator template parameter). This is much less interesting than one might expect, since (1) we're not actually using the default arguments for anything important, such as naming an actual Decl, and (2) we'll often need to instantiate the default arguments to check their well-formedness. The real fun will come later. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64310 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
677f401a7e4ef827e24152d8a7423644f8c17dab |
11-Feb-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6206858> [sema] type check @throw statements. Added a FIXME to handle 'rethrow' check. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64308 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
7151bbb55c8a437073e42f74348c3fd5f1d5b410 |
11-Feb-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6206858> [sema] type check @throw statements. Added a FIXME to handle 'rethrow' check. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64308 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
29b3d302e726e76bf5368bd1261509191ea0bdc4 |
11-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Rename Sema::hasSameType to QualType::isSameAs Rename Sema::hasSameUnqualifiedType to QualType::isSameIgnoringQalifiers git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64307 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaType.cpp
|
26a0bdb810681e2514b9ddc2d9779ce6c9a79409 |
11-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Rename Sema::hasSameType to QualType::isSameAs Rename Sema::hasSameUnqualifiedType to QualType::isSameIgnoringQalifiers git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64307 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaType.cpp
|
3628e1b464825e84b6f4d3f11db3765e2eda54b0 |
11-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement semantic checking for template arguments that correspond to pointer-to-member-data non-type template parameters. Also, get consistent about what it means to returned a bool from CheckTemplateArgument. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64305 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
658bbb5e8072ccd68b5ddc299d1b868aa047a746 |
11-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement semantic checking for template arguments that correspond to pointer-to-member-data non-type template parameters. Also, get consistent about what it means to returned a bool from CheckTemplateArgument. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64305 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
3f41196f2ea973ebdeb664e398a1e0d0570e83ed |
11-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Add semantic checking for template arguments that correspond to non-type template parameters that are references to functions or pointers to member functions. Did a little bit of refactoring so that these two cases, along with the handling of non-type template parameters that are pointers to functions, are handled by the same path. Also, tweaked FixOverloadedFunctionReference to cope with member function pointers. This is a necessary step for getting all of the fun member pointer conversions working outside of template arguments, too. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64277 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaTemplate.cpp
|
b86b0579c5805c8ecaedd2d676e06bf8c2bf7f79 |
11-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Add semantic checking for template arguments that correspond to non-type template parameters that are references to functions or pointers to member functions. Did a little bit of refactoring so that these two cases, along with the handling of non-type template parameters that are pointers to functions, are handled by the same path. Also, tweaked FixOverloadedFunctionReference to cope with member function pointers. This is a necessary step for getting all of the fun member pointer conversions working outside of template arguments, too. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64277 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaTemplate.cpp
|
d8c8c0991a09d7d1697b44b0342a48701bfd054c |
11-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Semantic checking for template arguments that correspond to non-type template parameters that have reference type. Effectively, we're doing a very limited form of reference binding here. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64270 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
f684e6e793a336f52138a2609b207e6eef3c3022 |
11-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Semantic checking for template arguments that correspond to non-type template parameters that have reference type. Effectively, we're doing a very limited form of reference binding here. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64270 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
2eedd9976fa867fd63ba10aa6d61bf032bd08355 |
11-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Add partial semantic checking of template arguments that are meant for non-type template parameters of pointer-to-object and pointer-to-function type. The most fun part of this is the use of overload resolution to pick a function from the set of overloaded functions that comes in as a template argument. Also, fixed two minor bugs in this area: - We were allowing non-type template parameters of type pointer to void. - We weren't patching up an expression that refers to an overloaded function set via "&f" properly. We're still not performing complete checking of the expression to be sure that it is referring to an object or function with external linkage (C++ [temp.arg.nontype]p1). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64266 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaTemplate.cpp
|
a35284bba5db7a6179d70fcce8fbe66481058698 |
11-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Add partial semantic checking of template arguments that are meant for non-type template parameters of pointer-to-object and pointer-to-function type. The most fun part of this is the use of overload resolution to pick a function from the set of overloaded functions that comes in as a template argument. Also, fixed two minor bugs in this area: - We were allowing non-type template parameters of type pointer to void. - We weren't patching up an expression that refers to an overloaded function set via "&f" properly. We're still not performing complete checking of the expression to be sure that it is referring to an object or function with external linkage (C++ [temp.arg.nontype]p1). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64266 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
emaTemplate.cpp
|
79e5c9cb09c1a188435d60328b060b9883f631e1 |
11-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Add type-checking and implicit conversions for template parameters of integral or enumeration type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64256 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaType.cpp
|
6ae5e6649f5d01a1b593f4db755bfcb42e095700 |
11-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Add type-checking and implicit conversions for template parameters of integral or enumeration type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64256 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
emaType.cpp
|
ec793e82537a1e7743bfa1eccf9b7b1186c8451f |
10-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
GNU allows structs with flexible array members to be placed inside arrays and other structs/unions as an extension. Downgrade our error to a warning. Fixes PR3540. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64239 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
0bfe54fdc83b7b4e37c40e652d86d15aa89885b2 |
10-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
GNU allows structs with flexible array members to be placed inside arrays and other structs/unions as an extension. Downgrade our error to a warning. Fixes PR3540. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64239 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
9225a7e7e87fc7cb22260ae16d5f42ed82f08314 |
10-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement parsing, semantic analysis and ASTs for default template arguments. This commit covers checking and merging default template arguments from previous declarations, but it does not cover the actual use of default template arguments when naming class template specializations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64229 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
|
d684b0027e16163c4bdba3e2f8bfadda7d62a0d3 |
10-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement parsing, semantic analysis and ASTs for default template arguments. This commit covers checking and merging default template arguments from previous declarations, but it does not cover the actual use of default template arguments when naming class template specializations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64229 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
|
62cdc79b9449bb634771e2b70ec8831fb02ea319 |
10-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Semantic analysis for non-type template parameter declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64223 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
5d290d584a82bb1cbfffa1b9a9a278538970e1b9 |
10-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Semantic analysis for non-type template parameter declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64223 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
341ac795fdda52b74de7ba824b15ea51d77ae2fb |
10-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Teach the type-id/expression disambiguator about different disambiguation contexts, so that we properly parse template arguments such as A<int()> as type-ids rather than as expressions. Since this can be confusing (especially when the template parameter is a non-type template parameter), we try to give a friendly error message. Almost, eliminate a redundant error message (that should have been a note) and add some ultra-basic checks for non-type template arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64189 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
8b642592a35167a3780074e78674e0bece87c40c |
10-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Teach the type-id/expression disambiguator about different disambiguation contexts, so that we properly parse template arguments such as A<int()> as type-ids rather than as expressions. Since this can be confusing (especially when the template parameter is a non-type template parameter), we try to give a friendly error message. Almost, eliminate a redundant error message (that should have been a note) and add some ultra-basic checks for non-type template arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64189 91177308-0d34-0410-b5e6-96231b3b80d8
emaTemplate.cpp
|
e8e367f393e9d1d81754d252f24f1f04600f6de6 |
10-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Check template template arguments against their corresponding template template parameters. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64188 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
|
dd0574e76439f31c02ba54bd7708725176f9531f |
10-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Check template template arguments against their corresponding template template parameters. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64188 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
|
35d81bb3324970c340d63aa9e17c39694dfe2891 |
10-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Rudimentary checking of template arguments against their corresponding template parameters when performing semantic analysis of a template-id naming a class template specialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64185 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaTemplate.cpp
|
c15cb38a4ff717097b32532fbf761c71b1376a02 |
10-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Rudimentary checking of template arguments against their corresponding template parameters when performing semantic analysis of a template-id naming a class template specialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64185 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaTemplate.cpp
|
362abcd61aeb05a1decfedd6b10f77cfe42034ae |
09-Feb-2009 |
Ted Kremenek <kremenek@apple.com> |
CallExpr now uses ASTContext's allocate to allocate/delete its array of subexpressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64162 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaOverload.cpp
|
668bf91d31265b6ea8c3eb854ba450857701f269 |
09-Feb-2009 |
Ted Kremenek <kremenek@apple.com> |
CallExpr now uses ASTContext's allocate to allocate/delete its array of subexpressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64162 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaOverload.cpp
|
d7e76c5e518f9d805dd94400308878204d62ea8b |
09-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When handling "the rest" of a designated array subobject, maybe sure to tell it that it wasn't (directly) designated. This way, we unwind back to the explicit initializer list properly rather than getting stuck in the wrong subobject. Fixes llvm.org/PR3519 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64155 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
fdf556936f94344d5482747403f27822cf0ae37f |
09-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
When handling "the rest" of a designated array subobject, maybe sure to tell it that it wasn't (directly) designated. This way, we unwind back to the explicit initializer list properly rather than getting stuck in the wrong subobject. Fixes llvm.org/PR3519 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64155 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
6f37b58716e89420c13ac067fe605c3b6d5821d0 |
09-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Eliminate TemplateArg so that we only have a single kind of representation for template arguments. Also simplifies the interface for ActOnClassTemplateSpecialization and eliminates some annoying allocations of TemplateArgs. My attempt at smart pointers for template arguments lists is relatively lame. We can improve it once we're sure that we have the right representation for template arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64154 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
|
5908e9f25bc9a334c99c095e0b1e6a515445be2d |
09-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Eliminate TemplateArg so that we only have a single kind of representation for template arguments. Also simplifies the interface for ActOnClassTemplateSpecialization and eliminates some annoying allocations of TemplateArgs. My attempt at smart pointers for template arguments lists is relatively lame. We can improve it once we're sure that we have the right representation for template arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64154 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
|
8e458f48f07276fe279a3d02e709e7ce15b2f9c3 |
09-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Start processing template-ids as types when the template-name refers to a class template. For example, the template-id 'vector<int>' now has a nice, sugary type in the type system. What we can do now: - Parse template-ids like 'vector<int>' (where 'vector' names a class template) and form proper types for them in the type system. - Parse icky template-ids like 'A<5>' and 'A<(5 > 0)>' properly, using (sadly) a bool in the parser to tell it whether '>' should be treated as an operator or not. This is a baby-step, with major problems and limitations: - There are currently two ways that we handle template arguments (whether they are types or expressions). These will be merged, and, most likely, TemplateArg will disappear. - We don't have any notion of the declaration of class template specializations or of template instantiations, so all template-ids are fancy names for 'int' :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64153 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
|
55f6b14230c94272efbbcdd89a92224c8db9f225 |
09-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Start processing template-ids as types when the template-name refers to a class template. For example, the template-id 'vector<int>' now has a nice, sugary type in the type system. What we can do now: - Parse template-ids like 'vector<int>' (where 'vector' names a class template) and form proper types for them in the type system. - Parse icky template-ids like 'A<5>' and 'A<(5 > 0)>' properly, using (sadly) a bool in the parser to tell it whether '>' should be treated as an operator or not. This is a baby-step, with major problems and limitations: - There are currently two ways that we handle template arguments (whether they are types or expressions). These will be merged, and, most likely, TemplateArg will disappear. - We don't have any notion of the declaration of class template specializations or of template instantiations, so all template-ids are fancy names for 'int' :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64153 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
|
3b7ec4be3ab6a5f2c13fb22622456d13b43a1751 |
09-Feb-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Update new expression to make use of Declarator::getSourceRange(). References are not objects; implement this in Type::isObjectType(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64152 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
|
00e68e2cc5ce37cb95beb801cae73c0d1e9dda37 |
09-Feb-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Update new expression to make use of Declarator::getSourceRange(). References are not objects; implement this in Type::isObjectType(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64152 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
|
0c9860319952458cc02ef5cbba3dd0b5be55c9a3 |
09-Feb-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implement Declarator::getSourceRange(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64151 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
ab197baec16bacade82325fb274cf6b992ac5d8a |
09-Feb-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implement Declarator::getSourceRange(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64151 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f1a6712a280fcb40f12117717f58a4ded5fc8649 |
09-Feb-2009 |
Ted Kremenek <kremenek@apple.com> |
Allocate the subexpression array for OberloadExpr from ASTContext's allocator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64145 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
fb7413f12636cefa9ebec9abf95804f82c305b11 |
09-Feb-2009 |
Ted Kremenek <kremenek@apple.com> |
Allocate the subexpression array for OberloadExpr from ASTContext's allocator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64145 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
a60c62ed9466364782369cb165f9392651a43a64 |
09-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Make Sema::getTypeName return the opaque pointer of a QualType rather than a Decl, which gives us some more flexibility to express the results with the type system. There are no clients using this flexibility yet, but it's meant to be able to describe qualified names as written in the source (e.g., "foo::type") or template-ids that name a class template specialization (e.g., "std::vector<INT>"). DeclSpec's TST_typedef has become TST_typename, to reflect its use to describe types found by name (that may or may not be typedefs). The type representation of a DeclSpec with TST_typename is an opaque QualType pointer. All users of TST_typedef, both direct and indirect, have been updated for these changes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64141 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaType.cpp
|
1a51b4a11b7db25cac2134249711ecaaf9d1c0a8 |
09-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Make Sema::getTypeName return the opaque pointer of a QualType rather than a Decl, which gives us some more flexibility to express the results with the type system. There are no clients using this flexibility yet, but it's meant to be able to describe qualified names as written in the source (e.g., "foo::type") or template-ids that name a class template specialization (e.g., "std::vector<INT>"). DeclSpec's TST_typedef has become TST_typename, to reflect its use to describe types found by name (that may or may not be typedefs). The type representation of a DeclSpec with TST_typename is an opaque QualType pointer. All users of TST_typedef, both direct and indirect, have been updated for these changes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64141 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaType.cpp
|
0d2157d80ba534761516a90f22bffb0f95a5bdbf |
08-Feb-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Fix redundant errors with missing default arguments in member declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64085 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
00d50747e8442a4d0daf2dfc226aec354fd3441e |
08-Feb-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Fix redundant errors with missing default arguments in member declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64085 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
c5d446916ec4c08106d51ee9d8aa3eab4f08e65a |
08-Feb-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Fix redundant errors for redefinitions with multiple existing definitions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64081 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
89ef6e03665635d965ba6c92035a85b125e6c78c |
08-Feb-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Fix redundant errors for redefinitions with multiple existing definitions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64081 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
9b3264d1cbb3bf7bebe90afe9cee8946788ad9ae |
08-Feb-2009 |
Anders Carlsson <andersca@mac.com> |
Improve Sema of the cleanup attribute somewhat. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64047 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
89941c1c68d8e4eec3c8ea8ee68e34d9e3c7b083 |
08-Feb-2009 |
Anders Carlsson <andersca@mac.com> |
Improve Sema of the cleanup attribute somewhat. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64047 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
aa4c373fd2e6425e2bb45f040024f0f8ced33e91 |
07-Feb-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Move CheckPointerToMemberOperands to SemaExprCXX.cpp git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64029 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprCXX.cpp
emaInherit.cpp
|
7c8bd60da52c3280f2fac27977efd74cd290b131 |
07-Feb-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Move CheckPointerToMemberOperands to SemaExprCXX.cpp git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64029 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprCXX.cpp
emaInherit.cpp
|
06f217cec5ccefc68c00555324486168ef583e93 |
07-Feb-2009 |
Ted Kremenek <kremenek@apple.com> |
Use 'Destroy(Context)' instead of 'Context.Deallocate()' (does recursive freeing of memory). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63998 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
169a2664a64b57a815b5f0b39276a0891663921a |
07-Feb-2009 |
Ted Kremenek <kremenek@apple.com> |
Use 'Destroy(Context)' instead of 'Context.Deallocate()' (does recursive freeing of memory). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63998 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
0c97e0460148daf132d6623af5b6ff1bc41db649 |
07-Feb-2009 |
Ted Kremenek <kremenek@apple.com> |
Overhaul of Stmt allocation: - Made allocation of Stmt objects using vanilla new/delete a *compiler error* by making this new/delete "protected" within class Stmt. - Now the only way to allocate Stmt objects is by using the new operator that takes ASTContext& as an argument. This ensures that all Stmt nodes are allocated from the same (pool) allocator. - Naturally, these two changes required that *all* creation sites for AST nodes use new (ASTContext&). This is a large patch, but the majority of the changes are just this mechanical adjustment. - The above changes also mean that AST nodes can no longer be deallocated using 'delete'. Instead, one most do StmtObject->Destroy(ASTContext&) or do ASTContextObject.Deallocate(StmtObject) (the latter not running the 'Destroy' method). Along the way I also... - Made CompoundStmt allocate its array of Stmt* using the allocator in ASTContext (previously it used std::vector). There are a whole bunch of other Stmt classes that need to be similarly changed to ensure that all memory allocated for ASTs comes from the allocator in ASTContext. - Added a new smart pointer ExprOwningPtr to Sema.h. This replaces the uses of llvm::OwningPtr within Sema, as llvm::OwningPtr used 'delete' to free memory instead of a Stmt's 'Destroy' method. Big thanks to Doug Gregor for helping with the acrobatics of making 'new/delete' private and the new smart pointer ExprOwningPtr! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63997 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaChecking.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaNamedCast.cpp
emaOverload.cpp
emaStmt.cpp
emaType.cpp
|
8189cde56b4f6f938cd65f53c932fe1860d0204c |
07-Feb-2009 |
Ted Kremenek <kremenek@apple.com> |
Overhaul of Stmt allocation: - Made allocation of Stmt objects using vanilla new/delete a *compiler error* by making this new/delete "protected" within class Stmt. - Now the only way to allocate Stmt objects is by using the new operator that takes ASTContext& as an argument. This ensures that all Stmt nodes are allocated from the same (pool) allocator. - Naturally, these two changes required that *all* creation sites for AST nodes use new (ASTContext&). This is a large patch, but the majority of the changes are just this mechanical adjustment. - The above changes also mean that AST nodes can no longer be deallocated using 'delete'. Instead, one most do StmtObject->Destroy(ASTContext&) or do ASTContextObject.Deallocate(StmtObject) (the latter not running the 'Destroy' method). Along the way I also... - Made CompoundStmt allocate its array of Stmt* using the allocator in ASTContext (previously it used std::vector). There are a whole bunch of other Stmt classes that need to be similarly changed to ensure that all memory allocated for ASTs comes from the allocator in ASTContext. - Added a new smart pointer ExprOwningPtr to Sema.h. This replaces the uses of llvm::OwningPtr within Sema, as llvm::OwningPtr used 'delete' to free memory instead of a Stmt's 'Destroy' method. Big thanks to Doug Gregor for helping with the acrobatics of making 'new/delete' private and the new smart pointer ExprOwningPtr! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63997 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaChecking.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaNamedCast.cpp
emaOverload.cpp
emaStmt.cpp
emaType.cpp
|
34e58bdd13e516bf1df52fec1d3cdf05d2dca766 |
07-Feb-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Add negative test cases and fix diagnostics for member pointer dereferencing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63987 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
7878ffde0c48a33a8fd3819be1b797d52f7b3849 |
07-Feb-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Add negative test cases and fix diagnostics for member pointer dereferencing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63987 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
95216a67cc6db599f50a8617f882396396ab07c9 |
07-Feb-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implement dereferencing of pointers-to-member. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63983 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaInherit.h
emaLookup.cpp
|
224605064a4ef87d1c3d35ad1cb363f8b534012b |
07-Feb-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implement dereferencing of pointers-to-member. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63983 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaInherit.h
emaLookup.cpp
|
ee785232e0aa8085be676ad77f9f5a8e54b33837 |
06-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Clean up an already-fixed FIXME git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63975 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
4b99bae3bf2395f732eaadb9edc07690ae177f54 |
06-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Clean up an already-fixed FIXME git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63975 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d406b034f9f50836d756e3f977845fdb8beaebee |
06-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Semantic checking for class template declarations and redeclarations. For example, checks that a class template redeclaration has the same template parameters as previous declarations. Detangled class-template checking from ActOnTag, whose logic was getting rather convoluted because it tried to handle C, C++, and C++ template semantics in one shot. Made some inroads toward eliminating extraneous "declaration does not declare anything" errors by adding an "error" type specifier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63973 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplate.cpp
|
ddc29e116db3c3f4144355e67a0137b38b6bb6d1 |
06-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Semantic checking for class template declarations and redeclarations. For example, checks that a class template redeclaration has the same template parameters as previous declarations. Detangled class-template checking from ActOnTag, whose logic was getting rather convoluted because it tried to handle C, C++, and C++ template semantics in one shot. Made some inroads toward eliminating extraneous "declaration does not declare anything" errors by adding an "error" type specifier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63973 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplate.cpp
|
4f530a9d984c94de4fa6ccf330885f6d05b564a2 |
06-Feb-2009 |
Ted Kremenek <kremenek@apple.com> |
Move StringLiteral to allocate its internal string data using the allocator in ASTContext. This required changing all clients to pass in the ASTContext& to the constructor of StringLiteral. I also changed all allocations of StringLiteral to use new(ASTContext&). Along the way, I updated a bunch of new()'s in StmtSerialization.cpp to use the allocator from ASTContext& (not complete). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63958 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprObjC.cpp
|
6e94ef5696cfb005d3fc7bbac8dcf7690b64f0a5 |
06-Feb-2009 |
Ted Kremenek <kremenek@apple.com> |
Move StringLiteral to allocate its internal string data using the allocator in ASTContext. This required changing all clients to pass in the ASTContext& to the constructor of StringLiteral. I also changed all allocations of StringLiteral to use new(ASTContext&). Along the way, I updated a bunch of new()'s in StmtSerialization.cpp to use the allocator from ASTContext& (not complete). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63958 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprObjC.cpp
|
46cfe45a10c6d35c1a502fb7949dac4874c09562 |
06-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Diagnose attempts to define a namespace member out-of-line when no matching member exists. Thanks to Piotr Rak for reporting the problem! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63939 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
4ce205f94c984ddc4776ba0c3de7e398d251653a |
06-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Diagnose attempts to define a namespace member out-of-line when no matching member exists. Thanks to Piotr Rak for reporting the problem! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63939 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
b96b92d2b8965ff7078ad9a2823d27f1411fb559 |
05-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Improvements and fixes for name lookup with using directives, from Piotr Rak! Also, put Objective-C protocols into their own identifier namespace. Otherwise, we find protocols when we don't want to in C++ (but not in C). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63877 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaLookup.cpp
|
7dda67d8decef1b3621a151488c4b83bd8372d6a |
05-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Improvements and fixes for name lookup with using directives, from Piotr Rak! Also, put Objective-C protocols into their own identifier namespace. Otherwise, we find protocols when we don't want to in C++ (but not in C). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63877 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaLookup.cpp
|
3a75abfa29ab4163e134b1c3394859beea9592e0 |
05-Feb-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Remove some non-ASCII in comment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63866 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
0defd76d0b73c4866f1d5f71a274bf125fafd446 |
05-Feb-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Remove some non-ASCII in comment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63866 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
be69b166be4822c1477e60a0529ab39846ee152e |
04-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement semantic analysis for the GNU flexible array initialization extension. The interaction with designated initializers is a bit... interesting... but we follow GNU's lead and don't permit too much crazy code in this area. Also, make the "excess initializers" error message a bit more informative. Addresses PR2561: http://llvm.org/bugs/show_bug.cgi?id=2561 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63785 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaInit.cpp
|
eeb15d499f032bb89773ddaca2d17475122a37bb |
04-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement semantic analysis for the GNU flexible array initialization extension. The interaction with designated initializers is a bit... interesting... but we follow GNU's lead and don't permit too much crazy code in this area. Also, make the "excess initializers" error message a bit more informative. Addresses PR2561: http://llvm.org/bugs/show_bug.cgi?id=2561 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63785 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaInit.cpp
|
c1fddffe2f78fc59d6d872ed14c50fba8110c0c0 |
04-Feb-2009 |
Mike Stump <mrs@apple.com> |
Add support for blocks with explicit return types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63784 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaStmt.cpp
emaType.cpp
|
98eb8a7a702b95183ed015706b1f1c66f5cb27a4 |
04-Feb-2009 |
Mike Stump <mrs@apple.com> |
Add support for blocks with explicit return types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63784 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaStmt.cpp
emaType.cpp
|
7434fc39134bab83a6aba534828a035d24e25ae6 |
04-Feb-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implement taking address of member functions, including overloaded ones. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63779 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaOverload.cpp
|
33b399a8fdd0910ed86b60e61c6a02ba8258bbe3 |
04-Feb-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implement taking address of member functions, including overloaded ones. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63779 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaOverload.cpp
|
f2dbdca4da38b43c06606f81bd6f5f1d384218a7 |
04-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve documentation for Sema::getTypeName. Also, it's return type is DeclTy*, not TypeTy*. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63756 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
d6efafa5144a3e9942d1b09a246b118b1ba77a48 |
04-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Improve documentation for Sema::getTypeName. Also, it's return type is DeclTy*, not TypeTy*. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63756 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
279272e63b321f89c8fa0bb198acd3a834459aeb |
04-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Basic representation of C++ class templates, from Andrew Sutton. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63750 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaLookup.cpp
emaTemplate.cpp
|
aaba5e346dffdbad5d1c42765a89e4a7afb0da67 |
04-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Basic representation of C++ class templates, from Andrew Sutton. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63750 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaLookup.cpp
emaTemplate.cpp
|
09be81b04e4e5f8c4c57f952fb6d82dcdbb56b85 |
04-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Some name-lookup-related fixes, from Piotr Rak! - Changes Lookup*Name functions to return NamedDecls, instead of Decls. Unfortunately my recent statement that it will simplify lot of code, was not quite right, but it simplifies some... - Makes MergeLookupResult SmallPtrSet instead of vector, following Douglas suggestions. - Adds %qN format for printing qualified names to Diagnostic. - Avoids searching for using-directives in Scopes, which are not DeclScope, during unqualified name lookup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63739 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprObjC.cpp
emaLookup.cpp
emaTemplate.cpp
|
47b9a1ca55e61e37f5a368740e29de190345acc6 |
04-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Some name-lookup-related fixes, from Piotr Rak! - Changes Lookup*Name functions to return NamedDecls, instead of Decls. Unfortunately my recent statement that it will simplify lot of code, was not quite right, but it simplifies some... - Makes MergeLookupResult SmallPtrSet instead of vector, following Douglas suggestions. - Adds %qN format for printing qualified names to Diagnostic. - Avoids searching for using-directives in Scopes, which are not DeclScope, during unqualified name lookup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63739 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprObjC.cpp
emaLookup.cpp
emaTemplate.cpp
|
cb3beaf908fc28b3e996db56e6575c4ef18bf548 |
04-Feb-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6552648> error: redefinition of 'XCElementAnchorDelegate' as different kind of symbol. At first glance, this looked like a recent regression (possibly created by http://llvm.org/viewvc/llvm-project?view=rev&revision=63354, which was the only recent change to this section of Sema::ActOnStartClassInterface()). After more investigation, it looks like an edge case bug that we didn't cover in our tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63738 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
818cb9eaba6279675af8c3b87c464d21d3796682 |
04-Feb-2009 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6552648> error: redefinition of 'XCElementAnchorDelegate' as different kind of symbol. At first glance, this looked like a recent regression (possibly created by http://llvm.org/viewvc/llvm-project?view=rev&revision=63354, which was the only recent change to this section of Sema::ActOnStartClassInterface()). After more investigation, it looks like an edge case bug that we didn't cover in our tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63738 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
1075a169d1dab0e6f5bed69440efec387d58af51 |
04-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Diagnose ambiguities in getTypeName. Fixes http://llvm.org/bugs/show_bug.cgi?id=3475 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63737 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
b696ea3a0693798daeafd896d77f0b8f1fec3cc5 |
04-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Diagnose ambiguities in getTypeName. Fixes http://llvm.org/bugs/show_bug.cgi?id=3475 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63737 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
48a8732ec59331eb3b65d4cefe992cc88c914e48 |
04-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Bring operator name lookup (as required for C++ operator overloading) into the general name-lookup fold. This cleans up some ugly, not-quite-working code in the handling of operator overloading. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63735 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaLookup.cpp
emaOverload.cpp
|
f680a0fe2dcab32b59fe6fdf71145b5313c40950 |
04-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Bring operator name lookup (as required for C++ operator overloading) into the general name-lookup fold. This cleans up some ugly, not-quite-working code in the handling of operator overloading. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63735 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaLookup.cpp
emaOverload.cpp
|
4646f9c5bcd9e45228412daa99c9fcee58db9676 |
04-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix our semantic analysis of unqualified-id '(' in C++. The unqualified-id might not refer to any declaration in our current scope, but declarations by that name might be found via argument-dependent lookup. We now do so properly. As part of this change, CXXDependentNameExpr, which was previously designed to express the unqualified-id in the above constructor within templates, has become UnresolvedFunctionNameExpr, which does effectively the same thing but will work for both templates and non-templates. Additionally, we cope with all unqualified-ids, since ADL also applies in cases like operator+(x, y) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63733 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprCXX.cpp
emaOverload.cpp
|
17330019f05966762bc952840ef1926b9becb145 |
04-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Fix our semantic analysis of unqualified-id '(' in C++. The unqualified-id might not refer to any declaration in our current scope, but declarations by that name might be found via argument-dependent lookup. We now do so properly. As part of this change, CXXDependentNameExpr, which was previously designed to express the unqualified-id in the above constructor within templates, has become UnresolvedFunctionNameExpr, which does effectively the same thing but will work for both templates and non-templates. Additionally, we cope with all unqualified-ids, since ADL also applies in cases like operator+(x, y) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63733 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprCXX.cpp
emaOverload.cpp
|
aa1da4a7c5d4a31a52a78865262f178b3071988a |
04-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Initial implementation of argument dependent lookup (a.k.a. ADL, a.k.a. Koenig lookup) in C++. Most of the pieces are in place, but for two: - In an unqualified call g(x), even if the name does not refer to anything in the current scope, we can still find functions named "g" based on ADL. We don't yet have this ability. - ADL will need updating for friend functions and templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63692 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaLookup.cpp
emaOverload.cpp
|
fa047648b2a5502d7eef117adb4777eb9a63baa6 |
04-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Initial implementation of argument dependent lookup (a.k.a. ADL, a.k.a. Koenig lookup) in C++. Most of the pieces are in place, but for two: - In an unqualified call g(x), even if the name does not refer to anything in the current scope, we can still find functions named "g" based on ADL. We don't yet have this ability. - ADL will need updating for friend functions and templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63692 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaLookup.cpp
emaOverload.cpp
|
b02f5f296842be4e912de7c3b65c994b0baba081 |
03-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
silence some warnings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63662 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
48458d214c21401aa120e432a434f8ffd4e76a82 |
03-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
silence some warnings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63662 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
0c9da2196c86e33dba390b4f52280e2a0803a1e8 |
03-Feb-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Allow taking the address of data members, resulting in a member pointer. Pointers to functions don't work yet, and pointers to overloaded functions even less. Also, far too much illegal code is accepted. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63655 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprCXX.cpp
|
ebc07d57be9e0722b4b9c66625e1fca43dcc2ee0 |
03-Feb-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Allow taking the address of data members, resulting in a member pointer. Pointers to functions don't work yet, and pointers to overloaded functions even less. Also, far too much illegal code is accepted. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63655 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprCXX.cpp
|
362c8955c74cd6f9e24026403624afbe7fcdf029 |
03-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When looking for a tag name via unqualified name lookup, only look in scopes where the name would be considered a redeclaration if we know that we're declaring or defining that tag. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63647 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
e2c565d488bc74a506d49fe37df4268fa35637b3 |
03-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
When looking for a tag name via unqualified name lookup, only look in scopes where the name would be considered a redeclaration if we know that we're declaring or defining that tag. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63647 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
7a7be65a7801addae8205fd68323cecd70df1635 |
03-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Semantic analysis, ASTs, and unqualified name lookup support for C++ using directives, from Piotr Rak! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63646 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaLookup.cpp
|
2a3009a432bdcec59e6383d7b2b17494d6f91649 |
03-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Semantic analysis, ASTs, and unqualified name lookup support for C++ using directives, from Piotr Rak! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63646 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaLookup.cpp
|
2d87eb0dd2c84324bf1847d0d85457b16d87445c |
03-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Simplify the way in which we inject the names of tag definitions and elaborated-type-specifier declarations into outer scopes while retaining their proper lexical scope. This way is simpler and more consistent with the way DeclContexts work, and also fixes http://llvm.org/bugs/show_bug.cgi?id=3430 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63581 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
1931b44da8da86979a8d7ceb48685686503f197b |
03-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Simplify the way in which we inject the names of tag definitions and elaborated-type-specifier declarations into outer scopes while retaining their proper lexical scope. This way is simpler and more consistent with the way DeclContexts work, and also fixes http://llvm.org/bugs/show_bug.cgi?id=3430 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63581 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
469fc9a3a0e2278cec1d6ad67f690498ea189475 |
03-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Add a macro-based enumeration of all of the Decl nodes (like we do with Stmt/Expr nodes), and convert some of the more mundane switch-on-all-decl-kinds uses over to use this new file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63570 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
64650af7cc4352c6c67b9bd1bf8ef3ce7471b910 |
03-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Add a macro-based enumeration of all of the Decl nodes (like we do with Stmt/Expr nodes), and convert some of the more mundane switch-on-all-decl-kinds uses over to use this new file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63570 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
7dd542259bc568a242fd1c49659d770e6fb36984 |
02-Feb-2009 |
Nuno Lopes <nunoplopes@sapo.pt> |
emit diagnostic when casting a ptr to a small int when doing static initialization (addresses Eli's comments I believe) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63562 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
ff77645058c5d56b4f3273e27f7492c78288825e |
02-Feb-2009 |
Nuno Lopes <nunoplopes@sapo.pt> |
emit diagnostic when casting a ptr to a small int when doing static initialization (addresses Eli's comments I believe) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63562 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
5ba3b2622abe258218660c1915abcb5e98841512 |
02-Feb-2009 |
Nuno Lopes <nunoplopes@sapo.pt> |
fix TryToFixInvalidVariablyModifiedType to reject negative array sizes git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63557 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
1dfa6e15cba39f27a438d63837435596e58af1c1 |
02-Feb-2009 |
Nuno Lopes <nunoplopes@sapo.pt> |
fix TryToFixInvalidVariablyModifiedType to reject negative array sizes git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63557 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d91763983557972420b09dc1f6f46683128707ad |
02-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Steve set me straight on this one. GCC was right, EDG was wrong: the direct-initialization following a user-defined conversion can select any constructor; it just can't employ any user-defined conversions. So we ban those conversions and classify the constructor call based on the relationship between the "from" and "to" types in the conversion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63554 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
2b1e0039a1937e3df59b5c99bcf4746360db3441 |
02-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Steve set me straight on this one. GCC was right, EDG was wrong: the direct-initialization following a user-defined conversion can select any constructor; it just can't employ any user-defined conversions. So we ban those conversions and classify the constructor call based on the relationship between the "from" and "to" types in the conversion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63554 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
bd4b085b89dbdad58da7dd305ad56765131dde9b |
02-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Add iterators to LookupResult, allowing one to iterate over the non-ambiguous name lookup results without allocating any memory, e.g., for sets of overloaded functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63549 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaInit.cpp
emaLookup.cpp
|
d863517ab7e936cbc3244a0fc431c8b672f5ece4 |
02-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Add iterators to LookupResult, allowing one to iterate over the non-ambiguous name lookup results without allocating any memory, e.g., for sets of overloaded functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63549 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaInit.cpp
emaLookup.cpp
|
538a4c24fd066b19d85fe24add5fb9bdbbe971ab |
02-Feb-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Check value-initializations that occur when an initializer list provides too few elements. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63525 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaInit.cpp
|
87fd703e097c27d63479cb83b687d4000a22bbb1 |
02-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Check value-initializations that occur when an initializer list provides too few elements. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63525 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaInit.cpp
|
347e093a93093efa7a5e7b0faf0491104d28e80d |
02-Feb-2009 |
Nuno Lopes <nunoplopes@sapo.pt> |
allow cast from array to int to be considered as constant git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63519 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
839508150a7a595b6172217eeddc4d024fc201c5 |
02-Feb-2009 |
Nuno Lopes <nunoplopes@sapo.pt> |
allow cast from array to int to be considered as constant git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63519 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
6283006cc00c1deba5547c70a17e6d59d683853d |
02-Feb-2009 |
Nuno Lopes <nunoplopes@sapo.pt> |
fix PR3459: improve compatibility with gcc when checking for constant exprs git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63517 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f23199847b686ca2d674274ee7271f75640c1e0e |
02-Feb-2009 |
Nuno Lopes <nunoplopes@sapo.pt> |
fix PR3459: improve compatibility with gcc when checking for constant exprs git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63517 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
677e38ffb695d3963143a4ced265248bcc2332dd |
31-Jan-2009 |
Anders Carlsson <andersca@mac.com> |
Add sema support for the cleanup attribute. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63462 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
f6e35d0b9f1e9f1b4c5d3ef924415fa5e7c89849 |
31-Jan-2009 |
Anders Carlsson <andersca@mac.com> |
Add sema support for the cleanup attribute. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63462 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
b206cc4d758deec59e57f8d3491aa764f966e775 |
31-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve our handling of the second step in a user-defined conversion sequence. Previously, we weren't permitting the second step to call copy constructors, which left user-defined conversion sequences surprisingly broken. Now, we perform overload resolution among all of the constructors, but only accept the result if it makes the conversion a standard conversion. Note that this behavior is different from both GCC and EDG (which don't agree with each other, either); I've submitted a core issue on the matter. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63450 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaOverload.cpp
|
734d9869efb5d126df53ba70a6060789887e0d68 |
31-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Improve our handling of the second step in a user-defined conversion sequence. Previously, we weren't permitting the second step to call copy constructors, which left user-defined conversion sequences surprisingly broken. Now, we perform overload resolution among all of the constructors, but only accept the result if it makes the conversion a standard conversion. Note that this behavior is different from both GCC and EDG (which don't agree with each other, either); I've submitted a core issue on the matter. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63450 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaOverload.cpp
|
355ed05df6da9484f1f9b1148b6541230f737169 |
31-Jan-2009 |
Anders Carlsson <andersca@mac.com> |
Turn on -flax-vector-conversions by default, issue a warning whenever one is done. Add a -fnolax-vector-conversions option. Fixes PR2862. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63447 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
b0f90ccbc1079bb054071b836aa6dd265f33f3a2 |
31-Jan-2009 |
Anders Carlsson <andersca@mac.com> |
Turn on -flax-vector-conversions by default, issue a warning whenever one is done. Add a -fnolax-vector-conversions option. Fixes PR2862. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63447 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
09f078ce215f423c1b8c794fe83c13e3b5370a83 |
30-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Upgrade the "excess elements in array initializer" warning to an error, since both C99 and C++ consider it an error. For reference, GCC makes this a warning while G++ makes it an error. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63435 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
b574e5630d66629ccc8f2432e60b59ae42f1f363 |
30-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Upgrade the "excess elements in array initializer" warning to an error, since both C99 and C++ consider it an error. For reference, GCC makes this a warning while G++ makes it an error. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63435 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
d45210dac6500ab9a0d9ee7edc423a183bf7d13a |
30-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement and test aggregate initialization in C++. Major changes: - Support initialization of reference members; complain if any reference members are left uninitialized. - Use C++ copy-initialization for initializing each element (falls back to constraint checking in C) - Make sure we diagnose when one tries to provide an initializer list for a non-aggregate. - Don't complain about empty initializers in C++ (they are permitted) - Unrelated but necessary: don't bother trying to convert the decl-specifier-seq to a type when we're dealing with a C++ constructor, destructor, or conversion operator; it results in spurious warnings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63431 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaInit.cpp
emaType.cpp
|
930d8b5ecc074cca01ecd9a522a55f55f3b72396 |
30-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement and test aggregate initialization in C++. Major changes: - Support initialization of reference members; complain if any reference members are left uninitialized. - Use C++ copy-initialization for initializing each element (falls back to constraint checking in C) - Make sure we diagnose when one tries to provide an initializer list for a non-aggregate. - Don't complain about empty initializers in C++ (they are permitted) - Unrelated but necessary: don't bother trying to convert the decl-specifier-seq to a type when we're dealing with a C++ constructor, destructor, or conversion operator; it results in spurious warnings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63431 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaInit.cpp
emaType.cpp
|
e7ef500151147ba851db502fc4d36319f863db80 |
30-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Switch Type::isAggregateType to use the C++ definition of "aggregate type" rather than the C definition. We do this because both C99 and Clang always use "aggregate type" as "aggregate or union type", and the C++ definition includes union types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63395 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaInit.cpp
|
d7eb846aaf5ee4a8d22c3cd0796d1e7229d46013 |
30-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Switch Type::isAggregateType to use the C++ definition of "aggregate type" rather than the C definition. We do this because both C99 and Clang always use "aggregate type" as "aggregate or union type", and the C++ definition includes union types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63395 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaInit.cpp
|
52ae30c90106ce7086e0787e95dd6536079202e4 |
30-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Eliminated LookupCriteria, whose creation was causing a bottleneck for LookupName et al. Instead, use an enum and a bool to describe its contents. Optimized the C/Objective-C path through LookupName, eliminating any unnecessarily C++isms. Simplify IdentifierResolver::iterator, removing some code and arguments that are no longer used. Eliminated LookupDeclInScope/LookupDeclInContext, moving all callers over to LookupName, LookupQualifiedName, or LookupParsedName, as appropriate. All together, I'm seeing a 0.2% speedup on Cocoa.h with PTH and -disable-free. Plus, we're down to three name-lookup routines. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63354 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
dentifierResolver.h
ema.h
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaInherit.cpp
emaInherit.h
emaLookup.cpp
emaOverload.cpp
emaTemplate.cpp
|
4c921ae760cbdd9270c16d48417d7d527eb0ceb8 |
30-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Eliminated LookupCriteria, whose creation was causing a bottleneck for LookupName et al. Instead, use an enum and a bool to describe its contents. Optimized the C/Objective-C path through LookupName, eliminating any unnecessarily C++isms. Simplify IdentifierResolver::iterator, removing some code and arguments that are no longer used. Eliminated LookupDeclInScope/LookupDeclInContext, moving all callers over to LookupName, LookupQualifiedName, or LookupParsedName, as appropriate. All together, I'm seeing a 0.2% speedup on Cocoa.h with PTH and -disable-free. Plus, we're down to three name-lookup routines. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63354 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
dentifierResolver.h
ema.h
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaInherit.cpp
emaInherit.h
emaLookup.cpp
emaOverload.cpp
emaTemplate.cpp
|
9fdddeddf7db0becc807298410fa5da31063e525 |
29-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Make CodeGen produce an error if we come across a non-constant initializer list that involves the GNU array-range designator extension git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63327 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
a9c878086036de36482cc21e35a33cabe9699b0a |
29-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Make CodeGen produce an error if we come across a non-constant initializer list that involves the GNU array-range designator extension git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63327 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
0eab08e337373bd0e98a6950e7f78b78be1b4ed4 |
29-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
diags moved, so these casts are no longer needed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63324 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
28372fa7f66e5c4f551f694373cba2aded3aa155 |
29-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
diags moved, so these casts are no longer needed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63324 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
a4e0498fe99f1dae86c462912222cf40ed8377f0 |
29-Jan-2009 |
Steve Naroff <snaroff@apple.com> |
Hack Sema::LookupDeclInScope() to avoid calling Sema::LookupName() when parsing C/ObjC. This results in a 1.7% improvement for "Cocoa.h". If we can figure out how to return a "Decl *", rather than a Sema::LookupResult(), we will likely bump the speedup from 1.7%->2.5%. I verified this, however couldn't get it to work without breaking a fair number of C++ test cases. Will discuss with Doug offline. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63320 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
a51890346e0d81519d0656f44bce15c40bf63d3f |
29-Jan-2009 |
Steve Naroff <snaroff@apple.com> |
Hack Sema::LookupDeclInScope() to avoid calling Sema::LookupName() when parsing C/ObjC. This results in a 1.7% improvement for "Cocoa.h". If we can figure out how to return a "Decl *", rather than a Sema::LookupResult(), we will likely bump the speedup from 1.7%->2.5%. I verified this, however couldn't get it to work without breaking a fair number of C++ test cases. Will discuss with Doug offline. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63320 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
c9e012a1d1737f355ff5cf65d691ee58c4143d5a |
29-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Introduce a new expression node, ImplicitValueInitExpr, that represents an implicit value-initialization of a subobject of a particular type. This replaces the (ab)use of CXXZeroValueInitExpr within initializer lists for the "holes" that occur due to the use of C99 designated initializers. The new test case is currently XFAIL'd, because CodeGen's ConstExprEmitter (in lib/CodeGen/CGExprConstant.cpp) needs to be taught to value-initialize when it sees ImplicitValueInitExprs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63317 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaInit.cpp
|
3498bdb9e9cb300de74c7b51c92608e2902b2348 |
29-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Introduce a new expression node, ImplicitValueInitExpr, that represents an implicit value-initialization of a subobject of a particular type. This replaces the (ab)use of CXXZeroValueInitExpr within initializer lists for the "holes" that occur due to the use of C99 designated initializers. The new test case is currently XFAIL'd, because CodeGen's ConstExprEmitter (in lib/CodeGen/CGExprConstant.cpp) needs to be taught to value-initialize when it sees ImplicitValueInitExprs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63317 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaInit.cpp
|
82462767a344858f1ec4913cc5a1b974bbd92af0 |
29-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Clean up designated initialization of unions, so that CodeGen doesn't have to try to guess which member is being initialized. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63315 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
0bb76897bedb8b747efc6523efb432fc24966118 |
29-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Clean up designated initialization of unions, so that CodeGen doesn't have to try to guess which member is being initialized. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63315 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
896f37bc8f2bbe1f271f59323adc037268af295b |
29-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Suppress a warning git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63310 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
5d2ff63254bf1c3d3ca6844c96f3bfd88561cc7c |
29-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Suppress a warning git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63310 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
545f39ee63c227cadd091f8ee163ef80aaee0700 |
29-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
move library-specific diagnostic headers into library private dirs. Reduce redundant #includes. Patch by Anders Johnsen! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63271 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaCXXScopeSpec.cpp
emaChecking.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaInherit.cpp
emaInit.cpp
emaNamedCast.cpp
emaStmt.cpp
emaType.cpp
|
500d3297d2a21edeac4d46cbcbe21bc2352c2a28 |
29-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
move library-specific diagnostic headers into library private dirs. Reduce redundant #includes. Patch by Anders Johnsen! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63271 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaCXXScopeSpec.cpp
emaChecking.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaInherit.cpp
emaInit.cpp
emaNamedCast.cpp
emaStmt.cpp
emaType.cpp
|
1aa25a7734729fe31397f579190c5c5025dc5713 |
29-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
fix an absolutely inscrutible gcc 4.0 error: llvm[0]: Compiling SemaInit.cpp for Debug build SemaInit.cpp:171: error: ‘InitListChecker’ has not been declared SemaInit.cpp:171: error: ISO C++ forbids declaration of ‘InitListChecker’ with no type SemaInit.cpp: In function ‘int InitListChecker(clang::Sema*, clang::InitListExpr*, clang::QualType&)’: SemaInit.cpp:172: error: ‘hadError’ was not declared in this scope SemaInit.cpp:173: error: ‘SemaRef’ was not declared in this scope SemaInit.cpp:177: error: ‘FullyStructuredList’ was not declared in this scope git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63270 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
68355a57bb9d5daccd3fc73e92370ba2b1a6eafb |
29-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
fix an absolutely inscrutible gcc 4.0 error: llvm[0]: Compiling SemaInit.cpp for Debug build SemaInit.cpp:171: error: ‘InitListChecker’ has not been declared SemaInit.cpp:171: error: ISO C++ forbids declaration of ‘InitListChecker’ with no type SemaInit.cpp: In function ‘int InitListChecker(clang::Sema*, clang::InitListExpr*, clang::QualType&)’: SemaInit.cpp:172: error: ‘hadError’ was not declared in this scope SemaInit.cpp:173: error: ‘SemaRef’ was not declared in this scope SemaInit.cpp:177: error: ‘FullyStructuredList’ was not declared in this scope git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63270 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
aaa209616c286419d66982802cb779423273008f |
29-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Better documentation for our initialization checker git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63261 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
9e80f7252ec1b91142e41790e4491c61e14b9472 |
29-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Better documentation for our initialization checker git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63261 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
849afc3f58f962b845f43a060f6bdb6eed226002 |
29-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Move InitListChecker out of Sema.h git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63258 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaInit.cpp
|
c34ee5ef2b267a683c432ba0c342f7c3a14889d6 |
29-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Move InitListChecker out of Sema.h git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63258 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaInit.cpp
|
36859ebc8a597bd07f9645684f4d361c918e0859 |
29-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Eliminate infinite looping in a wacky case with designated initializers. Simplifies (somewhat) the actually checking of the initializer expression following the designators git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63257 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaInit.cpp
|
6fbdc6bd38cc51232223ae3539c32f23c45ea852 |
29-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Eliminate infinite looping in a wacky case with designated initializers. Simplifies (somewhat) the actually checking of the initializer expression following the designators git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63257 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaInit.cpp
|
c349ee29cc5a0701288ace4ee682833b446edc4b |
29-Jan-2009 |
Steve Naroff <snaroff@apple.com> |
Refactor Sema::LookupDecl() into 2 functions: LookupDeclInScope() and LookupDeclInContext(). The previous interface was very confusing. This is much more explicit, which will be easier to understand/optimize/convert. The plan is to eventually deprecate both of these functions. For now, I'm focused on performance. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63256 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaTemplate.cpp
|
3e8ffd2e96e7842245f1ae0cb631eba75da1a6f7 |
29-Jan-2009 |
Steve Naroff <snaroff@apple.com> |
Refactor Sema::LookupDecl() into 2 functions: LookupDeclInScope() and LookupDeclInContext(). The previous interface was very confusing. This is much more explicit, which will be easier to understand/optimize/convert. The plan is to eventually deprecate both of these functions. For now, I'm focused on performance. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63256 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaTemplate.cpp
|
756283be81be486a58ecde773b0c7e876358c58e |
29-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Remove Expr::hasSideEffects. It doesn't work anyway git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63254 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
54f0728c2ab0f967e976300478b2f5cdfed78415 |
29-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Remove Expr::hasSideEffects. It doesn't work anyway git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63254 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
36dd0c55546d02d19186caf889230755776d0601 |
29-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Improvements to code-generation and semantic analysis of designated initializers. - We now initialize unions properly when a member other than the first is named by a designated initializer. - We now provide proper semantic analysis and code generation for GNU array-range designators *except* that side effects will occur more than once. We warn about this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63253 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaInit.cpp
|
34e7946831a63f96d3ba3478c74ca8e25ee52d7e |
29-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Improvements to code-generation and semantic analysis of designated initializers. - We now initialize unions properly when a member other than the first is named by a designated initializer. - We now provide proper semantic analysis and code generation for GNU array-range designators *except* that side effects will occur more than once. We warn about this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63253 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaInit.cpp
|
f603b47aec06841368ddb1a36925c57976794c24 |
28-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Code generation support for C99 designated initializers. The approach I've taken in this patch is relatively straightforward, although the code itself is non-trivial. Essentially, as we process an initializer list we build up a fully-explicit representation of the initializer list, where each of the subobject initializations occurs in order. Designators serve to "fill in" subobject initializations in a non-linear way. The fully-explicit representation makes initializer lists (both with and without designators) easy to grok for codegen and later semantic analyses. We keep the syntactic form of the initializer list linked into the AST for those clients interested in exactly what the user wrote. Known limitations: - Designating a member of a union that isn't the first member may result in bogus initialization (we warn about this) - GNU array-range designators are not supported (we warn about this) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63242 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaExpr.cpp
emaInit.cpp
|
4c67834407ca6ab344dcf44fc599ad4938cfa96d |
28-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Code generation support for C99 designated initializers. The approach I've taken in this patch is relatively straightforward, although the code itself is non-trivial. Essentially, as we process an initializer list we build up a fully-explicit representation of the initializer list, where each of the subobject initializations occurs in order. Designators serve to "fill in" subobject initializations in a non-linear way. The fully-explicit representation makes initializer lists (both with and without designators) easy to grok for codegen and later semantic analyses. We keep the syntactic form of the initializer list linked into the AST for those clients interested in exactly what the user wrote. Known limitations: - Designating a member of a union that isn't the first member may result in bogus initialization (we warn about this) - GNU array-range designators are not supported (we warn about this) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63242 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaExpr.cpp
emaInit.cpp
|
7b36a1b4b741fdd0db13e287316ee190c0064fb3 |
28-Jan-2009 |
Steve Naroff <snaroff@apple.com> |
Name change (isTypeName->getTypeName). Since it doesn't return a bool, is shouldn't be prefixed with 'is'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63226 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
b43a50ff1b0b171ece84425b0ad83a9a31f038fa |
28-Jan-2009 |
Steve Naroff <snaroff@apple.com> |
Name change (isTypeName->getTypeName). Since it doesn't return a bool, is shouldn't be prefixed with 'is'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63226 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
f41a58c5777154baefbdaee8472dffce998c065b |
28-Jan-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implement pointer to member handling in static_cast. Fix a stupid mistake in UnwrapSimilarPointers that made any two member pointers compatible as long as the pointee was the same. Make a few style corrections as suggested by Chris. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63215 91177308-0d34-0410-b5e6-96231b3b80d8
emaInherit.cpp
emaNamedCast.cpp
emaOverload.cpp
emaType.cpp
|
21593acb933324b439bc68b68e7cc7d1c3e3484d |
28-Jan-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implement pointer to member handling in static_cast. Fix a stupid mistake in UnwrapSimilarPointers that made any two member pointers compatible as long as the pointee was the same. Make a few style corrections as suggested by Chris. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63215 91177308-0d34-0410-b5e6-96231b3b80d8
emaInherit.cpp
emaNamedCast.cpp
emaOverload.cpp
emaType.cpp
|
b31f2940afc74f79cdb11add308be85c52de2426 |
28-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Complete semantic checking for typedef redeclarations in C++. The rules are slightly different than in C, and now we handle both dialects properly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63211 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
66973121788ca645fe3d4a66179b9cfb6f2bce08 |
28-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Complete semantic checking for typedef redeclarations in C++. The rules are slightly different than in C, and now we handle both dialects properly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63211 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
9844633f40ec26653e89edd502eb7f5d4e48a436 |
28-Jan-2009 |
Steve Naroff <snaroff@apple.com> |
Remove 'NamespaceNameOnly' argument to Sema::LookupDecl(). It is unused. Even though Sema::LookupDecl() is deprecated, it's still used all over the place. Simplifying the interface will make it easier to understand/optimize/convert. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63210 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
|
133147d2d31bdcd6943635f80e77d78d2504148f |
28-Jan-2009 |
Steve Naroff <snaroff@apple.com> |
Remove 'NamespaceNameOnly' argument to Sema::LookupDecl(). It is unused. Even though Sema::LookupDecl() is deprecated, it's still used all over the place. Simplifying the interface will make it easier to understand/optimize/convert. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63210 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
|
c8b0d08c6856d518ab7c4b166be8c3703d671e94 |
28-Jan-2009 |
Steve Naroff <snaroff@apple.com> |
Remove 'enableLazyBuiltinCreation' argument to Sema::LookupDecl(). It is unused. Even though Sema::LookupDecl() is deprecated, it's still used all over the place. Simplifying the interface will make it easier to understand/optimize/convert. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63208 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
939837f67e0558668be9afec67f2e51eb40d86f0 |
28-Jan-2009 |
Steve Naroff <snaroff@apple.com> |
Remove 'enableLazyBuiltinCreation' argument to Sema::LookupDecl(). It is unused. Even though Sema::LookupDecl() is deprecated, it's still used all over the place. Simplifying the interface will make it easier to understand/optimize/convert. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63208 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
88eebed66eb871cdc7de031cccfb59f445680cc4 |
28-Jan-2009 |
Ted Kremenek <kremenek@apple.com> |
Patch by Alexei Svitkine: Refactor Sema::ParseAST API to allow clients to pass as an argument a TranslationUnit object whose contents live beyond the call to ParseAST. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63175 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
|
46157b59646e3fd4252747c679fda529b8bf46af |
28-Jan-2009 |
Ted Kremenek <kremenek@apple.com> |
Patch by Alexei Svitkine: Refactor Sema::ParseAST API to allow clients to pass as an argument a TranslationUnit object whose contents live beyond the call to ParseAST. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63175 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
|
207b9ecb6031b79bd9cbacc2f6108d49dd941679 |
28-Jan-2009 |
Steve Naroff <snaroff@apple.com> |
Finish making AST BumpPtrAllocation runtime configurable (based on -disable-free). snaroff% time ../../Release-Asserts/bin/clang INPUTS/Cocoa_h.m 0.179u 0.051s 0:00.23 95.6% 0+0k 0+0io 0pf+0w snaroff% time ../../Release-Asserts/bin/clang INPUTS/Cocoa_h.m -disable-free 0.169u 0.052s 0:00.22 95.4% 0+0k 0+0io 0pf+0w git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63153 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
|
c0ac4923f08b25ae973a8ee7942cf3eb89da57b7 |
28-Jan-2009 |
Steve Naroff <snaroff@apple.com> |
Finish making AST BumpPtrAllocation runtime configurable (based on -disable-free). snaroff% time ../../Release-Asserts/bin/clang INPUTS/Cocoa_h.m 0.179u 0.051s 0:00.23 95.6% 0+0k 0+0io 0pf+0w snaroff% time ../../Release-Asserts/bin/clang INPUTS/Cocoa_h.m -disable-free 0.169u 0.052s 0:00.22 95.4% 0+0k 0+0io 0pf+0w git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63153 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
|
04b3f3576e43fa1ac2d959e59213c12c64730888 |
28-Jan-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Add handling of member pointers to reinterpret_cast. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63150 91177308-0d34-0410-b5e6-96231b3b80d8
emaNamedCast.cpp
|
db64728e69a45b89870ede13944a934d3c2ed12a |
28-Jan-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Add handling of member pointers to reinterpret_cast. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63150 91177308-0d34-0410-b5e6-96231b3b80d8
emaNamedCast.cpp
|
dd3a4fe10568b3eb4f0f24b9a51b4d70b87a0d5f |
27-Jan-2009 |
Anders Carlsson <andersca@mac.com> |
If an input constraint refers to an output constraint, it should have the same constraint info as the output constraint. Fixes PR3417 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63127 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
03eb543cf7ebee463b33b5802b83ac92c21770cf |
27-Jan-2009 |
Anders Carlsson <andersca@mac.com> |
If an input constraint refers to an output constraint, it should have the same constraint info as the output constraint. Fixes PR3417 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63127 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
52a425b852e4641d46073a697a48a457c8f655e2 |
27-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
Split the single monolithic DiagnosticKinds.def file into one .def file for each library. This means that adding a diagnostic to sema doesn't require all the other libraries to be rebuilt. Patch by Anders Johnsen! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63111 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaCXXScopeSpec.cpp
emaChecking.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaInherit.cpp
emaInit.cpp
emaNamedCast.cpp
emaStmt.cpp
emaType.cpp
|
20c6b3b85e186cd52d5d99489132d71d498159eb |
27-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
Split the single monolithic DiagnosticKinds.def file into one .def file for each library. This means that adding a diagnostic to sema doesn't require all the other libraries to be rebuilt. Patch by Anders Johnsen! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63111 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaCXXScopeSpec.cpp
emaChecking.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaInherit.cpp
emaInit.cpp
emaNamedCast.cpp
emaStmt.cpp
emaType.cpp
|
10a18fcb2dd34772d0b3a5a9013b13c40a6e9afc |
26-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Some micro-optimizations for DISABLE_SMART_POINTERS: - When it's safe, ActionResult uses the low bit of the pointer for the "invalid" flag rather than a separate "bool" value. This keeps GCC from generating some truly awful code, for a > 3x speedup in the result-passing microbenchmark. - When DISABLE_SMART_POINTERS is defined, store an ActionResult within ASTOwningResult rather than an ASTOwningPtr. Brings the performance benefits of the above to smart pointers with DISABLE_SMART_POINTERS defined. Sadly, these micro-benchmark performance improvements don't seem to make much of a difference on Cocoa.h right now. However, they're harmless and might help with future optimizations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63061 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprObjC.cpp
|
5ac8aff3d7431dc7e4d64d960574a10c9f7e0078 |
26-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Some micro-optimizations for DISABLE_SMART_POINTERS: - When it's safe, ActionResult uses the low bit of the pointer for the "invalid" flag rather than a separate "bool" value. This keeps GCC from generating some truly awful code, for a > 3x speedup in the result-passing microbenchmark. - When DISABLE_SMART_POINTERS is defined, store an ActionResult within ASTOwningResult rather than an ASTOwningPtr. Brings the performance benefits of the above to smart pointers with DISABLE_SMART_POINTERS defined. Sadly, these micro-benchmark performance improvements don't seem to make much of a difference on Cocoa.h right now. However, they're harmless and might help with future optimizations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63061 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprObjC.cpp
|
c374f8b15500a5de12c68b8c2a339154b1efff97 |
26-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
rename getSpelledCharacterAt to getSpellingOfSingleCharacterNumericConstant, optimize it to use the LiteralData when possible. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63060 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
7216dc9cb49f47254595120cf15a737cee53f0bd |
26-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
rename getSpelledCharacterAt to getSpellingOfSingleCharacterNumericConstant, optimize it to use the LiteralData when possible. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63060 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
08cdb99d28cb5d27499df72314c631a85c10ff24 |
26-Jan-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Add support for member pointers to const_cast. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63055 91177308-0d34-0410-b5e6-96231b3b80d8
emaNamedCast.cpp
|
f20269b42843d10c930886ee661ee1dd37a4248b |
26-Jan-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Add support for member pointers to const_cast. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63055 91177308-0d34-0410-b5e6-96231b3b80d8
emaNamedCast.cpp
|
8ebd8fb98a588f44d7b5b7c61d9d11435e501cd5 |
26-Jan-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Remove an implemented FIXME and extend test cases. Follow-up on Doug's review. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63032 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
9e5e4aaf8b8835b552819d68d29b6d94115d8a0b |
26-Jan-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Remove an implemented FIXME and extend test cases. Follow-up on Doug's review. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63032 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
c67f86a4d5b13c818bbab92fcc2c4a259a7b8dc9 |
26-Jan-2009 |
Eli Friedman <eli.friedman@gmail.com> |
PR3269: create an empty InitListExpr as a child for the CompoundLiteralExpr so that there aren't any null pointers in the AST. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62981 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
1d24259b5f13663d015c096d5500dcf0ea5ff568 |
26-Jan-2009 |
Eli Friedman <eli.friedman@gmail.com> |
PR3269: create an empty InitListExpr as a child for the CompoundLiteralExpr so that there aren't any null pointers in the AST. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62981 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ba3875684baa207e083260c44958fc8361ad9710 |
25-Jan-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implement implicit conversions for pointers-to-member. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62971 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
emaOverload.cpp
emaType.cpp
|
4433aafbc2591b82e4ea2fc39c723b21d2497f4d |
25-Jan-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implement implicit conversions for pointers-to-member. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62971 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
emaOverload.cpp
emaType.cpp
|
4a480d6ebe944d528cd1453dbc6681bfbe8d3fc2 |
25-Jan-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix for PR2100: merge types for variables. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62947 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
13ca96a238089fb8e622791bc0dc441eb2dd29b4 |
25-Jan-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Fix for PR2100: merge types for variables. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62947 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
bc941e1d1fd6d89c10905e1ab0be0fa1ef279668 |
25-Jan-2009 |
Eli Friedman <eli.friedman@gmail.com> |
PR3062: statement expressions should be illegal at file scope. I don't think this has any significant effects at the moment, but it could matter if we start constant-folding statement expressions like gcc does. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62943 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
dca2b7314f73fbb1e897befdc4f0ddaa9905d72c |
25-Jan-2009 |
Eli Friedman <eli.friedman@gmail.com> |
PR3062: statement expressions should be illegal at file scope. I don't think this has any significant effects at the moment, but it could matter if we start constant-folding statement expressions like gcc does. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62943 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
364a42d5359bec37c089b9839c8ce4d33dc1434a |
24-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
Implement C99 6.5.3.4p1, rejecting sizeof(bitfield) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62936 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
da0274725667d1168867dc404417f2c68c8dc0c5 |
24-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
Implement C99 6.5.3.4p1, rejecting sizeof(bitfield) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62936 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
7555503bb5f08651638f269c44c15bb425d10c5e |
24-Jan-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Add support for declaring pointers to members. Add serialization support for ReferenceType. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62934 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
emaType.cpp
|
f30208ad5b334e93582e846a2a0c92f38a607b8a |
24-Jan-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Add support for declaring pointers to members. Add serialization support for ReferenceType. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62934 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
emaType.cpp
|
8d9f7966e67ffdde467b84b187c782f3e1b08556 |
24-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
Fix PR3386 by handling GCC's rules for alignof, which are substantially different than those for sizeof. Reject alignof(bitfield) like gcc does. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62928 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
31e21e05623ce9d11b1a893fecb87ad349df6c7d |
24-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
Fix PR3386 by handling GCC's rules for alignof, which are substantially different than those for sizeof. Reject alignof(bitfield) like gcc does. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62928 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
a78909b1fcae7dbe7726f878dcaf65d87857c01c |
24-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
fix a fixme, don't leak the expr on error. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62927 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
694b1e4425d930c471350b10cf22a93124a698bd |
24-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
fix a fixme, don't leak the expr on error. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62927 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
159fe0812cbb382bb01b6e77a09337c9dd1f3dc0 |
24-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
minor formatting changes, no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62926 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
0107292a2dd92aced39c7c97eec9eb0ffa4b7186 |
24-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
minor formatting changes, no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62926 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
37704bee8c9a6a1b16d7a5f4d52e0887a5a2363e |
24-Jan-2009 |
Anders Carlsson <andersca@mac.com> |
Ignore parens when determining if an expr is a string literal. Fixes PR3382. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62922 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
91b9f2072a20906dd34ac6cb83813debf3595328 |
24-Jan-2009 |
Anders Carlsson <andersca@mac.com> |
Ignore parens when determining if an expr is a string literal. Fixes PR3382. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62922 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
ea0528d8f4dd6604f8ad29b0eb591c8243c2d8aa |
23-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
More APSInt appeasement git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62884 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
d6f584ff262f51b40f4c9e317b13f1f21db29755 |
23-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
More APSInt appeasement git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62884 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
4ac887b57a1bdccee7ad58170b6892c7f0d8a563 |
23-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Make sure that all NamedDecls have an identifier namespace. Make sure that we know a call is invalid if we dropped arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62882 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
3fd56d755aa74f01fbe963195c95c963ea1fee91 |
23-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Make sure that all NamedDecls have an identifier namespace. Make sure that we know a call is invalid if we dropped arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62882 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e498e37015d2eef11cf92659006cbd394759c3c0 |
23-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Hopefully the last of the APSInt signedness issues with initializers. Fixes PR clang/3378 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62876 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
53d3d8e0662197f7245d8f5ff697a72a2b4b3f54 |
23-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Hopefully the last of the APSInt signedness issues with initializers. Fixes PR clang/3378 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62876 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
f93eda159a27d28130c5d1cbf9fccd66b79b5512 |
23-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Allow subtraction of function pointer types in C, as a GNU extension. Fixes rdar://problem/6520707 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62859 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
0804888d9162cfd422925762c161bd80f80358b9 |
23-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Allow subtraction of function pointer types in C, as a GNU extension. Fixes rdar://problem/6520707 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62859 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
6972270a30303957eaf47a7170f58a7140a78de7 |
23-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Make sure all of the isUnsigned flags line up when comparing initializer values, to really really fix PR clang/3377 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62858 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
e3fa2de90ea1666bf4504b8fd557b09a57aac222 |
23-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Make sure all of the isUnsigned flags line up when comparing initializer values, to really really fix PR clang/3377 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62858 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
5a203a607869f30926d8614da04ab53a4e4834f2 |
23-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Properly manage the bit-widths of APInts/APSInts in array initialization. Fixes PR clang/3377 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62851 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
f6c717c3dca839dcd189b4a6fa46c8fe7a8bec1d |
23-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Properly manage the bit-widths of APInts/APSInts in array initialization. Fixes PR clang/3377 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62851 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
65075ec8e35729afc6ff55e45eb653688666de1b |
23-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Handle any undeclared parameters in a K&R-style function with a special action, inside function prototype scope. This avoids confusion when we try to inject these parameters into the scope of the function body before the function itself has been added to the surrounding scope. Fixes <rdar://problem/6097326>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62849 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
be109b3e768b70f9efb106d25d6b5a2c72c5a9b8 |
23-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Handle any undeclared parameters in a K&R-style function with a special action, inside function prototype scope. This avoids confusion when we try to inject these parameters into the scope of the function body before the function itself has been added to the surrounding scope. Fixes <rdar://problem/6097326>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62849 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
b3193246902562ea8ab8d2c3214f02b3e711927c |
23-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Support arithmetic on pointer-to-function types as a GNU extension. Addresses clang PR/3371. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62823 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
c983b86514d14dd4b30147bf6791dde9487d2c3f |
23-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Support arithmetic on pointer-to-function types as a GNU extension. Addresses clang PR/3371. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62823 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
710f6d41708bc34c39b75a00d9cc91cee68cf4d8 |
23-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Reimplement the handling of the "current object" in designator initializers, so that we are within the appropriate subobject after we've processed a multi-designator designation. We're matching GCC and EDG's behavior on all examples I've found thus far. *Huge* thanks to Eli Friedman for pointing out my fundamental misunderstanding of "current object" in the C99 spec. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62812 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaInit.cpp
|
87f55cf59e82f246d8605733e9300d0c5f6830a6 |
23-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Reimplement the handling of the "current object" in designator initializers, so that we are within the appropriate subobject after we've processed a multi-designator designation. We're matching GCC and EDG's behavior on all examples I've found thus far. *Huge* thanks to Eli Friedman for pointing out my fundamental misunderstanding of "current object" in the C99 spec. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62812 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaInit.cpp
|
6d89a8a54fbf451a50526b5079fa5cf99e3f36a0 |
22-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
inline Sema::getLangOptions, rdar://6515190. This speeds up fsyntax-only with PTH by 3%. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62774 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
|
53ebff34243161e5b18cbec5e3373661ab105d2d |
22-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
inline Sema::getLangOptions, rdar://6515190. This speeds up fsyntax-only with PTH by 3%. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62774 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
|
edd94e9726e3e222711cb49809b5bb33d134d3f7 |
22-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
EXTWARNify the warning about unnamed typedefs of enums git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62766 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
21282df53bd86f737f84c4ae6d2dea7ef32f0895 |
22-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
EXTWARNify the warning about unnamed typedefs of enums git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62766 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
c5a6bdc2f783e75a434e1e230dac17b946822976 |
22-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Initial implementation of semantic analysis and ASTs for C99 designated initializers. This implementation should cover all of the constraints in C99 6.7.8, including long, complex designations and computing the size of incomplete array types initialized with a designated initializer. Please see the new test-case and holler if you find cases where this doesn't work. There are still some wrinkles with GNU's anonymous structs and anonymous unions (it isn't clear how these should work; we'll just follow GCC's lead) and with designated initializers for the members of a union. I'll tackle those very soon. CodeGen is still nonexistent, and there's some leftover code in the parser's representation of designators that I'll also need to clean up. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62737 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
emaInit.cpp
|
05c13a3411782108d65aab3c77b1a231a4963bc0 |
22-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Initial implementation of semantic analysis and ASTs for C99 designated initializers. This implementation should cover all of the constraints in C99 6.7.8, including long, complex designations and computing the size of incomplete array types initialized with a designated initializer. Please see the new test-case and holler if you find cases where this doesn't work. There are still some wrinkles with GNU's anonymous structs and anonymous unions (it isn't clear how these should work; we'll just follow GCC's lead) and with designated initializers for the members of a union. I'll tackle those very soon. CodeGen is still nonexistent, and there's some leftover code in the parser's representation of designators that I'll also need to clean up. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62737 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
emaInit.cpp
|
27959659872da99b03d8d72c3ffcef9079e42094 |
21-Jan-2009 |
Steve Naroff <snaroff@apple.com> |
Fix Sema::Owned(ExprResult) to not use a ternary operator. Necessary to work around a Visual Studio compiler bug. Thanks to Doug Gregor for the suggestion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62723 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
|
872b9acd95f8ecec52db6fe4053bc349ae2dfa43 |
21-Jan-2009 |
Steve Naroff <snaroff@apple.com> |
Fix Sema::Owned(ExprResult) to not use a ternary operator. Necessary to work around a Visual Studio compiler bug. Thanks to Doug Gregor for the suggestion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62723 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
|
de93d33099d51ddcbe3ae6f7075acca8bebcb4c8 |
21-Jan-2009 |
Anders Carlsson <andersca@mac.com> |
Fix an inline asm sema bug that I introduced. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62666 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
e6ea27995fb15add0de47588b4226049fa0753e5 |
21-Jan-2009 |
Anders Carlsson <andersca@mac.com> |
Fix an inline asm sema bug that I introduced. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62666 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
310dea3da3c932dd65ef5ee13f0a4c7e4bab90e0 |
21-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
Don't look up decls with no name (such as parameters and unnamed tagged types), this removes 4266 calls to LookupDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62662 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
cf79b011e849a4455cb7b0de6dc4fb3b83308f39 |
21-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
Don't look up decls with no name (such as parameters and unnamed tagged types), this removes 4266 calls to LookupDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62662 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
774e4158e7baeb79f7a650aab6eb56df8820675e |
21-Jan-2009 |
Steve Naroff <snaroff@apple.com> |
Convert expressions over to Sebastian's spiffy ASTContext::new() operator. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62640 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
6ece14c609723053db91b917ee97d73cf240f85b |
21-Jan-2009 |
Steve Naroff <snaroff@apple.com> |
Convert expressions over to Sebastian's spiffy ASTContext::new() operator. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62640 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
75324939f58f0e711da23b15297d06049b42864f |
20-Jan-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Provide a placement new taking an ASTContext argument. This allows more concise syntax when allocating an object using the ASTContext's allocator. Convert a few allocations to this operator to for test purposes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62623 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e91b3bc1624ec877862e5d276f1b6f5026fe71e3 |
20-Jan-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Provide a placement new taking an ASTContext argument. This allows more concise syntax when allocating an object using the ASTContext's allocator. Convert a few allocations to this operator to for test purposes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62623 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
5c6139b3e9f4efa272ac9da4ec8200bc064975ba |
20-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
Fix a crash Anders' was seeing due to free'ing an invalid pointer caused by my previous commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62613 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
1833a83368bda46b76388069e52b27f12e60dc9c |
20-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
Fix a crash Anders' was seeing due to free'ing an invalid pointer caused by my previous commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62613 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
8b9a98d931785da35577b08a20f01f865259cc5e |
20-Jan-2009 |
Steve Naroff <snaroff@apple.com> |
Convert more exprs to use ASTContext's Allocator. When using a BumpPtrAllocator, this reduces malloc overhead from 2.2->1.9% (for Cocoa.h). At this point, malloc() has dropped the fourth most expensive routine (behind Preprocessor::HandleIdentifier()). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62612 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
9e0b600dc7373ee7d2857ef5ccebca599ebb5178 |
20-Jan-2009 |
Steve Naroff <snaroff@apple.com> |
Convert more exprs to use ASTContext's Allocator. When using a BumpPtrAllocator, this reduces malloc overhead from 2.2->1.9% (for Cocoa.h). At this point, malloc() has dropped the fourth most expensive routine (behind Preprocessor::HandleIdentifier()). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62612 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e7d9270833ec75befe87f19ea54d238fc0ca3088 |
20-Jan-2009 |
Anders Carlsson <andersca@mac.com> |
Improvements to Sema of asm statements. Fixes <rdar://problem/6156893> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62609 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
d9fca6e3950346ea503f92f27ed0f9d8edde9feb |
20-Jan-2009 |
Anders Carlsson <andersca@mac.com> |
Improvements to Sema of asm statements. Fixes <rdar://problem/6156893> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62609 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
e5f128a410e2779c528616a76e7cd4559ecd1249 |
20-Jan-2009 |
Steve Naroff <snaroff@apple.com> |
Allocate expresssions through ASTContext (still more work to do). Add debug hook to DeclContext. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62605 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
0a4739305a984ef9b821cedad5f4fe235eb6ef7d |
20-Jan-2009 |
Steve Naroff <snaroff@apple.com> |
Allocate expresssions through ASTContext (still more work to do). Add debug hook to DeclContext. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62605 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
defaf41313d7f08484ccca659c500722ba5a8f2a |
20-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
Optimize Declarator to avoid malloc/free traffic for the argument list of a function DeclaratorChunk in common cases. This uses a fixed array in Declarator when it is small enough for the first function declarator chunk in a declarator. This eliminates all malloc/free traffic from DeclaratorChunk::getFunction when running on Cocoa.h except for five functions: signal/bsd_signal/sigset, which have multiple Function DeclChunk's, and CFUUIDCreateWithBytes/CFUUIDGetConstantUUIDWithBytes, which take more than 16 arguments. This patch was pair programmed with Steve. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62599 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
5af2f35c6ad1cb78b2aed3705d221954d1689b8a |
20-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
Optimize Declarator to avoid malloc/free traffic for the argument list of a function DeclaratorChunk in common cases. This uses a fixed array in Declarator when it is small enough for the first function declarator chunk in a declarator. This eliminates all malloc/free traffic from DeclaratorChunk::getFunction when running on Cocoa.h except for five functions: signal/bsd_signal/sigset, which have multiple Function DeclChunk's, and CFUUIDCreateWithBytes/CFUUIDGetConstantUUIDWithBytes, which take more than 16 arguments. This patch was pair programmed with Steve. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62599 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
9ac66d25bcaeb7594368dfe20def4174032d1c49 |
20-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Rename DeclContext::insert to DeclContext::makeDeclVisibleInContext and document both it and DeclContext::addDecl properly git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62581 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
40f4e69002af9623a1f959bd57b99afda186a6a7 |
20-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Rename DeclContext::insert to DeclContext::makeDeclVisibleInContext and document both it and DeclContext::addDecl properly git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62581 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f4006be67e6e90617340c7317831a803d006e443 |
20-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Remove the TopLevelDecls from TranslationUnit, since all of those decls are owned by the ASTContext's TranslationUnitDecl. There are definitely some leaking Decls now that I'll tackle tomorrow git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62568 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
|
00ad0ef8369ee65337ff29c8db3c1841a01102c4 |
20-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Remove the TopLevelDecls from TranslationUnit, since all of those decls are owned by the ASTContext's TranslationUnitDecl. There are definitely some leaking Decls now that I'll tackle tomorrow git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62568 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
|
af8ad2b4dcc1d03fec720ab2c20d9eaf4754e496 |
20-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Remove ScopedDecl, collapsing all of its functionality into Decl, so that every declaration lives inside a DeclContext. Moved several things that don't have names but were ScopedDecls (and, therefore, NamedDecls) to inherit from Decl rather than NamedDecl, including ObjCImplementationDecl and LinkageSpecDecl. Now, we don't store empty DeclarationNames for these things, nor do we try to insert them into DeclContext's lookup structure. The serialization tests are temporarily disabled. We'll re-enable them once we've sorted out the remaining ownership/serialiazation issues between DeclContexts and TranslationUnion, DeclGroups, etc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62562 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
dentifierResolver.h
ema.cpp
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaLookup.cpp
emaOverload.cpp
emaStmt.cpp
|
4afa39deaa245592977136d367251ee2c173dd8d |
20-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Remove ScopedDecl, collapsing all of its functionality into Decl, so that every declaration lives inside a DeclContext. Moved several things that don't have names but were ScopedDecls (and, therefore, NamedDecls) to inherit from Decl rather than NamedDecl, including ObjCImplementationDecl and LinkageSpecDecl. Now, we don't store empty DeclarationNames for these things, nor do we try to insert them into DeclContext's lookup structure. The serialization tests are temporarily disabled. We'll re-enable them once we've sorted out the remaining ownership/serialiazation issues between DeclContexts and TranslationUnion, DeclGroups, etc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62562 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
dentifierResolver.h
ema.cpp
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaLookup.cpp
emaOverload.cpp
emaStmt.cpp
|
5457c5e9eb67e6f2974499ecd60f814456f15886 |
19-Jan-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Convert more expression actions to smart pointers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62537 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
b8a6aca87d07b22b257153ce0dfc92f78c8f8c1f |
19-Jan-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Convert more expression actions to smart pointers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62537 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
6ec895516e18daa95e5d6ecb6dbf99855ea54ce6 |
19-Jan-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Type of property and its ivar is more restrictive that rules for assignment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62524 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
acdc33b1ff74744e05d492a05053cdc4f4131086 |
19-Jan-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Type of property and its ivar is more restrictive that rules for assignment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62524 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
46fe06e7544e7cbe79b893fb028c3ecd45feec00 |
19-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Centralize error reporting of improper uses of incomplete types in the new DiagnoseIncompleteType. It provides additional information about struct/class/union/enum types when possible, either by pointing to the forward declaration of that type or by pointing to the definition (if we're in the process of defining that type). Fixes <rdar://problem/6500531>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62521 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaNamedCast.cpp
emaType.cpp
|
4ec339f43c0cae2678334850c90926bea10999c7 |
19-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Centralize error reporting of improper uses of incomplete types in the new DiagnoseIncompleteType. It provides additional information about struct/class/union/enum types when possible, either by pointing to the forward declaration of that type or by pointing to the definition (if we're in the process of defining that type). Fixes <rdar://problem/6500531>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62521 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaNamedCast.cpp
emaType.cpp
|
8b76997ec19a90aa0db4e90d50710cef86bf09f5 |
19-Jan-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Convert more expression actions to smart pointers. Fix type of logical negation for C++. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62475 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
emaExpr.cpp
emaOverload.cpp
|
0eb23307222bda7ad95d968eac4e1ab30864b213 |
19-Jan-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Convert more expression actions to smart pointers. Fix type of logical negation for C++. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62475 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
emaExpr.cpp
emaOverload.cpp
|
cd883f7c200bba826ed89a41c89b1a125dd3f524 |
18-Jan-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Convert a few expression actions to smart pointers. These actions are extremely widely used (identifier expressions and literals); still no performance regression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62468 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprCXX.cpp
|
cd965b97cfac7b7a53a835810ec2bc2ac7a9dd1a |
18-Jan-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Convert a few expression actions to smart pointers. These actions are extremely widely used (identifier expressions and literals); still no performance regression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62468 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprCXX.cpp
|
b3860a7d4a4dae7a599dbd8ea6c4490b78cb3c01 |
18-Jan-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Convert ObjC statement actions to smart pointers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62465 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaStmt.cpp
|
431e90e887c21c0d0d56fc12a2d359df8d53ea66 |
18-Jan-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Convert ObjC statement actions to smart pointers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62465 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaStmt.cpp
|
c6b86338be45f235c01f42bed1170b68a8c82bb7 |
18-Jan-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Convert asm statement action to smart pointers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62464 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaStmt.cpp
|
3037ed0a27dba62e522304183718efc149e8b6d9 |
18-Jan-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Convert asm statement action to smart pointers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62464 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaStmt.cpp
|
539eb571e81a65adfb664dc712accc82afead0ae |
18-Jan-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Convert more statement actions to smart pointers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62463 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaStmt.cpp
|
4cffe2fd5c23168bc08f0453c684cbd3f79471d3 |
18-Jan-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Convert more statement actions to smart pointers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62463 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaStmt.cpp
|
7903d050d7f22e2a75cc950f30d0cc3df0c6b101 |
18-Jan-2009 |
Nate Begeman <natebegeman@mac.com> |
Vector codegen improvements git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62458 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
6fe7c8aa8c7546743ecd0ac0138c2cf5d8155386 |
18-Jan-2009 |
Nate Begeman <natebegeman@mac.com> |
Vector codegen improvements git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62458 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
d6d2f776f8cc39ea85c952fb2e8bde386bcca802 |
18-Jan-2009 |
Nate Begeman <natebegeman@mac.com> |
Support evaluation of vector constant expressions, and codegen of same. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62455 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
|
59b5da6d853b4368b984700315adf7b37de05764 |
18-Jan-2009 |
Nate Begeman <natebegeman@mac.com> |
Support evaluation of vector constant expressions, and codegen of same. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62455 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
|
1486b507eb8b13d3cc77b42a32395a811c5c962e |
18-Jan-2009 |
Nate Begeman <natebegeman@mac.com> |
Update support for vector component access on ExtVectors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62440 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
353417af9d254d4fd0eb7d0a3ff71c4d8594ac58 |
18-Jan-2009 |
Nate Begeman <natebegeman@mac.com> |
Update support for vector component access on ExtVectors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62440 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
5738547dc1aee87a6f35c0f83daf861826222fb6 |
18-Jan-2009 |
Nate Begeman <natebegeman@mac.com> |
Remove outdated diagnostic. Tests are coming. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62437 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
334a802eeb5acb959f99b8227ee995725b2624aa |
18-Jan-2009 |
Nate Begeman <natebegeman@mac.com> |
Remove outdated diagnostic. Tests are coming. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62437 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
7b49cec50220b69d83616aea2d5da3ce049611a0 |
18-Jan-2009 |
Anders Carlsson <andersca@mac.com> |
Change TargetInfo::validateInputConstraint to take begin/end name iterators instead of the number of outputs. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62433 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
45b050e72d058131e6f169fe54888bb91a003fb5 |
18-Jan-2009 |
Anders Carlsson <andersca@mac.com> |
Change TargetInfo::validateInputConstraint to take begin/end name iterators instead of the number of outputs. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62433 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
7b4695fff245e34f9503e1654b8310f788c1bb41 |
17-Jan-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Diagnose when method parameter is an object. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62431 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
9bae5e7af04e44b4d333a2c7ba22608d0594ff9f |
17-Jan-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Diagnose when method parameter is an object. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62431 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
72de8493647493a81b3d73d39369e5231393a1d5 |
17-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Warn about typedefs of enums without any declarator name. Fixes rdar://problem/6503878 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62397 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
8158f692571ba5eaae19e086b76d19319ac503c5 |
17-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Warn about typedefs of enums without any declarator name. Fixes rdar://problem/6503878 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62397 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d07474bba02aed4874589b96c85acd79219a1336 |
17-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
PODify LookupResult, for a measly 1% speedup on Cocoa.h. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62391 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaLookup.cpp
|
69d993ad8418cf21a56cf5b16c0f1c3cd6f74b64 |
17-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
PODify LookupResult, for a measly 1% speedup on Cocoa.h. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62391 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaLookup.cpp
|
98b275417eab0af35ba0bf0d7dbd89253c710f3c |
17-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Teach DeclContext how to find the primary declaration for any TagDecl even when we are still defining the TagDecl. This is required so that qualified name lookup of a class name within its definition works (see the new bits in test/SemaCXX/qualified-id-lookup.cpp). As part of this, move the nested redefinition checking code into ActOnTag. This gives us diagnostics earlier (when we try to perform the nested redefinition, rather than when we try to complete the 2nd definition) and removes some code duplication. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62386 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaLookup.cpp
|
0b7a158d120ac8d78c114a823e17eedfec6b6658 |
17-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Teach DeclContext how to find the primary declaration for any TagDecl even when we are still defining the TagDecl. This is required so that qualified name lookup of a class name within its definition works (see the new bits in test/SemaCXX/qualified-id-lookup.cpp). As part of this, move the nested redefinition checking code into ActOnTag. This gives us diagnostics earlier (when we try to perform the nested redefinition, rather than when we try to complete the 2nd definition) and removes some code duplication. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62386 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaLookup.cpp
|
19c74d3a0fb0dfe747c2d03f5d48f8c17ac8d927 |
17-Jan-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Convert some more statement actions to smart pointers. Fix a type error; parser wanted to pass the third part of a for-statement as a statement; should be expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62380 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaStmt.cpp
|
f05b1520d6f175acbfc3913489f4dfa842875ec4 |
17-Jan-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Convert some more statement actions to smart pointers. Fix a type error; parser wanted to pass the third part of a for-statement as a statement; should be expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62380 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaStmt.cpp
|
44da7a11b1d43f7a2cbd2f4980375d77c417d6bb |
16-Jan-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Don't ICE (issue diagnostics) when receiver is a non-objc type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62355 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
ebff1fed660fac9c50a7b7571da797bb489254a4 |
16-Jan-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Don't ICE (issue diagnostics) when receiver is a non-objc type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62355 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
de93967e1b89a5191335a7a95d39c3e090bfa0bf |
16-Jan-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Don't ICE on user redeclaration of objc's built-in types. Issue diagnostics instead if types do not match. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62349 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
c55a24095c3488fa6e99b537be64e57a2905477b |
16-Jan-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Don't ICE on user redeclaration of objc's built-in types. Issue diagnostics instead if types do not match. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62349 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
50500f6f312cfb1d0bc2d06dc5d26cfcd0fdbe39 |
16-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
silence release-assert warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62346 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
95d58f3ad73881c39cd63780b6af01a1045bd4b3 |
16-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
silence release-assert warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62346 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
5ac8ffadad9f47686a75f8014cc389d1409bed96 |
16-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix <rdar://problem/6502934>. We were creating an ImplicitCastExpr with reference type (it should be an lvalue with non-reference type). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62345 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
66b947fdf9104b53d7e8caa8f71ee0c0e3fe1521 |
16-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Fix <rdar://problem/6502934>. We were creating an ImplicitCastExpr with reference type (it should be an lvalue with non-reference type). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62345 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
9eaf2b7d18d5ebf778dcd478c051e1a9b7edd137 |
16-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
minor cleanups to StringLiteralParser: no need to pass target info into its ctor. Also, make it handle validity checking of pascal strings instead of making clients do it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62332 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
bbee00b6456e90a09f63c83c20233e6c5ad6000a |
16-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
minor cleanups to StringLiteralParser: no need to pass target info into its ctor. Also, make it handle validity checking of pascal strings instead of making clients do it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62332 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
861e79049d4d463c4c5d04a422a7eaf50243ea7d |
16-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Part one of handling C++ functional casts. This handles semantic analysis and AST-building for the cases where we have N != 1 arguments. For N == 1 arguments, we need to finish the C++ implementation of explicit type casts (C++ [expr.cast]). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62329 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
506ae418eb171d072f2fb4f6bc46d258b52cbf97 |
16-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Part one of handling C++ functional casts. This handles semantic analysis and AST-building for the cases where we have N != 1 arguments. For N == 1 arguments, we need to finish the C++ implementation of explicit type casts (C++ [expr.cast]). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62329 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
4b8e38c379eae5b55f2ad116d2e9e4df5eed1946 |
16-Jan-2009 |
Anders Carlsson <andersca@mac.com> |
Use a single function for doing vararg argument promotion. Also, make sure to do the promotion before checking the type - fixes PR3340. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62323 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprObjC.cpp
emaOverload.cpp
|
dce5e2cabf07ff25eb4d9e1859c0a21c69f588d2 |
16-Jan-2009 |
Anders Carlsson <andersca@mac.com> |
Use a single function for doing vararg argument promotion. Also, make sure to do the promotion before checking the type - fixes PR3340. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62323 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprObjC.cpp
emaOverload.cpp
|
fd5f14340189da032be0af550199c039c8709ff3 |
16-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
rename PP::getPhysicalCharacterAt -> PP::getSpelledCharacterAt. Slightly speed up sema of numbers like '1' by going directly to TargetInfo instead of through ASTContext. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62314 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
0c21e84b82191ae1c4d04444a84008c464433868 |
16-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
rename PP::getPhysicalCharacterAt -> PP::getSpelledCharacterAt. Slightly speed up sema of numbers like '1' by going directly to TargetInfo instead of through ASTContext. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62314 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
2b3c3dd9a1ec832b183815ca53737e4c84e02556 |
16-Jan-2009 |
Zhongxing Xu <xuzhongxing@gmail.com> |
Extract code dealing with typedef declarators into a separate function. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62303 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
d5ed8c3d7de82ee1f028806ccac9b921832fb528 |
16-Jan-2009 |
Zhongxing Xu <xuzhongxing@gmail.com> |
Extract code dealing with typedef declarators into a separate function. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62303 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
511d45bd35398482997d0b611e1a17ee683a37db |
16-Jan-2009 |
Zhongxing Xu <xuzhongxing@gmail.com> |
Extract code dealing with variable declarator into a separate function. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62300 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
cb8f4f15dd56d0da6503e7fc188fb7cac5d1285d |
16-Jan-2009 |
Zhongxing Xu <xuzhongxing@gmail.com> |
Extract code dealing with variable declarator into a separate function. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62300 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
7502dec96e06748a8f452d14548567ff37a62300 |
16-Jan-2009 |
Zhongxing Xu <xuzhongxing@gmail.com> |
Extract code dealing with declarators of function type into a separate function Sema::ActOnFunctionDeclarator(). No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62290 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
416fcaf92006f8a3cc290cdd2aa62bbf3998541f |
16-Jan-2009 |
Zhongxing Xu <xuzhongxing@gmail.com> |
Extract code dealing with declarators of function type into a separate function Sema::ActOnFunctionDeclarator(). No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62290 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
b9ef055f4db55de642f2873343654efb6eaaaf9e |
16-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve diagnostics for ambiguous name lookup results git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62287 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaInherit.cpp
emaInherit.h
emaLookup.cpp
|
4dc6b1c81c5efbaf68b868df10b18466b5e14b34 |
16-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Improve diagnostics for ambiguous name lookup results git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62287 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaInherit.cpp
emaInherit.h
emaLookup.cpp
|
8c6dc7a71278deeb222640d74ce88c84ddce280d |
15-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
PR3330: given an enum like this: enum E { A = 1U, B }; Don't make an implicit cast expr of null for B. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62274 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
13fd416b3d2b0c69247f2691f0ff344100e0faff |
15-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
PR3330: given an enum like this: enum E { A = 1U, B }; Don't make an implicit cast expr of null for B. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62274 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
ddebecaa80b74dfd595f99627a45259cf54d6769 |
15-Jan-2009 |
Daniel Dunbar <daniel@zuster.org> |
Fix some unused variable, control reaches end of non-void function, and uninitialized use options. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62270 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
f185319f25efd6094870f287030270fad26085ba |
15-Jan-2009 |
Daniel Dunbar <daniel@zuster.org> |
Fix some unused variable, control reaches end of non-void function, and uninitialized use options. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62270 91177308-0d34-0410-b5e6-96231b3b80d8
emaLookup.cpp
|
8260d5de5a366b0b4da0bed1bf6c85c5f215f423 |
15-Jan-2009 |
Nuno Lopes <nunoplopes@sapo.pt> |
add support for initializing static vars with a cast to union (gcc extension) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62261 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
6ed2ef8281e44fdd8f002d1cbe11668068d3e530 |
15-Jan-2009 |
Nuno Lopes <nunoplopes@sapo.pt> |
add support for initializing static vars with a cast to union (gcc extension) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62261 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
27b33952a3df9f60f9de6a2c6d20ccebc0d0149e |
15-Jan-2009 |
Seo Sanghyeon <sanxiyn@gmail.com> |
PR2746: Implement GCC cast to union extension git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62255 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
eff2cd58a897379c7fc46e83447d4619d6f6e9ca |
15-Jan-2009 |
Seo Sanghyeon <sanxiyn@gmail.com> |
PR2746: Implement GCC cast to union extension git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62255 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
6beddfef7f2786e4c93264701207fb7b4ef3e742 |
15-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Deallocate the BasePaths structure that we allocate for LookupResult. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62250 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaLookup.cpp
|
4bb64e77dd3b22070e28b7f9ff99feb576eaf6ef |
15-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Deallocate the BasePaths structure that we allocate for LookupResult. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62250 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaLookup.cpp
|
29dfa2f9174742d4ca1a4bfbb74e615eeddb497c |
15-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Initial implementation of member name lookup git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62247 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaExpr.cpp
emaInherit.cpp
emaInherit.h
emaLookup.cpp
|
7176fff961e04c4dff61efb967b1d344d41335a7 |
15-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Initial implementation of member name lookup git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62247 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaExpr.cpp
emaInherit.cpp
emaInherit.h
emaLookup.cpp
|
78d70131ddde779452a3a560f02bfb80052a779a |
14-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Refactor name lookup. This change refactors and cleans up our handling of name lookup with LookupDecl. There are several aspects to this refactoring: - The criteria for name lookup is now encapsulated into the class LookupCriteria, which replaces the hideous set of boolean values that LookupDecl currently has. - The results of name lookup are returned in a new class LookupResult, which can lazily build OverloadedFunctionDecls for overloaded function sets (and, eventually, eliminate the need to allocate member for OverloadedFunctionDecls) and contains a placeholder for handling ambiguous name lookup (for C++). - The primary entry points for name lookup are now LookupName (for unqualified name lookup) and LookupQualifiedName (for qualified name lookup). There is also a convenience function LookupParsedName that handles qualified/unqualified name lookup when given a scope specifier. Together, these routines are meant to gradually replace the kludgy LookupDecl, but this won't happen until after we have base class lookup (which forces us to cope with ambiguities). - Documented the heck out of name lookup. Experimenting a little with using Doxygen's member groups to make some sense of the Sema class. Feedback welcome! - Fixes some lingering issues with name lookup for nested-name-specifiers, which now goes through LookupName/LookupQualifiedName. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62245 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
dentifierResolver.h
ema.h
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaLookup.cpp
|
eb11cd078ba8682bbb9b082f8f6ead8be5c98581 |
14-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Refactor name lookup. This change refactors and cleans up our handling of name lookup with LookupDecl. There are several aspects to this refactoring: - The criteria for name lookup is now encapsulated into the class LookupCriteria, which replaces the hideous set of boolean values that LookupDecl currently has. - The results of name lookup are returned in a new class LookupResult, which can lazily build OverloadedFunctionDecls for overloaded function sets (and, eventually, eliminate the need to allocate member for OverloadedFunctionDecls) and contains a placeholder for handling ambiguous name lookup (for C++). - The primary entry points for name lookup are now LookupName (for unqualified name lookup) and LookupQualifiedName (for qualified name lookup). There is also a convenience function LookupParsedName that handles qualified/unqualified name lookup when given a scope specifier. Together, these routines are meant to gradually replace the kludgy LookupDecl, but this won't happen until after we have base class lookup (which forces us to cope with ambiguities). - Documented the heck out of name lookup. Experimenting a little with using Doxygen's member groups to make some sense of the Sema class. Feedback welcome! - Fixes some lingering issues with name lookup for nested-name-specifiers, which now goes through LookupName/LookupQualifiedName. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62245 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
dentifierResolver.h
ema.h
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaLookup.cpp
|
6214d8a05f448cccc9aa9dd7b3b00c274013d75d |
14-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Introduce support for C++0x explicit conversion operators (N2437) Small cleanup in the handling of user-defined conversions. Also, implement an optimization when constructing a call. We avoid recomputing implicit conversion sequences and instead use those conversion sequences that we computed as part of overload resolution. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62231 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
|
09f41cf63f4df0bf4e98ee473e44e9a95b68f0ff |
14-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Introduce support for C++0x explicit conversion operators (N2437) Small cleanup in the handling of user-defined conversions. Also, implement an optimization when constructing a call. We avoid recomputing implicit conversion sequences and instead use those conversion sequences that we computed as part of overload resolution. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62231 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
|
8494c967ba170c792681ba6b64ffe8ad61a8b6ff |
14-Jan-2009 |
Ted Kremenek <kremenek@apple.com> |
FunctionDecl::setParams() now uses the allocator associated with ASTContext to allocate the array of ParmVarDecl*'s. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62203 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
|
fc767615bc67d3a7587b1fb2e0494c32c9dbd7a5 |
14-Jan-2009 |
Ted Kremenek <kremenek@apple.com> |
FunctionDecl::setParams() now uses the allocator associated with ASTContext to allocate the array of ParmVarDecl*'s. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62203 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
|
82f549690d7edcdffe624a166bea4357df78dfe4 |
14-Jan-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Implemenent objective-c's NSObject attribute as a way of ddeclaraing c-type objects as an objective-c object. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62197 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaExpr.cpp
|
fa23c1d9adc99c662c1c0e192817185809d95614 |
14-Jan-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Implemenent objective-c's NSObject attribute as a way of ddeclaraing c-type objects as an objective-c object. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62197 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaExpr.cpp
|
dbde2284818a4085a59ef1a45ece0709f81c04e5 |
14-Jan-2009 |
Ted Kremenek <kremenek@apple.com> |
PTH: - Use canonical FileID when using getSpelling() caching. This addresses some cache misses we were seeing with -fsyntax-only on Cocoa.h - Added Preprocessor::getPhysicalCharacterAt() utility method for clients to grab the first character at a specified sourcelocation. This uses the PTH spelling cache. - Modified Sema::ActOnNumericConstant() to use Preprocessor::getPhysicalCharacterAt() instead of SourceManager::getCharacterData() (to get PTH hits). These changes cause -fsyntax-only to not page in any sources from Cocoa.h. We see a speedup of 27%. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62193 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
28396608ec20d44e9d1470e1ea51689bb504d0de |
14-Jan-2009 |
Ted Kremenek <kremenek@apple.com> |
PTH: - Use canonical FileID when using getSpelling() caching. This addresses some cache misses we were seeing with -fsyntax-only on Cocoa.h - Added Preprocessor::getPhysicalCharacterAt() utility method for clients to grab the first character at a specified sourcelocation. This uses the PTH spelling cache. - Modified Sema::ActOnNumericConstant() to use Preprocessor::getPhysicalCharacterAt() instead of SourceManager::getCharacterData() (to get PTH hits). These changes cause -fsyntax-only to not page in any sources from Cocoa.h. We see a speedup of 27%. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62193 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
80c720e111fb7c3e9f939bde477bccced7a77a23 |
14-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Permitting typedefs without a name is a Microsoft/GNU extension git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62192 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
ee159c14c1ac99d7944645e2b111b04dca089855 |
14-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Permitting typedefs without a name is a Microsoft/GNU extension git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62192 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
8a863428c1907064fca34b75528dafd21916d691 |
13-Jan-2009 |
Anders Carlsson <andersca@mac.com> |
Use the unqualified type for GCCs struct/union cast extension git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62170 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
53859912e4b5c4493e28c9ead8d634fdaac6adaf |
13-Jan-2009 |
Anders Carlsson <andersca@mac.com> |
Use the unqualified type for GCCs struct/union cast extension git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62170 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
fde627e5a8988f8b26ee651d893416814fec5134 |
13-Jan-2009 |
Anders Carlsson <andersca@mac.com> |
Warn when someone tries to pass a variable with a non-POD type to a varargs function/method/block. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62148 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprObjC.cpp
emaOverload.cpp
|
906fed0fb54a338961aba3aa54802b7d68de94c7 |
13-Jan-2009 |
Anders Carlsson <andersca@mac.com> |
Warn when someone tries to pass a variable with a non-POD type to a varargs function/method/block. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62148 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprObjC.cpp
emaOverload.cpp
|
db0ae4af998513bd134ae91a8995a12c1fc77253 |
13-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix argument-passing bugs in a call to object git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62147 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
518fda1d121dcba3ad7276f5e9a94f733f6e5ecd |
13-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Fix argument-passing bugs in a call to object git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62147 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
ab14111e04fa491c118fd7c57b867f407ba013fd |
13-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Add the proper restrictions on the left-hand argument of a built-in assignment operator candidate (C++ [over.match.oper]p4). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62128 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaOverload.cpp
|
88b4bf202a6bb67ed241281b8dea973f38df2782 |
13-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Add the proper restrictions on the left-hand argument of a built-in assignment operator candidate (C++ [over.match.oper]p4). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62128 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaOverload.cpp
|
036b5a0b6b0dc7d4c1e70984c848079848227d57 |
13-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Make sure we don't name a constructor or destructor with a qualified type. It leads to very weird errors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62124 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
e63ef48b76b84e7ffb0a38fbf475ddea5c48adb4 |
13-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Make sure we don't name a constructor or destructor with a qualified type. It leads to very weird errors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62124 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
03b2ad28d67ed14e2203eb1e92ce042f63182bcd |
13-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Cleanup DeclContext::addDecl and DeclContext::insert interface, from Piotr Rak git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62122 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExprCXX.cpp
|
482b77d1cb4ca08391d1f749436f092a4cc24427 |
13-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Cleanup DeclContext::addDecl and DeclContext::insert interface, from Piotr Rak git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62122 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExprCXX.cpp
|
8c797c0ab5f7ce7c537aa11e790ba5cad43833a4 |
13-Jan-2009 |
Ted Kremenek <kremenek@apple.com> |
Patch by Roman Divacky: Extend string-literal checking for printf() format string to handle conditional ternary operators where both sides are literals. This fixes PR 3319: http://llvm.org/bugs/show_bug.cgi?id=3319 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62117 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
|
d30ef87f34015d18bde20b9632032d0063d761aa |
13-Jan-2009 |
Ted Kremenek <kremenek@apple.com> |
Patch by Roman Divacky: Extend string-literal checking for printf() format string to handle conditional ternary operators where both sides are literals. This fixes PR 3319: http://llvm.org/bugs/show_bug.cgi?id=3319 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62117 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
|
b748fc51475dd9336219fb05401ac936edaa8c58 |
12-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement support for anonymous structs and unions in C. Both C and C++ handle anonymous structs/unions in the same way. Addresses several bugs: <rdar://problem/6259534> <rdar://problem/6481130> <rdar://problem/6483159> The test case in PR clang/1750 now passes with -fsyntax-only, but CodeGen for inline assembler still fails. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62112 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
4920f1ffb62b13b88e579476803c093f97f3e17f |
12-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement support for anonymous structs and unions in C. Both C and C++ handle anonymous structs/unions in the same way. Addresses several bugs: <rdar://problem/6259534> <rdar://problem/6481130> <rdar://problem/6483159> The test case in PR clang/1750 now passes with -fsyntax-only, but CodeGen for inline assembler still fails. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62112 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f96ee9e9b146493eb2fcc55ba45dfeebe8241ac7 |
12-Jan-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to supprt case of readonly property being assigned to when it has user declared setter method defined in the class implementation (but no declaration in the class itself). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62098 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
emaExpr.cpp
|
d1fa6449e9dbdd667466e9e1e971aa17c9793e8a |
12-Jan-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to supprt case of readonly property being assigned to when it has user declared setter method defined in the class implementation (but no declaration in the class itself). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62098 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
emaExpr.cpp
|
5eca99e9d013696b4888f3177f71569f9a105033 |
12-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Properly set the scope of non-fields declared within a struct, union, or enum to be outside that struct, union, or enum. Fixes several regressions: <rdar://problem/6487662> <rdar://problem/6487669> <rdar://problem/6487684> <rdar://problem/6487702> PR clang/3305 PR clang/3312 There is still some work to do in Objective-C++, but this requires that each of the Objective-C entities (interfaces, implementations, etc.) to be introduced into the context stack with PushDeclContext/PopDeclContext. This will be a separate fix, later. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62091 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
1a0d31a3d7f14ddc6370ba912c778aece6c12cf0 |
12-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Properly set the scope of non-fields declared within a struct, union, or enum to be outside that struct, union, or enum. Fixes several regressions: <rdar://problem/6487662> <rdar://problem/6487669> <rdar://problem/6487684> <rdar://problem/6487702> PR clang/3305 PR clang/3312 There is still some work to do in Objective-C++, but this requires that each of the Objective-C entities (interfaces, implementations, etc.) to be introduced into the context stack with PushDeclContext/PopDeclContext. This will be a separate fix, later. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62091 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
47c6d223eb8a89e4035584f7086b42256911d1d2 |
11-Jan-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Fix operator precedence. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62038 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
2726f9ad0a2a97c444a2b8b356c261cba120605a |
11-Jan-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Fix operator precedence. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62038 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
dcf1e8426517ad33f1f849708ae5c95d4040e4a7 |
11-Jan-2009 |
Steve Naroff <snaroff@apple.com> |
Convert property implementation to DeclContext::addDecl(). This completes the ObjCContainerDecl AST cleanup (for now). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62037 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
93983f8fa120330bf212bfde7e65da2709fb3be8 |
11-Jan-2009 |
Steve Naroff <snaroff@apple.com> |
Convert property implementation to DeclContext::addDecl(). This completes the ObjCContainerDecl AST cleanup (for now). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62037 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
2437ec62d40cbe0d3a48f5219a2ecddeb3dae89f |
11-Jan-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Convert some more actions to smart pointers. No performance regression in my basic test. Also fixed a type error in ActOnFinishSwitchStmt's arguments (body is a stmt). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62032 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaStmt.cpp
|
de307473448fb3cebcb4c10090728300b53bca03 |
11-Jan-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Convert some more actions to smart pointers. No performance regression in my basic test. Also fixed a type error in ActOnFinishSwitchStmt's arguments (body is a stmt). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62032 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaStmt.cpp
|
a89ed20e33970a4ab9b68cea4898325b689e39a2 |
10-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Don't bother setting NextDeclarator for EnumConstantDecls. It isn't used git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62016 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
dcde115dc2e9c21a295200c3129619e4bea15924 |
10-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Don't bother setting NextDeclarator for EnumConstantDecls. It isn't used git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62016 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
cab994dc1257be8fa17ed928f58cd85bc5af93a7 |
09-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
When we see a reference to a struct, class, or union like "struct X" that is neither a definition nor a forward declaration and where X has not yet been declared as a tag, introduce a declaration into the appropriate scope (which is likely *not* to be the current scope). The rules for the placement of the declaration differ slightly in C and C++, so we implement both and test the various corner cases. This implementation isn't 100% correct due to some lingering issues with the function prototype scope (for a function parameter list) not being the same scope as the scope of the function definition. Testcase is FIXME'd; this probably isn't an important issue. Addresses <rdar://problem/6484805>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62014 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
3218c4bb3b5d7250f12420de6db7ef3e3f805a75 |
09-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
When we see a reference to a struct, class, or union like "struct X" that is neither a definition nor a forward declaration and where X has not yet been declared as a tag, introduce a declaration into the appropriate scope (which is likely *not* to be the current scope). The rules for the placement of the declaration differ slightly in C and C++, so we implement both and test the various corner cases. This implementation isn't 100% correct due to some lingering issues with the function prototype scope (for a function parameter list) not being the same scope as the scope of the function definition. Testcase is FIXME'd; this probably isn't an important issue. Addresses <rdar://problem/6484805>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62014 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
54e4be99d5aeccb434916d8ae1bbc339c4969208 |
09-Jan-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Add some comments to the virtual work. Thanks to Doug Gregor for the review. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62012 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
c9b580a4de1824b3155048d31aaa153316e150c2 |
09-Jan-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Add some comments to the virtual work. Thanks to Doug Gregor for the review. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62012 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
faca5e2c497659869be8a0647ea589e209a06931 |
09-Jan-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
This patch removes mergeProperties and does the property lookup in designated protocols lazily. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62007 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
a66793ee8d2589ead81739d9b8a968650db3d452 |
09-Jan-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
This patch removes mergeProperties and does the property lookup in designated protocols lazily. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62007 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
83faa29958e9a74b83445f2cf462dbaff46abb94 |
09-Jan-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Very basic support for pure virtual functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62003 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
9ba73ad65446f6bc876f40cced866d85dff754da |
09-Jan-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Very basic support for pure virtual functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62003 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
d16753817a047f96670d084d3146c0e495604586 |
09-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Replace DeclContext's vector of ScopedDecl pointers with a linked list of ScopedDecls (using the new ScopedDecl::NextDeclInScope pointer). Performance-wise: - It's a net win in memory utilization, since DeclContext is now one pointer smaller than it used to be (std::vectors are typically 3 pointers; we now use 2 pointers) and - Parsing Cocoa.h with -fsyntax-only (with a Release-Asserts Clang) is about 1.9% faster than before, most likely because we no longer have the memory allocations and copying associated with the std::vector. I'll re-enable serialization of DeclContexts once I've sorted out the NextDeclarator/NextDeclInScope question. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62001 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclObjC.cpp
|
6037fcba3431b47de1a994c9b286feac17894eff |
09-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Replace DeclContext's vector of ScopedDecl pointers with a linked list of ScopedDecls (using the new ScopedDecl::NextDeclInScope pointer). Performance-wise: - It's a net win in memory utilization, since DeclContext is now one pointer smaller than it used to be (std::vectors are typically 3 pointers; we now use 2 pointers) and - Parsing Cocoa.h with -fsyntax-only (with a Release-Asserts Clang) is about 1.9% faster than before, most likely because we no longer have the memory allocations and copying associated with the std::vector. I'll re-enable serialization of DeclContexts once I've sorted out the NextDeclarator/NextDeclInScope question. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62001 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclObjC.cpp
|
d394a2793850cf65f2f7a99f089603cf34405dec |
09-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Make sure that ScopedDecls passed to DeclContext::addDecl are added into their lexical context git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61998 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
a8cc8ce044e5d2589128f0c1a84e586cce743b27 |
09-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Make sure that ScopedDecls passed to DeclContext::addDecl are added into their lexical context git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61998 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
5d7648449392dccee2deb7920c2e5facbe1a63f5 |
09-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Provide a new kind of iterator, the specific_decl_iterator, that filters the decls seen by decl_iterator with two criteria: the dynamic type of the declaration and a run-time predicate described by a member function. This simplifies EnumDecl, RecordDecl, and ObjCContainerDecl considerably. It has no measurable performance impact. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61994 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
emaExprObjC.cpp
emaType.cpp
|
f8d49f64ef6ab7e632717a31631fc289aab69428 |
09-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Provide a new kind of iterator, the specific_decl_iterator, that filters the decls seen by decl_iterator with two criteria: the dynamic type of the declaration and a run-time predicate described by a member function. This simplifies EnumDecl, RecordDecl, and ObjCContainerDecl considerably. It has no measurable performance impact. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61994 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
emaExprObjC.cpp
emaType.cpp
|
451f83c3d689753abb1d7393816951b96d39bbb1 |
09-Jan-2009 |
Steve Naroff <snaroff@apple.com> |
Move property API's up to ObjCContainerDecl (removing a lot of duplicate code). Add isa/cast/dyncast support for ObjCContainerDecl. Renamed classprop_iterator/begin/end to prop_iterator/begin/end (the class prefix was confusing). More simplifications to Sema::ActOnAtEnd()... Added/changed some FIXME's as a result of the above work. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61988 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
09c4719788a5cea09897525e528fa00420f1677b |
09-Jan-2009 |
Steve Naroff <snaroff@apple.com> |
Move property API's up to ObjCContainerDecl (removing a lot of duplicate code). Add isa/cast/dyncast support for ObjCContainerDecl. Renamed classprop_iterator/begin/end to prop_iterator/begin/end (the class prefix was confusing). More simplifications to Sema::ActOnAtEnd()... Added/changed some FIXME's as a result of the above work. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61988 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
6e4fa2c890cc4f81ac227b3f6d1b49a49dcf0566 |
09-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Addressed the issue in <rdar://problem/6479085>, where we failed to rewrite @class declarations that showed up within linkage specifications because those @class declarations never made it any place where the rewriter could find them. Moved all of the ObjC*Decl nodes over to ScopedDecls, so that they can live in the appropriate top-level or transparent DeclContext near the top level, e.g., TranslationUnitDecl or LinkageSpecDecl. Objective-C declarations now show up in a traversal of the declarations in a DeclContext (they didn't before!). This way, the rewriter finds all Objective-C declarations within linkage specifications. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61966 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDeclObjC.cpp
|
d04341000d35c8808a72838b057eed7bf13b7661 |
09-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Addressed the issue in <rdar://problem/6479085>, where we failed to rewrite @class declarations that showed up within linkage specifications because those @class declarations never made it any place where the rewriter could find them. Moved all of the ObjC*Decl nodes over to ScopedDecls, so that they can live in the appropriate top-level or transparent DeclContext near the top level, e.g., TranslationUnitDecl or LinkageSpecDecl. Objective-C declarations now show up in a traversal of the declarations in a DeclContext (they didn't before!). This way, the rewriter finds all Objective-C declarations within linkage specifications. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61966 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDeclObjC.cpp
|
89d5304610977ee2b6ca7237ba1c7be4119810cd |
09-Jan-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Adding support for ObjC methods which have c-style parameter list. This is work in progress. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61964 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
439c65892cc8629bbf541e0b8bda6b64cbcc4e6b |
09-Jan-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Adding support for ObjC methods which have c-style parameter list. This is work in progress. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61964 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
bdbbc2dd11e8e5645fa6a61b9f24cb12625a830f |
08-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Revert my previous, failed attempt to pretty-print anonymous struct/union accesses well. Added a FIXME so we know to revisit this later git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61951 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaInit.cpp
|
b3eef68111ffc220e449be96da1747998c057790 |
08-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Revert my previous, failed attempt to pretty-print anonymous struct/union accesses well. Added a FIXME so we know to revisit this later git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61951 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaInit.cpp
|
96babf0e08d3d48855836c5c13e727503d5f6296 |
08-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Remove double-insertion of EnumConstantDecls. Thanks to Zhongxing Xu for pointing this out git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61942 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
25553512a50e8c79fb1daae4b0398086be338554 |
08-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Remove double-insertion of EnumConstantDecls. Thanks to Zhongxing Xu for pointing this out git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61942 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
db568cfb21332e84a163afdaab0d13e88a56f712 |
08-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Unify the code for defining tags in C and C++, so that we always introduce a Scope for the body of a tag. This reduces the number of semantic differences between C and C++ structs and unions, and will help with other features (e.g., anonymous unions) in C. Some important points: - Fields are now in the "member" namespace (IDNS_Member), to keep them separate from tags and ordinary names in C. See the new test in Sema/member-reference.c for an example of why this matters. In C++, ordinary and member name lookup will find members in both the ordinary and member namespace, so the difference between IDNS_Member and IDNS_Ordinary is erased by Sema::LookupDecl (but only in C++!). - We always introduce a Scope and push a DeclContext when we're defining a tag, in both C and C++. Previously, we had different actions and different Scope/CurContext behavior for enums, C structs/unions, and C++ structs/unions/classes. Now, it's one pair of actions. (Yay!) There's still some fuzziness in the handling of struct/union/enum definitions within other struct/union/enum definitions in C. We'll need to do some more cleanup to eliminate some reliance on CurContext before we can solve this issue for real. What we want is for something like this: struct X { struct T { int x; } t; }; to introduce T into translation unit scope (placing it at the appropriate point in the IdentifierResolver chain, too), but it should still have struct X as its lexical declaration context. PushOnScopeChains isn't smart enough to do that yet, though, so there's a FIXME test in nested-redef.c git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61940 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
ema.h
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
|
72de6676bd30f9081ee4166bbe07b4c270258ce6 |
08-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Unify the code for defining tags in C and C++, so that we always introduce a Scope for the body of a tag. This reduces the number of semantic differences between C and C++ structs and unions, and will help with other features (e.g., anonymous unions) in C. Some important points: - Fields are now in the "member" namespace (IDNS_Member), to keep them separate from tags and ordinary names in C. See the new test in Sema/member-reference.c for an example of why this matters. In C++, ordinary and member name lookup will find members in both the ordinary and member namespace, so the difference between IDNS_Member and IDNS_Ordinary is erased by Sema::LookupDecl (but only in C++!). - We always introduce a Scope and push a DeclContext when we're defining a tag, in both C and C++. Previously, we had different actions and different Scope/CurContext behavior for enums, C structs/unions, and C++ structs/unions/classes. Now, it's one pair of actions. (Yay!) There's still some fuzziness in the handling of struct/union/enum definitions within other struct/union/enum definitions in C. We'll need to do some more cleanup to eliminate some reliance on CurContext before we can solve this issue for real. What we want is for something like this: struct X { struct T { int x; } t; }; to introduce T into translation unit scope (placing it at the appropriate point in the IdentifierResolver chain, too), but it should still have struct X as its lexical declaration context. PushOnScopeChains isn't smart enough to do that yet, though, so there's a FIXME test in nested-redef.c git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61940 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
ema.h
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
|
4cf0d3f08c6b89732180ce62a20ea2d81706cba4 |
08-Jan-2009 |
Steve Naroff <snaroff@apple.com> |
Move FIXME to a better location. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61937 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
4fb78c6d62a325f949e002a6bb3af4f6f33608a9 |
08-Jan-2009 |
Steve Naroff <snaroff@apple.com> |
Move FIXME to a better location. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61937 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
5492c1beecd117ab9ac0c0e03331b3573faaf5ff |
08-Jan-2009 |
Steve Naroff <snaroff@apple.com> |
Removed ObjCContainerDecl::getPropertyMethods()...doesn't belong in the AST. Moved logic to Sema::ProcessPropertyDecl(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61936 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
92f863bffa9d5efe5cc63992e06b268231bc2cc0 |
08-Jan-2009 |
Steve Naroff <snaroff@apple.com> |
Removed ObjCContainerDecl::getPropertyMethods()...doesn't belong in the AST. Moved logic to Sema::ProcessPropertyDecl(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61936 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
ab63fd6f3dccb110f78f132fa81321bbd4a61b70 |
08-Jan-2009 |
Steve Naroff <snaroff@apple.com> |
This is a large/messy diff that unifies the ObjC AST's with DeclContext. - ObjCContainerDecl's (ObjCInterfaceDecl/ObjCCategoryDecl/ObjCProtocolDecl), ObjCCategoryImpl, & ObjCImplementation are all DeclContexts. - ObjCMethodDecl is now a ScopedDecl (so it can play nicely with DeclContext). - ObjCContainerDecl now does iteration/lookup using DeclContext infrastructure (no more linear search:-) - Removed ASTContext argument to DeclContext::lookup(). It wasn't being used and complicated it's use from an ObjC AST perspective. - Added Sema::ProcessPropertyDecl() and removed Sema::diagnosePropertySetterGetterMismatch(). - Simplified Sema::ActOnAtEnd() considerably. Still more work to do. - Fixed an incorrect casting assumption in Sema::getCurFunctionOrMethodDecl(), now that ObjCMethodDecl is a ScopedDecl. - Removed addPropertyMethods from ObjCInterfaceDecl/ObjCCategoryDecl/ObjCProtocolDecl. This passes all the tests on my machine. Since many of the changes are central to the way ObjC finds it's methods, I expect some fallout (and there are still a handful of FIXME's). Nevertheless, this should be a step in the right direction. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61929 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
ema.cpp
ema.h
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExprCXX.cpp
emaOverload.cpp
|
0701bbb228dfd87e1fe82a0a4b7b9facfecb43da |
08-Jan-2009 |
Steve Naroff <snaroff@apple.com> |
This is a large/messy diff that unifies the ObjC AST's with DeclContext. - ObjCContainerDecl's (ObjCInterfaceDecl/ObjCCategoryDecl/ObjCProtocolDecl), ObjCCategoryImpl, & ObjCImplementation are all DeclContexts. - ObjCMethodDecl is now a ScopedDecl (so it can play nicely with DeclContext). - ObjCContainerDecl now does iteration/lookup using DeclContext infrastructure (no more linear search:-) - Removed ASTContext argument to DeclContext::lookup(). It wasn't being used and complicated it's use from an ObjC AST perspective. - Added Sema::ProcessPropertyDecl() and removed Sema::diagnosePropertySetterGetterMismatch(). - Simplified Sema::ActOnAtEnd() considerably. Still more work to do. - Fixed an incorrect casting assumption in Sema::getCurFunctionOrMethodDecl(), now that ObjCMethodDecl is a ScopedDecl. - Removed addPropertyMethods from ObjCInterfaceDecl/ObjCCategoryDecl/ObjCProtocolDecl. This passes all the tests on my machine. Since many of the changes are central to the way ObjC finds it's methods, I expect some fallout (and there are still a handful of FIXME's). Nevertheless, this should be a step in the right direction. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61929 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
ema.cpp
ema.h
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExprCXX.cpp
emaOverload.cpp
|
2ac4cd357dbaa659d3f8d3730251865cc1903efa |
08-Jan-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Objc's compatibility-alias semantics and code gen issue fix. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61901 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
305c658ebce84bb9833fc0e7675554656453b8e8 |
08-Jan-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Objc's compatibility-alias semantics and code gen issue fix. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61901 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
1ae2770c5bb2dbc11e4eabd9ecdd434c1e7da0b6 |
07-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix PR clang/3291 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61886 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
bc468ba19c0bad9bf4a40ff39d8fad7e471bfbf5 |
07-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Fix PR clang/3291 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61886 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
cc74331b39f125521e8c1fa66d3c3171ce119114 |
07-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix printing of member references to avoid displaying implicitly-generated member references, e.g., for anonymous struct/unions or implicit 'this' in member functions git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61885 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaInit.cpp
|
83233a4b7c2bc7b531ffa3b33fdd1cd8138373b6 |
07-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Fix printing of member references to avoid displaying implicitly-generated member references, e.g., for anonymous struct/unions or implicit 'this' in member functions git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61885 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaInit.cpp
|
a04fcb61cf8a23063c836fcd147cc565a9aa6b45 |
07-Jan-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Don't ICE when messaging on 'super' receiver when class of category implementation is undeclared. Issue error instead. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61882 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
4b1e275eb743b46cd10153bb58743d89af7242ea |
07-Jan-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Don't ICE when messaging on 'super' receiver when class of category implementation is undeclared. Issue error instead. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61882 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
c7f0161766b7b551e21882add1e6e9599b820251 |
07-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Finished semantic analysis of anonymous unions in C++. Duplicate-member checking within classes is still a little messy, and anonymous unions are still completely broken in C. We'll need to unify the handling of fields in C and C++ to make this code applicable in both languages. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61878 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
6b3945f4bc757bdadd3e443180cf32c2cccb52a0 |
07-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Finished semantic analysis of anonymous unions in C++. Duplicate-member checking within classes is still a little messy, and anonymous unions are still completely broken in C. We'll need to unify the handling of fields in C and C++ to make this code applicable in both languages. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61878 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
3a423135abbd36c8f1fbe6becbfb8aee0ba8583c |
07-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Use DeclContext::getLookupContext wherever necessary to ensure that we look through transparent contexts git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61861 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
e21b99468ad408694caf4b4efbbb57ef9d89f99f |
07-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Use DeclContext::getLookupContext wherever necessary to ensure that we look through transparent contexts git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61861 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
723d3339200af4a2f1861b7f4cc6d9788e0d7386 |
07-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Initial implementation of anonymous unions (and, as a GNU extension, structures and classes) in C++. Covers name lookup and the synthesis and member access for the unnamed objects/fields associated with anonymous unions. Some C++ semantic checks are still missing (anonymous unions can't have function members, static data members, etc.), and there is no support for anonymous structs or unions in C. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61840 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaExpr.cpp
emaOverload.cpp
emaType.cpp
|
bcbffc46f1ad3796c4582fa1e3a9113b5aa26061 |
07-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Initial implementation of anonymous unions (and, as a GNU extension, structures and classes) in C++. Covers name lookup and the synthesis and member access for the unnamed objects/fields associated with anonymous unions. Some C++ semantic checks are still missing (anonymous unions can't have function members, static data members, etc.), and there is no support for anonymous structs or unions in C. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61840 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaExpr.cpp
emaOverload.cpp
emaType.cpp
|
69e781fb54d6a9592899a96d2a85f3f39a4142a9 |
07-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Allow Objective-C entities to be declared within a transparent context nested in the translation unit. This fixes <rdar://problem/6476070>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61832 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
emaDecl.cpp
emaDeclObjC.cpp
|
ce35607c282c845b3285d0f6e106489d8bbeba13 |
07-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Allow Objective-C entities to be declared within a transparent context nested in the translation unit. This fixes <rdar://problem/6476070>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61832 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
emaDecl.cpp
emaDeclObjC.cpp
|
7898bf690f82bf0b3d74e796497cadf683446c0a |
06-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
- Various comment typo fixes in Sema.h - Simplify ParseDeclCXX to use early exit on error instead of nesting. - Change ParseDeclCXX to using the 'skip on error' form of ExpectAndConsume. - If we don't see the ; in a using directive, still call the action, for hopefully better error recovery. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61801 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
|
823c44e6d73141f642e207980b4021ddcf09897b |
06-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
- Various comment typo fixes in Sema.h - Simplify ParseDeclCXX to use early exit on error instead of nesting. - Change ParseDeclCXX to using the 'skip on error' form of ExpectAndConsume. - If we don't see the ; in a using directive, still call the action, for hopefully better error recovery. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61801 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
|
954381a18151766734239089d2589940201f4bbb |
06-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
it is ok to insert empty source ranges into diagnostics, declare variable in an if. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61800 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
ead013e4a89d8a51acacebe541b922b309867642 |
06-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
it is ok to insert empty source ranges into diagnostics, declare variable in an if. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61800 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
093e31bd453f109511c158cc65b7a43201ad6ea4 |
06-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
simplify some code using 'continue' and the new 'isInIdentifierNamespace' predicate. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61799 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
7bea766fc90752eb5415c40dd70fc7176383bdbc |
06-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
simplify some code using 'continue' and the new 'isInIdentifierNamespace' predicate. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61799 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f0464ec81688de6a1fcc9979ae7245aa87e451aa |
06-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Minor tweaks to the transparent declcontext patch git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61798 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
4f3b8f8ac2f8c89028a2f8793df0a7887df809d4 |
06-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Minor tweaks to the transparent declcontext patch git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61798 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
566782aea6d9805c4f703f8101f2dc452cf7286a |
06-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Add QualifiedDeclRefExpr, which retains additional source-location information for declarations that were referenced via a qualified-id, e.g., N::C::value. We keep track of the location of the start of the nested-name-specifier. Note that the difference between QualifiedDeclRefExpr and DeclRefExpr does have an effect on the semantics of function calls in two ways: 1) The use of a qualified-id instead of an unqualified-id suppresses argument-dependent lookup 2) If the name refers to a virtual function, the qualified-id version will call the function determined statically while the unqualified-id version will call the function determined dynamically (by looking up the appropriate function in the vtable). Neither of these features is implemented yet, but we do print out qualified names for QualifiedDeclRefExprs as part of the AST printing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61789 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
emaDecl.cpp
emaExpr.cpp
|
1a49af9681c350fef58e677f85ccb9a77e8e9d0a |
06-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Add QualifiedDeclRefExpr, which retains additional source-location information for declarations that were referenced via a qualified-id, e.g., N::C::value. We keep track of the location of the start of the nested-name-specifier. Note that the difference between QualifiedDeclRefExpr and DeclRefExpr does have an effect on the semantics of function calls in two ways: 1) The use of a qualified-id instead of an unqualified-id suppresses argument-dependent lookup 2) If the name refers to a virtual function, the qualified-id version will call the function determined statically while the unqualified-id version will call the function determined dynamically (by looking up the appropriate function in the vtable). Neither of these features is implemented yet, but we do print out qualified names for QualifiedDeclRefExprs as part of the AST printing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61789 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
emaDecl.cpp
emaExpr.cpp
|
b27282f5090f1f4a0a56c895ae2ed2876e87ab41 |
05-Jan-2009 |
Daniel Dunbar <daniel@zuster.org> |
Remainder is only valid on integer vector operands. Improve ext vector test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61766 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
523aa600bee6b4de874cdc9dd0269c97cb7c912e |
05-Jan-2009 |
Daniel Dunbar <daniel@zuster.org> |
Remainder is only valid on integer vector operands. Improve ext vector test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61766 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
2f08d81741057a4bb8769595ddddc35fe6a94932 |
05-Jan-2009 |
Daniel Dunbar <daniel@zuster.org> |
Use CheckVectorOperands when % is applied to a vector type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61763 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
69d1d0029311fa657dd0be16b1b5ca51ec98d621 |
05-Jan-2009 |
Daniel Dunbar <daniel@zuster.org> |
Use CheckVectorOperands when % is applied to a vector type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61763 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
39c0f6f69727c07a1b87605c54f14b86f8189194 |
05-Jan-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
PODness and Type Traits Make C++ classes track the POD property (C++ [class]p4) Track the existence of a copy assignment operator. Implicitly declare the copy assignment operator if none is provided. Implement most of the parsing job for the G++ type traits extension. Fully implement the low-hanging fruit of the type traits: __is_pod: Whether a type is a POD. __is_class: Whether a type is a (non-union) class. __is_union: Whether a type is a union. __is_enum: Whether a type is an enum. __is_polymorphic: Whether a type is polymorphic (C++ [class.virtual]p1). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61746 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
|
64b45f7e0d3167f040841ac2920aead7f080730d |
05-Jan-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
PODness and Type Traits Make C++ classes track the POD property (C++ [class]p4) Track the existence of a copy assignment operator. Implicitly declare the copy assignment operator if none is provided. Implement most of the parsing job for the G++ type traits extension. Fully implement the low-hanging fruit of the type traits: __is_pod: Whether a type is a POD. __is_class: Whether a type is a (non-union) class. __is_union: Whether a type is a union. __is_enum: Whether a type is an enum. __is_polymorphic: Whether a type is polymorphic (C++ [class.virtual]p1). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61746 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
|
d802838e493df9217cf3d71087de523fff486a97 |
05-Jan-2009 |
Douglas Gregor <doug.gregor@gmail.com> |
Introduce support for "transparent" DeclContexts, which are DeclContexts whose members are visible from enclosing DeclContexts up to (and including) the innermost enclosing non-transparent DeclContexts. Transparent DeclContexts unify the mechanism to be used for various language features, including C enumerations, anonymous unions, C++0x inline namespaces, and C++ linkage specifications. Please refer to the documentation in the Clang internals manual for more information. Only enumerations and linkage specifications currently use transparent DeclContexts. Still to do: use transparent DeclContexts to implement anonymous unions and GCC's anonymous structs extension, and, later, the C++0x features. We also need to tighten up the DeclContext/ScopedDecl link to ensure that every ScopedDecl is in a single DeclContext, which will ensure that we can then enforce ownership and reduce the memory footprint of DeclContext. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61735 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
dentifierResolver.h
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
074149e11baf5f7db12f84efd5c34ba6e35d5cdf |
05-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Introduce support for "transparent" DeclContexts, which are DeclContexts whose members are visible from enclosing DeclContexts up to (and including) the innermost enclosing non-transparent DeclContexts. Transparent DeclContexts unify the mechanism to be used for various language features, including C enumerations, anonymous unions, C++0x inline namespaces, and C++ linkage specifications. Please refer to the documentation in the Clang internals manual for more information. Only enumerations and linkage specifications currently use transparent DeclContexts. Still to do: use transparent DeclContexts to implement anonymous unions and GCC's anonymous structs extension, and, later, the C++0x features. We also need to tighten up the DeclContext/ScopedDecl link to ensure that every ScopedDecl is in a single DeclContext, which will ensure that we can then enforce ownership and reduce the memory footprint of DeclContext. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61735 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
dentifierResolver.h
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
c06c27980ba52ffec8b8f93cde1a43b540f5a6f4 |
31-Dec-2008 |
Anders Carlsson <andersca@mac.com> |
Perform default function/array conversion for input arguments to inline asm statements if the input expr can be a memory operand git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61515 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
562489e0c8bbfc2490377542590e048cde822934 |
31-Dec-2008 |
Anders Carlsson <andersca@mac.com> |
Perform default function/array conversion for input arguments to inline asm statements if the input expr can be a memory operand git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61515 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
5ff0ee5a153adf37bcbfae110b61a73e18fa27fe |
30-Dec-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Parser support for C++ using directives, from Piotr Rak git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61486 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
f780abc21c39cd4731b9e38f2d2d9f7d1510bd7b |
30-Dec-2008 |
Douglas Gregor <dgregor@apple.com> |
Parser support for C++ using directives, from Piotr Rak git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61486 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
f463b9a2835c52f7ba564fdf61df4e55cd5c3db8 |
29-Dec-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Remove hasKind(). Use existing getKind(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61476 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
fc820a4394a33e4fccfd8283909d425708311d41 |
29-Dec-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Remove hasKind(). Use existing getKind(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61476 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
0a23e8fc1cbe3cf61c82ca8d947aa84ec60d079f |
28-Dec-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Convert a two more statement actions to smart pointers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61456 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaStmt.cpp
|
117054a99f4994e4ec8a1fc904b554e1f2dc9b29 |
28-Dec-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Convert a two more statement actions to smart pointers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61456 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaStmt.cpp
|
b7605e84123a331db0338400ef740c3a7a47a1eb |
28-Dec-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Diagnose declarations that don't declare anything, and fix PR3020. Examples: int; typedef int; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61454 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
a4ed0d8d75212dc01b4438829a4b0c846d99458d |
28-Dec-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Diagnose declarations that don't declare anything, and fix PR3020. Examples: int; typedef int; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61454 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
853dd3979b57feef32ac7f22a7157854f6fb063e |
26-Dec-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Add support for out-of-line definitions of conversion functions and member operators git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61442 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
70316a065bcf11c88143e22c88d530ebd320832f |
26-Dec-2008 |
Douglas Gregor <dgregor@apple.com> |
Add support for out-of-line definitions of conversion functions and member operators git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61442 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
b27a8700761e1c1f955fc5cc3663289179c9e4d2 |
26-Dec-2008 |
Anton Korobeynikov <asl@math.spbu.ru> |
Add full dllimport / dllexport support: both sema checks and codegen. Patch by Ilya Okonsky git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61437 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
|
2f402708e62f89fb875442802e3d3f20fc909d33 |
26-Dec-2008 |
Anton Korobeynikov <asl@math.spbu.ru> |
Add full dllimport / dllexport support: both sema checks and codegen. Patch by Ilya Okonsky git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61437 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
|
524734351dd3a2c625d8a7fb131ee8a424b3a00b |
24-Dec-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Keep track of template arguments when we parse them. Right now, we don't actually do anything with the template arguments, but they'll be used to create template declarations git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61413 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplate.cpp
|
c4b4e7b8f6ca9b036824e048af49cd2a52b57cdf |
24-Dec-2008 |
Douglas Gregor <dgregor@apple.com> |
Keep track of template arguments when we parse them. Right now, we don't actually do anything with the template arguments, but they'll be used to create template declarations git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61413 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaTemplate.cpp
|
62ae25ad1ecf45a8ecfefba3b14b159a91847657 |
24-Dec-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Correct the order in which we cope with end-of-class-definition semantics and improve our handling of default arguments. Specifically, we follow this order: - As soon as the see the '}' in the class definition, the class is complete and we add any implicit declarations (default constructor, copy constructor, etc.) to the class. - If there are any default function arguments, parse them - If there were any inline member function definitions, parse them As part of this change, we now keep track of the the fact that we've seen unparsed default function arguments within the AST. See the new ParmVarDecl::hasUnparsedDefaultArg member. This allows us to properly cope with calls inside default function arguments to other functions where we're making use of the default arguments. Made some C++ error messages regarding failed initializations more specific. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61406 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
|
61366e9cd41a6dbde4e66416dac21269c8ac1d94 |
24-Dec-2008 |
Douglas Gregor <dgregor@apple.com> |
Correct the order in which we cope with end-of-class-definition semantics and improve our handling of default arguments. Specifically, we follow this order: - As soon as the see the '}' in the class definition, the class is complete and we add any implicit declarations (default constructor, copy constructor, etc.) to the class. - If there are any default function arguments, parse them - If there were any inline member function definitions, parse them As part of this change, we now keep track of the the fact that we've seen unparsed default function arguments within the AST. See the new ParmVarDecl::hasUnparsedDefaultArg member. This allows us to properly cope with calls inside default function arguments to other functions where we're making use of the default arguments. Made some C++ error messages regarding failed initializations more specific. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61406 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
|
796269447580ef8672e694bae1bceec5513b406c |
23-Dec-2008 |
Anton Korobeynikov <asl@math.spbu.ru> |
Sema for fastcall/stdcall stuff. Tests will follow. Patch by Ilya Okonsky! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61394 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
7b0a52f982e3514425fc8a3c8fc728f17c27c08e |
23-Dec-2008 |
Anton Korobeynikov <asl@math.spbu.ru> |
Sema for fastcall/stdcall stuff. Tests will follow. Patch by Ilya Okonsky! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61394 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
7c8658523aee6ae2f2cf678bfa3b3b6599d3f2a5 |
23-Dec-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix misguided type selection git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61393 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
5cc3709b843c799e268f944b7bf9dbdc79cefe8d |
23-Dec-2008 |
Douglas Gregor <dgregor@apple.com> |
Fix misguided type selection git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61393 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
6e71edcf013acb364885695ab4831a8403a2c4cd |
23-Dec-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Don't push OverloadedFunctionDecls onto the chain of declarations attached to an identifier. Instead, all overloaded functions will be pushed into scope, and we'll synthesize an OverloadedFunctionDecl on the fly when we need it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61386 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.h
emaDecl.cpp
emaExprCXX.cpp
emaOverload.cpp
|
6ed40e351a7c1fb3084434f1db19216b79623cf0 |
23-Dec-2008 |
Douglas Gregor <dgregor@apple.com> |
Don't push OverloadedFunctionDecls onto the chain of declarations attached to an identifier. Instead, all overloaded functions will be pushed into scope, and we'll synthesize an OverloadedFunctionDecl on the fly when we need it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61386 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.h
emaDecl.cpp
emaExprCXX.cpp
emaOverload.cpp
|
80402cf73c8d1301445146b0416a33f1cf14b083 |
23-Dec-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Add some block-pointer conversions in C++ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61359 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
2a7e58dc24b17b1cb900a1ee30ea328d665b1a64 |
23-Dec-2008 |
Douglas Gregor <dgregor@apple.com> |
Add some block-pointer conversions in C++ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61359 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
ddfd9d5d81715686bf47f8bf577ead557d5f3c83 |
23-Dec-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Don't explicitly represent OverloadedFunctionDecls within DeclContext. Instead, just keep the list of currently-active declarations and only build the OverloadedFunctionDecl when we absolutely need it. This is a half-step toward eliminating the need to explicitly build OverloadedFunctionDecls that store sets of overloaded functions. This was suggested by Argiris a while back, and it's a good thing for several reasons: first, it eliminates the messy logic that currently tries to keep the OverloadedFunctionDecl in sync with the declarations that are being added. Second, it will (eventually) eliminate the need to allocate memory for overload sets, which could help performance. Finally, it helps set us up for when name lookup can return multiple (possibly ambiguous) results, as can happen with lookup of class members in C++. Next steps: make the IdentifierResolver store overloads as separate entries in its list rather than replacing them with an OverloadedFunctionDecl now, then see how far we can go toward eliminating OverloadedFunctionDecl entirely. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61357 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaOverload.cpp
|
3fc749d899dfc194162128c1a88933148a39b68d |
23-Dec-2008 |
Douglas Gregor <dgregor@apple.com> |
Don't explicitly represent OverloadedFunctionDecls within DeclContext. Instead, just keep the list of currently-active declarations and only build the OverloadedFunctionDecl when we absolutely need it. This is a half-step toward eliminating the need to explicitly build OverloadedFunctionDecls that store sets of overloaded functions. This was suggested by Argiris a while back, and it's a good thing for several reasons: first, it eliminates the messy logic that currently tries to keep the OverloadedFunctionDecl in sync with the declarations that are being added. Second, it will (eventually) eliminate the need to allocate memory for overload sets, which could help performance. Finally, it helps set us up for when name lookup can return multiple (possibly ambiguous) results, as can happen with lookup of class members in C++. Next steps: make the IdentifierResolver store overloads as separate entries in its list rather than replacing them with an OverloadedFunctionDecl now, then see how far we can go toward eliminating OverloadedFunctionDecl entirely. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61357 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaOverload.cpp
|
237116b372f05f0c504c86f99d945b8f783368bc |
22-Dec-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Full AST support and better Sema support for C++ try-catch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61346 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaStmt.cpp
|
8351da06ca3082dfd49dd8e3c1785a986920f57c |
22-Dec-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Full AST support and better Sema support for C++ try-catch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61346 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaStmt.cpp
|
f1d75710da884c66b4af82786e7788e5f024f197 |
22-Dec-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Support conversion from a null pointer constant o any Objective-C object pointer type. Fixes rdar://problem/6463298 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61340 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
27b09ac9f7a4b2555bb9adda3568f3ba6264a63e |
22-Dec-2008 |
Douglas Gregor <dgregor@apple.com> |
Support conversion from a null pointer constant o any Objective-C object pointer type. Fixes rdar://problem/6463298 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61340 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
743c81609db46cce8a881fac6d295774687ff035 |
22-Dec-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Partial AST and Sema support for C++ try-catch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61337 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaStmt.cpp
|
4b07b2968f87f3cd5a3d8c76145f1cbfd718d42d |
22-Dec-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Partial AST and Sema support for C++ try-catch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61337 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaStmt.cpp
|
42d0bf96e13c495f3a643c8870622b958e1d2d80 |
22-Dec-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to remove bogus warning in case of @dynamic property in a category and to issue diagnostics for mismatch method in some other cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61336 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
804058ece0d8f692faac8518ce4d98975ba57ac2 |
22-Dec-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to remove bogus warning in case of @dynamic property in a category and to issue diagnostics for mismatch method in some other cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61336 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
74a212966df1e53ae57e0d8fa92482b62580aa0c |
22-Dec-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Expr and Stmt must be destroyed with Destroy, not delete. Fixes PR/3245. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61335 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
cfb664c308fcfe5bf17d2fe430bcedf1f3707a28 |
22-Dec-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Expr and Stmt must be destroyed with Destroy, not delete. Fixes PR/3245. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61335 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
3257fb58ef6583ce20036c77a8c5af95f158f2d3 |
22-Dec-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Add support for calls to overloaded member functions. Things to note: - Overloading has to cope with having both static and non-static member functions in the overload set. - The call may or may not have an implicit object argument, depending on the syntax (x.f() vs. f()) and the context (static vs. non-static member function). - We now generate MemberExprs for implicit member access expression. - We now cope with mutable whenever we're building MemberExprs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61329 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaOverload.cpp
emaOverload.h
|
88a3514f36de96b19cdf50141c640df1a5f13f6c |
22-Dec-2008 |
Douglas Gregor <dgregor@apple.com> |
Add support for calls to overloaded member functions. Things to note: - Overloading has to cope with having both static and non-static member functions in the overload set. - The call may or may not have an implicit object argument, depending on the syntax (x.f() vs. f()) and the context (static vs. non-static member function). - We now generate MemberExprs for implicit member access expression. - We now cope with mutable whenever we're building MemberExprs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61329 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaOverload.cpp
emaOverload.h
|
6e67d9b883bea0ae19b94e7fd43719fde984782f |
21-Dec-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Fix a comment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61313 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
a89d82c1c819d17042ec2db4283326a850229b21 |
21-Dec-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Fix a comment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61313 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
b12ac33f83d035e5b4c4aba1bb5b2084e720f5d4 |
21-Dec-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Parser support for C++ try-catch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61312 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
ema.h
|
a0fd8652f3302d0f39ed9849b521ee5b76597b0a |
21-Dec-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Parser support for C++ try-catch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61312 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
ema.h
|
76b9ddb5b0f9f7bf3808de65eb051a94a0246c21 |
21-Dec-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Convert a few Stmt actions to smart pointers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61309 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaStmt.cpp
|
a60528cdac7deee3991c2b48af4df4f315e49e9d |
21-Dec-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Convert a few Stmt actions to smart pointers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61309 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaStmt.cpp
|
82d44776fc817d80b1985d9d8e86453d4f15995c |
21-Dec-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Add support for member references (E1.E2, E1->E2) with C++ semantics, which can refer to static data members, enumerators, and member functions as well as to non-static data members. Implement correct lvalue computation for member references in C++. Compute the result type of non-static data members of reference type properly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61294 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaOverload.cpp
|
86f194083504938df72135b5b66bf0c5cafd9498 |
21-Dec-2008 |
Douglas Gregor <dgregor@apple.com> |
Add support for member references (E1.E2, E1->E2) with C++ semantics, which can refer to static data members, enumerators, and member functions as well as to non-static data members. Implement correct lvalue computation for member references in C++. Compute the result type of non-static data members of reference type properly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61294 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaOverload.cpp
|
e26cb43f48421366ffc0d3c28b8e703a010f1089 |
21-Dec-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Finish up saving original parameter type and using it in ObjC's method parameter encoding. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61293 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
4306d3cb9116605728252e2738df24b9f6ab53c3 |
21-Dec-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Finish up saving original parameter type and using it in ObjC's method parameter encoding. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61293 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
ef2f7dfdda4b609c0ef9fe692ce3c0ad5de81490 |
20-Dec-2008 |
Anders Carlsson <andersca@mac.com> |
Handle typedefs to VLAs (Emit the size expr when we encounter the typedef git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61290 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
fcdbb93749ed69aa9022437052c390522355ec3d |
20-Dec-2008 |
Anders Carlsson <andersca@mac.com> |
Handle typedefs to VLAs (Emit the size expr when we encounter the typedef git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61290 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
0440c8c2163d60db45ae42aec602f03e7f25622c |
20-Dec-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implement checks for bool in increment and decrement. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61275 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
e6d5a4a58346441c969d5fcc7aa053e029186f86 |
20-Dec-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implement checks for bool in increment and decrement. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61275 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
8c3de809dc733ca29f1d07c73684be65b3f10785 |
19-Dec-2008 |
Anders Carlsson <andersca@mac.com> |
Get rid of the old Expr::Evaluate variant. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61260 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
1c0cfd4599e816cfd7a8f348286bf0ad79652ffc |
19-Dec-2008 |
Anders Carlsson <andersca@mac.com> |
Get rid of the old Expr::Evaluate variant. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61260 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
932778b2665a59d2c1ace605906beebb07170abf |
19-Dec-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Support more implicit conversions for Objective-C types. Addresses <rdar://problem/6458293>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61255 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaOverload.cpp
|
c78875112311d86112690ac859976d91d87cc3b8 |
19-Dec-2008 |
Douglas Gregor <dgregor@apple.com> |
Support more implicit conversions for Objective-C types. Addresses <rdar://problem/6458293>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61255 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaOverload.cpp
|
6fd3557615e8e6e33456e147d060296282bfe7f1 |
19-Dec-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Allow downcasts of pointers to Objective-C interfaces, with a warning. This matches GCC's behavior and addresses <rdar://problem/6458293>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61246 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaOverload.cpp
emaOverload.h
|
45920e82bd87454545642ee2612e656a4140889d |
19-Dec-2008 |
Douglas Gregor <dgregor@apple.com> |
Allow downcasts of pointers to Objective-C interfaces, with a warning. This matches GCC's behavior and addresses <rdar://problem/6458293>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61246 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaOverload.cpp
emaOverload.h
|
96095fcc4c580c21560361d526f645f3e887f0fc |
19-Dec-2008 |
Anders Carlsson <andersca@mac.com> |
Fix for PR3234 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61245 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
00165a25a9ac005aa2e6b4ac791d555226fa9a9f |
19-Dec-2008 |
Anders Carlsson <andersca@mac.com> |
Fix for PR3234 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61245 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
d0c653a59cc3428b3f1ffc9c93b0b63c7fd40485 |
19-Dec-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Add some more implicit conversions for Objective-C++ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61229 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
dda78893c8d1f6f5cdcb19db58da11b756694e2c |
19-Dec-2008 |
Douglas Gregor <dgregor@apple.com> |
Add some more implicit conversions for Objective-C++ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61229 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
f1ae3e078e007252d67b1ae36fbcdc223ccc2c82 |
18-Dec-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Don't check initializers when there are dependent types or type-dependent expressions involved git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61212 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
264c8ed7edf26031c6854b6b92ab0d7774c13579 |
18-Dec-2008 |
Douglas Gregor <dgregor@apple.com> |
Don't check initializers when there are dependent types or type-dependent expressions involved git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61212 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
2fa10440d81ba071e854a2246cb58e7142a81c6b |
18-Dec-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Ultrasimplistic sketch for the parsing of C++ template-ids. This won't become useful or correct until we (1) parse template arguments correctly, (2) have some way to turn template-ids into types, declarators, etc., and (3) have a real representation of templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61208 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
|
d6fb7ef028d9aa0b3e8943b7bc049c524437b407 |
18-Dec-2008 |
Douglas Gregor <dgregor@apple.com> |
Ultrasimplistic sketch for the parsing of C++ template-ids. This won't become useful or correct until we (1) parse template arguments correctly, (2) have some way to turn template-ids into types, declarators, etc., and (3) have a real representation of templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61208 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaTemplate.cpp
|
ea944844821d8e07b87937a8e9cb02a5a611cc11 |
18-Dec-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Removed a slot in ObjCMemRegExpr used in code gen which did not belong there. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61203 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
efc4c4bdbd8fee90b93deb3b5cfaeb044ae22557 |
18-Dec-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Removed a slot in ObjCMemRegExpr used in code gen which did not belong there. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61203 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
306d4df4d3795208470617291c8a83373268c6ed |
18-Dec-2008 |
Chris Lattner <sabre@nondot.org> |
Clean up the C89/C++ warnings about C99 array features to not emit duplicate diags (some in parser and some in sema) and to warn about use of typequals in array sizes. This implements PR2759. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61197 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
a1fcbadf4f930c22bb171fb90ed886f5f359d010 |
18-Dec-2008 |
Chris Lattner <sabre@nondot.org> |
Clean up the C89/C++ warnings about C99 array features to not emit duplicate diags (some in parser and some in sema) and to warn about use of typequals in array sizes. This implements PR2759. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61197 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
d1a053993a394e45f11caa62307390a60f5f2919 |
18-Dec-2008 |
Chris Lattner <sabre@nondot.org> |
This is valid in C++. void foo() { return foo(); } git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61188 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
e878eb035b343d7d819c092102364ec9849716ae |
18-Dec-2008 |
Chris Lattner <sabre@nondot.org> |
This is valid in C++. void foo() { return foo(); } git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61188 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
6ed167cea991ebd3eedb4e8a4552d9a20d81b210 |
18-Dec-2008 |
Chris Lattner <sabre@nondot.org> |
Merge function-return.c into function.c Fix PR2790 by making a warning an EXTWARN instead of EXTENSION. Add a new EXTENSION warning for "return (some void expression);" git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61187 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
65ce04bef06696379682410f399f37b43996d824 |
18-Dec-2008 |
Chris Lattner <sabre@nondot.org> |
Merge function-return.c into function.c Fix PR2790 by making a warning an EXTWARN instead of EXTENSION. Add a new EXTENSION warning for "return (some void expression);" git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61187 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
e6be68ae1f97c922d437e89e74c95660b0b98e70 |
17-Dec-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Delay semantic analysis of the C++ names casts when the subexpression is type-dependent or the destination type is dependent. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61165 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaNamedCast.cpp
|
9103bb27f4eefa0e0d7935387750e3aca24abc49 |
17-Dec-2008 |
Douglas Gregor <dgregor@apple.com> |
Delay semantic analysis of the C++ names casts when the subexpression is type-dependent or the destination type is dependent. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61165 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaNamedCast.cpp
|
2004fb618473fa8e648bd26b69b13b99eada6acb |
17-Dec-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to re-implement duplicate ivar checking (which will pass duplicate-ivar-check.m test again). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61161 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
375d37c1298def125934bbbebca535c3867a89db |
17-Dec-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to re-implement duplicate ivar checking (which will pass duplicate-ivar-check.m test again). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61161 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
0556b1563848eb53ac71b24d0ab6411bace87214 |
17-Dec-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
This patch will build the Records lazily per Steve's comments. Note that one test duplicate-ivar-check.m will fail because I need to re-implement duplicate ivar checking. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61154 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclObjC.cpp
|
a769c004a2874504c17ea8afccbc4ad35fc33c9f |
17-Dec-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
This patch will build the Records lazily per Steve's comments. Note that one test duplicate-ivar-check.m will fail because I need to re-implement duplicate ivar checking. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61154 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclObjC.cpp
|
4b00d568f8ec40e3f879687edadc5fb305056e84 |
17-Dec-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Make the injected-class-name of a C++ class a separate RecordDecl from the class itself, with a different scope. This eliminates some ownership issues, so that the RecordDecl only lives in a single context git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61140 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
510ffaefd48b0784367693e823768ac49e288781 |
17-Dec-2008 |
Douglas Gregor <dgregor@apple.com> |
Make the injected-class-name of a C++ class a separate RecordDecl from the class itself, with a different scope. This eliminates some ownership issues, so that the RecordDecl only lives in a single context git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61140 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
b0b42f6f5b944688eefd7fba53c76c0b2230512e |
17-Dec-2008 |
Chris Lattner <sabre@nondot.org> |
diagnose C99 6.9.1p5, C arguments in definitions that are lacking a name. This implements PR3208. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61127 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
777f07b6cd595bb0922e05768e5703fbc92b5695 |
17-Dec-2008 |
Chris Lattner <sabre@nondot.org> |
diagnose C99 6.9.1p5, C arguments in definitions that are lacking a name. This implements PR3208. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61127 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
9bb9abf997e93f84b6fb215332dcb840ea03608e |
17-Dec-2008 |
Chris Lattner <sabre@nondot.org> |
Move the other Sema::ActOnLinkageSpec to SemaDeclCXX. Move Sema::ActOnDefs to SemaDeclObjC git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61126 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
|
cc98eac383718899462b9b1361c46eea8dddfb2b |
17-Dec-2008 |
Chris Lattner <sabre@nondot.org> |
Move the other Sema::ActOnLinkageSpec to SemaDeclCXX. Move Sema::ActOnDefs to SemaDeclObjC git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61126 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
|
f58d52b30f2f8d28cc3ae414333acb4dbcce3023 |
17-Dec-2008 |
Chris Lattner <sabre@nondot.org> |
Move Sema::ActOnLinkageSpec to SemaDeclCXX. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61125 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
5a003a4b1bddc06d5695ee8a7eb88ae22bb3afbf |
17-Dec-2008 |
Chris Lattner <sabre@nondot.org> |
Move Sema::ActOnLinkageSpec to SemaDeclCXX. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61125 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
0c3ab04bbbef9718dc1578efcff573dd47dca3ab |
17-Dec-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Make sure that enumerators show up within the enumeration declaration. Fixes. PR clang/3220 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61116 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
45579f5e2904590ff9a4f48c7fbf2e60dccb0426 |
17-Dec-2008 |
Douglas Gregor <dgregor@apple.com> |
Make sure that enumerators show up within the enumeration declaration. Fixes. PR clang/3220 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61116 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
8f9b1b29de881c59cd08fceafe30b385e9684931 |
17-Dec-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Semantics of @protocol attributes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61114 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclAttr.cpp
emaDeclObjC.cpp
|
bc1c877fe28fb6a825f0b226a0a2da99e713ea03 |
17-Dec-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Semantics of @protocol attributes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61114 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclAttr.cpp
emaDeclObjC.cpp
|
1a68ecfee1e63cd59b762d789b137b8e20623ee0 |
16-Dec-2008 |
Nuno Lopes <nunoplopes@sapo.pt> |
remove debug stmt, sorry.. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61112 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
6b6609f875cc4baa97a7c7db31b86da88706dcc9 |
16-Dec-2008 |
Nuno Lopes <nunoplopes@sapo.pt> |
remove debug stmt, sorry.. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61112 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
df23952590bc268d942a512e0ef1e5014d5a21fa |
16-Dec-2008 |
Nuno Lopes <nunoplopes@sapo.pt> |
fix PR 3222: allow one to get the address of a global function in C++ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61111 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
6fea8d2e42a53a1c03e2e1ced68dda8a36e09153 |
16-Dec-2008 |
Nuno Lopes <nunoplopes@sapo.pt> |
fix PR 3222: allow one to get the address of a global function in C++ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61111 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ad17e37ac2ad69b67ae6a1559658d46617a44eac |
16-Dec-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Make linkage-specifications hold on to all of their declarations git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61110 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
f44515a49b549171dc3ee9faa6281b72609da563 |
16-Dec-2008 |
Douglas Gregor <dgregor@apple.com> |
Make linkage-specifications hold on to all of their declarations git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61110 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
605de8d1e3f8ebf01431e8a7448a7a3e0b8d0723 |
16-Dec-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Delay parsing of default arguments of member functions until the class is completely defined (C++ [class.mem]p2). Reverse the order in which we process the definitions of member functions specified inline. This way, we'll get diagnostics in the order in which the member functions were declared in the class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61103 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
|
72b505b7904b3c9320a1312998800ba76e4f5841 |
16-Dec-2008 |
Douglas Gregor <dgregor@apple.com> |
Delay parsing of default arguments of member functions until the class is completely defined (C++ [class.mem]p2). Reverse the order in which we process the definitions of member functions specified inline. This way, we'll get diagnostics in the order in which the member functions were declared in the class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61103 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
|
70c167d378bbaa1584deb046c42fe674cca9aaee |
16-Dec-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Silence a couple more operator precedence warnings; this shouldn't change the semantics. Please correct this if the precedence was actually supposed to be something different. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61099 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
emaExprObjC.cpp
|
82b4e768d38c12ceba7db23a96e8d845e00fdeb7 |
16-Dec-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Silence a couple more operator precedence warnings; this shouldn't change the semantics. Please correct this if the precedence was actually supposed to be something different. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61099 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
emaExprObjC.cpp
|
f8bfa0c944df6195d36ab51cc0eb296c3abeba43 |
16-Dec-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to check for ObjC's property type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61090 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
105ec4bb8e969eee18b4c2f503b46b17f3e2f364 |
16-Dec-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to check for ObjC's property type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61090 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
b6bf544547384cbe4b40442bd7b3d8796f384dfb |
16-Dec-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Partial fix for qualified name lookup, such that the lookup of N in N::X only skips those entities specified in C++ [basic.lookup.qual]p1. Note that both EDG and GCC currently get this wrong. EDG has confirmed that the bug will be fixed in a future version. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61079 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
|
3dde5a3fa28cae4b8b2fb060abc0bfc2b4425ed8 |
16-Dec-2008 |
Douglas Gregor <dgregor@apple.com> |
Partial fix for qualified name lookup, such that the lookup of N in N::X only skips those entities specified in C++ [basic.lookup.qual]p1. Note that both EDG and GCC currently get this wrong. EDG has confirmed that the bug will be fixed in a future version. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61079 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
|
0c06709cc33705527581f9aa3c9769843fedf130 |
16-Dec-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Diagnose that ivars in current and super class may not be duplicates and a test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61068 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
3281eff4c1fbf7e2e59cc5381d5270deaf06839e |
16-Dec-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Diagnose that ivars in current and super class may not be duplicates and a test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61068 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
24effa8f97905f1ed88317a763f7a2742dd23f7f |
16-Dec-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Make name lookup when we're inside a declarator's scope, such as ClassName::func, work with the new unqualified name lookup code. Test it with default arguments in out-of-line member definitions git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61060 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaDecl.cpp
|
0a59acb9ae36077ce46fb2807956c5e84f0f6837 |
16-Dec-2008 |
Douglas Gregor <dgregor@apple.com> |
Make name lookup when we're inside a declarator's scope, such as ClassName::func, work with the new unqualified name lookup code. Test it with default arguments in out-of-line member definitions git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61060 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaDecl.cpp
|
c5cbc24943ddf0867e89e68c0c93722b9e72d620 |
16-Dec-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Diagnose erroneous uses of out-of-line member definitions and scope specifiers. Specifically: * Determine when an out-of-line function definition does not match any declaration within the class or namespace (including coping with overloaded functions). * Complain about typedefs and parameters that have scope specifiers. * Complain about out-of-line declarations that aren't also definitions. * Complain about non-static data members being declared out-of-line. * Allow cv-qualifiers on out-of-line member function definitions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61058 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaType.cpp
|
584049d49d956add7bce5669e9823491f7d8de78 |
16-Dec-2008 |
Douglas Gregor <dgregor@apple.com> |
Diagnose erroneous uses of out-of-line member definitions and scope specifiers. Specifically: * Determine when an out-of-line function definition does not match any declaration within the class or namespace (including coping with overloaded functions). * Complain about typedefs and parameters that have scope specifiers. * Complain about out-of-line declarations that aren't also definitions. * Complain about non-static data members being declared out-of-line. * Allow cv-qualifiers on out-of-line member function definitions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61058 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaType.cpp
|
e658bf5183d1329d3b85f5172f6c4cc7c43b4c95 |
15-Dec-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Fix for PR3212: don't descend into C++ operator overloading code for C programs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61056 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
03f332a8f4300bbaa91240f461923e7874892dd3 |
15-Dec-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Fix for PR3212: don't descend into C++ operator overloading code for C programs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61056 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
6422de634718edc57cba376671060aaeecc86c76 |
15-Dec-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Make error handling for va_start a bit more robust. Fixes PR3213. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61055 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
56f20ae1010aa71defd7572f660b41288c56cdd1 |
15-Dec-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Make error handling for va_start a bit more robust. Fixes PR3213. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61055 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
cb8e803696224e723e294d7e3ef79e5e393493eb |
15-Dec-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Name of addLayoutToClass is confusing as no layout calculation is done. Layout is calculated lazily at code gen type. This patch changes the name. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61054 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclObjC.cpp
|
9ee92e84ecf085ccbe6f877d1c6e1500961bbbce |
15-Dec-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Name of addLayoutToClass is confusing as no layout calculation is done. Layout is calculated lazily at code gen type. This patch changes the name. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61054 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclObjC.cpp
|
b9213832bca8e9a31450604e56a1da067fea4b7c |
15-Dec-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Place constructors and destructors into the DeclContext of the class, just like all other members, and remove the special variables in CXXRecordDecl to store them. This eliminates a lot of special-case code for constructors and destructors, including ActOnConstructor/ActOnDeclarator and special lookup rules in LookupDecl. The result is far more uniform and manageable. Diagnose the redeclaration of member functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61048 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaOverload.cpp
|
9e7d9de3ef538c1473248238b76a6d7b16f5f684 |
15-Dec-2008 |
Douglas Gregor <dgregor@apple.com> |
Place constructors and destructors into the DeclContext of the class, just like all other members, and remove the special variables in CXXRecordDecl to store them. This eliminates a lot of special-case code for constructors and destructors, including ActOnConstructor/ActOnDeclarator and special lookup rules in LookupDecl. The result is far more uniform and manageable. Diagnose the redeclaration of member functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61048 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaOverload.cpp
|
138f7bb17b4a984747449ec1521546b28a5bffc2 |
15-Dec-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Removed setRecordForDecl. Added a FIXME. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61038 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
9fbb609b90c1b41e147cf3e6afac40ff4b4137da |
15-Dec-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Removed setRecordForDecl. Added a FIXME. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61038 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
789e17157be71cccb25b2443a4623bd7b91613c9 |
15-Dec-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Don't double-destroy constructors defined out-of-line. This is a half-solution; the real solution is coming when constructors and destructors are treated like all other functions by ActOnDeclarator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61037 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
0874bd31984529b71aa4ffaac73be948e2402222 |
15-Dec-2008 |
Douglas Gregor <dgregor@apple.com> |
Don't double-destroy constructors defined out-of-line. This is a half-solution; the real solution is coming when constructors and destructors are treated like all other functions by ActOnDeclarator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61037 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
ae644896ecccf05b5497a311a8a55112023a0b83 |
15-Dec-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Create new EnumDecl nodes for redeclarations of enums, linking them together in the same way that we link RecordDecl/CXXRecordDecl nodes. Unify ActOnTag and ActOnTagStruct. Fixes PR clang/2753. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61034 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
7df7b6bb800e1987951285ea192e4f347e1b603a |
15-Dec-2008 |
Douglas Gregor <dgregor@apple.com> |
Create new EnumDecl nodes for redeclarations of enums, linking them together in the same way that we link RecordDecl/CXXRecordDecl nodes. Unify ActOnTag and ActOnTagStruct. Fixes PR clang/2753. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61034 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
09772396cb7b6c47b05858ae74e78b113adf3821 |
13-Dec-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch for ObjCIvarRefExpr containing the field matching the storage layout for this ivar git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60996 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
aaa63a761c6671a08e3f4f463435b72739fa194b |
13-Dec-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch for ObjCIvarRefExpr containing the field matching the storage layout for this ivar git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60996 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
624921a9c7054a2613a5ac57e44320cc6b9adcc6 |
13-Dec-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Add storage layout to ObjC classes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60993 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclObjC.cpp
|
60f8c868ffb346b78451a3eccaecd0461d2ae498 |
13-Dec-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Add storage layout to ObjC classes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60993 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclObjC.cpp
|
91f9b0aa21ff25478a4558bdc3f92b3c1fae632f |
13-Dec-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Some utilities for using the smart pointers in Actions, especially Sema. Convert a few functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60983 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
|
798d119415323ebcd029ffe1e0fb442a4ca8adbb |
13-Dec-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Some utilities for using the smart pointers in Actions, especially Sema. Convert a few functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60983 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExprCXX.cpp
|
98341049a14443ad41927de25d8950936a39aedd |
12-Dec-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Enable out-of-line definitions of C++ constructors and destructors git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60947 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
9d35097bc0fefb2f77638be513cac72d1c09d840 |
12-Dec-2008 |
Douglas Gregor <dgregor@apple.com> |
Enable out-of-line definitions of C++ constructors and destructors git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60947 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
bce5e4f8e89830ed30afa8b102c1ec42ededfc9b |
12-Dec-2008 |
Chris Lattner <sabre@nondot.org> |
fix rdar://6097892 - gcc incompat: clang rejects __func__, __FUNCTION__, and __PRETTY_FUNCTION__ outside func Yeah, this is "useful". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60921 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b0da923653601191c4f60bdc284feae376d28cda |
12-Dec-2008 |
Chris Lattner <sabre@nondot.org> |
fix rdar://6097892 - gcc incompat: clang rejects __func__, __FUNCTION__, and __PRETTY_FUNCTION__ outside func Yeah, this is "useful". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60921 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
8464c370159a4e19d38694b76a651199ea0446aa |
12-Dec-2008 |
Chris Lattner <sabre@nondot.org> |
Implement rdar://6138816 - [sema] named bitfields cannot have 0 width git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60920 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
cd08707a960842223e4af9ab82c729ba179290c0 |
12-Dec-2008 |
Chris Lattner <sabre@nondot.org> |
Implement rdar://6138816 - [sema] named bitfields cannot have 0 width git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60920 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
6b5e34f8f3bc528a26656724a15a2b699cb7edcd |
12-Dec-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
In C++, set the type of each of the enumerators in an enumeration to the type of the enumeration once the enumeration has been defined. Fix the overloading test-case to properly create enums that promote the way we want them to. Implement C++0x promotions from enumeration types to long long/unsigned long long. We're using these promotions in Carbon.h (since long long is a common extension). Fixes PR clang/2954: http://llvm.org/bugs/show_bug.cgi?id=2954 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60917 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaOverload.cpp
|
c9467cf4cff1bb09f38667b871268c47ed823f97 |
12-Dec-2008 |
Douglas Gregor <dgregor@apple.com> |
In C++, set the type of each of the enumerators in an enumeration to the type of the enumeration once the enumeration has been defined. Fix the overloading test-case to properly create enums that promote the way we want them to. Implement C++0x promotions from enumeration types to long long/unsigned long long. We're using these promotions in Carbon.h (since long long is a common extension). Fixes PR clang/2954: http://llvm.org/bugs/show_bug.cgi?id=2954 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60917 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaOverload.cpp
|
3967762597e4c1f410a83493df22f38432557a61 |
11-Dec-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Address some comments on the name lookup/DeclContext patch from Chris git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60897 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaInit.cpp
emaOverload.cpp
|
e267ff35b2f4e9d2b0d8bf24109d41cc7398b61b |
11-Dec-2008 |
Douglas Gregor <dgregor@apple.com> |
Address some comments on the name lookup/DeclContext patch from Chris git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60897 91177308-0d34-0410-b5e6-96231b3b80d8
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaInit.cpp
emaOverload.cpp
|
8acb72795794649013477457cd06a0d3871a2374 |
11-Dec-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Unifies the name-lookup mechanisms used in various parts of the AST and separates lexical name lookup from qualified name lookup. In particular: * Make DeclContext the central data structure for storing and looking up declarations within existing declarations, e.g., members of structs/unions/classes, enumerators in C++0x enums, members of C++ namespaces, and (later) members of Objective-C interfaces/implementations. DeclContext uses a lazily-constructed data structure optimized for fast lookup (array for small contexts, hash table for larger contexts). * Implement C++ qualified name lookup in terms of lookup into DeclContext. * Implement C++ unqualified name lookup in terms of qualified+unqualified name lookup (since unqualified lookup is not purely lexical in C++!) * Limit the use of the chains of declarations stored in IdentifierInfo to those names declared lexically. * Eliminate CXXFieldDecl, collapsing its behavior into FieldDecl. (FieldDecl is now a ScopedDecl). * Make RecordDecl into a DeclContext and eliminates its Members/NumMembers fields (since one can just iterate through the DeclContext to get the fields). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60878 91177308-0d34-0410-b5e6-96231b3b80d8
XXFieldCollector.h
dentifierResolver.cpp
dentifierResolver.h
ema.cpp
ema.h
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
|
44b4321feab46299d3f5cfd404680884752a0fcf |
11-Dec-2008 |
Douglas Gregor <dgregor@apple.com> |
Unifies the name-lookup mechanisms used in various parts of the AST and separates lexical name lookup from qualified name lookup. In particular: * Make DeclContext the central data structure for storing and looking up declarations within existing declarations, e.g., members of structs/unions/classes, enumerators in C++0x enums, members of C++ namespaces, and (later) members of Objective-C interfaces/implementations. DeclContext uses a lazily-constructed data structure optimized for fast lookup (array for small contexts, hash table for larger contexts). * Implement C++ qualified name lookup in terms of lookup into DeclContext. * Implement C++ unqualified name lookup in terms of qualified+unqualified name lookup (since unqualified lookup is not purely lexical in C++!) * Limit the use of the chains of declarations stored in IdentifierInfo to those names declared lexically. * Eliminate CXXFieldDecl, collapsing its behavior into FieldDecl. (FieldDecl is now a ScopedDecl). * Make RecordDecl into a DeclContext and eliminates its Members/NumMembers fields (since one can just iterate through the DeclContext to get the fields). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60878 91177308-0d34-0410-b5e6-96231b3b80d8
XXFieldCollector.h
dentifierResolver.cpp
dentifierResolver.h
ema.cpp
ema.h
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaOverload.cpp
|
488a079cf2080e3b7f6ab1d279b52b85985bcfdc |
11-Dec-2008 |
Anders Carlsson <andersca@mac.com> |
Make sure to promote expressions of the form (floating point + complex integer) correctly, to (complex floating point + complex floating point) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60862 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
5b1f3f0b21f1ad6999b0ae9f3fa3259737c799e5 |
11-Dec-2008 |
Anders Carlsson <andersca@mac.com> |
Make sure to promote expressions of the form (floating point + complex integer) correctly, to (complex floating point + complex floating point) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60862 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
48840c744b86163706d32fe4f75a6c9f04f43730 |
11-Dec-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Added a warning when referencing an if's condition variable in the "else" clause, e.g., if (int X = foo()) { } else { if (X) { // warning: X is always zero in this context } } Fixes rdar://6425550 and lets me think about something other than DeclContext. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60858 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprCXX.cpp
|
caaf29a08761b14fbe42a29080c22dd6961056d1 |
11-Dec-2008 |
Douglas Gregor <dgregor@apple.com> |
Added a warning when referencing an if's condition variable in the "else" clause, e.g., if (int X = foo()) { } else { if (X) { // warning: X is always zero in this context } } Fixes rdar://6425550 and lets me think about something other than DeclContext. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60858 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprCXX.cpp
|
5b82d61a725396ac1eae6aed4310ab275e609af3 |
10-Dec-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix PR clang/3175: CheckAddressOfOperand does not handle references to class vars git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60849 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
2988205cb3d00286fa3f32ae242f6738da9060d1 |
10-Dec-2008 |
Douglas Gregor <dgregor@apple.com> |
Fix PR clang/3175: CheckAddressOfOperand does not handle references to class vars git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60849 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
a5d84611d43742b51455d181bdeda14039dcf694 |
10-Dec-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Some cleanups to the dependent-types commit, as suggested by Sebastian git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60848 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
83f96f668d0bcc957ead2032fe6e6c475dc156e5 |
10-Dec-2008 |
Douglas Gregor <dgregor@apple.com> |
Some cleanups to the dependent-types commit, as suggested by Sebastian git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60848 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
94cc823aa36a866b060f7c9f30a1bcf01df09e53 |
10-Dec-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to allow a getter call using property dot-syntax notation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60816 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
391d8953701ad712bb31ebe33d12ca1765758897 |
10-Dec-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to allow a getter call using property dot-syntax notation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60816 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
91dd9d3cabbe94e48dd24bfe318a9ee5a9b21617 |
09-Dec-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Support for implementation of property in the case where the synthesis is in an implementation of s subclass of a super class where the property has been declared. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60792 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
fef30b55230064d334a669a065a1c9acdb87cdfe |
09-Dec-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Support for implementation of property in the case where the synthesis is in an implementation of s subclass of a super class where the property has been declared. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60792 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
46c8c7e51a4b3fe8d1169604dbae61017c671422 |
09-Dec-2008 |
Steve Naroff <snaroff@apple.com> |
Sema::ActOnMethodDeclaration(): Make sure we perform the default function/array conversion for parameter types. This fixes <rdar://problem/6424064> checker on xcode: (possible bad AST) can the type of a method parameter really have "isFunctionType() == true"? and http://llvm.org/bugs/show_bug.cgi?id=2997. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60781 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
6082c62125688a2901c11b932a7bb47ca83bc298 |
09-Dec-2008 |
Steve Naroff <snaroff@apple.com> |
Sema::ActOnMethodDeclaration(): Make sure we perform the default function/array conversion for parameter types. This fixes <rdar://problem/6424064> checker on xcode: (possible bad AST) can the type of a method parameter really have "isFunctionType() == true"? and http://llvm.org/bugs/show_bug.cgi?id=2997. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60781 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
f189290ce2a564a1531c41c9ded6d0ee6ab23954 |
08-Dec-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Changed 'readonly' 'retain/copy' diagnostics into warning as it is allowed in gcc and will break projects. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60710 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
ba45da8328b97fe7c9f4d92e377bd3e586b9a79f |
08-Dec-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Changed 'readonly' 'retain/copy' diagnostics into warning as it is allowed in gcc and will break projects. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60710 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
965242e96f004dd7fc05d5dbf2f6415e477ad00b |
08-Dec-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Since we do not allow a readonly property to be 'copy'retain', we must allow the continuation class to extend it to a 'readwrite' and 'copy/retain'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60709 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
9bfb2a2cbe3931db9785705c6d476c3089eaeed6 |
08-Dec-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Since we do not allow a readonly property to be 'copy'retain', we must allow the continuation class to extend it to a 'readwrite' and 'copy/retain'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60709 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
2715a1f5a94534980bd61dab5652a3d8c03be39c |
08-Dec-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Move Sema::isTemplateParameterDecl to Decl::isTemplateParameter, where it belongs git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60708 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclObjC.cpp
emaTemplate.cpp
|
f57172b24f08a68d179675989813d5479dc87829 |
08-Dec-2008 |
Douglas Gregor <dgregor@apple.com> |
Move Sema::isTemplateParameterDecl to Decl::isTemplateParameter, where it belongs git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60708 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclObjC.cpp
emaTemplate.cpp
|
2c9b810657c83a687ba146ec7592cd8fba7ce759 |
08-Dec-2008 |
Zhongxing Xu <xuzhongxing@gmail.com> |
fix 80-col violation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60693 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
e50897af8bcdeee5e4bd65a5d122df9bee82705a |
08-Dec-2008 |
Zhongxing Xu <xuzhongxing@gmail.com> |
fix 80-col violation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60693 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
b32a1ba89ea59572f81eb6270074971d5bb0c0b6 |
07-Dec-2008 |
Anders Carlsson <andersca@mac.com> |
Pass the VLA size expr range to the VLA diags git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60645 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
7fd1df2a87729059a1589c47606f7a43f531c39f |
07-Dec-2008 |
Anders Carlsson <andersca@mac.com> |
Pass the VLA size expr range to the VLA diags git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60645 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
68adbd15ff5f148e17dea108f7c76ae711a6a7eb |
07-Dec-2008 |
Anders Carlsson <andersca@mac.com> |
Improve VLA diagnostics/sema checking. Fixes PR2361 and PR2352. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60638 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
96e05bc09070aaa7c18d3dd3ff13125a43532f69 |
07-Dec-2008 |
Anders Carlsson <andersca@mac.com> |
Improve VLA diagnostics/sema checking. Fixes PR2361 and PR2352. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60638 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
5c1505479c53266b307b28a5700abe53152e895a |
07-Dec-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Setters returning a typedef of 'void' should not cause error. Bug reported by Chris L. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60635 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
5dd412901196305e7c6dd053880f711ca5419763 |
07-Dec-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Setters returning a typedef of 'void' should not cause error. Bug reported by Chris L. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60635 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
acad6d1ae92bf3150fce97137889e1ec19fa7316 |
07-Dec-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Use of properties declared in protocols in the category via the category's protocol list1s, with appropriate diagnsostics and a test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60634 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
1ac2bc44781ec8451f880dcf586768a71824d3a6 |
07-Dec-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Use of properties declared in protocols in the category via the category's protocol list1s, with appropriate diagnsostics and a test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60634 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
88a6293ed42aa6aa186ba2e9d3c4bee967e80d09 |
06-Dec-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Improve error reporting of property and setter/getter type mimatches. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60630 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
196d0ed5e13bbea4cbe327060eb3cba7fa83898f |
06-Dec-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Improve error reporting of property and setter/getter type mimatches. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60630 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
a9307bb02c0b61cebc09f053d7af230a143d0d19 |
06-Dec-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Check for correct'void' return type for setter methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60629 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
ec604c8e1f6a76a413c38179a2eeeee37fc7f886 |
06-Dec-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Check for correct'void' return type for setter methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60629 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
108229a2eece5159ea6451d9446d29b7bd7a6e29 |
06-Dec-2008 |
Anders Carlsson <andersca@mac.com> |
Add diagnostics for bitfields. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60628 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
9f1e5727e36481d830e566ff5a016fda726838e4 |
06-Dec-2008 |
Anders Carlsson <andersca@mac.com> |
Add diagnostics for bitfields. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60628 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
0f5ae03f71238dcc6f0591fdc4beca11cdaa8502 |
06-Dec-2008 |
Anders Carlsson <andersca@mac.com> |
Simplify some diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60626 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
a75023d60fc22cef8c5c0e6ea79758233f4d2e2d |
06-Dec-2008 |
Anders Carlsson <andersca@mac.com> |
Simplify some diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60626 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
37aaf4fbef1e787157cc09315b3f20e3447a1c17 |
06-Dec-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Changed a 'FIXME' into new comment. Added a test case testing declaration of properties in categories. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60625 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
77e14bd3a714be42dbe1ab90a37b5832740b6df2 |
06-Dec-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Changed a 'FIXME' into new comment. Added a test case testing declaration of properties in categories. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60625 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
7ad911cef1201ad1ef81e7a5f7906ed048475feb |
06-Dec-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to diagnose a variety of misuse of property attributes. Example would be, readonly, assign or assign, copy, etc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60620 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
567c8df3646208e0a5816c57191ca36930f50ed3 |
06-Dec-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to diagnose a variety of misuse of property attributes. Example would be, readonly, assign or assign, copy, etc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60620 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
a133e26a86b181df1188a7af7671db790b5e56b2 |
06-Dec-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Add support for calls to dependent names within templates, e.g., template<typename T> void f(T x) { g(x); // g is a dependent name, so don't even bother to look it up g(); // error: g is not a dependent name } Note that when we see "g(", we build a CXXDependentNameExpr. However, if none of the call arguments are type-dependent, we will force the resolution of the name "g" and replace the CXXDependentNameExpr with its result. GCC actually produces a nice error message when you make this mistake, and even offers to compile your code with -fpermissive. I'll do the former next, but I don't plan to do the latter. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60618 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaOverload.cpp
|
5c37de788529cd9180f22069970737a7208bd625 |
06-Dec-2008 |
Douglas Gregor <dgregor@apple.com> |
Add support for calls to dependent names within templates, e.g., template<typename T> void f(T x) { g(x); // g is a dependent name, so don't even bother to look it up g(); // error: g is not a dependent name } Note that when we see "g(", we build a CXXDependentNameExpr. However, if none of the call arguments are type-dependent, we will force the resolution of the name "g" and replace the CXXDependentNameExpr with its result. GCC actually produces a nice error message when you make this mistake, and even offers to compile your code with -fpermissive. I'll do the former next, but I don't plan to do the latter. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60618 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaOverload.cpp
|
1b21c7ffe5fac1711fea35e4830159004a835c1a |
06-Dec-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Introduce basic support for dependent types, type-dependent expressions, and value-dependent expressions. This permits us to parse some template definitions. This is not a complete solution; we're missing type- and value-dependent computations for most of the expression types, and we're missing checks for dependent types and type-dependent expressions throughout Sema. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60615 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
emaExprCXX.cpp
emaStmt.cpp
emaTemplate.cpp
emaType.cpp
|
898574e7496ba8fd76290079d3a9d06954992734 |
06-Dec-2008 |
Douglas Gregor <dgregor@apple.com> |
Introduce basic support for dependent types, type-dependent expressions, and value-dependent expressions. This permits us to parse some template definitions. This is not a complete solution; we're missing type- and value-dependent computations for most of the expression types, and we're missing checks for dependent types and type-dependent expressions throughout Sema. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60615 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
emaExprCXX.cpp
emaStmt.cpp
emaTemplate.cpp
emaType.cpp
|
6834228be513a9bf574db13b214cc31b3312d936 |
05-Dec-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
This test checks for duplicate implementation of the same property. It also checks for duplicate use of the same ivar in two different iproperty implementations. It also caught an error for a test case used in CodeGen :). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60610 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
ae6f6fd1527a1da84679a6f0439dec3bbbd6ca7b |
05-Dec-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
This test checks for duplicate implementation of the same property. It also checks for duplicate use of the same ivar in two different iproperty implementations. It also caught an error for a test case used in CodeGen :). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60610 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
4e0f645b99e2f12c60f2f9411c17015c2d0172de |
05-Dec-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
(instance/class) Method type checking between class and its implementation. (instance/class) Method type checking between category and its implementation. And a test case for all. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60598 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
8daab970b80ed2e751fc88327180acbeff1dbb9c |
05-Dec-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
(instance/class) Method type checking between class and its implementation. (instance/class) Method type checking between category and its implementation. And a test case for all. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60598 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
dd861060e2e1f1e41f7b023d025fcd8eb183686d |
05-Dec-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Representation of template type parameters and non-type template parameters, with some semantic analysis: - Template parameters are introduced into template parameter scope - Complain about template parameter shadowing (except in Microsoft mode) Note that we leak template parameter declarations like crazy, a problem we'll remedy once we actually create proper declarations for templates. Next up: dependent types and value-dependent/type-dependent expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60597 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
ema.h
emaDecl.cpp
emaDeclObjC.cpp
emaTemplate.cpp
|
72c3f314d92d65c050ee1c07b7753623c044d6c7 |
05-Dec-2008 |
Douglas Gregor <dgregor@apple.com> |
Representation of template type parameters and non-type template parameters, with some semantic analysis: - Template parameters are introduced into template parameter scope - Complain about template parameter shadowing (except in Microsoft mode) Note that we leak template parameter declarations like crazy, a problem we'll remedy once we actually create proper declarations for templates. Next up: dependent types and value-dependent/type-dependent expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60597 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
ema.h
emaDecl.cpp
emaDeclObjC.cpp
emaTemplate.cpp
|
5374c6b82e4fb6b94eb4c7f18f838aa6e3226de0 |
05-Dec-2008 |
Anders Carlsson <andersca@mac.com> |
Use VerifyIntegerConstantExpression instead of isIntegerConstantExpr. Fixes PR2963 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60591 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
49184b2916f2f6535ac22f8517dc1e996225d2f1 |
05-Dec-2008 |
Anders Carlsson <andersca@mac.com> |
Use VerifyIntegerConstantExpression instead of isIntegerConstantExpr. Fixes PR2963 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60591 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f6791c6efa0084a9a4fa14224fd81d4f2ba384fe |
05-Dec-2008 |
Anders Carlsson <andersca@mac.com> |
Make Sema::CheckForConstantInitializer use Expr::Evaluate. This fixes PR3130. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60580 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
9e09f5d361c50373435b9e142da8538034d84601 |
05-Dec-2008 |
Anders Carlsson <andersca@mac.com> |
Make Sema::CheckForConstantInitializer use Expr::Evaluate. This fixes PR3130. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60580 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
34144dfbd38918b0aff02fc18fc8ec56b42635d2 |
05-Dec-2008 |
Zhongxing Xu <xuzhongxing@gmail.com> |
Rename: FindContext -> FindDeclVisibleInContext. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60574 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
dentifierResolver.h
|
ebed7971cf47d2fc83f262e7d99cacc3d8b5f163 |
05-Dec-2008 |
Zhongxing Xu <xuzhongxing@gmail.com> |
Rename: FindContext -> FindDeclVisibleInContext. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60574 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
dentifierResolver.h
|
64c46317096af21d32313b428c8f5af2e470fcde |
05-Dec-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch for diagnosing type mismatch between methods in class and its implementation. This is work in progress. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60573 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
de7394157c3f83af55053128178aa71bdb08101c |
05-Dec-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch for diagnosing type mismatch between methods in class and its implementation. This is work in progress. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60573 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
e5cb586c259546f534d30df1c39b77e49dd3a839 |
05-Dec-2008 |
Chris Lattner <sabre@nondot.org> |
change getCurFunctionDecl to skip through Block contexts to find the containing block. Introduce a new getCurFunctionOrMethodDecl method to check to see if we're in a function or objc method. Minor cleanups to other related places. This fixes rdar://6405429. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60564 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaChecking.cpp
emaExpr.cpp
emaStmt.cpp
|
371f258e61e1365b951b17931a3c5ac1530fd1a0 |
05-Dec-2008 |
Chris Lattner <sabre@nondot.org> |
change getCurFunctionDecl to skip through Block contexts to find the containing block. Introduce a new getCurFunctionOrMethodDecl method to check to see if we're in a function or objc method. Minor cleanups to other related places. This fixes rdar://6405429. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60564 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaChecking.cpp
emaExpr.cpp
emaStmt.cpp
|
3d7aa252a922305cc9e7955023f1b01a068ebf00 |
04-Dec-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Output better diagnostics for continuation class property attribute mis-specification. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60562 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
06de37bade11b2d4187a1e4f74d0dcf2a72dda39 |
04-Dec-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Output better diagnostics for continuation class property attribute mis-specification. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60562 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
ec5f3265971814f7a08b9576a1ba5dcf6d5ee041 |
04-Dec-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Code cleanup in new handling. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60557 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
|
7f6623914e779e41eb3d85f9a2dc3affea5de1e8 |
04-Dec-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Code cleanup in new handling. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60557 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
|
73dc065e0885e94fbdaa4d6e92af8769b1bb8938 |
04-Dec-2008 |
Ted Kremenek <kremenek@apple.com> |
Fix bug in attribute(nonnull) processing where not all of the parameter indices in nonnull(...) were actually processed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60546 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
f5e883474796afd26e52a010cd9bf90374fa1915 |
04-Dec-2008 |
Ted Kremenek <kremenek@apple.com> |
Fix bug in attribute(nonnull) processing where not all of the parameter indices in nonnull(...) were actually processed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60546 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
fd98af27478ac2256ee55900513ed878bbaac56e |
04-Dec-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Fix some diagnostics and enhance test cases. Now tests member new and ambiguous overloads. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60542 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
636a7c42d42800f69caadcdea433312fd642a4b3 |
04-Dec-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Fix some diagnostics and enhance test cases. Now tests member new and ambiguous overloads. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60542 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
b5ee874b66de64428b533ef7d89adde679409c43 |
03-Dec-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Overload resolution for the operator new function. Member version is still untested. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60503 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaExprCXX.cpp
|
b5a57a69e5fdac6dd9a92be717e279486c4a0128 |
03-Dec-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Overload resolution for the operator new function. Member version is still untested. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60503 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaExprCXX.cpp
|
e5edfcea3a5b72ea4c96b56ad4428f501df88701 |
03-Dec-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Fix typo in index operator overloading. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60483 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
cb354721a69038ecf371c7c84fb210d2d9c70f12 |
03-Dec-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Fix typo in index operator overloading. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60483 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
faca797cb3a8c1a41c2ba4728f26bb93b902b01b |
02-Dec-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
More type-checking of setter/getter methods. This is still work in prgress. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60430 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
f3cd3fd859120d58f745ba545c8da808e12a39ac |
02-Dec-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
More type-checking of setter/getter methods. This is still work in prgress. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60430 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
66df3efdf5d6a2d2b0a1e2f8764150f9af931d40 |
02-Dec-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Handle new by passing the Declaration to the Action, not a processed type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60413 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
emaType.cpp
|
cee63fbf0e64ac526582312bf8cf33263fc5c16e |
02-Dec-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Handle new by passing the Declaration to the Action, not a processed type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60413 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
emaType.cpp
|
ecfbb49cc91d777ddddb2c94950560771bb91661 |
02-Dec-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
This patch corrects problem in searching for a setter/getter method for a property. Previous scheme of seaching in interface's list of methods would not work because this list is not yet constructed. This is in preparation for doing semantic check on viability of setter/getter method declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60386 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
b85cce6498c8c1c20f701571d85a3b2fe53338eb |
02-Dec-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
This patch corrects problem in searching for a setter/getter method for a property. Previous scheme of seaching in interface's list of methods would not work because this list is not yet constructed. This is in preparation for doing semantic check on viability of setter/getter method declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60386 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
538754e4c23d77cb3144552dc517e03009f625b8 |
01-Dec-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Initialize storage class even if we got an erroneous mutable git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60377 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
e89b02823a3ab1a5a282922ac9b014e226dca2ab |
01-Dec-2008 |
Douglas Gregor <dgregor@apple.com> |
Initialize storage class even if we got an erroneous mutable git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60377 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f8aa870bd0b800f52f4944c885f41b7ba3e7cfd2 |
01-Dec-2008 |
Anders Carlsson <andersca@mac.com> |
Revert change that made isNullPointerConstant start emitting warnings. We don't want that :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60333 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
d26527708b2b2f3b1d747f570efd10149d48364e |
01-Dec-2008 |
Anders Carlsson <andersca@mac.com> |
Revert change that made isNullPointerConstant start emitting warnings. We don't want that :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60333 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
511425ab02d26bbdd43ffa92746996d0419972e8 |
01-Dec-2008 |
Anders Carlsson <andersca@mac.com> |
Add Sema::isNullPointerConstant which extwarns if necessary. Use it in Sema::CheckConditionalOperands. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60319 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
4000ea685acfb3e827040ce0e172e13243c2edae |
01-Dec-2008 |
Anders Carlsson <andersca@mac.com> |
Add Sema::isNullPointerConstant which extwarns if necessary. Use it in Sema::CheckConditionalOperands. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60319 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
613314dc4dfa212ae1b8c1e16da1a5e8dc8b6422 |
01-Dec-2008 |
Anders Carlsson <andersca@mac.com> |
Use VerifyIntegerConstantExpression for case values. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60317 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
d3a61d5ec5357d19b7c0b6b599231e68dc5e237f |
01-Dec-2008 |
Anders Carlsson <andersca@mac.com> |
Use VerifyIntegerConstantExpression for case values. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60317 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
d5201b99e0c79b05a09963269057b8ec7f6de8ce |
30-Nov-2008 |
Anders Carlsson <andersca@mac.com> |
Add Sema::VerifyIntegerConstantExpression git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60305 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
e21555e666004b9aea0c8122358bc4cd3e61c4e7 |
30-Nov-2008 |
Anders Carlsson <andersca@mac.com> |
Add Sema::VerifyIntegerConstantExpression git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60305 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
ad4b379662af0511244a62578cda472bef00a7e2 |
29-Nov-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement the GNU __null extension git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60235 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
2d8b273470684a9cd47f0ce24743cc1f71ef7cbc |
29-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Implement the GNU __null extension git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60235 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
3f5a00c88d3194b986208fed8ebfda981d487124 |
27-Nov-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Add implicit conversions for Objective-C qualified ids, e.g., id<P0> The intended overloading behavior of these entities isn't entirely clear, and GCC seems to have some strange limitations (e.g., the inability to overload on id<P0> vs. id<P1>). We'll want to revisit these semantics and determine just how Objective-C++ overloading should really work. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60142 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
7ca09760ee77ad03eac8212e580338bacd46f4d4 |
27-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Add implicit conversions for Objective-C qualified ids, e.g., id<P0> The intended overloading behavior of these entities isn't entirely clear, and GCC seems to have some strange limitations (e.g., the inability to overload on id<P0> vs. id<P1>). We'll want to revisit these semantics and determine just how Objective-C++ overloading should really work. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60142 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
8bb7ad8e6be231cfd644c304fb8df857603ef393 |
27-Nov-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Cleanup formatting git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60140 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
bf40818928d2a7f76a4ba9abee469a7d02225ab2 |
27-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Cleanup formatting git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60140 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
7abc1437d45ba0e886404dd126e8128db5e61fbc |
27-Nov-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Don't complain about block pointer to void* conversions git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60138 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
63a9490b27db3af7ea94b6418d38433244f90e67 |
27-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Don't complain about block pointer to void* conversions git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60138 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
9036ef77eb55afa11a2f569b764a82d689b7845f |
27-Nov-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Support block pointer conversions in C++. I'm storing the test case locally until we can enable blocks in C++ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60133 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
071f2aec57467027540ea849b7889c4c263dbb7d |
27-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Support block pointer conversions in C++. I'm storing the test case locally until we can enable blocks in C++ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60133 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
24a90a59ea04a8aa80777dd87052f94d58767147 |
27-Nov-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement implicit conversions for Objective-C specific types, e.g., converting a pointer to one Objective-C interface into a pointer to another Objective-C interface, and conversions with 'id'. The semantics seems to match GCC, although they seem somewhat ad hoc. Fixed a few cases where we assumed the C++ definition of isObjectType, but were getting the C definition, causing failures in trouble with conversions to void pointers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60130 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
cb7de523cc2ad5635f235e15b12867e6b349441f |
27-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Implement implicit conversions for Objective-C specific types, e.g., converting a pointer to one Objective-C interface into a pointer to another Objective-C interface, and conversions with 'id'. The semantics seems to match GCC, although they seem somewhat ad hoc. Fixed a few cases where we assumed the C++ definition of isObjectType, but were getting the C definition, causing failures in trouble with conversions to void pointers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60130 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
c123566cd8e643ff72d0ec813f72c61592345079 |
26-Nov-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Removed a FIXME. Added a test case for anonymous category. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60115 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
b16308f1b37237244022d06a467db14efb01b7c3 |
26-Nov-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Removed a FIXME. Added a test case for anonymous category. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60115 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
bcda0b464e0df135b03758b84168707c81fbeb86 |
26-Nov-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Set default property attributes on each property. Implemented anonymous category (also know as continuation class) used to override main class's property attribute. This is work in propgress. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60114 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
8cf0bb3c2a798ce3acacaac2d3178648cd4c65c6 |
26-Nov-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Set default property attributes on each property. Implemented anonymous category (also know as continuation class) used to override main class's property attribute. This is work in propgress. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60114 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
5183f9ed9b62bf7b201774fce1216cd3d187c771 |
26-Nov-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix a minor typo in the handling of the conditional operator for Objective-C interface pointers git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60096 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
7ffd0defb993f82449afb18bb85a734e4b1bc308 |
26-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Fix a minor typo in the handling of the conditional operator for Objective-C interface pointers git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60096 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
bf4f058188012455893671f15f25323eafc7671e |
26-Nov-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Tweak the new ResolveOverloadedCallFn to just return a FunctionDecl. It makes ActOnCallExpr simpler git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60094 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaOverload.cpp
|
0a39668d6adf1d709985eef149136a80372f5032 |
26-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Tweak the new ResolveOverloadedCallFn to just return a FunctionDecl. It makes ActOnCallExpr simpler git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60094 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaOverload.cpp
|
3ed006b9d222bd6491edf64f324ee4a3462b03f8 |
26-Nov-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Move the overloading logic of Sema::ActOnCallExpr to a separate function git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60093 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaOverload.cpp
|
f6b89691d2fdb88b97edabbe5f390fb2919c8f0a |
26-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Move the overloading logic of Sema::ActOnCallExpr to a separate function git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60093 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaOverload.cpp
|
4b871b398f18ca515fe8dd434cd4185eef8a407d |
24-Nov-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to remove bogus waring when a property declaration is imported from a protocol into the implementation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59988 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
e793a6ec1617376c7c320dc0b9808dce5450d726 |
24-Nov-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to remove bogus waring when a property declaration is imported from a protocol into the implementation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59988 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
51504af7ab712673f765a892a15d89a850a3dbc3 |
24-Nov-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Remove some bad characters from comment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59979 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d14094db3375b64fbe3cbf43587bcb0f1f728220 |
24-Nov-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Remove some bad characters from comment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59979 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
4bfd223a74022ce30ac1b86683bac054ab5fac34 |
24-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
Change a whole lot of diagnostics to take QualType's directly instead of converting them to strings first. This also fixes a bunch of minor inconsistencies in the diagnostics emitted by clang and adds a bunch of FIXME's to DiagnosticKinds.def. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59948 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaInherit.cpp
emaInit.cpp
emaNamedCast.cpp
emaOverload.cpp
emaStmt.cpp
emaType.cpp
|
d162584991885ab004a02573a73ce06422b921fc |
24-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
Change a whole lot of diagnostics to take QualType's directly instead of converting them to strings first. This also fixes a bunch of minor inconsistencies in the diagnostics emitted by clang and adds a bunch of FIXME's to DiagnosticKinds.def. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59948 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaInherit.cpp
emaInit.cpp
emaNamedCast.cpp
emaOverload.cpp
emaStmt.cpp
emaType.cpp
|
271d4c2c75e2b6774cc017506d3b27e4fa1697ff |
24-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
Rename NamedDecl::getName() to getNameAsString(). Replace a bunch of uses of getName() with uses of getDeclName(). This upgrades a bunch of diags to take DeclNames instead of std::strings. This also tweaks a couple of diagnostics to be cleaner and changes CheckInitializerTypes/PerformInitializationByConstructor to pass around DeclarationNames instead of std::strings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59947 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaOverload.cpp
|
d9d22dd9c94618490dbffb0e2caf222530ca39d3 |
24-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
Rename NamedDecl::getName() to getNameAsString(). Replace a bunch of uses of getName() with uses of getDeclName(). This upgrades a bunch of diags to take DeclNames instead of std::strings. This also tweaks a couple of diagnostics to be cleaner and changes CheckInitializerTypes/PerformInitializationByConstructor to pass around DeclarationNames instead of std::strings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59947 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaOverload.cpp
|
d120b9ed1f54a3d2b284a6c683c3f6e646a31d26 |
24-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
Rename NamedDecl::getIdentifierName() to ::getNameAsCString() and make it assert if the name is not an identifier. Update callers to do the right thing and avoid this method in unsafe cases. This also fixes an objc warning that was missing a space, and migrates a couple more to taking IdentifierInfo and QualTypes instead of std::strings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59936 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
8ec03f58c33c33a917f54bb7f2cd61b6d7ffe0ca |
24-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
Rename NamedDecl::getIdentifierName() to ::getNameAsCString() and make it assert if the name is not an identifier. Update callers to do the right thing and avoid this method in unsafe cases. This also fixes an objc warning that was missing a space, and migrates a couple more to taking IdentifierInfo and QualTypes instead of std::strings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59936 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
3a8f294d0c43fe0a3e1fc1612bc1a42d55172cae |
24-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
Rename Selector::getName() to Selector::getAsString(), and add a new NamedDecl::getAsString() method. Change uses of Selector::getName() to just pass in a Selector where possible (e.g. to diagnostics) instead of going through an std::string. This also adds new formatters for objcinstance and objcclass as described in the dox. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59933 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDeclObjC.cpp
emaExprObjC.cpp
|
077bf5e2f48acfa9e7d69429b6e4ba86ea14896d |
24-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
Rename Selector::getName() to Selector::getAsString(), and add a new NamedDecl::getAsString() method. Change uses of Selector::getName() to just pass in a Selector where possible (e.g. to diagnostics) instead of going through an std::string. This also adds new formatters for objcinstance and objcclass as described in the dox. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59933 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDeclObjC.cpp
emaExprObjC.cpp
|
ef2a3c6e0e05443da44d757cc1bc4c55141f685d |
24-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
convert some more warnings to NOTEs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59923 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
1326a3dcbbf04b126396d3e1a739ee437ca4398c |
24-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
convert some more warnings to NOTEs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59923 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
b13cb56ab8fa85edf10e159f26eb991470ade1b0 |
24-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
remove warn_previous_declaration git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59922 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
8b265bd5eba1394273693e6705a43adac6b6aa2f |
24-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
remove warn_previous_declaration git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59922 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
1336cab43dec39c2d36531c0e3875f4db725a28c |
24-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
Make all the 'redefinition' diagnostics more consistent, and make the "previously defined here" diagnostics all notes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59920 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaStmt.cpp
|
5f4a6829dc58cab2f76e2b98492859aa3b91e3f2 |
24-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
Make all the 'redefinition' diagnostics more consistent, and make the "previously defined here" diagnostics all notes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59920 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaStmt.cpp
|
5b25065a9cc36cc677c60db3c5136a96b0557125 |
23-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
make some objc redefinition warnings more consistent: call definitions "definitions", not declarations. Point out the location of the original definition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59919 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
b8b96aff63e24ff1509f112de871f697aaea55f9 |
23-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
make some objc redefinition warnings more consistent: call definitions "definitions", not declarations. Point out the location of the original definition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59919 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
de1bd98d3669375a3fe42f21883ffeaec8c80f8a |
23-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
Tweak duplicate category diagnostic to work like the duplicate protocol diagnostic. Also, point out where the previous decl was. This unxfails two tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59918 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
6ff0fc341f6d66b523d63b5d3fdfe00f6d4254fd |
23-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
Tweak duplicate category diagnostic to work like the duplicate protocol diagnostic. Also, point out where the previous decl was. This unxfails two tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59918 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
b175342d2ca2d747f964604249138e04f32116b9 |
23-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
Convert IdentifierInfo's to be printed the same as DeclarationNames with implicit quotes around them. This has a bunch of follow-on effects and requires tweaking to a whole lot of code. This causes a regression in two tests (xfailed) by causing it to emit things like: Line 10: duplicate interface declaration for category 'MyClass1' ('Category1') instead of: Line 10: duplicate interface declaration for category 'MyClass1(Category1)' I will fix this in a follow-up commit. As part of this, I had to start switching stuff to use ->getDeclName() instead of Decl::getName() for consistency. This is good, but I was planning to do this as an independent patch. There will be several follow-on patches to clean up some of the mess, but this patch is already too big. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59917 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprObjC.cpp
emaStmt.cpp
|
08631c5fa053867146b5ee8be658c229f6bf127c |
23-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
Convert IdentifierInfo's to be printed the same as DeclarationNames with implicit quotes around them. This has a bunch of follow-on effects and requires tweaking to a whole lot of code. This causes a regression in two tests (xfailed) by causing it to emit things like: Line 10: duplicate interface declaration for category 'MyClass1' ('Category1') instead of: Line 10: duplicate interface declaration for category 'MyClass1(Category1)' I will fix this in a follow-up commit. As part of this, I had to start switching stuff to use ->getDeclName() instead of Decl::getName() for consistency. This is good, but I was planning to do this as an independent patch. There will be several follow-on patches to clean up some of the mess, but this patch is already too big. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59917 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprObjC.cpp
emaStmt.cpp
|
254de7dd490d1163d6dad4302f5d8b7f9ae3dc30 |
23-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
add support for inserting a DeclarationName into a diagnostic directly without calling getAsString(). This implicitly puts quotes around the name, so diagnostics need to be tweaked to accommodate this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59916 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDecl.cpp
|
011bb4edf731d529da1cbf71c7c2696aaf5a054f |
23-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
add support for inserting a DeclarationName into a diagnostic directly without calling getAsString(). This implicitly puts quotes around the name, so diagnostics need to be tweaked to accommodate this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59916 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDecl.cpp
|
f5b269a115352029a14d81c44647f042bbf6843c |
23-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
Genericize the qualtype formating callback to support any diag argument. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59908 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
3fdf4b071dc79fae778fb5f376485480756c76a3 |
23-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
Genericize the qualtype formating callback to support any diag argument. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59908 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
da5c087ebf3d47b40bae2e99671ce1929156a427 |
23-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
Add support for sending QualType's directly into diags and convert two diags over to use this. QualTypes implicitly print single quotes around them for uniformity and future extension. Doing this requires a little function pointer dance to prevent libbasic from depending on libast. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59907 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaExpr.cpp
|
22caddc91d2f6186739c6b20ec58ed38cd68e595 |
23-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
Add support for sending QualType's directly into diags and convert two diags over to use this. QualTypes implicitly print single quotes around them for uniformity and future extension. Doing this requires a little function pointer dance to prevent libbasic from depending on libast. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59907 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaExpr.cpp
|
b96c206f56a403cbc8ef650b887a3fae9dc2156b |
22-Nov-2008 |
Anders Carlsson <andersca@mac.com> |
Case values must be evaluated git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59884 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
6dde0d5dc09f45f4d9508c964703e36fef1a0198 |
22-Nov-2008 |
Anders Carlsson <andersca@mac.com> |
Case values must be evaluated git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59884 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
e8bd9f2ddf3eee09c36f1d5d8a61fbf5993612f2 |
22-Nov-2008 |
Anders Carlsson <andersca@mac.com> |
Use Expr::Evaluate for case statements. Fixes PR2525 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59881 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaStmt.cpp
|
51fe996231b1d7199f76e4005ff4c943d5deeecd |
22-Nov-2008 |
Anders Carlsson <andersca@mac.com> |
Use Expr::Evaluate for case statements. Fixes PR2525 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59881 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaStmt.cpp
|
c05da428caaf67c3b23acf7000fb7e8238d604e9 |
22-Nov-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Support for implicit property assignment. Error assigning to 'implicit' property with no 'setter'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59878 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ba8d2d684e74a20bef03828c21c991d222c7e9e5 |
22-Nov-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Support for implicit property assignment. Error assigning to 'implicit' property with no 'setter'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59878 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
f18d4c8326553440fb01bfeb368b2bc60996cfc2 |
22-Nov-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
New AST node to access "implicit" setter/getter using property dor syntax. Issuing diagnostics when assigning to read-only properties. This is work in progress. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59874 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
5daf570d0ce027e18ed5f9d66e6b2a14a40b720d |
22-Nov-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
New AST node to access "implicit" setter/getter using property dor syntax. Issuing diagnostics when assigning to read-only properties. This is work in progress. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59874 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
fd9f2acf08cdc747bccfe6642c8a2d52d1c1cf89 |
22-Nov-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implement a %plural modifier for complex plural forms in diagnostics. Use it in the overload diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59871 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExpr.cpp
emaOverload.cpp
|
e4c452c4c7b9124fe94a96f559ff077d59cdf996 |
22-Nov-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implement a %plural modifier for complex plural forms in diagnostics. Use it in the overload diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59871 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExpr.cpp
emaOverload.cpp
|
f9ea6a45aa598267e9d2ba2bce1f91b3685ca071 |
22-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
move the Diag method for Sema to be inline. This shrinks the release-asserts clang executable (when built with gcc 4.2 on the mac) from 14519740 to 14495028 bytes. This shrinks individual object files as well: SemaChecking from 23580->22248, SemaDeclObjc from 61368->57376, SemaExpr from 115628->110516, as well as several others. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59867 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
|
3cfa928f9c9bdc5a12f4c4902cd932babc9c7bc1 |
22-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
move the Diag method for Sema to be inline. This shrinks the release-asserts clang executable (when built with gcc 4.2 on the mac) from 14519740 to 14495028 bytes. This shrinks individual object files as well: SemaChecking from 23580->22248, SemaDeclObjc from 61368->57376, SemaExpr from 115628->110516, as well as several others. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59867 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
|
9943e982658785c2c0ecc3af88a1c0111e9b7749 |
22-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
Split the DiagnosticInfo class into two disjoint classes: one for building up the diagnostic that is in flight (DiagnosticBuilder) and one for pulling structured information out of the diagnostic when formatting and presenting it. There is no functionality change with this patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59849 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
|
3cbfe2c4159e0a219ae660d50625c013aa4afbd0 |
22-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
Split the DiagnosticInfo class into two disjoint classes: one for building up the diagnostic that is in flight (DiagnosticBuilder) and one for pulling structured information out of the diagnostic when formatting and presenting it. There is no functionality change with this patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59849 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
|
19fec9de1274b385dcf711040020945aff5cdb6d |
21-Nov-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implementation of new and delete parsing and sema. This version uses VLAs to represent arrays. I'll try an alternative way next, but I want this safe first. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59835 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
emaType.cpp
|
4c5d320a7581f4b80b151630c91cea5727fa9923 |
21-Nov-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implementation of new and delete parsing and sema. This version uses VLAs to represent arrays. I'll try an alternative way next, but I want this safe first. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59835 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
emaType.cpp
|
66beaba392e8de4483d178286beb50a721267b85 |
21-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
merge some simple call diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59831 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExpr.cpp
emaExprObjC.cpp
|
2c21a073525cdfa68e4439b7af551385dc2796ab |
21-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
merge some simple call diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59831 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExpr.cpp
emaExprObjC.cpp
|
036094b45f36bb70daa22c558defaf3378b24da0 |
21-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
print a type in a diagnostic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59829 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b1b4d337fafe30823b581cbfaa1641f37541fffe |
21-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
print a type in a diagnostic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59829 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
49ba1b7cf8861bc4ba126eb6c9619cb3d247ef5b |
21-Nov-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Allow redeclaration of typedefs in C++ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59822 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
bbe2743b0259e6c8b053b601bfd768dd49c8143a |
21-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Allow redeclaration of typedefs in C++ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59822 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
a7b56a3479d07df296b4e836493a16937939f147 |
21-Nov-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix overloading of non-static member functions that differ in their cv-qualifiers git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59819 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
1ca50c3f541dd637063b9d186a7ea193e3440a48 |
21-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Fix overloading of non-static member functions that differ in their cv-qualifiers git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59819 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
bb002338ac6d32dde969463290842f557071f38f |
21-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
merge 3 more diagnostics into 1. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59805 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
416e46febcb7084e715fbe0b9bf2cab7a85f5242 |
21-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
merge 3 more diagnostics into 1. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59805 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
a7021ee6987ae13adedcae2b37f6d820cd8ac07e |
21-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
Add the concept of "modifiers" to the clang diagnostic format strings. This allows us to have considerable flexibility in how these things are displayed and provides extra information that allows us to merge away diagnostics that are very similar. Diagnostic modifiers are a string of characters with the regex [-a-z]+ that occur between the % and digit. They may optionally have an argument that can parameterize them. For now, I've added two example modifiers. One is a very useful tool that allows you to factor commonality across diagnostics that need single words or phrases combined. Basically you can use %select{a|b|c}4 with with an integer argument that selects either a/b/c based on an integer value in the range [0..3). The second modifier is also an integer modifier, aimed to help English diagnostics handle plurality. "%s3" prints to 's' if integer argument #3 is not 1, otherwise it prints to nothing. I'm fully aware that 's' is an English concept and doesn't apply to all situations (mouse vs mice). However, this is very useful and we can add other crazy modifiers once we add support for polish! ;-) I converted a couple C++ diagnostics over to use this as an example, I'd appreciate it if others could merge the other likely candiates. If you have other modifiers that you want, lets talk on cfe-dev. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59803 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
af7ae4e8160fc5c23e471f2125b3fe5911e3532a |
21-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
Add the concept of "modifiers" to the clang diagnostic format strings. This allows us to have considerable flexibility in how these things are displayed and provides extra information that allows us to merge away diagnostics that are very similar. Diagnostic modifiers are a string of characters with the regex [-a-z]+ that occur between the % and digit. They may optionally have an argument that can parameterize them. For now, I've added two example modifiers. One is a very useful tool that allows you to factor commonality across diagnostics that need single words or phrases combined. Basically you can use %select{a|b|c}4 with with an integer argument that selects either a/b/c based on an integer value in the range [0..3). The second modifier is also an integer modifier, aimed to help English diagnostics handle plurality. "%s3" prints to 's' if integer argument #3 is not 1, otherwise it prints to nothing. I'm fully aware that 's' is an English concept and doesn't apply to all situations (mouse vs mice). However, this is very useful and we can add other crazy modifiers once we add support for polish! ;-) I converted a couple C++ diagnostics over to use this as an example, I'd appreciate it if others could merge the other likely candiates. If you have other modifiers that you want, lets talk on cfe-dev. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59803 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
e65182ce612da17a12ab30e1c978b33f859add0a |
21-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
Change CheckIncrementDecrementOperand to test for common cases first and fall through better. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59799 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
3528d3552c309c37e6724b4c4f512290c276f534 |
21-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
Change CheckIncrementDecrementOperand to test for common cases first and fall through better. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59799 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
9c690e940d32a268dab9f94a272519d241ad2534 |
21-Nov-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Cleanup memory management in overloading of operator->, slightly git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59791 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
fc195efd688f134fb58a540447f4ce67f9d6563e |
21-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Cleanup memory management in overloading of operator->, slightly git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59791 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
30c8ddfb74ad98d7cb3fba833df739c7e00a30fe |
21-Nov-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Don't print canonical types in overloading-related diagnostics git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59789 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaOverload.cpp
|
621b3933e570792810386b891264c78e3bd7b169 |
21-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Don't print canonical types in overloading-related diagnostics git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59789 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaOverload.cpp
|
7563a323ee763711cf6f4f002f99ab64214109a3 |
20-Nov-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
__weak ivar need not warn. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59743 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
24b93f2debe1fdb98c7b03a79486a02bf8b9c9e4 |
20-Nov-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
__weak ivar need not warn. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59743 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
7f3fec565aab6cad369f418dbcbe601d545c5ac0 |
20-Nov-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Add support for overloaded operator-> when used in a member access expression (smart_ptr->mem). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59732 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaOverload.cpp
|
8ba10745f525467e91bbaec21044bf4d9017a988 |
20-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Add support for overloaded operator-> when used in a member access expression (smart_ptr->mem). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59732 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaOverload.cpp
|
261afa773475c31491cb5141af6a330d1d955486 |
20-Nov-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix strange quote characters git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59729 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
a967a6f6af170fcfdcd4ea24ba2ba5e072f6cded |
20-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Fix strange quote characters git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59729 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
01f03cfd772533848081de95ca420b1d2159757e |
20-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
Daniel really really likes = instead of += :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59716 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
69d27b9f2e1c678b6b8a199fa3f705f2b3ff5e0d |
20-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
Daniel really really likes = instead of += :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59716 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
10f2c2ef39b5cd9be33cfaa38f9e3155434e8af2 |
20-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
remove the last old-fashioned Diag method. Transition complete! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59714 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprObjC.cpp
emaInit.cpp
emaStmt.cpp
emaType.cpp
|
f3a41af4d5c98a72a1d6720bbbfd658e57ef2541 |
20-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
remove the last old-fashioned Diag method. Transition complete! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59714 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprObjC.cpp
emaInit.cpp
emaStmt.cpp
emaType.cpp
|
8d7568161303f50a8a8d0525e5ce50b25616b993 |
20-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
remove another old Diag method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59713 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
|
5dc266abe0e8de69788ba67e38047a919f4bc383 |
20-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
remove another old Diag method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59713 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
|
77d52da9074ee804f03724f4f2f499a3b4741fe1 |
20-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
remove another old-school Diag method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59712 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaChecking.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaNamedCast.cpp
emaStmt.cpp
emaType.cpp
|
d3a94e24ddf3fb90de76b17bd176d9ed61e66f2c |
20-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
remove another old-school Diag method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59712 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaChecking.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaNamedCast.cpp
emaStmt.cpp
emaType.cpp
|
c2a5f512b7b19ac1d430c63a58fbce64ee626745 |
20-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
remove the type_info identifier cache. Compared to the cost of doing the lookup_decl, the hash lookup is cheap. Also, typeid doesn't happen enough in real world code to worry about it. I'd like to eventually get rid of KnownFunctionIDs from Sema also, but today is not that day. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59711 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaExprCXX.cpp
|
572af49cc0052931e7b06902d99c72f04b75704e |
20-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
remove the type_info identifier cache. Compared to the cost of doing the lookup_decl, the hash lookup is cheap. Also, typeid doesn't happen enough in real world code to worry about it. I'd like to eventually get rid of KnownFunctionIDs from Sema also, but today is not that day. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59711 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaExprCXX.cpp
|
f0939608e3f0679798315de9904f3f324fe982bd |
20-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
compared to the rest of the code in Sema::GetStdNamespace(), looking up the "std" identifier is trivial. Just do it, particularly since this is only done if the namespace hasn't already been looked up. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59710 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
|
8edea83d4d45d912191eac97b861309af6c74acd |
20-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
compared to the rest of the code in Sema::GetStdNamespace(), looking up the "std" identifier is trivial. Just do it, particularly since this is only done if the namespace hasn't already been looked up. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59710 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
|
6d16b056e65e4a9565cdc691f3916491e608da27 |
20-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
remove some other identifiers that are looked up really early and only used in one cold place. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59709 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
|
2bac0f6b3724734d7bb7bf8231bd8511cb49570f |
20-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
remove some other identifiers that are looked up really early and only used in one cold place. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59709 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
|
87fada8ee3ae20dfbee958a605bab793a4d677e8 |
20-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
instead of looking up super at startup time, just check for it when needed. It doesn't incur real cost in any hot paths. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59708 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaExpr.cpp
emaExprObjC.cpp
|
8469265156c6344fa1100a6a7bf6349acc187d9f |
20-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
instead of looking up super at startup time, just check for it when needed. It doesn't incur real cost in any hot paths. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59708 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaExpr.cpp
emaExprObjC.cpp
|
05fb7c8668938447ffdd36d5e15ea697e88db0ba |
20-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
Rename IdentifierInfo::isName to ::isStr. Use a nifty trick from Sebastian to enforce that a literal string is passed in, and use this to avoid having to call strlen on it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59706 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
92e62b02226410bcad8584541b8f1ff4d35ebab9 |
20-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
Rename IdentifierInfo::isName to ::isStr. Use a nifty trick from Sebastian to enforce that a literal string is passed in, and use this to avoid having to call strlen on it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59706 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
f0ca65f501c7e7d8c286e04bca0d805c12a5ad1b |
20-Nov-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
More objc gc stuff. Read/Write barriers for local static/extern, diagnostics on use of __weak attribute on fields, Early support for read/write barriers for objc fields. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59682 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
2682d8b3a0415d521d5ca11afb13a8bc5c559a31 |
20-Nov-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
More objc gc stuff. Read/Write barriers for local static/extern, diagnostics on use of __weak attribute on fields, Early support for read/write barriers for objc fields. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59682 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
67fdb5bda3dc14d1da17c2e071a0dba9fec577cb |
19-Nov-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement the rest of C++ [over.call.object], which permits the object being called to be converted to a reference-to-function, pointer-to-function, or reference-to-pointer-to-function. This is done through "surrogate" candidate functions that model the conversions from the object to the function (reference/pointer) and the conversions in the arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59674 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaOverload.cpp
emaOverload.h
|
106c6eb3f1380bfe243a62d8f0f8bce6a7c8d5c6 |
19-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Implement the rest of C++ [over.call.object], which permits the object being called to be converted to a reference-to-function, pointer-to-function, or reference-to-pointer-to-function. This is done through "surrogate" candidate functions that model the conversions from the object to the function (reference/pointer) and the conversions in the arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59674 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaOverload.cpp
emaOverload.h
|
10f3c50c0ae70ca5bb648f555d277fbfb8eab284 |
19-Nov-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Support for calling overloaded function call operators (operator()) with function call syntax, e.g., Functor f; f(x, y); This is the easy part of handling calls to objects of class type (C++ [over.call.object]). The hard part (coping with conversions from f to function pointer or reference types) will come later. Nobody uses that stuff anyway, right? :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59663 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaOverload.cpp
|
f9eb905197e44ed5634205512074993f6f40470d |
19-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Support for calling overloaded function call operators (operator()) with function call syntax, e.g., Functor f; f(x, y); This is the easy part of handling calls to objects of class type (C++ [over.call.object]). The hard part (coping with conversions from f to function pointer or reference types) will come later. Nobody uses that stuff anyway, right? :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59663 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaOverload.cpp
|
2409477a45b4279d5d0600b057392b5b458e5d1f |
19-Nov-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Some tweaks suggested by Argiris git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59661 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
|
487a75ab300552e42afa45b8199133f838a40e5f |
19-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Some tweaks suggested by Argiris git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59661 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
|
9cd599b261c4d48135c43a0a73cd2c188051d669 |
19-Nov-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Take care another assert: struct A { struct B; }; struct A::B { void m() {} // Assertion failed: getContainingDC(DC) == CurContext && "The next DeclContext should be lexically contained in the current one." }; Introduce DeclContext::getLexicalParent which may be different from DeclContext::getParent when nested-names are involved, e.g: namespace A { struct S; } struct A::S {}; // getParent() == namespace 'A' // getLexicalParent() == translation unit git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59650 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
77407b802130b1c44b1f63b855722a5376f57bca |
19-Nov-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Take care another assert: struct A { struct B; }; struct A::B { void m() {} // Assertion failed: getContainingDC(DC) == CurContext && "The next DeclContext should be lexically contained in the current one." }; Introduce DeclContext::getLexicalParent which may be different from DeclContext::getParent when nested-names are involved, e.g: namespace A { struct S; } struct A::S {}; // getParent() == namespace 'A' // getLexicalParent() == translation unit git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59650 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
80723c56092e182aea4c28cdcdc92b1b8e0c41d3 |
19-Nov-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Support overloading of the subscript operator[], including support for built-in operator candidates. Test overloading of '&' and ','. In C++, a comma expression is an lvalue if its right-hand subexpression is an lvalue. Update Expr::isLvalue accordingly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59643 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
337c6b9f5d502dc1c5acea628bf7bf9e828efc0e |
19-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Support overloading of the subscript operator[], including support for built-in operator candidates. Test overloading of '&' and ','. In C++, a comma expression is an lvalue if its right-hand subexpression is an lvalue. Update Expr::isLvalue accordingly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59643 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
c64a53d59278fb34f24cd330f77554c9f1c9a494 |
19-Nov-2008 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6150376> [sema] crash on invalid message send. The core fix in Sema::ActOnClassMessage(). All the other changes have to do with passing down the SourceLocation for the receiver (to properly position the cursor when producing an error diagnostic). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59639 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprObjC.cpp
|
5cb93b8bf009c4b0ae09b71ba85f54b2a7ea8022 |
19-Nov-2008 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6150376> [sema] crash on invalid message send. The core fix in Sema::ActOnClassMessage(). All the other changes have to do with passing down the SourceLocation for the receiver (to properly position the cursor when producing an error diagnostic). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59639 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprObjC.cpp
|
4f6904d8d02ccd71e23d18e5cd36c1f1c52d9ef7 |
19-Nov-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Added operator overloading for unary operators, post-increment, and post-decrement, including support for generating all of the built-in operator candidates for these operators. C++ and C have different rules for the arguments to the builtin unary '+' and '-'. Implemented both variants in Sema::ActOnUnaryOp. In C++, pre-increment and pre-decrement return lvalues. Update Expr::isLvalue accordingly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59638 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaOverload.cpp
|
74253736184c0717a0649922551bf9d8b6815651 |
19-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Added operator overloading for unary operators, post-increment, and post-decrement, including support for generating all of the built-in operator candidates for these operators. C++ and C have different rules for the arguments to the builtin unary '+' and '-'. Implemented both variants in Sema::ActOnUnaryOp. In C++, pre-increment and pre-decrement return lvalues. Update Expr::isLvalue accordingly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59638 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaOverload.cpp
|
c13c54cd2af10e172f2b7a26ec22ffffab35deb0 |
19-Nov-2008 |
Daniel Dunbar <daniel@zuster.org> |
Fix silly code, use IdentifierInfo* instead of std::string in PragmaPackStack. Thanks Chris! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59616 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
06550395dd70d0c65a1d8dbb8a9639262f158414 |
19-Nov-2008 |
Daniel Dunbar <daniel@zuster.org> |
Fix silly code, use IdentifierInfo* instead of std::string in PragmaPackStack. Thanks Chris! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59616 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
65cae295f7d9a326f78878f315fb35fb0053c568 |
19-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
stop calling II::getName() unnecesarily in sema git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59609 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaChecking.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprObjC.cpp
emaStmt.cpp
|
3c73c41cefcfe76f36b7bed72c9f1ec195490951 |
19-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
stop calling II::getName() unnecesarily in sema git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59609 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaCXXScopeSpec.cpp
emaChecking.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprObjC.cpp
emaStmt.cpp
|
e46b8797fa40245512e73af79c497328e9d606b5 |
19-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
Allow sending IdentifierInfo*'s into Diagnostics without turning them into strings first. This should allow removal of a bunch of II->getName() calls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59601 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
43b628cd47ecdc3caf640d79b3ad7ecef0f2c285 |
19-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
Allow sending IdentifierInfo*'s into Diagnostics without turning them into strings first. This should allow removal of a bunch of II->getName() calls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59601 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
a5cc188f53d3bf27f52fd6f59be0ed061039971a |
19-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
convert some diags to use numbers instead of strings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59600 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
8365223e5498255a1285b6bb206f5894fe5b83c6 |
19-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
convert some diags to use numbers instead of strings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59600 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
68f621cb6c43392e164c6fdbda71bc8f3b94962b |
19-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
add direct support for signed and unsigned integer arguments to diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59598 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
30bc96544346bea42921cf6837e66cef80d664b4 |
19-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
add direct support for signed and unsigned integer arguments to diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59598 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
9d2cf08cd303bcb8ad5c4244cce5025d6be0cf05 |
19-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
remove one more old-style Diag method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59589 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaChecking.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaStmt.cpp
emaType.cpp
|
dcd5ef12488e4c7ea844327835896ca86b609a97 |
19-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
remove one more old-style Diag method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59589 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaChecking.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInit.cpp
emaStmt.cpp
emaType.cpp
|
8ba580c3126c63e82339cba4b52b37b36a019916 |
19-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
Switch several more Sema Diag methods over. This simplifies the __builtin_prefetch code to only emit one diagnostic per builtin_prefetch. While this has nothing to do with the rest of the patch, the code seemed like overkill when I was updating it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59588 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaChecking.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprObjC.cpp
emaOverload.cpp
emaStmt.cpp
|
fa25bbb351f4fdd977f51254119cdfc2b525ce90 |
19-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
Switch several more Sema Diag methods over. This simplifies the __builtin_prefetch code to only emit one diagnostic per builtin_prefetch. While this has nothing to do with the rest of the patch, the code seemed like overkill when I was updating it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59588 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaChecking.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprObjC.cpp
emaOverload.cpp
emaStmt.cpp
|
849ea9cc5d2ee01d571c35347a6f7ce86c00ed76 |
19-Nov-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Built-in equality and relational operators have return type "bool" in C++, not "int". Fix a typo in the promotion of enumeration types that was causing some integral promotions to look like integral conversions (leading to extra ambiguities in overload resolution). Check for "acceptable" overloaded operators based on the types of the arguments. This is a somewhat odd check that is specified by the standard, but I can't see why it actually matters: the overload candidates it suppresses don't seem like they would ever be picked as the best candidates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59583 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaOverload.cpp
|
447b69e55e1098d8df46dd99f171bfaace9ff8a0 |
19-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Built-in equality and relational operators have return type "bool" in C++, not "int". Fix a typo in the promotion of enumeration types that was causing some integral promotions to look like integral conversions (leading to extra ambiguities in overload resolution). Check for "acceptable" overloaded operators based on the types of the arguments. This is a somewhat odd check that is specified by the standard, but I can't see why it actually matters: the overload candidates it suppresses don't seem like they would ever be picked as the best candidates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59583 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaOverload.cpp
|
5ed15042cb1ae4fc91e1fefe40589a486ee2314b |
19-Nov-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Partial expansion of C++ operator overloading (for binary operators) to support operators defined as member functions, e.g., struct X { bool operator==(X&); }; Overloading with non-member operators is supported, and the special rules for the implicit object parameter (e.g., the ability for a non-const *this to bind to an rvalue) are implemented. This change also refactors and generalizes the code for adding overload candidates for overloaded operator calls (C++ [over.match.expr]), both to match the rules more exactly (name lookup of non-member operators actually ignores member operators) and to make this routine more reusable for the other overloaded operators. Testing for the initialization of the implicit object parameter is very light. More tests will come when we get support for calling member functions directly (e.g., o.m(a1, a2)). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59564 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaOverload.cpp
|
96176b3575823ea996c6140380dd17d9240c9766 |
19-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Partial expansion of C++ operator overloading (for binary operators) to support operators defined as member functions, e.g., struct X { bool operator==(X&); }; Overloading with non-member operators is supported, and the special rules for the implicit object parameter (e.g., the ability for a non-const *this to bind to an rvalue) are implemented. This change also refactors and generalizes the code for adding overload candidates for overloaded operator calls (C++ [over.match.expr]), both to match the rules more exactly (name lookup of non-member operators actually ignores member operators) and to make this routine more reusable for the other overloaded operators. Testing for the initialization of the implicit object parameter is very light. More tests will come when we get support for calling member functions directly (e.g., o.m(a1, a2)). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59564 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaOverload.cpp
|
70b93d86d4caf98b8752241d1caaef11a7b2ffd0 |
18-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
start converting Sema over to using its canonical Diag method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59561 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaInherit.cpp
emaNamedCast.cpp
emaOverload.cpp
|
c9c7c4e06bba5dce053162ea1ead5743d7bba35b |
18-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
start converting Sema over to using its canonical Diag method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59561 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaInherit.cpp
emaNamedCast.cpp
emaOverload.cpp
|
429558c34ac133c82a5d51df346aaa851b1519d5 |
18-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
introduce the one true Diag method for Sema. Next up: kill all the others off. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59556 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
|
ebf5ddfbf7df93c9c885c176ac2152669e39cfbf |
18-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
introduce the one true Diag method for Sema. Next up: kill all the others off. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59556 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
|
1422a622ad564b8a2a88781932d809b060df0320 |
18-Nov-2008 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6329769> [sema] crash on duplication definition of interface with protocols. As soon as we detect duplicate interfaces, discontinue further semantic checks (returning the original interface). This is now consistent with how we handle protocols (and less error prone in general). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59541 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
cfe8bf31ad61a16458d5970734d4a300a7bd9b0a |
18-Nov-2008 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6329769> [sema] crash on duplication definition of interface with protocols. As soon as we detect duplicate interfaces, discontinue further semantic checks (returning the original interface). This is now consistent with how we handle protocols (and less error prone in general). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59541 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
aee3bf8be3cc87bae59b47213089aca4e9f8ee02 |
18-Nov-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
As threatened previously: consolidate name lookup and the creation of DeclRefExprs and BlockDeclRefExprs into a single function Sema::ActOnDeclarationNameExpr, eliminating a bunch of duplicate lookup-name-and-check-the-result code. Note that we still have the three parser entry points for identifiers, operator-function-ids, and conversion-function-ids, since the parser doesn't (and shouldn't) know about DeclarationNames. This is a Good Thing (TM), and there will be more entrypoints coming (e.g., for C++ pseudo-destructor expressions). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59527 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprCXX.cpp
|
10c4262aeb5212375e3fa64e76887bd9bcc79924 |
18-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
As threatened previously: consolidate name lookup and the creation of DeclRefExprs and BlockDeclRefExprs into a single function Sema::ActOnDeclarationNameExpr, eliminating a bunch of duplicate lookup-name-and-check-the-result code. Note that we still have the three parser entry points for identifiers, operator-function-ids, and conversion-function-ids, since the parser doesn't (and shouldn't) know about DeclarationNames. This is a Good Thing (TM), and there will be more entrypoints coming (e.g., for C++ pseudo-destructor expressions). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59527 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprCXX.cpp
|
96a32ddc1349db9772d01530425bca2af481f0a2 |
18-Nov-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Extend DeclarationName to support C++ overloaded operators, e.g., operator+, directly, using the same mechanism as all other special names. Removed the "special" identifiers for the overloaded operators from the identifier table and IdentifierInfo data structure. IdentifierInfo is back to representing only real identifiers. Added a new Action, ActOnOperatorFunctionIdExpr, that builds an expression from an parsed operator-function-id (e.g., "operator +"). ActOnIdentifierExpr used to do this job, but operator-function-ids are no longer represented by IdentifierInfo's. Extended Declarator to store overloaded operator names. Sema::GetNameForDeclarator now knows how to turn the operator name into a DeclarationName for the overloaded operator. Except for (perhaps) consolidating the functionality of ActOnIdentifier, ActOnOperatorFunctionIdExpr, and ActOnConversionFunctionExpr into a common routine that builds an appropriate DeclRefExpr by looking up a DeclarationName, all of the work on normalizing declaration names should be complete with this commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59526 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaExpr.cpp
emaExprCXX.cpp
|
e94ca9e4371c022329270436b3dd77adc4ddfa8f |
18-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Extend DeclarationName to support C++ overloaded operators, e.g., operator+, directly, using the same mechanism as all other special names. Removed the "special" identifiers for the overloaded operators from the identifier table and IdentifierInfo data structure. IdentifierInfo is back to representing only real identifiers. Added a new Action, ActOnOperatorFunctionIdExpr, that builds an expression from an parsed operator-function-id (e.g., "operator +"). ActOnIdentifierExpr used to do this job, but operator-function-ids are no longer represented by IdentifierInfo's. Extended Declarator to store overloaded operator names. Sema::GetNameForDeclarator now knows how to turn the operator name into a DeclarationName for the overloaded operator. Except for (perhaps) consolidating the functionality of ActOnIdentifier, ActOnOperatorFunctionIdExpr, and ActOnConversionFunctionExpr into a common routine that builds an appropriate DeclRefExpr by looking up a DeclarationName, all of the work on normalizing declaration names should be complete with this commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59526 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaExpr.cpp
emaExprCXX.cpp
|
6948ae68efb71fc0ef50fbf240c3cc2ce8b97b2d |
18-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
This reworks some of the Diagnostic interfaces a bit to change how diagnostics are formed. In particular, a diagnostic with all its strings and ranges is now packaged up and sent to DiagnosticClients as a DiagnosticInfo instead of as a ton of random stuff. This has the benefit of simplifying the interface, making it more extensible, and allowing us to do more checking for things like access past the end of the various arrays passed in. In addition to introducing DiagnosticInfo, this also substantially changes how Diagnostic::Report works. Instead of being passed in all of the info required to issue a diagnostic, Report now takes only the required info (a location and ID) and returns a fresh DiagnosticInfo *by value*. The caller is then free to stuff strings and ranges into the DiagnosticInfo with the << operator. When the dtor runs on the DiagnosticInfo object (which should happen at the end of the statement), the diagnostic is actually emitted with all of the accumulated information. This is a somewhat tricky dance, but it means that the accumulated DiagnosticInfo is allowed to keep pointers to other expression temporaries without those pointers getting invalidated. This is just the minimal change to get this stuff working, but this will allow us to eliminate the zillions of variant "Diag" methods scattered throughout (e.g.) sema. For example, instead of calling: Diag(BuiltinLoc, diag::err_overload_no_match, typeNames, SourceRange(BuiltinLoc, RParenLoc)); We will soon be able to just do: Diag(BuiltinLoc, diag::err_overload_no_match) << typeNames << SourceRange(BuiltinLoc, RParenLoc)); This scales better to support arbitrary types being passed in (not just strings) in a type-safe way. Go operator overloading?! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59502 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
0a14eee528a901c16f0e288fbc10a3abc1660d87 |
18-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
This reworks some of the Diagnostic interfaces a bit to change how diagnostics are formed. In particular, a diagnostic with all its strings and ranges is now packaged up and sent to DiagnosticClients as a DiagnosticInfo instead of as a ton of random stuff. This has the benefit of simplifying the interface, making it more extensible, and allowing us to do more checking for things like access past the end of the various arrays passed in. In addition to introducing DiagnosticInfo, this also substantially changes how Diagnostic::Report works. Instead of being passed in all of the info required to issue a diagnostic, Report now takes only the required info (a location and ID) and returns a fresh DiagnosticInfo *by value*. The caller is then free to stuff strings and ranges into the DiagnosticInfo with the << operator. When the dtor runs on the DiagnosticInfo object (which should happen at the end of the statement), the diagnostic is actually emitted with all of the accumulated information. This is a somewhat tricky dance, but it means that the accumulated DiagnosticInfo is allowed to keep pointers to other expression temporaries without those pointers getting invalidated. This is just the minimal change to get this stuff working, but this will allow us to eliminate the zillions of variant "Diag" methods scattered throughout (e.g.) sema. For example, instead of calling: Diag(BuiltinLoc, diag::err_overload_no_match, typeNames, SourceRange(BuiltinLoc, RParenLoc)); We will soon be able to just do: Diag(BuiltinLoc, diag::err_overload_no_match) << typeNames << SourceRange(BuiltinLoc, RParenLoc)); This scales better to support arbitrary types being passed in (not just strings) in a type-safe way. Go operator overloading?! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59502 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
ba57bd96f01864f28c40259866bbd30799e6e6c8 |
18-Nov-2008 |
Ted Kremenek <kremenek@apple.com> |
Attribute nonnull can be applied to block pointers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59499 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
46bbacac37141ed9d01d5b6473e8211554b02710 |
18-Nov-2008 |
Ted Kremenek <kremenek@apple.com> |
Attribute nonnull can be applied to block pointers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59499 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
b034e281af9d2cb52c2606764de229c1fb825307 |
18-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
Change the diagnostics interface to take an array of pointers to strings instead of array of strings. This reduces string copying in some not-very-important cases, but paves the way for future improvements. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59494 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
2383b7f6aea2cb2bf2b5bfc0ec730f9354fecbbf |
18-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
Change the diagnostics interface to take an array of pointers to strings instead of array of strings. This reduces string copying in some not-very-important cases, but paves the way for future improvements. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59494 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
1eafdea98862f19797cd8146e93064f840a3d40c |
18-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
minor cleanups and tidying, no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59485 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
29a1cfbec38d255dd24ba660333a2430849a2f1c |
18-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
minor cleanups and tidying, no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59485 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
da189c64db6654b55dff3c131e1f6b1ef999fccb |
18-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
implement a fixme by making warnings for ++/-- on non-modifiable-lvalues better. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59484 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
858bb6f2d6790feeb03b3c2a24f01ef24b54301b |
18-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
implement a fixme by making warnings for ++/-- on non-modifiable-lvalues better. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59484 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
4c2642c671d46b5bbb0958db854d3e9bf9b75b53 |
18-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
factor some code out into a helper function git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59483 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
f67bd9f41ce60cbb5f107e980e940ae13471016c |
18-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
factor some code out into a helper function git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59483 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
6a2b7fd0027d190eb934a68b04991a12f8892a1c |
18-Nov-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implement effects of 'mutable', and a few comments from Chris on its parsing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59470 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
|
a11f42f4bca694b9be91350d0a74815f119e3fbf |
18-Nov-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implement effects of 'mutable', and a few comments from Chris on its parsing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59470 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
|
6704b319467ad5bb8fa89aa800a7e47aba46f5cf |
17-Nov-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Eliminate all of the placeholder identifiers used for constructors, destructors, and conversion functions. The placeholders were used to work around the fact that the parser and some of Sema really wanted declarators to have simple identifiers; now, the code that deals with declarators will use DeclarationNames. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59469 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
10bd36882406cdf4805e35add1ce2f11ab9ae152 |
17-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Eliminate all of the placeholder identifiers used for constructors, destructors, and conversion functions. The placeholders were used to work around the fact that the parser and some of Sema really wanted declarators to have simple identifiers; now, the code that deals with declarators will use DeclarationNames. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59469 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
7926f10af0eeedd8b227236eb0d0e97bb15e6118 |
17-Nov-2008 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6333904> [sema] message lookup on super is incorrect Missing special lookup rule in Sema::ActOnInstanceMessage(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59467 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
87d3ef08d892df8264bd51adb6ddd4a22422cd29 |
17-Nov-2008 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6333904> [sema] message lookup on super is incorrect Missing special lookup rule in Sema::ActOnInstanceMessage(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59467 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
b0212bdede2abd0ca5e893d90464f5b0f3ce9943 |
17-Nov-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Updated IdentifierResolver to deal with DeclarationNames. The names of C++ constructors, destructors, and conversion functions now have a FETokenInfo field that IdentifierResolver can access, so that these special names are handled just like ordinary identifiers. A few other Sema routines now use DeclarationNames instead of IdentifierInfo*'s. To validate this design, this code also implements parsing and semantic analysis for id-expressions that name conversion functions, e.g., return operator bool(); The new parser action ActOnConversionFunctionExpr takes the result of parsing "operator type-id" and turning it into an expression, using the IdentifierResolver with the DeclarationName of the conversion function. ActOnDeclarator pushes those conversion function names into scope so that the IdentifierResolver can find them, of course. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59462 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
dentifierResolver.h
ema.h
emaCXXScopeSpec.cpp
emaChecking.cpp
emaDecl.cpp
emaExprCXX.cpp
|
2def48394f6d48bde0dec2b514193c2b533265b5 |
17-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Updated IdentifierResolver to deal with DeclarationNames. The names of C++ constructors, destructors, and conversion functions now have a FETokenInfo field that IdentifierResolver can access, so that these special names are handled just like ordinary identifiers. A few other Sema routines now use DeclarationNames instead of IdentifierInfo*'s. To validate this design, this code also implements parsing and semantic analysis for id-expressions that name conversion functions, e.g., return operator bool(); The new parser action ActOnConversionFunctionExpr takes the result of parsing "operator type-id" and turning it into an expression, using the IdentifierResolver with the DeclarationName of the conversion function. ActOnDeclarator pushes those conversion function names into scope so that the IdentifierResolver can find them, of course. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59462 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
dentifierResolver.h
ema.h
emaCXXScopeSpec.cpp
emaChecking.cpp
emaDecl.cpp
emaExprCXX.cpp
|
37fb940de30f294356022f3cb9eced40f0933e70 |
17-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
Implement rdar://6319320: give a good diagnostic for cases where people are trying to use the old GCC "casts as lvalue" extension. We don't and will hopefully never support this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59460 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ca354faa7e9b99af17070c82b9662a5fca76422c |
17-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
Implement rdar://6319320: give a good diagnostic for cases where people are trying to use the old GCC "casts as lvalue" extension. We don't and will hopefully never support this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59460 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
030fcda1517189554b52ed77f1527bac2d1ef080 |
17-Nov-2008 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6316324> [sema] spurious warning on comparison of qualified id. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59459 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
a8069f102f1e7b67927be2e500ee1518e25aafbb |
17-Nov-2008 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6316324> [sema] spurious warning on comparison of qualified id. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59459 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
55debeaa0826154650118fec248cdbca0478b77d |
17-Nov-2008 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6320086> parser rejects block capturing ivar. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59444 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
d7612e183bb09d04677d0ddde89ee29130ffb715 |
17-Nov-2008 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6320086> parser rejects block capturing ivar. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59444 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
682a8cf9b1b84cc299225acd8e0b38e9a6da08ec |
17-Nov-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Some cleanups for C++ operator overloading git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59443 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
43c7bad105f742988e7ca40564285c83bea854a5 |
17-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Some cleanups for C++ operator overloading git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59443 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
aa368a2159168ef0b6991c6ee5e205a7edb78129 |
17-Nov-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Simplify error messages for two-parameter overloaded increment/decrement operators git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59442 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
1adbab67751f44147a0d259b684cf52bae142ef3 |
17-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Simplify error messages for two-parameter overloaded increment/decrement operators git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59442 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
24afd4accaf5499312f05f1252463c6e0febf16d |
17-Nov-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Introduction the DeclarationName class, as a single, general method of representing the names of declarations in the C family of languages. DeclarationName is used in NamedDecl to store the name of the declaration (naturally), and ObjCMethodDecl is now a NamedDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59441 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaOverload.cpp
|
2e1cd4264d363ca869bf37ef160902f211d21b8c |
17-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Introduction the DeclarationName class, as a single, general method of representing the names of declarations in the C family of languages. DeclarationName is used in NamedDecl to store the name of the declaration (naturally), and ObjCMethodDecl is now a NamedDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59441 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaOverload.cpp
|
ef0696643975b7f5db9c9b333cffae2c6a469a5c |
16-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
rename Expr::tryEvaluate to Expr::Evaluate. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59426 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
6ee7aa154e8bbb21a21254293410b944f78b0bfe |
16-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
rename Expr::tryEvaluate to Expr::Evaluate. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59426 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
9f5337b3f6c3871db5756b0f9ba0babc13c4eac7 |
15-Nov-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implement parsing and semantic checking of the 'mutable' keyword. Thanks to Doug for the review. Actual effects of mutable to follow. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59331 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
669d5d74b880a8497b92a3ec159145713f4d6519 |
15-Nov-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implement parsing and semantic checking of the 'mutable' keyword. Thanks to Doug for the review. Actual effects of mutable to follow. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59331 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
65fedaf9bd026cf8863e24eeecade7b2a65e0030 |
14-Nov-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Add a new expression node, CXXOperatorCallExpr, which expresses a function call created in response to the use of operator syntax that resolves to an overloaded operator in C++, e.g., "str1 + str2" that resolves to std::operator+(str1, str2)". We now build a CXXOperatorCallExpr in C++ when we pick an overloaded operator. (But only for binary operators, where we actually implement overloading) I decided *not* to refactor the current CallExpr to make it abstract (with FunctionCallExpr and CXXOperatorCallExpr as derived classes). Doing so would allow us to make CXXOperatorCallExpr a little bit smaller, at the cost of making the argument and callee accessors virtual. We won't know if this is going to be a win until we can parse lots of C++ code to determine how much memory we'll save by making this change vs. the performance penalty due to the extra virtual calls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59306 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
|
b4609806e9232593ece09ce08b630836e825865c |
14-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Add a new expression node, CXXOperatorCallExpr, which expresses a function call created in response to the use of operator syntax that resolves to an overloaded operator in C++, e.g., "str1 + str2" that resolves to std::operator+(str1, str2)". We now build a CXXOperatorCallExpr in C++ when we pick an overloaded operator. (But only for binary operators, where we actually implement overloading) I decided *not* to refactor the current CallExpr to make it abstract (with FunctionCallExpr and CXXOperatorCallExpr as derived classes). Doing so would allow us to make CXXOperatorCallExpr a little bit smaller, at the cost of making the argument and callee accessors virtual. We won't know if this is going to be a win until we can parse lots of C++ code to determine how much memory we'll save by making this change vs. the performance penalty due to the extra virtual calls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59306 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
|
3d4492e262e9ae7c20fefe1ad886f5382316f358 |
13-Nov-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Some cleanup for the implementation of built-in operator candidates. Thanks to Chris for the review! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59260 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaOverload.cpp
|
bf3af056289893f58d37b05a2c80970708781d61 |
13-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Some cleanup for the implementation of built-in operator candidates. Thanks to Chris for the review! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59260 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaOverload.cpp
|
86be8577707e71597d8833319c67916799d6381c |
13-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
don't highlight field name, just put a caret on it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59255 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
23cd0d994f39300c9eed013afaec99b8cde2a65c |
13-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
don't highlight field name, just put a caret on it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59255 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
cbcb4c2ba81d6b1c0dea9d8a362755607175873c |
13-Nov-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Don't build identifiers for C++ constructors, destructors, or conversion functions. Instead, we just use a placeholder identifier for these (e.g., "<constructor>") and override NamedDecl::getName() to provide a human-readable name. This is one potential solution to the problem; another solution would be to replace the use of IdentifierInfo* in NamedDecl with a different class that deals with identifiers better. I'm also prototyping that to see how it compares, but this commit is better than what we had previously. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59193 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
7d7e6727a5de032c86dcb58ae734e7c1603c26e6 |
13-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Don't build identifiers for C++ constructors, destructors, or conversion functions. Instead, we just use a placeholder identifier for these (e.g., "<constructor>") and override NamedDecl::getName() to provide a human-readable name. This is one potential solution to the problem; another solution would be to replace the use of IdentifierInfo* in NamedDecl with a different class that deals with identifiers better. I'm also prototyping that to see how it compares, but this commit is better than what we had previously. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59193 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
fa1b4e512b091cb2cbe1997c33c1b0642a564d6c |
12-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
Fix a FIXME by improving a diagnostic, add a testcase for PR3048 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59167 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
67027a7bc35671bc3f6d5c109720060f06303391 |
12-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
Fix a FIXME by improving a diagnostic, add a testcase for PR3048 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59167 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
a73e220722f6a7e30f2992a9830551f26b8be947 |
12-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
make TryFixInvalidVariablyModifiedType a static function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59163 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
1d353bae14855bfcfefa1df230d2e271d00ee919 |
12-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
make TryFixInvalidVariablyModifiedType a static function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59163 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
d03be6ef15906d1ed34cf9e4563c8579adba20ee |
12-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
Restructure code to encourage fallthrough, no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59157 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
57d5788b45b677463f3132410d6f530ae5a2cf87 |
12-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
Restructure code to encourage fallthrough, no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59157 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
2a88475a33920da7996f22d0f38a339f88b54b63 |
12-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
fix PR3048. I'm going to do some more work before closing it off and adding a testcase. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59156 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
3ab5543acfbaca11409c87efdc5154d7af21d47f |
12-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
fix PR3048. I'm going to do some more work before closing it off and adding a testcase. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59156 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
70d2612fd956d4d3aeac8b3abed8ef5e29c4b7a5 |
12-Nov-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement support for operator overloading using candidate operator functions for built-in operators, e.g., the builtin bool operator==(int const*, int const*) can be used for the expression "x1 == x2" given: struct X { operator int const*(); } x1, x2; The scheme for handling these built-in operators is relatively simple: for each candidate required by the standard, create a special kind of candidate function for the built-in. If overload resolution picks the built-in operator, we perform the appropriate conversions on the arguments and then let the normal built-in operator take care of it. There may be some optimization opportunity left: if we can reduce the number of built-in operator overloads we generate, overload resolution for these cases will go faster. However, one must be careful when doing this: GCC generates too few operator overloads in our little test program, and fails to compile it because none of the overloads it generates match. Note that we only support operator overload for non-member binary operators at the moment. The other operators will follow. As part of this change, ImplicitCastExpr can now be an lvalue. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59148 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaOverload.cpp
emaOverload.h
|
eb8f3063257a392f15aea48d42fb73ec51afc548 |
12-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Implement support for operator overloading using candidate operator functions for built-in operators, e.g., the builtin bool operator==(int const*, int const*) can be used for the expression "x1 == x2" given: struct X { operator int const*(); } x1, x2; The scheme for handling these built-in operators is relatively simple: for each candidate required by the standard, create a special kind of candidate function for the built-in. If overload resolution picks the built-in operator, we perform the appropriate conversions on the arguments and then let the normal built-in operator take care of it. There may be some optimization opportunity left: if we can reduce the number of built-in operator overloads we generate, overload resolution for these cases will go faster. However, one must be careful when doing this: GCC generates too few operator overloads in our little test program, and fails to compile it because none of the overloads it generates match. Note that we only support operator overload for non-member binary operators at the moment. The other operators will follow. As part of this change, ImplicitCastExpr can now be an lvalue. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59148 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaOverload.cpp
emaOverload.h
|
0cb7c87eb879a2a3f79426d34c678b07c04c1d8c |
11-Nov-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Introduce a single AST node SizeOfAlignOfExpr for all sizeof and alignof expressions, both of values and types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59057 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaExpr.cpp
|
0518999d3adcc289997bd974dce90cc97f5c1c44 |
11-Nov-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Introduce a single AST node SizeOfAlignOfExpr for all sizeof and alignof expressions, both of values and types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59057 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaExpr.cpp
|
b93b49c760fcb5dda81f42e80d84e2fb1e88e54b |
11-Nov-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implement C++ 'typeid' parsing and sema. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59042 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
dentifierResolver.h
ema.cpp
ema.h
emaDecl.cpp
emaExprCXX.cpp
|
c42e1183846228a7fa5143ad76507d6d60f5c6f3 |
11-Nov-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implement C++ 'typeid' parsing and sema. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59042 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
dentifierResolver.h
ema.cpp
ema.h
emaDecl.cpp
emaExprCXX.cpp
|
e0ee727d1691b60447321408e6fce2b00df13f7d |
11-Nov-2008 |
Daniel Dunbar <daniel@zuster.org> |
Fix cmake build, patch from Jjgod Jiang. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59036 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
|
f1d93600000bb516cdd499905f699b289fd73ada |
11-Nov-2008 |
Daniel Dunbar <daniel@zuster.org> |
Fix cmake build, patch from Jjgod Jiang. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59036 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
|
cd61d5956afb6505f91fc1240d2e3cd6cfc59fae |
11-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
Fix PR3031 by silencing follow-on errors in invalid declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59027 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
1f6f54be86a514d531ec231fd837858a43cfe72e |
11-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
Fix PR3031 by silencing follow-on errors in invalid declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59027 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
45014fd2d7e50079dc092df04fec9af7ea0cb0e0 |
10-Nov-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Basic support for taking the address of an overloaded function git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59000 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaOverload.cpp
|
904eed3f6148758d39a2d3c88f3133274460d645 |
10-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Basic support for taking the address of an overloaded function git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59000 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaOverload.cpp
|
2c30c296c300e4d5d2a0d530b82fba71dc8f05a0 |
10-Nov-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Remove an out-of-date FIXME git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58990 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
25e70871412a48466673d695fd7ed591231e23f0 |
10-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Remove an out-of-date FIXME git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58990 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
e6985fea0229f7e85e508da7b7c2deb9b7744bce |
10-Nov-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Allow user-defined conversions during reference binding git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58988 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
cb9b977d5989efc1e5bc7684091912ca2915aacb |
10-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Allow user-defined conversions during reference binding git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58988 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
bd19fdbcabc465056b644ec35a0ea6e6f785e6be |
10-Nov-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Don't create a typedef for the injected-class-name git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58987 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
55c60954c273c225777276cbd9db477939c6f073 |
10-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Don't create a typedef for the injected-class-name git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58987 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
9c6210b86c24a722970568f19abb8250814e9b02 |
10-Nov-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Some cleanups to the declaration/checking of overloaded operators in C++. Thanks to Sebastian for the review git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58986 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
02bcd4cd1a19121da12884aa4943226f72a81e6c |
10-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Some cleanups to the declaration/checking of overloaded operators in C++. Thanks to Sebastian for the review git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58986 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
881964bc7876c335a821293d9a05e21e360ac320 |
10-Nov-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Introduce ScopedDecl::getLexicalDeclContext() which is different from ScopedDecl::getDeclContext() when there are nested-names. e.g.: namespace A { void f(); // SemanticDC (getDeclContext) == LexicalDC (getLexicalDeclContext) == 'namespace A' } void A::f(); // SemanticDC == namespace 'A' // LexicalDC == global namespace git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58948 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
5239304ff761b8b03eefb772bd5d830a9b9f1aea |
10-Nov-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Introduce ScopedDecl::getLexicalDeclContext() which is different from ScopedDecl::getDeclContext() when there are nested-names. e.g.: namespace A { void f(); // SemanticDC (getDeclContext) == LexicalDC (getLexicalDeclContext) == 'namespace A' } void A::f(); // SemanticDC == namespace 'A' // LexicalDC == global namespace git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58948 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
5ce4db86c448f1144785d4cd7c54104ba8f08b53 |
09-Nov-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
When a tag has nested-name ('struct foo::bar'), use not 'CurContext' but the context of the nested-name ('foo::'). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58945 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
0f84a23cc542a76f97aee735cdf3ff948b149879 |
09-Nov-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
When a tag has nested-name ('struct foo::bar'), use not 'CurContext' but the context of the nested-name ('foo::'). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58945 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
70b5413a0472233ee351106b048f1cdf0d41631c |
09-Nov-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Simplify handling of nested-names in tags ('struct foo::bar'). -Use more of the non nested-name code path. -Also use the ActOnTagStruct code path. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58944 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
630c81b78a6a469707e2940a421da874f3b12643 |
09-Nov-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Simplify handling of nested-names in tags ('struct foo::bar'). -Use more of the non nested-name code path. -Also use the ActOnTagStruct code path. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58944 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
054a2638e71d2633851f262749de76808224ae6e |
08-Nov-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Implement Sema support for C++ nested-name-specifiers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58916 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
|
ef6e647b8d3268a765c2c4dd7f8a73cad281a8e6 |
08-Nov-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Implement Sema support for C++ nested-name-specifiers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58916 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaCXXScopeSpec.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
|
311db8c9d95f110058b4ced9b89f09c42e1debc8 |
08-Nov-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Implement support for C++ nested-name-specifiers ('foo::bar::x') in the Parser side. No Sema functionality change, just the signatures of the Action/Sema methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58913 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
|
eb83ecde1a822b1c38cd060a85a08c1ac9f82cf8 |
08-Nov-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Implement support for C++ nested-name-specifiers ('foo::bar::x') in the Parser side. No Sema functionality change, just the signatures of the Action/Sema methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58913 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
|
f831eebb27fa149310fffdf86f0e8360c7fb477b |
08-Nov-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Move named cast helpers out of Sema, as Chris requested. This requirse making a few functions public that weren't before. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58906 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaNamedCast.cpp
|
37d6de37498017ba3b24f8b31fff392e35b7ca72 |
08-Nov-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Move named cast helpers out of Sema, as Chris requested. This requirse making a few functions public that weren't before. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58906 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaNamedCast.cpp
|
0528e1c81fe7c67a0245ba86a9e9d70162475c62 |
08-Nov-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Greatly improve static_cast diagnostics git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58873 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaNamedCast.cpp
|
e3dc28a32a61960bdef59f79d0da161c72a5c88a |
08-Nov-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Greatly improve static_cast diagnostics git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58873 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaNamedCast.cpp
|
60714f9884cc7f3a8dc7e4b3d0ecbcb32d60fecb |
07-Nov-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Initial, partially-baked support for implicit user-defined conversions by conversion functions git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58870 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaOverload.cpp
emaOverload.h
|
f1991eab1e777634fb38758eafbbe0d303271d2f |
07-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Initial, partially-baked support for implicit user-defined conversions by conversion functions git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58870 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaOverload.cpp
emaOverload.h
|
c9e909c35b3c0610930fb5fb07a66d768dc6dc61 |
07-Nov-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Changes in preparation for nested-name-specifiers. -When parsing declarators, don't depend on "CurScope->isCXXClassScope() == true" for constructors/destructors -For C++ member declarations, don't depend on "Declarator.getContext() == Declarator::MemberContext" git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58866 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
c7ed9c60b8ee04b119e23441cae2cfec74536ba9 |
07-Nov-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Changes in preparation for nested-name-specifiers. -When parsing declarators, don't depend on "CurScope->isCXXClassScope() == true" for constructors/destructors -For C++ member declarations, don't depend on "Declarator.getContext() == Declarator::MemberContext" git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58866 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
3ef6c9794a79271d00bfcd941974602fcd2f9c48 |
07-Nov-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Parsing, ASTs, and semantic analysis for the declaration of conversion functions in C++, e.g., struct X { operator bool() const; }; Note that these conversions don't actually do anything, since we don't yet have the ability to use them for implicit or explicit conversions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58860 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
2f1bc5285ccd40f411af5f5993f013e27e74ab78 |
07-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Parsing, ASTs, and semantic analysis for the declaration of conversion functions in C++, e.g., struct X { operator bool() const; }; Note that these conversions don't actually do anything, since we don't yet have the ability to use them for implicit or explicit conversions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58860 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
9c0e994d53a307e67653cbf47af5ca69616b1cd0 |
07-Nov-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Fix crash caused by this: void f() { int +; // crash here } git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58846 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
48c2e909741a7b67ead01143edabd7b3fe42ee50 |
07-Nov-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Fix crash caused by this: void f() { int +; // crash here } git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58846 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d7f915e74b3906e075d8fbd7b546f40fb6a39814 |
07-Nov-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Initial, rudimentary implementation of operator overloading for binary operators. For example, one can now write "x + y" where x or y is a class or enumeration type, and Clang will perform overload resolution for "+" based on the overloaded operators it finds. The other kinds of overloadable operators in C++ will follow this same approach. Three major issues remain: 1) We don't find member operators 2) Since we don't have user-defined conversion operators, we can't call any of the built-in overloaded operators in C++ [over.built]. 3) Once we've done the semantic checks, we drop the overloaded operator on the floor; it doesn't get into the AST at all. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58821 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
eaebc75ef6ff21fbc9f25ab4175cba465e4e0e43 |
07-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Initial, rudimentary implementation of operator overloading for binary operators. For example, one can now write "x + y" where x or y is a class or enumeration type, and Clang will perform overload resolution for "+" based on the overloaded operators it finds. The other kinds of overloadable operators in C++ will follow this same approach. Three major issues remain: 1) We don't find member operators 2) Since we don't have user-defined conversion operators, we can't call any of the built-in overloaded operators in C++ [over.built]. 3) Once we've done the semantic checks, we drop the overloaded operator on the floor; it doesn't get into the AST at all. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58821 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
e60e5d3eb3d09bde80882f60abc69e28ced874c6 |
06-Nov-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Parsing, ASTs, and semantic analysis for the declaration of overloaded operators in C++. Overloaded operators can be called directly via their operator-function-ids, e.g., "operator+(foo, bar)", but we don't yet implement the semantics of operator overloading to handle, e.g., "foo + bar". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58817 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
1cd1b1e987f5e2f060d7972b13d83239b36d77d6 |
06-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Parsing, ASTs, and semantic analysis for the declaration of overloaded operators in C++. Overloaded operators can be called directly via their operator-function-ids, e.g., "operator+(foo, bar)", but we don't yet implement the semantics of operator overloading to handle, e.g., "foo + bar". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58817 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
a1cf66a5674bc3fed6f595345c597466e07d2450 |
06-Nov-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Sema-check virtual declarations. Complete dynamic_cast checking. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58804 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaNamedCast.cpp
|
d93f0ddba0965ded252e228134b30ce30e863fb0 |
06-Nov-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Sema-check virtual declarations. Complete dynamic_cast checking. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58804 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaNamedCast.cpp
|
dbed59057d85c11c2629a516d5778778beb38b88 |
05-Nov-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Improve assert messages. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58770 91177308-0d34-0410-b5e6-96231b3b80d8
emaNamedCast.cpp
|
03a6cf96d8056f85803c395e938858086bedbb39 |
05-Nov-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Improve assert messages. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58770 91177308-0d34-0410-b5e6-96231b3b80d8
emaNamedCast.cpp
|
2b6b14c9ea8c00dab5a688e36b6450670463faa0 |
05-Nov-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Move named cast sema functions to their own file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58769 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaNamedCast.cpp
|
26d85b197257bfa15cd8b10dfef9e741e19c4fc5 |
05-Nov-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Move named cast sema functions to their own file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58769 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
emaNamedCast.cpp
|
8210a8e4f46bc955ed717609aba309b68c5924ab |
05-Nov-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Parsing, representation, and preliminary semantic analysis of destructors. Implicit declaration of destructors (when necessary). Extended Declarator to store information about parsed constructors and destructors; this will be extended to deal with declarators that name overloaded operators (e.g., "operator +") and user-defined conversion operators (e.g., "operator int"). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58767 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
42a552f8200ba5948661aee0106fce0c04e39818 |
05-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Parsing, representation, and preliminary semantic analysis of destructors. Implicit declaration of destructors (when necessary). Extended Declarator to store information about parsed constructors and destructors; this will be extended to deal with declarators that name overloaded operators (e.g., "operator +") and user-defined conversion operators (e.g., "operator int"). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58767 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
01285317aede615ee5af927003e24f60b1faffb2 |
05-Nov-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
A small error message improvement and some comment cleanup for static_cast. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58762 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
4e84935b299f2572601419692f1f2e84def685e7 |
05-Nov-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
A small error message improvement and some comment cleanup for static_cast. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58762 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
15e0462675c2725515466bb423157e652c135784 |
05-Nov-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Keep track of whether a C++ class is an aggregate. Don't allow initialization of non-aggregates with initializer lists. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58757 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
64bffa9a6f40e5a3d5556f994f09f7bf45eecd4c |
05-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Keep track of whether a C++ class is an aggregate. Don't allow initialization of non-aggregates with initializer lists. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58757 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
6428e76498e3f45d62934fe679df803b0cc1eaa5 |
05-Nov-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement C++ copy-initialization for declarations. There is now some duplication in the handling of copy-initialization by constructor, which occurs both for initialization of a declaration and for overloading. The initialization code is due for some refactoring. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58756 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
|
f03d7c7af2ca8555c513ba7667acffb667445ecd |
05-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Implement C++ copy-initialization for declarations. There is now some duplication in the handling of copy-initialization by constructor, which occurs both for initialization of a declaration and for overloading. The initialization code is due for some refactoring. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58756 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
|
a65e8ddc1a3a8878ddce4b74f2fe276134602410 |
05-Nov-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Initial implementation of parsing, semantic analysis, and AST-building for constructor initializations, e.g., class A { }; class B : public A { int m; public: B() : A(), m(17) { }; }; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58749 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExprCXX.cpp
|
7ad8390f7992ab7f19b1460c5f0b9d96f165c4e9 |
05-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Initial implementation of parsing, semantic analysis, and AST-building for constructor initializations, e.g., class A { }; class B : public A { int m; public: B() : A(), m(17) { }; }; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58749 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExprCXX.cpp
|
0a6ab173022fd4812fd61c52de36c5fa85c67894 |
04-Nov-2008 |
Anders Carlsson <andersca@mac.com> |
Make it an error if an Objective-C declaration is not in the global scope. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58705 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
15281450f512b7d554858e4d17fca00bfc442a07 |
04-Nov-2008 |
Anders Carlsson <andersca@mac.com> |
Make it an error if an Objective-C declaration is not in the global scope. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58705 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
12aee8691f63779a7b241362078af35722c4c76d |
04-Nov-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Some cleanup of the cast checkers. Don't canonicalize types when not needed. Use distinct diagnostics for distinct errors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58700 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaExprCXX.cpp
emaOverload.cpp
|
f7be9448af88e0ebb204bdcebfc13f4cb2b9d8e1 |
04-Nov-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Some cleanup of the cast checkers. Don't canonicalize types when not needed. Use distinct diagnostics for distinct errors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58700 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaExprCXX.cpp
emaOverload.cpp
|
d860663a58f234b3936571178855e52f41377ba0 |
04-Nov-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Add a new expression class, ObjCSuperExpr, to handle the Objective-C 'super'. Remove ObjCThis from PredefinedExpr git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58698 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprObjC.cpp
|
cd9b46e5442a3ef17f83f75177d8545cb5b3e2b9 |
04-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Add a new expression class, ObjCSuperExpr, to handle the Objective-C 'super'. Remove ObjCThis from PredefinedExpr git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58698 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprObjC.cpp
|
a5b022ad90e26b786f0c3096e3312db2f6ee317b |
04-Nov-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Create a new expression class, CXXThisExpr, to handle the C++ 'this' primary expression. Remove CXXThis from PredefinedExpr git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58695 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExprCXX.cpp
|
796da18402f286b897782a298ae3b20c459c102e |
04-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Create a new expression class, CXXThisExpr, to handle the C++ 'this' primary expression. Remove CXXThis from PredefinedExpr git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58695 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExprCXX.cpp
|
58c428c96934a7873e70eadde8b496ff7f8d72ec |
04-Nov-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Now that we have copy initialization support, use it for checking the default arguments git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58692 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
eb704f22ef00a2b41ff1ccf1b20016d7cd4c5c85 |
04-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Now that we have copy initialization support, use it for checking the default arguments git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58692 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
3c24695274a68eaba955816377b350ae6dcd86cb |
04-Nov-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Diagnose use of 'this' in a C++ default argument. Thanks to Eli for correcting my bogus assertion about it already being handled git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58691 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
3996f23ac20de411e0b5931a451bd05142f0b712 |
04-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Diagnose use of 'this' in a C++ default argument. Thanks to Eli for correcting my bogus assertion about it already being handled git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58691 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
7f1412d98bd91fb090784f112d822bf7b9f367c3 |
04-Nov-2008 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6339636> clang ObjC rewriter: Assertion failed: FileID-1 < FileIDs.size() && "Invalid FileID!", file c:\cygwin\home\Administrator\llvm\tools\clang\include\clang/Basic/SourceManager.h, line 513 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58654 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b2f9e516327310d95840d442416084508f80c183 |
04-Nov-2008 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6339636> clang ObjC rewriter: Assertion failed: FileID-1 < FileIDs.size() && "Invalid FileID!", file c:\cygwin\home\Administrator\llvm\tools\clang\include\clang/Basic/SourceManager.h, line 513 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58654 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
3becfd849fc4632c2586597c9a474c9d89b6f57b |
03-Nov-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Check that this cannot be used in a default argument. Happily, it was already implemented git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58649 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
30c5436856b33e15387ec7a14bcd10c49236e340 |
03-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Check that this cannot be used in a default argument. Happily, it was already implemented git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58649 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
5870a95bc9b8a547b0ed253d6c51d20b8dcf4647 |
03-Nov-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Implicit support for direct initialization of objects of class type, e.g., X x(5, 7); git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58641 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaOverload.cpp
|
18fe56863be253a27b940022d27a3101778adaf6 |
03-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Implicit support for direct initialization of objects of class type, e.g., X x(5, 7); git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58641 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaOverload.cpp
|
a3b34bbd1f4066a423e890727c7898fc726df2d0 |
03-Nov-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Standard conversion sequences now have a CopyConstructor field, to cope with the case where a user-defined conversion is actually a copy construction, and therefore can be compared against other standard conversion sequences. While I called this a hack before, now I'm convinced that it's the right way to go. Compare overloads based on derived-to-base conversions that invoke copy constructors. Suppress user-defined conversions when attempting to call a user-defined conversion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58629 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExprCXX.cpp
emaOverload.cpp
emaOverload.h
|
225c41eb3e960fd2e1d1b547f0f19a278d608bc5 |
03-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Standard conversion sequences now have a CopyConstructor field, to cope with the case where a user-defined conversion is actually a copy construction, and therefore can be compared against other standard conversion sequences. While I called this a hack before, now I'm convinced that it's the right way to go. Compare overloads based on derived-to-base conversions that invoke copy constructors. Suppress user-defined conversions when attempting to call a user-defined conversion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58629 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExprCXX.cpp
emaOverload.cpp
emaOverload.h
|
e640ab64c642d17ed4eb13261d9455d7ae6a511e |
03-Nov-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Add implicitly-declared default and copy constructors to C++ classes, when appropriate. Conversions for class types now make use of copy constructors. I've replaced the egregious hack allowing class-to-class conversions with a slightly less egregious hack calling these conversions standard conversions (for overloading reasons). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58622 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExprCXX.cpp
emaOverload.cpp
|
396b7cd9f6b35d87d17ae03e9448b5c1f2184598 |
03-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Add implicitly-declared default and copy constructors to C++ classes, when appropriate. Conversions for class types now make use of copy constructors. I've replaced the egregious hack allowing class-to-class conversions with a slightly less egregious hack calling these conversions standard conversions (for overloading reasons). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58622 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExprCXX.cpp
emaOverload.cpp
|
b7b28a2e267fccb603a5a9c5e188d7d670a909b2 |
03-Nov-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement C++ DR 106 and C++ DR 540, both of which deal with reference-collapsing. Implement diagnostic for formation of a reference to cv void. Drop cv-qualifiers added to a reference type when the reference type comes from a typedef. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58612 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
f1f9b4e5c7fd087e78f2e387c01098d49d41e784 |
03-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Implement C++ DR 106 and C++ DR 540, both of which deal with reference-collapsing. Implement diagnostic for formation of a reference to cv void. Drop cv-qualifiers added to a reference type when the reference type comes from a typedef. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58612 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
8778974243c2b6bb9bc4b46efdc2f41e6bff4880 |
02-Nov-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Source ranges for named cast diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58570 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
|
d5a56f0e5d8f495a471fe739195f86756e22de48 |
02-Nov-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Source ranges for named cast diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58570 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
|
ccabf0868d9cb81bbc3037a8b3b400737401841d |
31-Oct-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Semantic checking of constructor declarations and classification of default/copy constructors git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58538 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
030ff0cdad79b9e0602e143e0669364d2bad8bd2 |
31-Oct-2008 |
Douglas Gregor <dgregor@apple.com> |
Semantic checking of constructor declarations and classification of default/copy constructors git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58538 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
b72e9da529fca5693b46ec2888a241f706d7dbcb |
31-Oct-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement basic support for converting constructors in user-defined conversions. Notes: - Overload resolution for converting constructors need to prohibit user-defined conversions (hence, the test isn't -verify safe yet). - We still use hacks for conversions from a class type to itself. This will be the case until we start implicitly declaring the appropriate special member functions. (That's next on my list) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58513 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExprCXX.cpp
emaOverload.cpp
emaOverload.h
|
60d62c29d260596454aaf4cb50cbc756ac08875e |
31-Oct-2008 |
Douglas Gregor <dgregor@apple.com> |
Implement basic support for converting constructors in user-defined conversions. Notes: - Overload resolution for converting constructors need to prohibit user-defined conversions (hence, the test isn't -verify safe yet). - We still use hacks for conversions from a class type to itself. This will be the case until we start implicitly declaring the appropriate special member functions. (That's next on my list) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58513 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExprCXX.cpp
emaOverload.cpp
emaOverload.h
|
9ac68aa262c6c829f6b4b82209172e4a8bf239b3 |
31-Oct-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implement semantic checking of static_cast and dynamic_cast. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58509 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
emaInherit.cpp
emaInherit.h
emaOverload.cpp
|
0777972d38a3125efed962b045704c30ae6965cf |
31-Oct-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implement semantic checking of static_cast and dynamic_cast. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58509 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
emaInherit.cpp
emaInherit.h
emaOverload.cpp
|
fa45143d9b070b5e0e76031dbba1fca99ecd06ab |
31-Oct-2008 |
Sanjiv Gupta <sanjiv.gupta@microchip.com> |
Made the mechanism of defining preprocessor defs for maxint, ptrdiff_t, wchar etc more generic. For some targets, long may not be equal to pointer size. For example: PIC16 has int as i16, ptr as i16 but long as i32. Also fixed a few build warnings in assert() functions in CFRefCount.cpp, CGDecl.cpp, SemaDeclCXX.cpp and ParseDeclCXX.cpp. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58501 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
31fc07df7f0fc89ebf83ca05a20b29de45a7598d |
31-Oct-2008 |
Sanjiv Gupta <sanjiv.gupta@microchip.com> |
Made the mechanism of defining preprocessor defs for maxint, ptrdiff_t, wchar etc more generic. For some targets, long may not be equal to pointer size. For example: PIC16 has int as i16, ptr as i16 but long as i32. Also fixed a few build warnings in assert() functions in CFRefCount.cpp, CGDecl.cpp, SemaDeclCXX.cpp and ParseDeclCXX.cpp. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58501 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
f15ac4bc132d609f1df92308612f3d2629bbd480 |
31-Oct-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Add support for parsing and representing C++ constructor declarations. Notes: - Constructors are never found by name lookup, so they'll never get pushed into any scope. Instead, they are stored as an OverloadedFunctionDecl in CXXRecordDecl for easy overloading. - There's a new action isCurrentClassName that determines whether an identifier is the name of the innermost class currently being defined; we use this to identify the declarator-id grammar rule that refers to a type-name. - MinimalAction does *not* support parsing constructors. - We now handle virtual and explicit function specifiers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58499 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
b48fe3812047e84164925c8938ce82be0624c40c |
31-Oct-2008 |
Douglas Gregor <dgregor@apple.com> |
Add support for parsing and representing C++ constructor declarations. Notes: - Constructors are never found by name lookup, so they'll never get pushed into any scope. Instead, they are stored as an OverloadedFunctionDecl in CXXRecordDecl for easy overloading. - There's a new action isCurrentClassName that determines whether an identifier is the name of the innermost class currently being defined; we use this to identify the declarator-id grammar rule that refers to a type-name. - MinimalAction does *not* support parsing constructors. - We now handle virtual and explicit function specifiers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58499 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
b3dff48583b88eec32808e5387dff25e2d3fb3c0 |
30-Oct-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve documentation for Sema::CheckReferenceInit git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58404 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
3205a7821dc5bb33a9cc4f51a500bc4e79ac967e |
30-Oct-2008 |
Douglas Gregor <dgregor@apple.com> |
Improve documentation for Sema::CheckReferenceInit git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58404 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
56da786ac47077ff62a90b3b54bf97f40bec690b |
29-Oct-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Simplify and correct the check for function redefinitions. This does two things: - Allows definitions of overloaded functions :) - Eliminates extraneous error messages when we have a definition of a function that isn't an overload but doesn't have exactly the same type as the original. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58382 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
6fc17ff5bf73c4d190517ebc5773f2ae557598ab |
29-Oct-2008 |
Douglas Gregor <dgregor@apple.com> |
Simplify and correct the check for function redefinitions. This does two things: - Allows definitions of overloaded functions :) - Eliminates extraneous error messages when we have a definition of a function that isn't an overload but doesn't have exactly the same type as the original. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58382 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
0e34338c5f9fcca0dfeca55db0f199122b6c78fc |
29-Oct-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement overloading rules for reference binding git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58381 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaOverload.cpp
emaOverload.h
|
f70bdb9463a6e3ea2c6307b2c7a5f3e2c6b7e489 |
29-Oct-2008 |
Douglas Gregor <dgregor@apple.com> |
Implement overloading rules for reference binding git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58381 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaOverload.cpp
emaOverload.h
|
c0d11a892eb4c449d1a51350a439cc1a8a33177c |
29-Oct-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Temporary disable the const-object-declaration-without-initializer check, because it depends on linkage-specifier semantics we don't yet have git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58377 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
818ce488beec3935623a25bfa0026d67e182d6d6 |
29-Oct-2008 |
Douglas Gregor <dgregor@apple.com> |
Temporary disable the const-object-declaration-without-initializer check, because it depends on linkage-specifier semantics we don't yet have git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58377 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
2aecd1ffad6dde4044d23ead1e5a4d8ecd68100d |
29-Oct-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Tweak Sema::CheckReferenceInit so that it (optionally) computes an ImplicitConversionSequence and, when doing so, following the specific rules of [over.best.ics]. The computation of the implicit conversion sequences implements C++ [over.ics.ref], but we do not (yet) have ranking for implicit conversion sequences that use reference binding. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58357 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExpr.cpp
emaOverload.cpp
emaOverload.h
|
15da57e66cade0c2cab752f925e838b22daadafc |
29-Oct-2008 |
Douglas Gregor <dgregor@apple.com> |
Tweak Sema::CheckReferenceInit so that it (optionally) computes an ImplicitConversionSequence and, when doing so, following the specific rules of [over.best.ics]. The computation of the implicit conversion sequences implements C++ [over.ics.ref], but we do not (yet) have ranking for implicit conversion sequences that use reference binding. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58357 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaExpr.cpp
emaOverload.cpp
emaOverload.h
|
81c29157dcb112ce5f1ccb9df4a431d3070a99a8 |
29-Oct-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement initialization of a reference (C++ [dcl.init.ref]) as part of copy initialization. Other pieces of the puzzle: - Try/Perform-ImplicitConversion now handles implicit conversions that don't involve references. - Try/Perform-CopyInitialization uses CheckSingleAssignmentConstraints for C. PerformCopyInitialization is now used for all argument passing and returning values from a function. - Diagnose errors with declaring references and const values without an initializer. (Uses a new Action callback, ActOnUninitializedDecl). We do not yet have implicit conversion sequences for reference binding, which means that we don't have any overloading support for reference parameters yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58353 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInherit.cpp
emaOverload.cpp
emaStmt.cpp
|
27c8dc06f65d7abcf6a7e7f64a7960c9a150ca01 |
29-Oct-2008 |
Douglas Gregor <dgregor@apple.com> |
Implement initialization of a reference (C++ [dcl.init.ref]) as part of copy initialization. Other pieces of the puzzle: - Try/Perform-ImplicitConversion now handles implicit conversions that don't involve references. - Try/Perform-CopyInitialization uses CheckSingleAssignmentConstraints for C. PerformCopyInitialization is now used for all argument passing and returning values from a function. - Diagnose errors with declaring references and const values without an initializer. (Uses a new Action callback, ActOnUninitializedDecl). We do not yet have implicit conversion sequences for reference binding, which means that we don't have any overloading support for reference parameters yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58353 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
emaInherit.cpp
emaOverload.cpp
emaStmt.cpp
|
035d088fb41d691b08924635995c66d09a126f81 |
28-Oct-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Rename ExplicitCCastExpr to CStyleCastExpr git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58331 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDecl.cpp
emaExpr.cpp
|
6eec8e883de118b431e3ead5b1e604a6ac68ff6b |
28-Oct-2008 |
Douglas Gregor <dgregor@apple.com> |
Rename ExplicitCCastExpr to CStyleCastExpr git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58331 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDecl.cpp
emaExpr.cpp
|
0d5d89d173f87b74a7f539c51f417de0f5435fb3 |
28-Oct-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Improve our handling of (C++) references within Clang. Specifically: - Do not allow expressions to ever have reference type - Extend Expr::isLvalue to handle more cases where having written a reference into the source implies that the expression is an lvalue (e.g., function calls, C++ casts). - Make GRExprEngine::VisitCall treat the call arguments as lvalues when they are being bound to a reference parameter. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58306 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
emaExprCXX.cpp
|
9d293dfc0ad7c44ae0b5eb9517f1ed8c8d8b7ff7 |
28-Oct-2008 |
Douglas Gregor <dgregor@apple.com> |
Improve our handling of (C++) references within Clang. Specifically: - Do not allow expressions to ever have reference type - Extend Expr::isLvalue to handle more cases where having written a reference into the source implies that the expression is an lvalue (e.g., function calls, C++ casts). - Make GRExprEngine::VisitCall treat the call arguments as lvalues when they are being bound to a reference parameter. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58306 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
emaExprCXX.cpp
|
0a2da71034fea55ee786387314eae704b91e2f9b |
28-Oct-2008 |
Daniel Dunbar <daniel@zuster.org> |
Add attribute always_inline support. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58304 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
af668b0e7d3581dea3b4f29a9262686e83887e5b |
28-Oct-2008 |
Daniel Dunbar <daniel@zuster.org> |
Add attribute always_inline support. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58304 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
ac6372a40237fcd22dd436b52022715955838dcf |
27-Oct-2008 |
Daniel Dunbar <daniel@zuster.org> |
Comment fix, ParseAST does not take ownership of the consumer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58281 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
|
d6a1c5daec1ff7152f0e3ced8a461e0dc6793dfa |
27-Oct-2008 |
Daniel Dunbar <daniel@zuster.org> |
Comment fix, ParseAST does not take ownership of the consumer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58281 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
|
21a04f33b3e9024aadbebbef24eadf49ed0cbaf1 |
27-Oct-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Refactor the expression class hierarchy for casts. Most importantly: - CastExpr is the root of all casts - ImplicitCastExpr is (still) used for all explicit casts - ExplicitCastExpr is now the root of all *explicit* casts - ExplicitCCastExpr (new name needed!?) is a C-style cast in C or C++ - CXXFunctionalCastExpr inherits from ExplicitCastExpr - CXXNamedCastExpr inherits from ExplicitCastExpr and is the root of all of the C++ named cast expression types (static_cast, dynamic_cast, etc.) - Added classes CXXStaticCastExpr, CXXDynamicCastExpr, CXXReinterpretCastExpr, and CXXConstCastExpr to Also, fixed returned-stack-addr.cpp, which broke once when we fixed reinterpret_cast to diagnose double->int* conversions and again when we eliminated implicit conversions to reference types. The fix is in both testcase and SemaChecking.cpp. Most of this patch is simply support for the renaming. There's very little actual change in semantics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58264 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
emaDecl.cpp
emaExpr.cpp
emaExprCXX.cpp
|
49badde06e066d058d6c7fcf4e628a72999b65a9 |
27-Oct-2008 |
Douglas Gregor <dgregor@apple.com> |
Refactor the expression class hierarchy for casts. Most importantly: - CastExpr is the root of all casts - ImplicitCastExpr is (still) used for all explicit casts - ExplicitCastExpr is now the root of all *explicit* casts - ExplicitCCastExpr (new name needed!?) is a C-style cast in C or C++ - CXXFunctionalCastExpr inherits from ExplicitCastExpr - CXXNamedCastExpr inherits from ExplicitCastExpr and is the root of all of the C++ named cast expression types (static_cast, dynamic_cast, etc.) - Added classes CXXStaticCastExpr, CXXDynamicCastExpr, CXXReinterpretCastExpr, and CXXConstCastExpr to Also, fixed returned-stack-addr.cpp, which broke once when we fixed reinterpret_cast to diagnose double->int* conversions and again when we eliminated implicit conversions to reference types. The fix is in both testcase and SemaChecking.cpp. Most of this patch is simply support for the renaming. There's very little actual change in semantics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58264 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
emaDecl.cpp
emaExpr.cpp
emaExprCXX.cpp
|
fc08f5ec2a57e348b5a34e0f0203f150919a059d |
27-Oct-2008 |
Steve Naroff <snaroff@apple.com> |
Replace common diagnostic with a convenience function. This simplifies debug of this particular diagnostic (and removes some code clutter). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58242 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
6594a701dc5da3a84573ed0a02b8d13593b8cf92 |
27-Oct-2008 |
Steve Naroff <snaroff@apple.com> |
Replace common diagnostic with a convenience function. This simplifies debug of this particular diagnostic (and removes some code clutter). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58242 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
3d081ae71df853a9d906de845b925c0c809ad383 |
27-Oct-2008 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6315646> clang on xcode: error: invalid operands to binary expression ('id<NSTableViewDelegate>' and 'XCExtendedArrayController *'). There is still a bug here (as the FIXME in the test case indicates). Prior to this patch, the bug would generate an error. Now, we simply do nothing (which is less harmful until we can get it right). The complete bug fix will require changing ASTContext::mergeTypes(), which I'd like to defer for now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58241 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
a5ad8631c963c5d76df18830ac1c226b415903cf |
27-Oct-2008 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6315646> clang on xcode: error: invalid operands to binary expression ('id<NSTableViewDelegate>' and 'XCExtendedArrayController *'). There is still a bug here (as the FIXME in the test case indicates). Prior to this patch, the bug would generate an error. Now, we simply do nothing (which is less harmful until we can get it right). The complete bug fix will require changing ASTContext::mergeTypes(), which I'd like to defer for now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58241 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
71ca8c805be13bcbd3b95f2452f6a75fe442e2e4 |
27-Oct-2008 |
Chris Lattner <sabre@nondot.org> |
Remember whether an initlist had a designator in the AST. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58218 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaInit.cpp
|
418f6c7d142e5ff4607f70cd8431d008442bafe9 |
27-Oct-2008 |
Chris Lattner <sabre@nondot.org> |
Remember whether an initlist had a designator in the AST. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58218 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaInit.cpp
|
ce236e7048fef8339d64e68b5729bbeaff4c0543 |
27-Oct-2008 |
Chris Lattner <sabre@nondot.org> |
pass designators into sema. This completes parser-level designator support as far as I know. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58217 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
220ad7c8d1adc23799e480faf189332f1eb032e6 |
27-Oct-2008 |
Chris Lattner <sabre@nondot.org> |
pass designators into sema. This completes parser-level designator support as far as I know. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58217 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
65b99647ba0ef8d52e01f14eb9a9e9e6ca2b0be6 |
26-Oct-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Don't give a default argument to ASTContext::getFunctionType for the TypeQuals parameter, it causes subtle bugs where TypeQuals, while necessary, are omitted from the call. -Remove the default argument. -Update all call sites of ASTContext::getFunctionType. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58187 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaType.cpp
|
7fb5e4888221cd36652d078c6b171ac55e7f406d |
26-Oct-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Don't give a default argument to ASTContext::getFunctionType for the TypeQuals parameter, it causes subtle bugs where TypeQuals, while necessary, are omitted from the call. -Remove the default argument. -Update all call sites of ASTContext::getFunctionType. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58187 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaType.cpp
|
c03d2ca68a37b5a33fffd5d1a30c28337bfce31f |
26-Oct-2008 |
Oscar Fuentes <ofv@wanadoo.es> |
CMake: Builds and installs clang binary and libs (no docs yet). It must be under the `tools' subdirectory of the LLVM *source* tree. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58180 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
|
d2f4e5ea6e980e48c292f5ca250e99377e3ee111 |
26-Oct-2008 |
Oscar Fuentes <ofv@wanadoo.es> |
CMake: Builds and installs clang binary and libs (no docs yet). It must be under the `tools' subdirectory of the LLVM *source* tree. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58180 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
|
4b269b4f8fe1509a5d9a92bc02b1b8b503fcd2fd |
24-Oct-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
-Add support for cv-qualifiers after function declarators. -Add withConst/withVolatile/withRestrict methods to QualType class, that return the QualType plus the respective qualifier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58120 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
emaType.cpp
|
971c4fae6092976338b755af1d47dac07c8f16e3 |
24-Oct-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
-Add support for cv-qualifiers after function declarators. -Add withConst/withVolatile/withRestrict methods to QualType class, that return the QualType plus the respective qualifier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58120 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
emaType.cpp
|
ba3e8b753a3e2262877f0f10c2977be51aef7c65 |
24-Oct-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
PR2942: FunctionDecls by typedef crash the C++ front-end git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58100 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
6cbd3df095ab92e0637265e88fe9c093135cdb03 |
24-Oct-2008 |
Douglas Gregor <dgregor@apple.com> |
PR2942: FunctionDecls by typedef crash the C++ front-end git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58100 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
651d1cc9615e814b8173c9edf045984e0d198365 |
24-Oct-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Some cleanups for the ambiguous derived-to-base conversion checks git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58096 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
emaInherit.cpp
emaOverload.cpp
|
0575d4ab561b4b2905c6ef614a7f7a87be26e64f |
24-Oct-2008 |
Douglas Gregor <dgregor@apple.com> |
Some cleanups for the ambiguous derived-to-base conversion checks git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58096 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
emaInherit.cpp
emaOverload.cpp
|
f8e927072b3546982af4f01dad1354bf67715221 |
24-Oct-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Semantic analysis for C++ reinterpret_cast and const_cast. Patch by Sebastian Redl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58094 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaExpr.cpp
emaExprCXX.cpp
emaType.cpp
|
2f639b9f3c6b081f076d2ac6d75115ce44bfa249 |
24-Oct-2008 |
Douglas Gregor <dgregor@apple.com> |
Semantic analysis for C++ reinterpret_cast and const_cast. Patch by Sebastian Redl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58094 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaExpr.cpp
emaExprCXX.cpp
emaType.cpp
|
bb461503b115af248f3b13735d6936e0a436fdf0 |
24-Oct-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
First non-embarrassing cut at checking for ambiguous derived-to-base conversions. Added PerformImplicitConversion, which follows an implicit conversion sequence computed by TryCopyInitialization and actually performs the implicit conversions, including the extra check for ambiguity mentioned above. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58071 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprCXX.cpp
emaInherit.cpp
emaInherit.h
emaOverload.cpp
|
94b1dd2368dc9eeedf2794db654deae225fac763 |
24-Oct-2008 |
Douglas Gregor <dgregor@apple.com> |
First non-embarrassing cut at checking for ambiguous derived-to-base conversions. Added PerformImplicitConversion, which follows an implicit conversion sequence computed by TryCopyInitialization and actually performs the implicit conversions, including the extra check for ambiguity mentioned above. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58071 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprCXX.cpp
emaInherit.cpp
emaInherit.h
emaOverload.cpp
|
11c5f826332b0b930f0e969a565aefe1d1fbbb33 |
24-Oct-2008 |
Daniel Dunbar <daniel@zuster.org> |
Fix regression in comparison of qualified id; == operator was being created with LHS and RHS whose types didn't match. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58049 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
c6cb77f1e5c4455edfa9c96bf5a8ef463d4c8d54 |
24-Oct-2008 |
Daniel Dunbar <daniel@zuster.org> |
Fix regression in comparison of qualified id; == operator was being created with LHS and RHS whose types didn't match. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58049 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
4fd8590cbf5384f935b3e1bae8dfe1f97715dae9 |
23-Oct-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Clean up and document the representation of C++ base classes git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58040 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaInherit.cpp
|
57c856b96e6bbfc64c2d61b950b116b523dc3e46 |
23-Oct-2008 |
Douglas Gregor <dgregor@apple.com> |
Clean up and document the representation of C++ base classes git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58040 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaInherit.cpp
|
140465012c37bf87fd8c6ee583ae184abe6043ec |
23-Oct-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Add support for conversions from a pointer-to-derived to a pointer-to-base. Also, add overload ranking for pointer conversions (for both pointer-to-void and derived-to-base pointer conversions). Note that we do not yet diagnose derived-to-base pointer conversion errors that stem from ambiguous or inacessible base classes. These aren't handled during overload resolution; rather, when the conversion is actually used we go ahead and diagnose the error. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58017 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaInherit.cpp
emaOverload.cpp
emaOverload.h
|
bc0805a6ca84e3c38a08c9f47441e138945244d4 |
23-Oct-2008 |
Douglas Gregor <dgregor@apple.com> |
Add support for conversions from a pointer-to-derived to a pointer-to-base. Also, add overload ranking for pointer conversions (for both pointer-to-void and derived-to-base pointer conversions). Note that we do not yet diagnose derived-to-base pointer conversion errors that stem from ambiguous or inacessible base classes. These aren't handled during overload resolution; rather, when the conversion is actually used we go ahead and diagnose the error. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58017 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaInherit.cpp
emaOverload.cpp
emaOverload.h
|
81a5febf1ce9fea63f7ca38cf523daa3694ecfbc |
23-Oct-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Restrict creation of OverloadedFunctionDecl only to C++ (it was getting used for invalid redeclarations on C). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58008 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f1af6a70c3060f7eda67da0bfe10f57966fd8073 |
23-Oct-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Restrict creation of OverloadedFunctionDecl only to C++ (it was getting used for invalid redeclarations on C). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58008 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
792800dd2efd6b39493b40bf0b79a303d6c203c7 |
23-Oct-2008 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6311947> clang on xcode (regression): error: use of undeclared identifier 'expandedValue'. Mea culpa: I introduced this regresson in the following 2 commits: r57529 (10/14), r57841 (10/20). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58007 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
8970feab05b96f640a554a309e06d99478ef05fe |
23-Oct-2008 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6311947> clang on xcode (regression): error: use of undeclared identifier 'expandedValue'. Mea culpa: I introduced this regresson in the following 2 commits: r57529 (10/14), r57841 (10/20). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58007 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
0590402476a996b3c2081fd197b0e2055e387c23 |
22-Oct-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Added GraphViz visualization of C++ inheritance hierarchies. Factored the QualTypeOrdering predicate into its own header (TypeOrdering.h), now that it is used in two places. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58001 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
0218936235b137bbdcd29a6c36d61d9215bb4edd |
22-Oct-2008 |
Douglas Gregor <dgregor@apple.com> |
Added GraphViz visualization of C++ inheritance hierarchies. Factored the QualTypeOrdering predicate into its own header (TypeOrdering.h), now that it is used in two places. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58001 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
b9b4beb41723ad1316662bfc9078f387c541f1f9 |
22-Oct-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Now that DeclRefExpr accepts a NamedDecl, use a DeclRefExpr for when a CXXFieldDecl is referenced inside a method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58000 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
90b7bc67518a408d397f2400ff6c40e5465b45e4 |
22-Oct-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Now that DeclRefExpr accepts a NamedDecl, use a DeclRefExpr for when a CXXFieldDecl is referenced inside a method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58000 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
04151f37cdf6a57014bad2812c28734dfb6ef73e |
22-Oct-2008 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6257675> error: member reference base type ('NSUserDefaults *') is not a structure or union. Teach Sema::ActOnMemberReferenceExpr() to look through local category implementations associated with the class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57995 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
7692ed61098c216ca7d3ce9be744311e8eee90e4 |
22-Oct-2008 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6257675> error: member reference base type ('NSUserDefaults *') is not a structure or union. Teach Sema::ActOnMemberReferenceExpr() to look through local category implementations associated with the class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57995 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
abed217d6877aebfd733754adab35d83996b2135 |
22-Oct-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Add representation of base classes in the AST, and verify that we don't have duplicated direct base classes. Seriliazation of base class specifiers is not yet implemented. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57991 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaOverload.cpp
|
f8268ae3196002bbab6adb830302e79b0f368f13 |
22-Oct-2008 |
Douglas Gregor <dgregor@apple.com> |
Add representation of base classes in the AST, and verify that we don't have duplicated direct base classes. Seriliazation of base class specifiers is not yet implemented. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57991 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
emaOverload.cpp
|
4459bbe1ad110c100d74af8c74fdc82d87317dfe |
22-Oct-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
QualType::isMoreQualifiedThan and isAtLeastAsQualifiedAs assert that we aren't trying to compare with address-space qualifiers (for now). Clean up handing of DeclRefExprs in Expr::isLvalue and refactor part of the check into a static DeclCanBeLvalue. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57980 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
ba7e210a999275695f58be03ef402758cfec3635 |
22-Oct-2008 |
Douglas Gregor <dgregor@apple.com> |
QualType::isMoreQualifiedThan and isAtLeastAsQualifiedAs assert that we aren't trying to compare with address-space qualifiers (for now). Clean up handing of DeclRefExprs in Expr::isLvalue and refactor part of the check into a static DeclCanBeLvalue. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57980 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
ccc0ccc830de5cce4e48665dc7d8525e4fff767f |
22-Oct-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Implement ranking of standard conversion sequences by their qualification conversions (e.g., comparing int* -> const int* against int* -> const volatile int*); see C++ 13.3.3.2p3 bullet 3. Add Sema::UnwrapSimilarPointerTypes to simplify the control flow of IsQualificationConversion and CompareQualificationConversion (and fix the handling of the int* -> volatile int* conversion in the former). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57978 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaOverload.cpp
emaOverload.h
emaType.cpp
|
57373266011f73418381b736015d8d2bb0381176 |
22-Oct-2008 |
Douglas Gregor <dgregor@apple.com> |
Implement ranking of standard conversion sequences by their qualification conversions (e.g., comparing int* -> const int* against int* -> const volatile int*); see C++ 13.3.3.2p3 bullet 3. Add Sema::UnwrapSimilarPointerTypes to simplify the control flow of IsQualificationConversion and CompareQualificationConversion (and fix the handling of the int* -> volatile int* conversion in the former). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57978 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaOverload.cpp
emaOverload.h
emaType.cpp
|
3fb675ab045253ffe2f1b333e9f8e746b50abeb4 |
22-Oct-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Move Sema::GetNonReferenceType to QualType::getNonReferenceType and make it inline git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57951 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaType.cpp
|
e0a5d5fe8eab573f7764bf6d2ddb02bee8dceaf9 |
22-Oct-2008 |
Douglas Gregor <dgregor@apple.com> |
Move Sema::GetNonReferenceType to QualType::getNonReferenceType and make it inline git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57951 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaType.cpp
|
e5db4f7d7b6dc33259ee0248d73dd3794cd0a841 |
22-Oct-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Fix a thinko in the qualification-conversion check when the qualificaitons are disjoint, and add some overloading-based tests of qualification conversions git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57942 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
9b6e2d209cc2931a9bb2ae51e744a8698b54db73 |
22-Oct-2008 |
Douglas Gregor <dgregor@apple.com> |
Fix a thinko in the qualification-conversion check when the qualificaitons are disjoint, and add some overloading-based tests of qualification conversions git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57942 91177308-0d34-0410-b5e6-96231b3b80d8
emaOverload.cpp
|
6573cfd6fc32eab0b696cfc318bb21f4e3933f35 |
22-Oct-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Initial step toward supporting qualification conversions (C++ 4.4). Changes: - Sema::IsQualificationConversion determines whether we have a qualification conversion. - Sema::CheckSingleAssignment constraints now follows the C++ rules in C++, performing an implicit conversion from the right-hand side to the type of the left-hand side rather than checking based on the C notion of "compatibility". We now rely on the implicit-conversion code to determine whether the conversion can happen or not. Sema::TryCopyInitialization has an ugly reference-related hack to cope with the initialization of references, for now. - When building DeclRefExprs, strip away the reference type, since there are no expressions whose type is a reference. We'll need to do this throughout Sema. - Expr::isLvalue now permits functions to be lvalues in C++ (but not in C). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57935 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaOverload.cpp
emaType.cpp
|
98cd599ee8a9b259ed7388ee2921a20d97658864 |
22-Oct-2008 |
Douglas Gregor <dgregor@apple.com> |
Initial step toward supporting qualification conversions (C++ 4.4). Changes: - Sema::IsQualificationConversion determines whether we have a qualification conversion. - Sema::CheckSingleAssignment constraints now follows the C++ rules in C++, performing an implicit conversion from the right-hand side to the type of the left-hand side rather than checking based on the C notion of "compatibility". We now rely on the implicit-conversion code to determine whether the conversion can happen or not. Sema::TryCopyInitialization has an ugly reference-related hack to cope with the initialization of references, for now. - When building DeclRefExprs, strip away the reference type, since there are no expressions whose type is a reference. We'll need to do this throughout Sema. - Expr::isLvalue now permits functions to be lvalues in C++ (but not in C). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57935 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaOverload.cpp
emaType.cpp
|
612720db262d6f9694ac4b170b205b554bf36b7a |
21-Oct-2008 |
Daniel Dunbar <daniel@zuster.org> |
Fix use of dyn_cast. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57927 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
48d04ae529b023abe5ed825f52a9b96ce01d1496 |
21-Oct-2008 |
Daniel Dunbar <daniel@zuster.org> |
Fix use of dyn_cast. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57927 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
d2baafd07bc5c7679a6f1f10e5587a95842ffa15 |
21-Oct-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Preliminary support for function overloading git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57909 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaOverload.cpp
emaOverload.h
|
8e9bebdea69c590dedfbf27374114cb76fe12fbd |
21-Oct-2008 |
Douglas Gregor <dgregor@apple.com> |
Preliminary support for function overloading git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57909 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaOverload.cpp
emaOverload.h
|
ec7e088fccae6cfdd0e5d60f4a05fc477d350492 |
21-Oct-2008 |
Steve Naroff <snaroff@apple.com> |
Fix typo. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57899 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
6f5f41c501d5a4546809ec4a2d39245b66e60408 |
21-Oct-2008 |
Steve Naroff <snaroff@apple.com> |
Fix typo. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57899 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
b91afca45846dbec2adbadaa063108f5a1554ade |
21-Oct-2008 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6261178> clang-on-xcode: [sema] multiple method warning is over enthusiastic. Fix <rdar://problem/6265257> warnings for ambiguous message send swamp other warnings. Reworked Sema::MatchTwoMethodDeclarations() to optionally match based on method size and alignment (the default in GCC). Changed Sema::LookupInstanceMethodInGlobalPool() to use this feature. Added -Wno-struct-selector-match to driver, however didn't hook it up yet. Added a FIXME that says this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57898 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
fe6b0dc94a5279f33aba9a3bc0237c9841be3d43 |
21-Oct-2008 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6261178> clang-on-xcode: [sema] multiple method warning is over enthusiastic. Fix <rdar://problem/6265257> warnings for ambiguous message send swamp other warnings. Reworked Sema::MatchTwoMethodDeclarations() to optionally match based on method size and alignment (the default in GCC). Changed Sema::LookupInstanceMethodInGlobalPool() to use this feature. Added -Wno-struct-selector-match to driver, however didn't hook it up yet. Added a FIXME that says this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57898 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
d1d4440cb0a347795e7111a2f83a95cb0e4ec93c |
21-Oct-2008 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6268365> Parser rejects property (dot notation) access on id<protocol>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57850 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
18bc164e649bfc1909102e16d3d99836da65da4a |
21-Oct-2008 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6268365> Parser rejects property (dot notation) access on id<protocol>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57850 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
3b2ceeaf20c61c2442bbb77cc1da2e5d7a5967ef |
20-Oct-2008 |
Steve Naroff <snaroff@apple.com> |
Sema::CheckCompareOperands() and ASTContext::mergeTypes(): Change handling of ObjC qualified id types to be consistent with gcc. This changes a handful of test case errors into warnings (diff will tell you which cases have changed). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57841 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
87f3b93423062c343a35714517517a52cc9da4a5 |
20-Oct-2008 |
Steve Naroff <snaroff@apple.com> |
Sema::CheckCompareOperands() and ASTContext::mergeTypes(): Change handling of ObjC qualified id types to be consistent with gcc. This changes a handful of test case errors into warnings (diff will tell you which cases have changed). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57841 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b2ebd48fc5253fa67d29d789ce55d4a921c29bf1 |
20-Oct-2008 |
Chris Lattner <sabre@nondot.org> |
Fix rdar://6257721 by tightening up the block "snapshot" check, and move it to its own predicate to make it more clear. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57796 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
639e2d35d9881cefe167efa933e82ced3b0ed681 |
20-Oct-2008 |
Chris Lattner <sabre@nondot.org> |
Fix rdar://6257721 by tightening up the block "snapshot" check, and move it to its own predicate to make it more clear. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57796 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
cce4224fbf6b6977854816774af84e2540c1df86 |
20-Oct-2008 |
Chris Lattner <sabre@nondot.org> |
fix indentation git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57789 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
097e916b617bb4a069a03764024c310ed42a6424 |
20-Oct-2008 |
Chris Lattner <sabre@nondot.org> |
fix indentation git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57789 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
0ea2047f63f1a9bd302465122254885f98c461b3 |
19-Oct-2008 |
Daniel Dunbar <daniel@zuster.org> |
Improve attribute parsing & tests. - Support noreturn on function-typed variables. - Extend isFunctionOrMethod to return true for K&R functions and provide hasFunctionProto to check if a decl has information about its arguments. This code needs some serious cleaning, but works. - Add/improve test cases for noreturn and unused. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57778 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
d3f2c10f881311831a84114179342ff4db55e0c3 |
19-Oct-2008 |
Daniel Dunbar <daniel@zuster.org> |
Improve attribute parsing & tests. - Support noreturn on function-typed variables. - Extend isFunctionOrMethod to return true for K&R functions and provide hasFunctionProto to check if a decl has information about its arguments. This code needs some serious cleaning, but works. - Add/improve test cases for noreturn and unused. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57778 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
1c51d47f427fe10fad27cf6859aa26c0aac09cda |
16-Oct-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
In C++, an empty parameter list indicates a function that takes no parameters. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57646 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
c6f7345e44e079f373d6bdecaa06c7e06574dc27 |
16-Oct-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
In C++, an empty parameter list indicates a function that takes no parameters. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57646 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
4efeddefd705b406174cb2d0b24ef3acbef604a1 |
16-Oct-2008 |
Daniel Dunbar <daniel@zuster.org> |
Add --disable-free flag to clang. - Disables the freeing of the ASTContext and the TranslationUnit after parsing & sema. - Primarily for timing the impact on -fsyntax-only timings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57643 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
|
d3db40151868df39b14d2ef8ffacf19e8c36331f |
16-Oct-2008 |
Daniel Dunbar <daniel@zuster.org> |
Add --disable-free flag to clang. - Disables the freeing of the ASTContext and the TranslationUnit after parsing & sema. - Primarily for timing the impact on -fsyntax-only timings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57643 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
|
3557a343a9a9bea0b8e5cc13af2c9eb30f99f6ae |
16-Oct-2008 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6239726> Parser rejects: type of property 'list' does not match type of ivar and http://llvm.org/bugs/show_bug.cgi?id=2893 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57640 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
4fa4ab67dd9aa12752e1fa1421d9f4f7c937dec7 |
16-Oct-2008 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6239726> Parser rejects: type of property 'list' does not match type of ivar and http://llvm.org/bugs/show_bug.cgi?id=2893 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57640 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
2cb762f6d2cfb32f10a6f58261071287b8ee2145 |
16-Oct-2008 |
Daniel Dunbar <daniel@zuster.org> |
Implement #pragma pack use in structure packing. The general approach is to encode the state of the #pragma pack stack as an attribute when the structure is declared. - Extend PackedAttr to take an alignment (in bits), and reuse for both __attribute__((packed)) (which takes no argument, instead packing tightly (to "minimize the memory required") and for #pragma pack (which allows specification of the maximum alignment in bytes). __attribute__((packed)) is just encoded as Alignment=1. This conflates two related but different mechanisms, but it didn't seem worth another attribute. - I have attempted to follow the MSVC semantics as opposed to the gcc ones, since if I understand correctly #pragma pack originated with MSVC. The semantics are generally equivalent except when the stack is altered during the definition of a structure; its not clear if anyone does this in practice. See testcase if curious. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57623 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
|
3b0db908ebd07eaa26bc90deba5e826de00fe515 |
16-Oct-2008 |
Daniel Dunbar <daniel@zuster.org> |
Implement #pragma pack use in structure packing. The general approach is to encode the state of the #pragma pack stack as an attribute when the structure is declared. - Extend PackedAttr to take an alignment (in bits), and reuse for both __attribute__((packed)) (which takes no argument, instead packing tightly (to "minimize the memory required") and for #pragma pack (which allows specification of the maximum alignment in bytes). __attribute__((packed)) is just encoded as Alignment=1. This conflates two related but different mechanisms, but it didn't seem worth another attribute. - I have attempted to follow the MSVC semantics as opposed to the gcc ones, since if I understand correctly #pragma pack originated with MSVC. The semantics are generally equivalent except when the stack is altered during the definition of a structure; its not clear if anyone does this in practice. See testcase if curious. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57623 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
|
e2900c658f16e1fd868280495212b1dcf48b7fa0 |
15-Oct-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Fix this bug: typedef int f(); struct S { f *x; // incorrectly assuming this is function decl, leading to failed assertions. }; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57598 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
d6caa9ef4cc68290b0bf33432934cc11dd5594e6 |
15-Oct-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Fix this bug: typedef int f(); struct S { f *x; // incorrectly assuming this is function decl, leading to failed assertions. }; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57598 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
1960843aeea8f4f1ef624c613a8424898dc66af9 |
15-Oct-2008 |
Steve Naroff <snaroff@apple.com> |
Downgrade incompatibilities with objc qualified types (e.g. id <P>) to warnings. Note: One day, we should consider moving the actual diags to ObjCQualifiedIdTypesAreCompatible(), since it has more information on the actual problem. GCC currently emits slightly more instructive errors for some cases involving protocols. I added a FIXME to the code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57529 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
395790772565002c0ac03f2c8de9b0a6c7adcaf3 |
15-Oct-2008 |
Steve Naroff <snaroff@apple.com> |
Downgrade incompatibilities with objc qualified types (e.g. id <P>) to warnings. Note: One day, we should consider moving the actual diags to ObjCQualifiedIdTypesAreCompatible(), since it has more information on the actual problem. GCC currently emits slightly more instructive errors for some cases involving protocols. I added a FIXME to the code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57529 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
da64ff40c532b0068dcafdee963fa2bf91a6f1ae |
14-Oct-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Revert my previous change, got stupidly confused with my local changes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57514 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
154d8e2280b82dbffea2565dec5b22cebb4ba7a9 |
14-Oct-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Revert my previous change, got stupidly confused with my local changes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57514 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
7405ac9efde4ba059007729d8db0124c5868ffc2 |
14-Oct-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Fix a call to Sema::LookupDecl that had incorrect parameters. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57511 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
be6e3101e79abb65e1d9016565a39eaa36084ce9 |
14-Oct-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Fix a call to Sema::LookupDecl that had incorrect parameters. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57511 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
81c7d47fa10554e60d4061e22523ae1d7b2cc5ec |
14-Oct-2008 |
Daniel Dunbar <daniel@zuster.org> |
Add Sema implementation of #pragma pack stack. - Follows the MSVC (original) implementation, including support of pack(show) (useful for testing). - Implements support for named pack records which gcc seems to ignore (or implements incorrectly). - Not currently wired to anything, only functionality change is the type checking of the pragma. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57476 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
|
4cde927072a70f3156d72c6431e7a5d95bf62366 |
14-Oct-2008 |
Daniel Dunbar <daniel@zuster.org> |
Add Sema implementation of #pragma pack stack. - Follows the MSVC (original) implementation, including support of pack(show) (useful for testing). - Implements support for named pack records which gcc seems to ignore (or implements incorrectly). - Not currently wired to anything, only functionality change is the type checking of the pragma. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57476 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
|
504c543de0e5aeeafe4e0ad0b267f4c0d9dfba6e |
12-Oct-2008 |
Chris Lattner <sabre@nondot.org> |
silence some release-assert warnings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57391 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
33d34a6f7a65be1821ab31c7d08b8e9f36d8759c |
12-Oct-2008 |
Chris Lattner <sabre@nondot.org> |
silence some release-assert warnings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57391 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
5205938085c9bb3123b20745be5719d8d3be4b60 |
10-Oct-2008 |
Steve Naroff <snaroff@apple.com> |
Final phase of converting BlockDecls over to DeclContext. This is unfortunately a largish/complex diff, however it was necessry to pass all the current block tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57337 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
090276f5e164d491a1bb3f541bafdb394f5e6f04 |
10-Oct-2008 |
Steve Naroff <snaroff@apple.com> |
Final phase of converting BlockDecls over to DeclContext. This is unfortunately a largish/complex diff, however it was necessry to pass all the current block tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57337 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
1f0d4c225fdc5b669bd6c6431e94efa5445c279e |
09-Oct-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Fix a bug that crashed clang when parsing this: class C { static const int number = 50; static int arr[number]; }; Here's how it worked: -GetTypeForDeclarator was called from both Sema::ActOnCXXMemberDeclarator and Sema::ActOnDeclarator. -VariableArrayTypes are not uniqued so two VariableArrayTypes were created with the same DeclRefExpr. -On exit they both tried to destroy that one DeclRefExpr. The fix is not to use GetTypeForDeclarator from the Sema::ActOnCXXMemberDeclarator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57313 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
de933f025e839bde4b119f3437c320c2137bbe1f |
09-Oct-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Fix a bug that crashed clang when parsing this: class C { static const int number = 50; static int arr[number]; }; Here's how it worked: -GetTypeForDeclarator was called from both Sema::ActOnCXXMemberDeclarator and Sema::ActOnDeclarator. -VariableArrayTypes are not uniqued so two VariableArrayTypes were created with the same DeclRefExpr. -On exit they both tried to destroy that one DeclRefExpr. The fix is not to use GetTypeForDeclarator from the Sema::ActOnCXXMemberDeclarator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57313 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
95029d906b78b22b378693dbfca6c2b65af0b36f |
08-Oct-2008 |
Steve Naroff <snaroff@apple.com> |
Instantiate the BlockDecl in ActOnBlockStart() so we can use it as a DeclContext. This required changes to attach the compound statement later on (like we do for functions). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57304 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
1c90bfcbd7ff5d09694acf50a32dbb716a968b61 |
08-Oct-2008 |
Steve Naroff <snaroff@apple.com> |
Instantiate the BlockDecl in ActOnBlockStart() so we can use it as a DeclContext. This required changes to attach the compound statement later on (like we do for functions). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57304 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
9ac456d597886216becc2efdd4efb494bf91af68 |
08-Oct-2008 |
Steve Naroff <snaroff@apple.com> |
- Add BlockDecl AST node. - Modify BlockExpr to reference the BlockDecl. This is "cleanup" necessary to improve our lookup semantics for blocks (to fix <rdar://problem/6272905> clang block rewriter: parameter to function not imported into block?). Still some follow-up work to finish this (forthcoming). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57298 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
56ee6896f2efebffb4a2cce5a7610cdf1eddbbbe |
08-Oct-2008 |
Steve Naroff <snaroff@apple.com> |
- Add BlockDecl AST node. - Modify BlockExpr to reference the BlockDecl. This is "cleanup" necessary to improve our lookup semantics for blocks (to fix <rdar://problem/6272905> clang block rewriter: parameter to function not imported into block?). Still some follow-up work to finish this (forthcoming). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57298 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
1bc18e6632185ea7b3436f020681b3c1aa33606f |
08-Oct-2008 |
Ted Kremenek <kremenek@apple.com> |
Migrate DeclStmt over to using a DeclGroup instead of a pointer to a ScopedDecl*. This also removes the ugly hack needed in CFG.cpp for subclassing DeclStmt to create a DeclStmt with one Decl*. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57275 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
8ffb159441e923322bef6b5dee1aaf24c738d75e |
08-Oct-2008 |
Ted Kremenek <kremenek@apple.com> |
Migrate DeclStmt over to using a DeclGroup instead of a pointer to a ScopedDecl*. This also removes the ugly hack needed in CFG.cpp for subclassing DeclStmt to create a DeclStmt with one Decl*. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57275 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
cf4e8f8873f3eab79a899c22442dd9587259bf2d |
07-Oct-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Use getCustomDiagID() instead of specifying the diagnostic in the 'DiagnosticKinds.def' file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57220 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
4021a84eb1634a1e18bb3c258274477e8fdcd861 |
07-Oct-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Use getCustomDiagID() instead of specifying the diagnostic in the 'DiagnosticKinds.def' file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57220 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprCXX.cpp
|
bca33bfeb5bda73ae1cce89e3080f61a926c3d57 |
07-Oct-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Simplify handling of direct initializers by letting Sema::AddInitializerToDecl handle conversions, instead of using Sema::ActOnCXXTypeConstructExpr. Additional benefit is that diagnostics are the same for both direct-initialization and copy-initialization. In the case of "int x( expression );": -The Init expression of VarDecl 'x' will be the expression inside the parentheses. -VarDecl::hasCXXDirectInitializer for VarDecl 'x' will return true to let clients distinguish from "int x = expression ;". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57219 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
ce8e2926d8922bff7dc2661ec9c043dd619dcc82 |
07-Oct-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Simplify handling of direct initializers by letting Sema::AddInitializerToDecl handle conversions, instead of using Sema::ActOnCXXTypeConstructExpr. Additional benefit is that diagnostics are the same for both direct-initialization and copy-initialization. In the case of "int x( expression );": -The Init expression of VarDecl 'x' will be the expression inside the parentheses. -VarDecl::hasCXXDirectInitializer for VarDecl 'x' will return true to let clients distinguish from "int x = expression ;". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57219 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
779e1c286b793e0937e794345569daf0bae688b0 |
06-Oct-2008 |
Ted Kremenek <kremenek@apple.com> |
When processing Objective-C foreach statements, first check to see if the statement has a DeclStmt with a single Decl. Afterwards, use DeclStmt::getSolitaryDecl() to access that Decl (thus avoiding an assertion being triggered). These changes remove an unneeded use of ScopedDecl::getNextDeclarator() and DeclStmt::getDecl(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57207 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
f34afeed9a0112bf31fee185b6c80556111d3834 |
06-Oct-2008 |
Ted Kremenek <kremenek@apple.com> |
When processing Objective-C foreach statements, first check to see if the statement has a DeclStmt with a single Decl. Afterwards, use DeclStmt::getSolitaryDecl() to access that Decl (thus avoiding an assertion being triggered). These changes remove an unneeded use of ScopedDecl::getNextDeclarator() and DeclStmt::getDecl(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57207 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
85b4c49b156e7d0691eca1c564270d8a7ad07de9 |
06-Oct-2008 |
Ted Kremenek <kremenek@apple.com> |
Use "unsigned" instead of "int" for i to remove a "comparison between unsigned and signed" warning (potential integer overflow). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57201 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
15f613987a24198468a5a696adcca49f4e363ae3 |
06-Oct-2008 |
Ted Kremenek <kremenek@apple.com> |
Use "unsigned" instead of "int" for i to remove a "comparison between unsigned and signed" warning (potential integer overflow). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57201 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
c7350435c7d32df92ec9827facad460d45ae81e3 |
06-Oct-2008 |
Ted Kremenek <kremenek@apple.com> |
Use the DeclStmt::decl_iterator to get the first decl in a DeclStmt instead of using DeclStmt::getDecl(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57196 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
1bddf7e9c5f0243f0a2f65bc40b31e060ff260f3 |
06-Oct-2008 |
Ted Kremenek <kremenek@apple.com> |
Use the DeclStmt::decl_iterator to get the first decl in a DeclStmt instead of using DeclStmt::getDecl(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57196 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
ffcb5035fde1db5296df608f3fadf960c1e10b38 |
06-Oct-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
The current semantic process for direct initializers won't work properly for class types. Add a FIXME until class constructors are supported. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57188 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
06ad1f5d7349442687d5116ec8ea38786ee71735 |
06-Oct-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
The current semantic process for direct initializers won't work properly for class types. Add a FIXME until class constructors are supported. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57188 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
9e55d46140b05ed4dc7230b86ccf504a9a71985e |
06-Oct-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Implement support for C++ direct initializers in declarations, e.g. "int x(1);". This is how this kind of initializers appear in the AST: -The Init expression of the VarDecl is a functional type construction (of the VarDecl's type). -The new VarDecl::hasCXXDirectInitializer() returns true. e.g, for "int x(1);": -VarDecl 'x' has Init with expression "int(1)" (CXXFunctionalCastExpr). -hasCXXDirectInitializer() of VarDecl 'x' returns true. A major benefit is that clients that don't particularly care about which exactly form was the initializer can handle both cases without special case code. Note that codegening works now for "int x(1);" without any changes to CodeGen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57178 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
73a0d889eda0f000a441319e39540509175b8e81 |
06-Oct-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Implement support for C++ direct initializers in declarations, e.g. "int x(1);". This is how this kind of initializers appear in the AST: -The Init expression of the VarDecl is a functional type construction (of the VarDecl's type). -The new VarDecl::hasCXXDirectInitializer() returns true. e.g, for "int x(1);": -VarDecl 'x' has Init with expression "int(1)" (CXXFunctionalCastExpr). -hasCXXDirectInitializer() of VarDecl 'x' returns true. A major benefit is that clients that don't particularly care about which exactly form was the initializer can handle both cases without special case code. Note that codegening works now for "int x(1);" without any changes to CodeGen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57178 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
0903cba80a0f86fd8e9b50c3683643788ce1b7b8 |
06-Oct-2008 |
Chris Lattner <sabre@nondot.org> |
Make sema and codegen allow __builtin___CFStringMakeConstantString as a valid constant lvalue. Implement this in codegen by moving the code out of CGBuiltin into EmitConstantExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57163 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
506ff88f44562df267b6a06608ab841b76df2a2b |
06-Oct-2008 |
Chris Lattner <sabre@nondot.org> |
Make sema and codegen allow __builtin___CFStringMakeConstantString as a valid constant lvalue. Implement this in codegen by moving the code out of CGBuiltin into EmitConstantExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57163 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
2d9a3f6124b45c8b9c4094d06696293b64841a23 |
06-Oct-2008 |
Chris Lattner <sabre@nondot.org> |
Add a Expr::isEvaluatable method, eliminate isBuiltinConstantExpr which is checking for something that can be inconsistent with what we can constant fold. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57159 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
45b6b9d080ac56917337d73d8f1cd6374b27b05d |
06-Oct-2008 |
Chris Lattner <sabre@nondot.org> |
Add a Expr::isEvaluatable method, eliminate isBuiltinConstantExpr which is checking for something that can be inconsistent with what we can constant fold. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57159 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
94d4541bf0d259072c14c6eba88e4da533624293 |
06-Oct-2008 |
Chris Lattner <sabre@nondot.org> |
"Enhance" CheckArithmeticConstantExpression to accept ?: with a constant condition as a constant even if the unevaluated side is a not a constant. We don't do this when extensions are off, and we emit a warning when this happens: t.c:22:11: warning: expression is not a constant, but is accepted as one by GNU extensions short t = __builtin_constant_p(5353) ? 42 : somefunc(); ^ ~~~~~~~~~~ suggestions for improvement are welcome. This is obviously horrible, but is required for real-world code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57153 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
46cfefa8a4e486ee6a9b8960f232237bf7a4b1f9 |
06-Oct-2008 |
Chris Lattner <sabre@nondot.org> |
"Enhance" CheckArithmeticConstantExpression to accept ?: with a constant condition as a constant even if the unevaluated side is a not a constant. We don't do this when extensions are off, and we emit a warning when this happens: t.c:22:11: warning: expression is not a constant, but is accepted as one by GNU extensions short t = __builtin_constant_p(5353) ? 42 : somefunc(); ^ ~~~~~~~~~~ suggestions for improvement are welcome. This is obviously horrible, but is required for real-world code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57153 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
dd6791c806f39b878486285c7725ba09844bf8ed |
06-Oct-2008 |
Anders Carlsson <andersca@mac.com> |
Implement support for the const and pure attributes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57142 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
232eb7d33b96ad8f99de3b5ae840421b3a7c6cb7 |
06-Oct-2008 |
Anders Carlsson <andersca@mac.com> |
Implement support for the const and pure attributes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57142 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
244d99b19f0c7af22ee7250f62ea3b16186a4541 |
05-Oct-2008 |
Anders Carlsson <andersca@mac.com> |
Add parsing of the sentinel attribute. Still need to create the attribute. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57121 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
770918281c5bdc7b5b3942285c407e3d62270053 |
05-Oct-2008 |
Anders Carlsson <andersca@mac.com> |
Add parsing of the sentinel attribute. Still need to create the attribute. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57121 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
175e639e794fed69b821ab258de7c2611aca61b3 |
03-Oct-2008 |
Daniel Dunbar <daniel@zuster.org> |
Merge postfix attributes on record decls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57019 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
7d076643e77a941cd1e53ed4a328df64c88140a5 |
03-Oct-2008 |
Daniel Dunbar <daniel@zuster.org> |
Merge postfix attributes on record decls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57019 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f394444eb11a4fb1b0cc0e50d5d466f3be4ad52a |
03-Oct-2008 |
Daniel Dunbar <daniel@zuster.org> |
Pass postfix attributes to ActOnFields. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56992 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
1bfe1c2129771c06fb58ae5e8c079ae30e138309 |
03-Oct-2008 |
Daniel Dunbar <daniel@zuster.org> |
Pass postfix attributes to ActOnFields. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56992 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
71cd7764258c22e00cacb0b41811b1039de93962 |
03-Oct-2008 |
Steve Naroff <snaroff@apple.com> |
Add getTypeSpecStartLoc() to VarDecls and FunctionDecls. This is a temporary solution to help with the block rewriter (though it certainly has general utility). Once DeclGroup's are implemented, this SourceLocation should be stored with it (since it applies to all the decls). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56985 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
0eb07bfde0deedcb35cf3d118b3488f5d8db32ec |
03-Oct-2008 |
Steve Naroff <snaroff@apple.com> |
Add getTypeSpecStartLoc() to VarDecls and FunctionDecls. This is a temporary solution to help with the block rewriter (though it certainly has general utility). Once DeclGroup's are implemented, this SourceLocation should be stored with it (since it applies to all the decls). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56985 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
07253c7f77aca1857ba0226903c47cfb3a3b0543 |
03-Oct-2008 |
Daniel Dunbar <daniel@zuster.org> |
Add Builtins.def attribute for "can be a constant expression". - Enabled for builtins which are always constant expressions (__builtin_huge_val*, __builtin_inf*, __builtin_constant_p, __builtin_classify_type, __builtin___CFStringMakeConstantString). Added Builtin::Context::isConstantExpr. - Currently overly simply interface which only works for builtins whose constantexprness does not depend on their arguments. CallExpr::isBuiltinConstantExpr now takes an ASTContext argument. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56983 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
ae3f4919e4805f59c554d39cb9cd3a601809b2cb |
03-Oct-2008 |
Daniel Dunbar <daniel@zuster.org> |
Add Builtins.def attribute for "can be a constant expression". - Enabled for builtins which are always constant expressions (__builtin_huge_val*, __builtin_inf*, __builtin_constant_p, __builtin_classify_type, __builtin___CFStringMakeConstantString). Added Builtin::Context::isConstantExpr. - Currently overly simply interface which only works for builtins whose constantexprness does not depend on their arguments. CallExpr::isBuiltinConstantExpr now takes an ASTContext argument. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56983 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
0ab03e65e7b0e09011be4068d4bcca11db40ec5a |
02-Oct-2008 |
Daniel Dunbar <daniel@zuster.org> |
Add support for format string checking of object-size checking versions of sprintf and friends. - Added FIXME that this mechanism should be generalized. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56962 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaChecking.cpp
|
de45428f923b38d80407dbb9ede0df504256f9f6 |
02-Oct-2008 |
Daniel Dunbar <daniel@zuster.org> |
Add support for format string checking of object-size checking versions of sprintf and friends. - Added FIXME that this mechanism should be generalized. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56962 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaChecking.cpp
|
dff3fb2a775c8984aae1dadc5944012b3feaa18f |
02-Oct-2008 |
Steve Naroff <snaroff@apple.com> |
Changed Sema::CheckForConstantInitializer to allow global block literals. This commit also includes some name changes in the blocks rewriter (no functionality change). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56955 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
8af6a451ea075de1c9ec7cea0cd59f13cfc53adf |
02-Oct-2008 |
Steve Naroff <snaroff@apple.com> |
Changed Sema::CheckForConstantInitializer to allow global block literals. This commit also includes some name changes in the blocks rewriter (no functionality change). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56955 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
46d9134b995120acf99269d812da7c79d195ef3e |
30-Sep-2008 |
Chris Lattner <sabre@nondot.org> |
simplify padding, just fold it into the earlier resize. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56880 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
2a2990473fe999c3680a2342922c14412ded7ddf |
30-Sep-2008 |
Chris Lattner <sabre@nondot.org> |
simplify padding, just fold it into the earlier resize. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56880 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
2e6b4bf41af578fce1e23505b8aad0e7e509d041 |
30-Sep-2008 |
Chris Lattner <sabre@nondot.org> |
fix a potential buffer overrun that Eli noticed git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56879 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
28997ec3a493134a8642891944800ffc1c160bee |
30-Sep-2008 |
Chris Lattner <sabre@nondot.org> |
fix a potential buffer overrun that Eli noticed git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56879 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
45a9180f160a422eb59e52fa386342326a17b8f6 |
30-Sep-2008 |
Daniel Dunbar <daniel@zuster.org> |
Add diagnostic for .{lo,hi,e,o} on odd-sized extended vectors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56859 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
abee2d789ce799ce9a5d611e13a1713090f305f3 |
30-Sep-2008 |
Daniel Dunbar <daniel@zuster.org> |
Add diagnostic for .{lo,hi,e,o} on odd-sized extended vectors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56859 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
68354f3da21e0ebf7d9fb9fddbe5fe83cc951727 |
30-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6191148> [sema] Objective-C method lookup (at global scope) fails to handle overloaded selectors properly. Long standing bug in Sema::ActOnInstanceMessage(). We now warn when messaging an "id" with multiple method signatures in scope. The diags are a little verbose, however they can be streamlined if necessary. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56843 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
emaExprObjC.cpp
|
037cda5282e73f30bb09fa316047554b1af1e2ef |
30-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6191148> [sema] Objective-C method lookup (at global scope) fails to handle overloaded selectors properly. Long standing bug in Sema::ActOnInstanceMessage(). We now warn when messaging an "id" with multiple method signatures in scope. The diags are a little verbose, however they can be streamlined if necessary. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56843 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
emaExprObjC.cpp
|
c32e45c454c2fac9b14d57efc39ccb87b9947274 |
30-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
Improved fix for <rdar://problem/6247781> Parser rejecting properly mismatched properties. Needed to make sure the relaxed type checking only applies to "readonly" properties. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56838 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
3ce52d65339c49048ddad5080a0ea62e8ce7778c |
30-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
Improved fix for <rdar://problem/6247781> Parser rejecting properly mismatched properties. Needed to make sure the relaxed type checking only applies to "readonly" properties. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56838 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
631e3928fa91b22b966f583086d54aa1a25621a1 |
30-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6247781> Parser rejecting properly mismatched properties. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56821 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
fbbe0ac428f804184c1b7c24723dc6cebbe11d90 |
30-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6247781> Parser rejecting properly mismatched properties. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56821 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
b2f7241779edd40c883f79355edeeba05a6edfc2 |
29-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
Add a random C99 comment/reference. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56800 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
1ac6fddf6fb10441f7563fc4333c433f0d9730d0 |
29-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
Add a random C99 comment/reference. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56800 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
a982c71ef2d7b2307171784eb278330a349fa222 |
29-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
Teach Sema::CheckAssignmentConstraints() to allow assignments between id and block pointer types (^{}). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56793 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b440686eeed95c618ead89011d3814671b13ff6e |
29-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
Teach Sema::CheckAssignmentConstraints() to allow assignments between id and block pointer types (^{}). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56793 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ef5b9fc85cfb6d94c063289dc86f863f7960ed2b |
29-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6251012> clang: Blocks are objects too. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56791 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
6c4088e5fc0ce98bf3213d47f6f38bfbfa20c813 |
29-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6251012> clang: Blocks are objects too. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56791 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
e2e61e77e103286aa1d56a321c3c067446213376 |
29-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6253149> property declaration doesn't declare getter and setter. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56785 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
5e0a74fbf478da0dfe746b9d9c917cff37ae5175 |
29-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6253149> property declaration doesn't declare getter and setter. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56785 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
32fe5a9cbff18c1fde299c46760c373296097f43 |
28-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
Change a NOTE to a FIXME based on feedback from clattner. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56775 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
aa5caa17ed34df5e1147d7b2ff447441c906f3da |
28-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
Change a NOTE to a FIXME based on feedback from clattner. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56775 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
4b9846d221146a015478b9bd4745f3a84aed1c56 |
28-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6252129> implementation of method in category doesn't effectively declare it for methods below. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56771 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
emaExprObjC.cpp
|
e84a864a7871243d7c60441f399a309dea076f5c |
28-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6252129> implementation of method in category doesn't effectively declare it for methods below. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56771 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
emaExprObjC.cpp
|
91de75459b13ad32d3501cdd2eee05727c4a6334 |
28-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6252108> assigning to argument passed to block should not require __block. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56770 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ae530cfaf65e36fdcecb16d072422eb3d2a4518e |
28-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6252108> assigning to argument passed to block should not require __block. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56770 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b23469fe1918b0e8154fcc54e3ec395cc4e1c4aa |
28-Sep-2008 |
Chris Lattner <sabre@nondot.org> |
Replace a comparison with a static list of builtins that was wrong (it wasn't covering checking builtins like __builtin___vsnprintf_chk) with a check that won't get out of date. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56767 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
bd7eb1c3b2af5cd0a7540c79da85e2ce15a893f4 |
28-Sep-2008 |
Chris Lattner <sabre@nondot.org> |
Replace a comparison with a static list of builtins that was wrong (it wasn't covering checking builtins like __builtin___vsnprintf_chk) with a check that won't get out of date. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56767 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
631b135eca04bc0d2ab3f3c4772ddf20a953cb53 |
28-Sep-2008 |
Chris Lattner <sabre@nondot.org> |
Fix rdar://6251437, references to enum constant decls in a block don't need a BlockDeclRefExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56766 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
f7037b1c3be02fdc901862641d93118ea812e5f8 |
28-Sep-2008 |
Chris Lattner <sabre@nondot.org> |
Fix rdar://6251437, references to enum constant decls in a block don't need a BlockDeclRefExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56766 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
f85d66c4380bde1d55f97fa3c39a6fc6fa4a39dc |
28-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6252216> compare block to NULL. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56764 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
59f5394648e1d86f3df09ce900658199e8bfcb96 |
28-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6252216> compare block to NULL. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56764 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b6f2395bc9194f04f5e5c3211eebacca69646982 |
28-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6252226> parser thinks block argument is undefined identifier in NSServices.m git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56761 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
538afe30e4f9bfb338171be859d584e201dca2df |
28-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6252226> parser thinks block argument is undefined identifier in NSServices.m git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56761 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
076d6cb185520f54e36dd4d2dc994ac9b1f20319 |
26-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
Tweak Expr::isModifiableLvalue() and Expr::isLvalue() to better deal with BlockDeclRef exprs. This fixes <rdar://problem/6248392> clang: Error when using address of stack variable inside block. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56652 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
4f6a7d7ead09b439216c32f2de806a998aeb222a |
26-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
Tweak Expr::isModifiableLvalue() and Expr::isLvalue() to better deal with BlockDeclRef exprs. This fixes <rdar://problem/6248392> clang: Error when using address of stack variable inside block. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56652 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
28680d15b69cf07b19985dcc3365b11b6fa0b8e0 |
26-Sep-2008 |
Daniel Dunbar <daniel@zuster.org> |
Parser support for prefix __attribute__ on @protocol. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56642 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
246e70f69cb8aeb67225c54690f1c6b25abd5a86 |
26-Sep-2008 |
Daniel Dunbar <daniel@zuster.org> |
Parser support for prefix __attribute__ on @protocol. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56642 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
d1d847c356b3024762c7a747254f04c7ae343e48 |
26-Sep-2008 |
Daniel Dunbar <daniel@zuster.org> |
Sema support for format and noreturn attributes on Objective-C methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56640 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaDeclObjC.cpp
|
3568249c2d72d58b835a22d9186f5a6b4fc4bcd6 |
26-Sep-2008 |
Daniel Dunbar <daniel@zuster.org> |
Sema support for format and noreturn attributes on Objective-C methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56640 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaDeclObjC.cpp
|
bddb14add053bbda0d354c4c993ea96797085332 |
26-Sep-2008 |
Daniel Dunbar <daniel@zuster.org> |
Add support for CFString in format attribute. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56639 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
085e8f7da37a227ceee7f98b724e0a42e04d01ca |
26-Sep-2008 |
Daniel Dunbar <daniel@zuster.org> |
Add support for CFString in format attribute. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56639 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
82324d64af17964d61b9f93203e4cb47b95b742f |
25-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
Downgrade incompatible block pointer error to a warning (to be consistent with incompatible pointer warnings in general). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56595 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ba80c9abccd97d9771c1dfa1a862e66ddd4daedd |
25-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
Downgrade incompatible block pointer error to a warning (to be consistent with incompatible pointer warnings in general). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56595 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e2b66a81e8db712fc632b1a4949f0cd355d742b2 |
25-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6243788> clang: Incorrect return statement for Blocks? git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56590 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
16564420ffe679b0e3cf310c418be6ef98d8e658 |
25-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/6243788> clang: Incorrect return statement for Blocks? git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56590 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
540ff4771b67dd3bb210ddf9531f044a43bcad7e |
23-Sep-2008 |
Daniel Dunbar <daniel@zuster.org> |
Implement type checking of Objective-C property attributes. - readonly and readwrite are mutually exclusive. - assign, copy, and retain are mutually exclusive. - copy and retain are invalid on non-object types. - Warn about using default 'assign' property on object types (attempting to follow gcc behavior). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56507 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
95e61fb7cdd1becf956f897f90abffd8b70575de |
23-Sep-2008 |
Daniel Dunbar <daniel@zuster.org> |
Implement type checking of Objective-C property attributes. - readonly and readwrite are mutually exclusive. - assign, copy, and retain are mutually exclusive. - copy and retain are invalid on non-object types. - Warn about using default 'assign' property on object types (attempting to follow gcc behavior). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56507 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
cb6ad605af373a0ac762ffb879641fc76f62b60e |
22-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
Remove unused slot/reference and update Sema::ActOnIdentifierExpr(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56438 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
33ae3afcf893ee0af25401409ba1246d9cee1774 |
22-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
Remove unused slot/reference and update Sema::ActOnIdentifierExpr(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56438 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
e1cecbae5d675d1c9abdd9be8fb4e915139de509 |
18-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
Finish pushing blocks attribute through the clang attribute machinery. Also added a couple simple tests from the "gcc.apple" test suite. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56309 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
9eae5761c0691c0f11d7a823b8ee54f05786cbbe |
18-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
Finish pushing blocks attribute through the clang attribute machinery. Also added a couple simple tests from the "gcc.apple" test suite. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56309 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
b31e2b3876406efbd90bbca99b2dbd72063f170e |
17-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
Remove BlockStmtExpr. Block literals are now represented by the concrete BlockExpr class. This is cleanup (removes a FIXME). No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56288 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
9c3c902835ef7d37300463ad47176ec21a67dc8b |
17-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
Remove BlockStmtExpr. Block literals are now represented by the concrete BlockExpr class. This is cleanup (removes a FIXME). No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56288 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
2f3c44334501e481d646d087cb21e5cfb829894d |
17-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
Fix http://llvm.org/bugs/show_bug.cgi?id=2760. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56280 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
094cefbcc48c6b29062fef343fa8ff78ad368713 |
17-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
Fix http://llvm.org/bugs/show_bug.cgi?id=2760. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56280 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
a095a75de7e3b14f431bb8ee4d6ae39a78d34624 |
17-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
Remove support for BlockExprExpr. For example... ^(expression) or ^(int arg1, float arg2)(expression) ...is no longer supported. All block literals now require a compound statement. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56257 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
17dab4f616db7be6800c1f0505f4888d2e8ad7a2 |
17-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
Remove support for BlockExprExpr. For example... ^(expression) or ^(int arg1, float arg2)(expression) ...is no longer supported. All block literals now require a compound statement. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56257 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
503996ba323136f35413a71aff33774c791388a7 |
17-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
Sema::ActOnBlockReturnStmt(): Need to perform the UsualUnaryConversions on the return type. Sema::CheckReturnStackAddr(): Make sure we skip over implicit casts. Added some more test cases... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56254 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaStmt.cpp
|
c50a4a5f2eac14ac4c631d50b0a55cadc87700ce |
17-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
Sema::ActOnBlockReturnStmt(): Need to perform the UsualUnaryConversions on the return type. Sema::CheckReturnStackAddr(): Make sure we skip over implicit casts. Added some more test cases... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56254 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaStmt.cpp
|
4dbd857bedd72b95c197d939df5d6fcf7bfd8072 |
12-Sep-2008 |
Daniel Dunbar <daniel@zuster.org> |
Add --suppress-system-warnings (on by default, use =0 to disable) - For investigating warnings in system headers / builtins. - Currently also enables the behavior that allows silent redefinition of types in system headers. Conceptually these are separate but I didn't feel it was worth two options (or changing LangOptions). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56163 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
2fe0997427d92388e66e7573f4b043e7ba285ef0 |
12-Sep-2008 |
Daniel Dunbar <daniel@zuster.org> |
Add --suppress-system-warnings (on by default, use =0 to disable) - For investigating warnings in system headers / builtins. - Currently also enables the behavior that allows silent redefinition of types in system headers. Conceptually these are separate but I didn't feel it was worth two options (or changing LangOptions). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56163 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
1815b3bfc1382c88bee771bd158755b2426f0780 |
12-Sep-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Give string literals const element typesin C++, and cope with the deprecated C++ conversion from a string literal to a pointer-to-non-const-character git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56137 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprCXX.cpp
|
77a52233f7c0f162672652051bfe78b65ad4f789 |
12-Sep-2008 |
Douglas Gregor <dgregor@apple.com> |
Give string literals const element typesin C++, and cope with the deprecated C++ conversion from a string literal to a pointer-to-non-const-character git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56137 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprCXX.cpp
|
a7b5fb979fd0c952ed97877bce7ce8e6a303d47a |
12-Sep-2008 |
Daniel Dunbar <daniel@zuster.org> |
Iterate on sema for :? in Objective-C: - Follow C99 behavior of using other operand type when one of operands is a null pointer constant. - Fix overenthusiastic devolving of any Objective-C types to id: o If either operand has an Objective-C object type then: - If both operands are interfaces and either operand can be assigned to the other, use that type as the composite type. - Otherwise, if either type is id, use id as the composite type. - Otherwise, warn about incompatible types and use id as the composite type. - Return handling of qualified idea to separate test following general pointer type checking. o Upgraded from old code to allow devolving to id (without warning, which matches GCC). - <rdar://problem/6212771> Add test case for issues fixed above, XFAIL though because it exposed a new issue in property handling. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56135 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
5e155f0c9bd5916d47a7d99dd8d5b26bdb44d835 |
12-Sep-2008 |
Daniel Dunbar <daniel@zuster.org> |
Iterate on sema for :? in Objective-C: - Follow C99 behavior of using other operand type when one of operands is a null pointer constant. - Fix overenthusiastic devolving of any Objective-C types to id: o If either operand has an Objective-C object type then: - If both operands are interfaces and either operand can be assigned to the other, use that type as the composite type. - Otherwise, if either type is id, use id as the composite type. - Otherwise, warn about incompatible types and use id as the composite type. - Return handling of qualified idea to separate test following general pointer type checking. o Upgraded from old code to allow devolving to id (without warning, which matches GCC). - <rdar://problem/6212771> Add test case for issues fixed above, XFAIL though because it exposed a new issue in property handling. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56135 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
c362d3813c8685abaf57c0c4a5bc325751642ad9 |
11-Sep-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Do implicit conversion to bool for the condition in a do-while statement. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56096 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
6314ff264c345b5babb9faf50dad0bc68d7bd74e |
11-Sep-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Do implicit conversion to bool for the condition in a do-while statement. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56096 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
f580b4df6d1834c8774322274184d046729e5ccc |
11-Sep-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Allow array-to-pointer conversion for rvalues. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56094 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
c39a3d76737cce06116145c24f9821857e214e59 |
11-Sep-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Allow array-to-pointer conversion for rvalues. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56094 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
7776e10bdcab85f414c3795ee24090de714ab779 |
11-Sep-2008 |
Daniel Dunbar <daniel@zuster.org> |
Fix two bugs exposed by array passing assert: (1) Additional arguments to variadic methods should have default promotions applied. (2) Additional arguments to non-variadic methods were allowed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56084 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprObjC.cpp
|
91e19b2029447e75d2c7730ff888cc396874685b |
11-Sep-2008 |
Daniel Dunbar <daniel@zuster.org> |
Fix two bugs exposed by array passing assert: (1) Additional arguments to variadic methods should have default promotions applied. (2) Additional arguments to non-variadic methods were allowed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56084 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprObjC.cpp
|
753d1102c0c436171779fa6b8f77d236769de0fb |
11-Sep-2008 |
Daniel Dunbar <daniel@zuster.org> |
Bug fix, apply default argument promotion in message sends for which no method declaration was found. - This was allowing arrays to pass "by value" among other things. Add assert in CodeGen that arguments cannot have array type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56080 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
6660c8a4cc2115929d92be83bbc54c307002a321 |
11-Sep-2008 |
Daniel Dunbar <daniel@zuster.org> |
Bug fix, apply default argument promotion in message sends for which no method declaration was found. - This was allowing arrays to pass "by value" among other things. Add assert in CodeGen that arguments cannot have array type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56080 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
842b5e2b40bb98a31ec6892556ce85b6108cd90f |
11-Sep-2008 |
Daniel Dunbar <daniel@zuster.org> |
Refactor common Obj-C message send checking code into CheckMessageArgumentTypes. - No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56079 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprObjC.cpp
|
637cebb67c59765e1412c589550c8c9ba001baeb |
11-Sep-2008 |
Daniel Dunbar <daniel@zuster.org> |
Refactor common Obj-C message send checking code into CheckMessageArgumentTypes. - No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56079 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprObjC.cpp
|
3eac7698d809b39e89fc7f637f97a899425c85d4 |
10-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
More semantic analysis for blocks... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56064 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExpr.cpp
|
61f40a2b67fc2046768e14f66b617e564cbcc3d8 |
10-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
More semantic analysis for blocks... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56064 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExpr.cpp
|
4d1b93da77764885c7f1723689f5e10f302265af |
10-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
Sema::ActOnIdentifierExpr(): Lookup block arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56063 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
1f3b0d5ccabbc47aef525baec10c15d9fd1c6236 |
10-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
Sema::ActOnIdentifierExpr(): Lookup block arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56063 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
810c0f76b1d87aa5d6c1785558dc903c20e6aaf9 |
10-Sep-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Implement Sema support for the 'condition' part of C++ selection-statements and iteration-statements (if/switch/while/for). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56044 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
emaStmt.cpp
|
5921093cf1c2e9a8bd1a22b6f612e551bae7476b |
10-Sep-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Implement Sema support for the 'condition' part of C++ selection-statements and iteration-statements (if/switch/while/for). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56044 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
emaStmt.cpp
|
ad9de13a67b1ea90877d78663f020bfff1d42e26 |
10-Sep-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Use Sema::isDeclInScope instead of IdentifierResolver::isDeclInScope. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56042 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
2fac626e2ab4093d4b49c09ab475c5ed8bc9e3e8 |
10-Sep-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Use Sema::isDeclInScope instead of IdentifierResolver::isDeclInScope. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56042 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
aaa4dc66bb4d4725bd3bdecf4ae4f623fa4dd9b6 |
09-Sep-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Make IdentifierResolver::isDeclInScope regard declarations of a parent 'control' scope as part of the current scope. The 'control' scope is the 'condition' scope of if/switch/while statements and the scope that contains the for-init-statement and 'condition' of a for statement. e.g: if (int x = 0 /*'control' scope*/) { // x will be regarded as part of this substatement scope. } else { // and as part of this substatement scope too. } git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56020 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
dentifierResolver.h
|
f99cb051665d2faab038ed855b2eff15d603796d |
09-Sep-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Make IdentifierResolver::isDeclInScope regard declarations of a parent 'control' scope as part of the current scope. The 'control' scope is the 'condition' scope of if/switch/while statements and the scope that contains the for-init-statement and 'condition' of a for statement. e.g: if (int x = 0 /*'control' scope*/) { // x will be regarded as part of this substatement scope. } else { // and as part of this substatement scope too. } git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56020 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
dentifierResolver.h
|
71579514edb9b35ddb3358d14fc8cc080dc4fcb8 |
09-Sep-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Add a LangOptions member to IdentifierResolver. Make Sema pass the LangOptions to IdentifierResolver's constructor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56015 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
dentifierResolver.h
ema.cpp
|
eb7c388bc7ce19fffb8b4b440cee0173297e8490 |
09-Sep-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Add a LangOptions member to IdentifierResolver. Make Sema pass the LangOptions to IdentifierResolver's constructor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56015 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
dentifierResolver.h
ema.cpp
|
90842b6ec8d4336aa8e12916525a9e10d1d54cd8 |
09-Sep-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Add Sema::isDeclInScope which wraps IdentifierResolver::isDeclInScope. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56014 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
15a12d082486074662857299d837dfc29c207b1b |
09-Sep-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Add Sema::isDeclInScope which wraps IdentifierResolver::isDeclInScope. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56014 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
9c164b23c02f38c60fa3939bb83830c2fe8543fe |
09-Sep-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
IdentifierResolver cleanup. Make some methods out-of-line. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56002 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
dentifierResolver.h
|
81bebb1e2e6bb05e360f36da098dc7016e8f654b |
09-Sep-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
IdentifierResolver cleanup. Make some methods out-of-line. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56002 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
dentifierResolver.h
|
453a87884fa64e4449ffbdc66065e2484b478241 |
09-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
Tweak implementation for allowing ObjC builtin type redefinitions. - Replace string comparisons with pre-defined idents. - Avoid calling isBuiltinObjCType() to avoid two checks. - Remove isBuiltinObjCType(), since it was only used in Sema::MergeTypeDefDecl(). - Have Sema::MergeTypeDefDecl() set the new type. This is a moidified version of an patch by David Chisnall. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55990 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
|
2b255c4dabe6a04314e3659a0f8b61e1382ec287 |
09-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
Tweak implementation for allowing ObjC builtin type redefinitions. - Replace string comparisons with pre-defined idents. - Avoid calling isBuiltinObjCType() to avoid two checks. - Remove isBuiltinObjCType(), since it was only used in Sema::MergeTypeDefDecl(). - Have Sema::MergeTypeDefDecl() set the new type. This is a moidified version of an patch by David Chisnall. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55990 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
|
5eea562fd2ab2f3a3c6090fb91ca69e3043d4c8f |
08-Sep-2008 |
Daniel Dunbar <daniel@zuster.org> |
Add ThreadSpecified bit to Decl. - Patch from Kevin Tew. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55940 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
6f0200e9ebf7f65df74b3cf55b4319b075b244a2 |
08-Sep-2008 |
Daniel Dunbar <daniel@zuster.org> |
Add ThreadSpecified bit to Decl. - Patch from Kevin Tew. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55940 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
77881205831e4bf36b0d30fc2256be13975ca552 |
07-Sep-2008 |
Nico Weber <nicolasweber@gmx.de> |
rename libclangSEMA to libclangSema git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55887 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
|
e275e926b3037fc32c01036781832903c18e72e3 |
07-Sep-2008 |
Nico Weber <nicolasweber@gmx.de> |
rename libclangSEMA to libclangSema git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55887 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
|
d6163f3cfe7df430c3857d0552d5f5cb7ae86986 |
06-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
More type checking for blocks. Still incomplete (will hopefully finish up this weekend). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55862 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExpr.cpp
|
dd972f20dc2bd3609d833893e5c6544ac09b59a9 |
06-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
More type checking for blocks. Still incomplete (will hopefully finish up this weekend). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55862 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExpr.cpp
|
770b11d840fe962dd8ac0fe8ebaa92d25bca2b27 |
05-Sep-2008 |
Ted Kremenek <kremenek@apple.com> |
Add comment back that Argiris pointed out that I mistakenly removed (the comments below it were stale, so I accidently removed the whole thing). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55841 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
2b345eb7832dd4ffcc91e795d8f95bdd62e9e95a |
05-Sep-2008 |
Ted Kremenek <kremenek@apple.com> |
Add comment back that Argiris pointed out that I mistakenly removed (the comments below it were stale, so I accidently removed the whole thing). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55841 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
46a837c7ced306c55d1686cea5f77cb7a2f3b908 |
05-Sep-2008 |
Ted Kremenek <kremenek@apple.com> |
Change struct forward declarations and definitions to use unique RecordDecls, as opposed to creating a single RecordDecl and reusing it. This change effects both RecordDecls and CXXRecordDecls, but does not effect EnumDecls (yet). The motivation of this patch is as follows: - Capture more source information, necessary for refactoring/rewriting clients. - Pave the way to resolve ownership issues with RecordDecls with the forthcoming addition of DeclGroups. Current caveats: - Until DeclGroups are in place, we will leak RecordDecls not explicitly referenced by the AST. For example: typedef struct { ... } x; The RecordDecl for the struct will be leaked because the TypedefDecl doesn't refer to it. This will be solved with DeclGroups. - This patch also (temporarily) breaks CodeGen. More below. High-level changes: - As before, TagType still refers to a TagDecl, but it doesn't own it. When a struct/union/class is first referenced, a RecordType and RecordDecl are created for it, and the RecordType refers to that RecordDecl. Later, if a new RecordDecl is created, the pointer to a RecordDecl in RecordType is updated to point to the RecordDecl that defines the struct/union/class. - TagDecl and RecordDecl now how a method 'getDefinition()' to return the TagDecl*/RecordDecl* that refers to the TagDecl* that defines a particular enum/struct/class/union. This is useful from going from a RecordDecl* that defines a forward declaration to the RecordDecl* that provides the actual definition. Note that this also works for EnumDecls, except that in this case there is no distinction between forward declarations and definitions (yet). - Clients should no longer assume that 'isDefinition()' returns true from a RecordDecl if the corresponding struct/union/class has been defined. isDefinition() only returns true if a particular RecordDecl is the defining Decl. Use 'getDefinition()' instead to determine if a struct has been defined. - The main changes to Sema happen in ActOnTag. To make the changes more incremental, I split off the processing of enums and structs et al into two code paths. Enums use the original code path (which is in ActOnTag) and structs use the ActOnTagStruct. Eventually the two code paths will be merged, but the idea was to preserve the original logic both for comparison and not to change the logic for both enums and structs all at once. - There is NO CHAINING of RecordDecls for the same RecordType. All RecordDecls that correspond to the same type simply have a pointer to that type. If we need to figure out what are all the RecordDecls for a given type we can build a backmap. - The diff in CXXRecordDecl.[cpp,h] is actually very small; it just mimics the changes to RecordDecl. For some reason 'svn' marks the entire file as changed. Why is CodeGen broken: - Codegen assumes that there is an equivalence between RecordDecl* and RecordType*. This was true before because we only created one RecordDecl* for a given RecordType*, but it is no longer true. I believe this shouldn't be too hard to change, but the patch was big enough as it is. I have tested this patch on both the clang test suite, and by running the static analyzer over Postgresql and a large Apple-internal project (mix of Objective-C and C). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55839 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
4b7c98378ae0c1a3635f0b7756848b4a9923f8bc |
05-Sep-2008 |
Ted Kremenek <kremenek@apple.com> |
Change struct forward declarations and definitions to use unique RecordDecls, as opposed to creating a single RecordDecl and reusing it. This change effects both RecordDecls and CXXRecordDecls, but does not effect EnumDecls (yet). The motivation of this patch is as follows: - Capture more source information, necessary for refactoring/rewriting clients. - Pave the way to resolve ownership issues with RecordDecls with the forthcoming addition of DeclGroups. Current caveats: - Until DeclGroups are in place, we will leak RecordDecls not explicitly referenced by the AST. For example: typedef struct { ... } x; The RecordDecl for the struct will be leaked because the TypedefDecl doesn't refer to it. This will be solved with DeclGroups. - This patch also (temporarily) breaks CodeGen. More below. High-level changes: - As before, TagType still refers to a TagDecl, but it doesn't own it. When a struct/union/class is first referenced, a RecordType and RecordDecl are created for it, and the RecordType refers to that RecordDecl. Later, if a new RecordDecl is created, the pointer to a RecordDecl in RecordType is updated to point to the RecordDecl that defines the struct/union/class. - TagDecl and RecordDecl now how a method 'getDefinition()' to return the TagDecl*/RecordDecl* that refers to the TagDecl* that defines a particular enum/struct/class/union. This is useful from going from a RecordDecl* that defines a forward declaration to the RecordDecl* that provides the actual definition. Note that this also works for EnumDecls, except that in this case there is no distinction between forward declarations and definitions (yet). - Clients should no longer assume that 'isDefinition()' returns true from a RecordDecl if the corresponding struct/union/class has been defined. isDefinition() only returns true if a particular RecordDecl is the defining Decl. Use 'getDefinition()' instead to determine if a struct has been defined. - The main changes to Sema happen in ActOnTag. To make the changes more incremental, I split off the processing of enums and structs et al into two code paths. Enums use the original code path (which is in ActOnTag) and structs use the ActOnTagStruct. Eventually the two code paths will be merged, but the idea was to preserve the original logic both for comparison and not to change the logic for both enums and structs all at once. - There is NO CHAINING of RecordDecls for the same RecordType. All RecordDecls that correspond to the same type simply have a pointer to that type. If we need to figure out what are all the RecordDecls for a given type we can build a backmap. - The diff in CXXRecordDecl.[cpp,h] is actually very small; it just mimics the changes to RecordDecl. For some reason 'svn' marks the entire file as changed. Why is CodeGen broken: - Codegen assumes that there is an equivalence between RecordDecl* and RecordType*. This was true before because we only created one RecordDecl* for a given RecordType*, but it is no longer true. I believe this shouldn't be too hard to change, but the patch was big enough as it is. I have tested this patch on both the clang test suite, and by running the static analyzer over Postgresql and a large Apple-internal project (mix of Objective-C and C). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55839 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
e0a48135f22b0e144a56cee4c433a0d8992daebe |
05-Sep-2008 |
Ted Kremenek <kremenek@apple.com> |
Remove stale comments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55822 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
aa8d001787dcb67ec53bb326c8342096c2fc7fa5 |
05-Sep-2008 |
Ted Kremenek <kremenek@apple.com> |
Remove stale comments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55822 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
2c9840470bd025cc60b88fa86dff1122d48b6a3a |
05-Sep-2008 |
Ted Kremenek <kremenek@apple.com> |
Remove "NextDecl" from RecordDecl. This change touches many files that where RecordDecl or CXXRecordDecl was constructed, always with an argument of 'NULL' for the previous declaration. The motivation behind this change is that chaining the RecordDecls is simply unnecessary. Once we create multiple RecordDecls for the same struct/union/class, clients that care about all the declarations of the same struct can build a back map by seeing which Decls refer to the same RecordType. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55821 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDecl.cpp
|
df042e6c2bf06b2d9ed53c52469599ac1bd93a3f |
05-Sep-2008 |
Ted Kremenek <kremenek@apple.com> |
Remove "NextDecl" from RecordDecl. This change touches many files that where RecordDecl or CXXRecordDecl was constructed, always with an argument of 'NULL' for the previous declaration. The motivation behind this change is that chaining the RecordDecls is simply unnecessary. Once we create multiple RecordDecls for the same struct/union/class, clients that care about all the declarations of the same struct can build a back map by seeing which Decls refer to the same RecordType. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55821 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDecl.cpp
|
1d706e9bcdbfae133d593ffc4ef8c80547952d39 |
04-Sep-2008 |
Daniel Dunbar <daniel@zuster.org> |
Prevent invalid warnings about incomplete implementations for methods which are inherited from base clases or protocols. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55790 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
7ad1b1fa075e5cd4160d5b357b2a8d3f8a131984 |
04-Sep-2008 |
Daniel Dunbar <daniel@zuster.org> |
Prevent invalid warnings about incomplete implementations for methods which are inherited from base clases or protocols. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55790 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
4fea7b688be1fd4fd3fd34ed70127c78904eaa91 |
04-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
Touchup CheckSingleAssignmentConstraints() and CheckCompareOperands() to check for block pointers. Added a couple FIXME's wrt PointLikeType. If the author reads this, it would be great to get some background on this class (thanks in advance). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55778 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
39218dfef550ad1cd7b7ece83a715996a113ffd1 |
04-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
Touchup CheckSingleAssignmentConstraints() and CheckCompareOperands() to check for block pointers. Added a couple FIXME's wrt PointLikeType. If the author reads this, it would be great to get some background on this class (thanks in advance). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55778 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
6f37333d6a97b64d4b80c4bbd8ce65a4b7e50abb |
04-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
Fix a handful of typos (closure->block) to avoid confusion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55768 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
|
bfdcae678d44906293e21c0cddc6537f3ee8b5a4 |
04-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
Fix a handful of typos (closure->block) to avoid confusion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55768 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
|
3454b6cd8d58c98e2a867fb1104af11e1c183f68 |
04-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
Add type checking for blocks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55767 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
1c7d067550c2d9bca8997d0e67ee6b280d493202 |
04-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
Add type checking for blocks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55767 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
c6c927427b946f660ea7eaf1528142c3e33440bf |
04-Sep-2008 |
Mon P Wang <wangmp@apple.com> |
Generate error if we try to implicit cast between different address spaces git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55765 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
3a2c7449e356ed74552450bc1dd50691c8202770 |
04-Sep-2008 |
Mon P Wang <wangmp@apple.com> |
Generate error if we try to implicit cast between different address spaces git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55765 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
b648e8c64710eeb38fc2eef53a9a84b61448bcc0 |
03-Sep-2008 |
Daniel Dunbar <daniel@zuster.org> |
Set register storage class correctly for function parameters. - PR2730 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55739 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
33ad0120264da35db85ff8cccee5f08da6a7fbeb |
03-Sep-2008 |
Daniel Dunbar <daniel@zuster.org> |
Set register storage class correctly for function parameters. - PR2730 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55739 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
30ad42d076bf0b3804f641ef2a006cc1486a9a5e |
03-Sep-2008 |
Daniel Dunbar <daniel@zuster.org> |
Add __builtin_object_size support. - Currently CodeGen always returns a conservative value for this (-1 or 0 depending on the context). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55735 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
|
d5f8a4fd4d6dfb0415b93bb7ab721bba5cab1332 |
03-Sep-2008 |
Daniel Dunbar <daniel@zuster.org> |
Add __builtin_object_size support. - Currently CodeGen always returns a conservative value for this (-1 or 0 depending on the context). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55735 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
|
52a81c04a25001409f8b0c9b296248fd7cf80e13 |
03-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
Add semantic analysis for "blocks". Highlights... - 4 new AST nodes, BlockExpr, BlockStmtExpr, BlockExprExpr, BlockDeclRefExpr. - Sema::ActOnBlockStart(), ActOnBlockError(), ActOnBlockStmtExpr(), ActOnBlockExprExpr(), ActOnBlockReturnStmt(). Next steps... - hack Sema::ActOnIdentifierExpr() to deal with block decl refs. - add attribute handler for byref decls. - add test cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55710 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaExpr.cpp
emaStmt.cpp
|
4eb206bebcdab28ababe8df55c6185cec2cdc071 |
03-Sep-2008 |
Steve Naroff <snaroff@apple.com> |
Add semantic analysis for "blocks". Highlights... - 4 new AST nodes, BlockExpr, BlockStmtExpr, BlockExprExpr, BlockDeclRefExpr. - Sema::ActOnBlockStart(), ActOnBlockError(), ActOnBlockStmtExpr(), ActOnBlockExprExpr(), ActOnBlockReturnStmt(). Next steps... - hack Sema::ActOnIdentifierExpr() to deal with block decl refs. - add attribute handler for byref decls. - add test cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55710 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaExpr.cpp
emaStmt.cpp
|
40e70e768ba2d85d39c65333a340c86399edbfcb |
03-Sep-2008 |
Ted Kremenek <kremenek@apple.com> |
Fix 80 col violations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55707 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
a89d197c919e01ccb54d7822cc8886c373bcba00 |
03-Sep-2008 |
Ted Kremenek <kremenek@apple.com> |
Fix 80 col violations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55707 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
cc785c8a2eb6899cb84d049de7d938e54f920a9e |
03-Sep-2008 |
Daniel Dunbar <daniel@zuster.org> |
Improve type-checking of ?: for Objective-C types. - Allow any Objective-C object types to devolve to type id in a ?: expression. This matches gcc behavior more closely. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55705 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
40727a4b43d827319553620fa1183f4bcb346d2d |
03-Sep-2008 |
Daniel Dunbar <daniel@zuster.org> |
Improve type-checking of ?: for Objective-C types. - Allow any Objective-C object types to devolve to type id in a ?: expression. This matches gcc behavior more closely. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55705 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
60e8b161ab043c1a509488d43551e684e33bbcdc |
03-Sep-2008 |
Daniel Dunbar <daniel@zuster.org> |
Restore Objective-C dot-syntax access of methods. - Now also searches for correct setter method. - There are still some issues regarding validation of the setter method and access of read-only properties. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55686 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
2307d312f779b204468ac36aab3b153e66a853c0 |
03-Sep-2008 |
Daniel Dunbar <daniel@zuster.org> |
Restore Objective-C dot-syntax access of methods. - Now also searches for correct setter method. - There are still some issues regarding validation of the setter method and access of read-only properties. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55686 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
d4434158f9dac1cdcaefc7d1ac4c9b95228dd900 |
02-Sep-2008 |
Ted Kremenek <kremenek@apple.com> |
When creating CXXRecordDecls and RecordDecls within ActOnTag, hook up the new [CXX]RecordDecl with the RecordDecl chain. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55652 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
7e8cc57bad2b670b0a3b48fa3d84dce79b5c7288 |
02-Sep-2008 |
Ted Kremenek <kremenek@apple.com> |
When creating CXXRecordDecls and RecordDecls within ActOnTag, hook up the new [CXX]RecordDecl with the RecordDecl chain. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55652 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
266df14d276d27020cdc6ae24a318c23c786ec5a |
02-Sep-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Fix for PR2747: allow pointer->int casts with a null base; these are offset-of-like expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55627 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
b529d830b3b1667157da92ab0b5c32e1acfafbab |
02-Sep-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Fix for PR2747: allow pointer->int casts with a null base; these are offset-of-like expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55627 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
283b362bfa22140bc53a1a891ee905d6f47a1aa2 |
02-Sep-2008 |
Eli Friedman <eli.friedman@gmail.com> |
An extremely hacky version of transparent_union support; it isn't anywhere near correct in terms of missing cases and missing diagnostics, but it's good enough to handle the uses in the Linux system headers, which are currently a constant pain for compiling applications on Linux. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55621 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
bc88745b43f440341e60ed93b0d27bac7c418029 |
02-Sep-2008 |
Eli Friedman <eli.friedman@gmail.com> |
An extremely hacky version of transparent_union support; it isn't anywhere near correct in terms of missing cases and missing diagnostics, but it's good enough to handle the uses in the Linux system headers, which are currently a constant pain for compiling applications on Linux. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55621 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
583c31e77eb76d0f07f8b075f55c63e24d64528f |
02-Sep-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Make sure to take the unqualified versions of the canonical types for type-checking pointer subtraction; if the canonical types aren't used, the qualifiers won't always get stripped off correctly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55620 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
f1c7b48638a3ec78129fee9672ed8e2616e63c9c |
02-Sep-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Make sure to take the unqualified versions of the canonical types for type-checking pointer subtraction; if the canonical types aren't used, the qualifiers won't always get stripped off correctly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55620 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
d662caa6fdd4e18d465c0bd0d784d8839a134e21 |
02-Sep-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Backing out r55607 due to logic errors and test regression. I'll try to come up with a correct fix for the testcase sometime soon. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55614 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
6d4abe1eee550411524ca002025fdf0490eefd26 |
02-Sep-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Backing out r55607 due to logic errors and test regression. I'll try to come up with a correct fix for the testcase sometime soon. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55614 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
7af441b7228bcb16ebc216b071227ab07a7436cc |
01-Sep-2008 |
Ted Kremenek <kremenek@apple.com> |
Tidy up sema processing of attribute "nonull": - warn about nonnull being applied to functions with no pointer arguments - continue processing argument list in the attribute when we encounter a non-pointer parameter being marked as nonnull - when no argument list is specified, only mark pointers as nonnull. This fixes PR 2732 and radar 6188814. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55610 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
7fb43c17eb2b4102f40a80a355629aacd70589ad |
01-Sep-2008 |
Ted Kremenek <kremenek@apple.com> |
Tidy up sema processing of attribute "nonull": - warn about nonnull being applied to functions with no pointer arguments - continue processing argument list in the attribute when we encounter a non-pointer parameter being marked as nonnull - when no argument list is specified, only mark pointers as nonnull. This fixes PR 2732 and radar 6188814. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55610 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
1dc2676e7892f192a91258e6f315bc5addb7c57a |
01-Sep-2008 |
Nuno Lopes <nunoplopes@sapo.pt> |
fix one more this-is-not-a-constant error. test included git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55609 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
73419bf6cbf8e5f7a0f9b8855d6531db264ae899 |
01-Sep-2008 |
Nuno Lopes <nunoplopes@sapo.pt> |
fix one more this-is-not-a-constant error. test included git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55609 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
987c5226d2d1ddbb6881edd8e2b7a46939fd3146 |
01-Sep-2008 |
Nuno Lopes <nunoplopes@sapo.pt> |
make CheckArithmeticConstantExpression() aware of &foo and pointers git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55607 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f7e37ce8400d5ba3b0613116034aaa30e6a70b3e |
01-Sep-2008 |
Nuno Lopes <nunoplopes@sapo.pt> |
make CheckArithmeticConstantExpression() aware of &foo and pointers git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55607 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
dd85128cf057a296b3704141d250f8bc0ce421d6 |
30-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
Add Objective-C property setter support. - Change Obj-C runtime message API, drop the ObjCMessageExpr arg in favor of just result type and selector. Necessary so it can be reused in situations where we don't want to cons up an ObjCMessageExpr. - Update aggregate binary assignment to know about special property ref lvalues. - Add CodeGenFunction::EmitCallArg overload which takes an already emitted rvalue. Add CodeGenFunction::StoreComplexIntoAddr. Disabled logic in Sema for parsing Objective-C dot-syntax that accesses methods. This code does not search in the correct order and the AST node has no way of properly representing its results. Updated StmtDumper to print a bit more information about ObjCPropertyRefExprs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55561 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
7f8ea5c5b3a6a4332a841eefdd86b0726722ea7b |
30-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
Add Objective-C property setter support. - Change Obj-C runtime message API, drop the ObjCMessageExpr arg in favor of just result type and selector. Necessary so it can be reused in situations where we don't want to cons up an ObjCMessageExpr. - Update aggregate binary assignment to know about special property ref lvalues. - Add CodeGenFunction::EmitCallArg overload which takes an already emitted rvalue. Add CodeGenFunction::StoreComplexIntoAddr. Disabled logic in Sema for parsing Objective-C dot-syntax that accesses methods. This code does not search in the correct order and the AST node has no way of properly representing its results. Updated StmtDumper to print a bit more information about ObjCPropertyRefExprs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55561 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
7d3196c6490848e8b7805c490415274551cdd3b1 |
29-Aug-2008 |
Nico Weber <nicolasweber@gmx.de> |
minor cleanup git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55538 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
491be73282d5483c2f799289ed90cc0011fde4bd |
29-Aug-2008 |
Nico Weber <nicolasweber@gmx.de> |
minor cleanup git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55538 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
7aa5475ca2f62df5ba3f3b647ee141a40bf48fd3 |
27-Aug-2008 |
Steve Naroff <snaroff@apple.com> |
First wave of changes to support "blocks" (an extension to C). This commit adds the declaration syntax (and associated type). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55417 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
5618bd4a52c45fbbb605e3ba885663b2164db8a3 |
27-Aug-2008 |
Steve Naroff <snaroff@apple.com> |
First wave of changes to support "blocks" (an extension to C). This commit adds the declaration syntax (and associated type). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55417 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
0c0160f65d9c1389469261a6cfabd202e7a86fa6 |
27-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
Add synthesized property methods to protocols and categories in Sema. - It is not clear that this is the right approach, but this is at least consistent with how interfaces are handled. - This means NeXT now emits the correct metadata for properties in protocols. - This currently introduces a spurious warning involving inherited properties in protocols or categories; however, it also fixes some situations where we were failing to emit a warning. I will scrub this code tomorrow and fix this issue as well as number of other missed warnings / error situations that appear to exist. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55407 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
b20ef3e3fbe0fabe213dc0149011e9f0d751a3a4 |
27-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
Add synthesized property methods to protocols and categories in Sema. - It is not clear that this is the right approach, but this is at least consistent with how interfaces are handled. - This means NeXT now emits the correct metadata for properties in protocols. - This currently introduces a spurious warning involving inherited properties in protocols or categories; however, it also fixes some situations where we were failing to emit a warning. I will scrub this code tomorrow and fix this issue as well as number of other missed warnings / error situations that appear to exist. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55407 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
eaf91c3bc35b4802d65c0213388b600108a8c735 |
26-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
Move implicit Obj-C param creation into ObjCMethodDecl. - Add ObjCMethodDecl::createImplicitParams. - Remove ObjCMethodDecl::set{Self,Cmd}Decl - Remove Sema::CreateImplicitParameter No (intended) functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55356 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclObjC.cpp
|
451318c08a6342c10b8986060386fd9274418437 |
26-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
Move implicit Obj-C param creation into ObjCMethodDecl. - Add ObjCMethodDecl::createImplicitParams. - Remove ObjCMethodDecl::set{Self,Cmd}Decl - Remove Sema::CreateImplicitParameter No (intended) functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55356 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclObjC.cpp
|
14117fc5e21d0994bcbc2cfe9c7baff629f24e62 |
26-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
Rename ObjCPropertyImplDecl::PropertyImplKind (consistency) - Change enum name to Kind. - Change enum constants to English strings. Also, fix getPropertyImplementation (which probably should be renamed) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55354 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
9f0afd4e79601d9982072ff9318e6f9a982c770e |
26-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
Rename ObjCPropertyImplDecl::PropertyImplKind (consistency) - Change enum name to Kind. - Change enum constants to English strings. Also, fix getPropertyImplementation (which probably should be renamed) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55354 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
cd23bb227e188191d26aaff6723ea8e1fb4e23a4 |
26-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
In incompatible pointer-typed ?: expressions, add implicit conversion of RHSs to id type instead of void* if either has Objective-C object type. - This ensures the result can still be used in normal places an object can be used, like a message send. Add implicit conversions for ?: applied to qualified id types to ensure that the RHSs are compatible. - This prevents a codegen crash (creating invalid PHI nodes). - Again, this relates to the fact that qualified id types have no canonical types. - Note that the implicit type casted to is incorrect, however this doesn't currently cause problems because of the flexibility of the id type. Test cases for above. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55346 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
a56f7460baf475151e03b1249a1343349328e39c |
26-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
In incompatible pointer-typed ?: expressions, add implicit conversion of RHSs to id type instead of void* if either has Objective-C object type. - This ensures the result can still be used in normal places an object can be used, like a message send. Add implicit conversions for ?: applied to qualified id types to ensure that the RHSs are compatible. - This prevents a codegen crash (creating invalid PHI nodes). - Again, this relates to the fact that qualified id types have no canonical types. - Note that the implicit type casted to is incorrect, however this doesn't currently cause problems because of the flexibility of the id type. Test cases for above. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55346 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
769e730a8333b9486e70c949873eb28af39f8fcb |
25-Aug-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Do typechecking and codegen for K&R-style function declarations correctly. Not a regression, but made more obvious by my recent fix which made function type compatibility checking a bit more strict. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55339 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaType.cpp
|
eb4b7051a596560ef4a1846e3714707f44e9dc30 |
25-Aug-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Do typechecking and codegen for K&R-style function declarations correctly. Not a regression, but made more obvious by my recent fix which made function type compatibility checking a bit more strict. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55339 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaType.cpp
|
1fad3c631c383733098b123779b566cb4ddafa61 |
25-Aug-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Fix for PR2720; be a little bit more permissive in initializers for casting pointers to integers. Eventually, we should check whether we can evaluate an expression using Expr::tryEvaluate, and this codepath should be tightened to only handle standard-compliant cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55331 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
c3f07644a7846ac6fa8d952afcec7649a48213c4 |
25-Aug-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Fix for PR2720; be a little bit more permissive in initializers for casting pointers to integers. Eventually, we should check whether we can evaluate an expression using Expr::tryEvaluate, and this codepath should be tightened to only handle standard-compliant cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55331 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
8d0bcb090775b3285ac99692db61e349eda03366 |
25-Aug-2008 |
Anders Carlsson <andersca@mac.com> |
Objective-C foreach selector elements must be lvalues. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55316 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
1fe379f0fa6fbc0a6057e8966253aea2957ca953 |
25-Aug-2008 |
Anders Carlsson <andersca@mac.com> |
Objective-C foreach selector elements must be lvalues. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55316 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
e0f00b3baed42547883ca4b5c1bb5f732281db34 |
24-Aug-2008 |
Anders Carlsson <andersca@mac.com> |
Fix silly bug in objc_gc attribute parsing and add test case git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55286 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
6e14a8f2ac4af8e3741eac8e9dccec0061bc7166 |
24-Aug-2008 |
Anders Carlsson <andersca@mac.com> |
Fix silly bug in objc_gc attribute parsing and add test case git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55286 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
cb6d4126d69b135e08f57697e01822837a8c5d9f |
24-Aug-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Pass SourceRanges by reference to the various Diag methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55284 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
|
a88b509d233d3f42382130c159c05cafa006b3e0 |
24-Aug-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Pass SourceRanges by reference to the various Diag methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55284 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
|
d83141a546b6aa53591ec8ba684da5364661abc6 |
24-Aug-2008 |
Anders Carlsson <andersca@mac.com> |
Add support for parsing the objc_gc attribute. Tests will come shortly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55269 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
aa0d25b44e510a5a62e7345f4fa3840a886841d2 |
24-Aug-2008 |
Anders Carlsson <andersca@mac.com> |
Add support for parsing the objc_gc attribute. Tests will come shortly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55269 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
8930fb53fbd10cba76d5646d48dfdf8ddce38759 |
24-Aug-2008 |
Anders Carlsson <andersca@mac.com> |
Make sure to create CXX record decls for the implicit Obj-C type declarations. This lets us compile Cocoa.h as Objective-C++ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55261 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
c303606a8e2c1b7f8c985d0e7adf9fb9bb818070 |
24-Aug-2008 |
Anders Carlsson <andersca@mac.com> |
Make sure to create CXX record decls for the implicit Obj-C type declarations. This lets us compile Cocoa.h as Objective-C++ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55261 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
c1aea81eeb1cb5eba57d2658ada786ab5eb5a3c9 |
23-Aug-2008 |
Chris Lattner <sabre@nondot.org> |
make sure that ParseAST invokes the action for end of translation unit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55222 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
|
9299f3fa85796613cc787a2062c9562d07c8613e |
23-Aug-2008 |
Chris Lattner <sabre@nondot.org> |
make sure that ParseAST invokes the action for end of translation unit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55222 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
|
f7df4d19c10a7d7ed2b49a4f057a4ee39c6fb85b |
23-Aug-2008 |
Chris Lattner <sabre@nondot.org> |
minor cleanup, remove finalize method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55216 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
|
06f548596beef4c0a227a45cba996497f99566c0 |
23-Aug-2008 |
Chris Lattner <sabre@nondot.org> |
minor cleanup, remove finalize method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55216 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
|
03e4965c820c7f22203e5640ef87a3838ecc8a7b |
23-Aug-2008 |
Anders Carlsson <andersca@mac.com> |
Use isa instead of dyn_cast. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55207 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
6782fc6925a85c3772253e272745589a0c799c15 |
23-Aug-2008 |
Anders Carlsson <andersca@mac.com> |
Use isa instead of dyn_cast. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55207 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
7a1e74100c4f7e3f0e85775861cdf4851df616bd |
22-Aug-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Add support for C++'s "type-specifier ( expression-list )" expression: -The Parser calls a new "ActOnCXXTypeConstructExpr" action. -Sema, depending on the type and expressions number: -If the type is a class, it will treat it as a class constructor. [TODO] -If there's only one expression (i.e. "int(0.5)" ), creates a new "CXXFunctionalCastExpr" Expr node -If there are no expressions (i.e "int()" ), creates a new "CXXZeroInitValueExpr" Expr node. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55177 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
|
987a14bf5883ef6e5d07f1c83eb6d41a8212a78c |
22-Aug-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Add support for C++'s "type-specifier ( expression-list )" expression: -The Parser calls a new "ActOnCXXTypeConstructExpr" action. -Sema, depending on the type and expressions number: -If the type is a class, it will treat it as a class constructor. [TODO] -If there's only one expression (i.e. "int(0.5)" ), creates a new "CXXFunctionalCastExpr" Expr node -If there are no expressions (i.e "int()" ), creates a new "CXXZeroInitValueExpr" Expr node. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55177 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExprCXX.cpp
|
ea7140a0dfd2c3add6a6908c7b360dbb313cfab3 |
22-Aug-2008 |
Anders Carlsson <andersca@mac.com> |
Initial sema support for C++ static initializers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55166 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
c5eb7311445bb14b6a26eb2ad667fe7a1ca20887 |
22-Aug-2008 |
Anders Carlsson <andersca@mac.com> |
Initial sema support for C++ static initializers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55166 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
0d9549ba8a0dfae3cc59532884a050c098bc9418 |
22-Aug-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Rewrite type compatibility testing to do type merging rather than just testing compatibility. This is necessary for some constructs, like merging redeclarations. Also, there are some ObjC changes to make sure that typesAreCompatible(a,b) == typesAreCompatible(b,a). I don't have any ObjC code beyond the testsuite, so please tell me if there are any cases where this doesn't behave as expected. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55158 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
|
3d815e7eb56c25d7ed812eced32e41df43039f9a |
22-Aug-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Rewrite type compatibility testing to do type merging rather than just testing compatibility. This is necessary for some constructs, like merging redeclarations. Also, there are some ObjC changes to make sure that typesAreCompatible(a,b) == typesAreCompatible(b,a). I don't have any ObjC code beyond the testsuite, so please tell me if there are any cases where this doesn't behave as expected. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55158 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
|
34c850809dc1f97ca3003e24d3cd02cf19e9f5d5 |
21-Aug-2008 |
Chris Lattner <sabre@nondot.org> |
add a simple check to warn people who type "=+" when they probably meant "+=". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55131 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
2c15647dce6de66f673cc64236913732d6289317 |
21-Aug-2008 |
Chris Lattner <sabre@nondot.org> |
add a simple check to warn people who type "=+" when they probably meant "+=". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55131 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
8754e5b1106a6bf6bcfcb3b66ac2347eca10b17a |
21-Aug-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Fix a regression from my fix to PR2631. Fixes PR2692. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55083 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
efbe85c8ef4090147b371f616044c72d9b254095 |
21-Aug-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Fix a regression from my fix to PR2631. Fixes PR2692. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55083 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
d8bd6822067df6da893ecbc112839258fcc08715 |
20-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
Fix attributes on Obj-C interfaces & methods. - Drop MethodAttrs parameter to ObjCMethodDecl - Call ProcessDeclAttributeList for interface & method decls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55068 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
f6414927e67e27d9324d8d179c5f7ea620443924 |
20-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
Fix attributes on Obj-C interfaces & methods. - Drop MethodAttrs parameter to ObjCMethodDecl - Call ProcessDeclAttributeList for interface & method decls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55068 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
5ad49de44e24fec9981107e79759ca7797c67a69 |
20-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
Fix subtle bug introduced in r54852. - UsualUnaryConversions takes an Expr *& and may modify its argument, this broke when it was refactored into Sema::CheckCastTypes. This meant that we were missing implicit casts in some places. - Seems pretty sad that this got through our tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55039 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
58d5ebbe72a5ca429c260c908fba1fbdecf32c85 |
20-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
Fix subtle bug introduced in r54852. - UsualUnaryConversions takes an Expr *& and may modify its argument, this broke when it was refactored into Sema::CheckCastTypes. This meant that we were missing implicit casts in some places. - Seems pretty sad that this got through our tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55039 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
a760f5cf4bca86197c6198ae29f9f2c27a0dd13e |
20-Aug-2008 |
Ted Kremenek <kremenek@apple.com> |
Re-enable deletion of AST nodes upon completion of ParseAST. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55038 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
|
77ee5ed0ac67709ef9f255c1e37f7ad44240f373 |
20-Aug-2008 |
Ted Kremenek <kremenek@apple.com> |
Re-enable deletion of AST nodes upon completion of ParseAST. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55038 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
|
e5bedfe77babdf1060c875b3f303d8d331e4598b |
20-Aug-2008 |
Ted Kremenek <kremenek@apple.com> |
Added ObjCAtDefsFieldDecl to represent FieldDecls created by @defs. This fixes an ownership issue where FieldDecls could be owned both by an ObjCInterfaceDecl and a RecordDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55037 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
01e6779faca1e3a3164c697d6e2dfee0881a6981 |
20-Aug-2008 |
Ted Kremenek <kremenek@apple.com> |
Added ObjCAtDefsFieldDecl to represent FieldDecls created by @defs. This fixes an ownership issue where FieldDecls could be owned both by an ObjCInterfaceDecl and a RecordDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55037 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
c45e2fb32e93cda8c423c721fae52b7321e2ee04 |
19-Aug-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Add ExplicitCastExpr to replace the current CastExpr, and have ImplicitCastExpr and ExplicitCastExpr derive from a common base class (CastExpr): Expr -> CastExpr -> ExplicitCastExpr -> ImplicitCastExpr git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54955 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDecl.cpp
emaExpr.cpp
|
0835a3cdeefe714b4959d31127ea155e56393125 |
19-Aug-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Add ExplicitCastExpr to replace the current CastExpr, and have ImplicitCastExpr and ExplicitCastExpr derive from a common base class (CastExpr): Expr -> CastExpr -> ExplicitCastExpr -> ImplicitCastExpr git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54955 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaDecl.cpp
emaExpr.cpp
|
31fccafe4379c59e18f9b8c62c00945590fae6e9 |
19-Aug-2008 |
Chris Lattner <sabre@nondot.org> |
warn when someone tries to make an array of ObjC interfaces instead of array of pointers to them. rdar://4304469 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54953 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
43477ca46792311640cf29b7cff731e29bebb146 |
19-Aug-2008 |
Chris Lattner <sabre@nondot.org> |
warn when someone tries to make an array of ObjC interfaces instead of array of pointers to them. rdar://4304469 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54953 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
604dacf4819600ad0f1ba49c6e7ede0f9ae26963 |
18-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
Support initialization of incomplete array with zero size (as extension). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54946 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
396f0bfd4b2189452914893ce69f5fb068d0ec22 |
18-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
Support initialization of incomplete array with zero size (as extension). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54946 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
b052a839ef3afd954146645d21fa2769412aabeb |
18-Aug-2008 |
Chris Lattner <sabre@nondot.org> |
Several cleanups and tweaks to diagnostics in Sema::ActOnAsmStmt, no other functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54941 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
1708b963a014b48103e78131f960a13ee1aa6d0c |
18-Aug-2008 |
Chris Lattner <sabre@nondot.org> |
Several cleanups and tweaks to diagnostics in Sema::ActOnAsmStmt, no other functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54941 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
ead053a959400008395942da790cdaf54632f222 |
17-Aug-2008 |
Chris Lattner <sabre@nondot.org> |
various updates to match r54873 on mainline. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54874 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaStmt.cpp
|
9aa77f137b9b368f5bf46e2ab7bc7bd1d5755a5b |
17-Aug-2008 |
Chris Lattner <sabre@nondot.org> |
various updates to match r54873 on mainline. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54874 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaStmt.cpp
|
95de23a5bbe4da712e9b0d6fde5cf463c0289795 |
16-Aug-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Move the type checking that Sema::ActOnCastExpr does into a new Sema::CheckCastTypes function so that it can be reused. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54852 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
6c2dc4d99392042a70dff89ee8cfa9594075709e |
16-Aug-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Move the type checking that Sema::ActOnCastExpr does into a new Sema::CheckCastTypes function so that it can be reused. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54852 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
4837ae7c6630d2f6381ca0fd53c1e71742d5305f |
15-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
Change Parser & Sema to use interned "super" for comparions. - Added as private members for each because it is not clear where to put the common definition. Perhaps the IdentifierInfos all of these "pseudo-keywords" should be collected into one place (this would KnownFunctionIDs and Objective-C property IDs, for example). Remove Token::isNamedIdentifier. - There isn't a good reason to use strcmp when we have interned strings, and there isn't a good reason to encourage clients to do so. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54794 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaExpr.cpp
emaExprObjC.cpp
|
662e8b5647adbb1bc9eeceece7b64600cfa87471 |
15-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
Change Parser & Sema to use interned "super" for comparions. - Added as private members for each because it is not clear where to put the common definition. Perhaps the IdentifierInfos all of these "pseudo-keywords" should be collected into one place (this would KnownFunctionIDs and Objective-C property IDs, for example). Remove Token::isNamedIdentifier. - There isn't a good reason to use strcmp when we have interned strings, and there isn't a good reason to encourage clients to do so. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54794 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaExpr.cpp
emaExprObjC.cpp
|
61000b1f39b1e1742131d8cb90926ec24402a290 |
14-Aug-2008 |
Chris Lattner <sabre@nondot.org> |
Make diagnostics relating to the callee hilight just the callee and put the caret on the ()'s. e.g. produces: t.c:13:9: error: called object is not a function or function pointer ((B)a)(); ~~~~~~^ instead of: t.c:13:3: error: called object is not a function or function pointer ((B)a)(); ^~~~~~~~ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54775 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ad2018f4cde3607e83d9ebb195a82cb87c98f236 |
14-Aug-2008 |
Chris Lattner <sabre@nondot.org> |
Make diagnostics relating to the callee hilight just the callee and put the caret on the ()'s. e.g. produces: t.c:13:9: error: called object is not a function or function pointer ((B)a)(); ~~~~~~^ instead of: t.c:13:3: error: called object is not a function or function pointer ((B)a)(); ^~~~~~~~ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54775 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
7cbcbf42f86982eb686e00bbe28432a51f683102 |
14-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
Update some isIntegerConstantExpr uses to use getIntegerConstantExprValue where appropriate. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54771 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
32442bbc98bafa512fa42d46fedf60ed7d79f574 |
14-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
Update some isIntegerConstantExpr uses to use getIntegerConstantExprValue where appropriate. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54771 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
9a9e5218f3ec57e66d7a0829f5c2ebda487e384a |
13-Aug-2008 |
Steve Naroff <snaroff@apple.com> |
Sema::ActOnStartProtocolInterface(): Make sure the protocol decl has a valid start location. The following case resulted in an invalid start location: // start location not being set for ObjCProtocolDecl AST (when a forward reference is in scope). @protocol Buggy; @protocol Buggy @optional - whatever; @end git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54740 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
f11b5088ec16b27d526489b10da20273eb268975 |
13-Aug-2008 |
Steve Naroff <snaroff@apple.com> |
Sema::ActOnStartProtocolInterface(): Make sure the protocol decl has a valid start location. The following case resulted in an invalid start location: // start location not being set for ObjCProtocolDecl AST (when a forward reference is in scope). @protocol Buggy; @protocol Buggy @optional - whatever; @end git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54740 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
e0ad215b709fba79b3a1ead9af31a6f8bd3ee77a |
11-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
More #include cleaning - Kill unnecessary #includes in .cpp files. This is an automatic sweep so some things removed are actually used, but happen to be included by a previous header. I tried to get rid of the obvious examples and this was the easiest way to trim the #includes in one fell swoop. - We now return to regularly scheduled development. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54632 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
ema.cpp
emaChecking.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaInit.cpp
emaStmt.cpp
emaType.cpp
|
acc5f3e42334525bf28c86471551f83dfce222d5 |
11-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
More #include cleaning - Kill unnecessary #includes in .cpp files. This is an automatic sweep so some things removed are actually used, but happen to be included by a previous header. I tried to get rid of the obvious examples and this was the easiest way to trim the #includes in one fell swoop. - We now return to regularly scheduled development. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54632 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
ema.cpp
emaChecking.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaInit.cpp
emaStmt.cpp
emaType.cpp
|
64789f8496d9bd3ff5ba3686feca0de1a25d5a32 |
11-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
More #include cleaning - Drop {Decl.h,DeclObjC.h,IdentifierTable.h} from Expr.h - Moved Sema::getCurMethodDecl() out of line (dependent on ObjCMethodDecl via dyn_cast). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54629 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaChecking.cpp
emaDecl.cpp
emaExpr.cpp
emaStmt.cpp
|
c4a1dea2dc56bd1357ec91b829a0b9e68229a13e |
11-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
More #include cleaning - Drop {Decl.h,DeclObjC.h,IdentifierTable.h} from Expr.h - Moved Sema::getCurMethodDecl() out of line (dependent on ObjCMethodDecl via dyn_cast). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54629 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaChecking.cpp
emaDecl.cpp
emaExpr.cpp
emaStmt.cpp
|
de30073d24ef186212a70e2a21f488767e45b7fb |
11-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
More #include cleaning - Drop Expr.h,RecordLayout.h from ASTContext.h (for DeclBase.h and SourceLocation.h) - Move ASTContext constructor into implementation git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54627 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
ema.cpp
emaType.cpp
|
e91593ef084479340582b2ba177b44be50a717b7 |
11-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
More #include cleaning - Drop Expr.h,RecordLayout.h from ASTContext.h (for DeclBase.h and SourceLocation.h) - Move ASTContext constructor into implementation git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54627 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
ema.cpp
emaType.cpp
|
cc7b160a9a4400a0c38da1caa97ba383337d08bf |
11-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
More #include cleaning - Drop Diagnostic.h from DeclSpec.h, move utility Diag methods into implementation .cpp git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54626 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
emaExpr.cpp
emaType.cpp
|
e4858a65a93fb36c099d8dd2ea0a98e33e77687e |
11-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
More #include cleaning - Drop Diagnostic.h from DeclSpec.h, move utility Diag methods into implementation .cpp git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54626 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
emaExpr.cpp
emaType.cpp
|
8d03cbe313bd0577f66d84e0f355835017da6f72 |
11-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
Minor #include cleaning - Drop TokenKinds.h from Action.h - Move DeclSpec.h from Sema.h into individual Sema .cpp files git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54625 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaInit.cpp
|
12bc692a78582f1cc32791325981aadcffb04c5e |
11-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
Minor #include cleaning - Drop TokenKinds.h from Action.h - Move DeclSpec.h from Sema.h into individual Sema .cpp files git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54625 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaInit.cpp
|
0ccfaa48d37ba626d1e6f1322d03e74110be4215 |
10-Aug-2008 |
Steve Naroff <snaroff@apple.com> |
Cleanup ObjCSuperRefExpr (remove last usage and AST node:-). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54617 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
76de9d7a32b16246e2acd0d1ecd7355faceb4901 |
10-Aug-2008 |
Steve Naroff <snaroff@apple.com> |
Cleanup ObjCSuperRefExpr (remove last usage and AST node:-). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54617 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ff5b3a862b84e22452a1bd8f6dd3af4b727f382c |
10-Aug-2008 |
Steve Naroff <snaroff@apple.com> |
InitListChecker::CheckListElementTypes(): Check for function types and issue an appropriate diagnostic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54614 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
613535273b90dc5cbd0f9fa056dedc93801ea35a |
10-Aug-2008 |
Steve Naroff <snaroff@apple.com> |
InitListChecker::CheckListElementTypes(): Check for function types and issue an appropriate diagnostic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54614 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
d580209c39d62c52110b39401efec74ddd9762da |
10-Aug-2008 |
Steve Naroff <snaroff@apple.com> |
Cleanup from yesterday...make isTentativeDefinition() a static helper function (no need for it to be part of the Sema API). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54613 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
d4d46cd61673202d6c32c51a8bc0abc937bff808 |
10-Aug-2008 |
Steve Naroff <snaroff@apple.com> |
Cleanup from yesterday...make isTentativeDefinition() a static helper function (no need for it to be part of the Sema API). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54613 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
4b6bd3cb16fa5ad29e7f55172f873409f171e577 |
10-Aug-2008 |
Steve Naroff <snaroff@apple.com> |
Sema::CheckForFileScopedRedefinitions(): Make sure tentative decls of incomplete array types are completed (and diagnosed properly). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54612 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f855e6fbebb718a1cca75ec2efba12f3583fe614 |
10-Aug-2008 |
Steve Naroff <snaroff@apple.com> |
Sema::CheckForFileScopedRedefinitions(): Make sure tentative decls of incomplete array types are completed (and diagnosed properly). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54612 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
941c0104030b3468e896fc24eecb820fdff6d41b |
10-Aug-2008 |
Chris Lattner <sabre@nondot.org> |
tighten up some code and some wording on diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54607 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
d1a0b6d3dfb208f638d3d750b588d9c0daa49289 |
10-Aug-2008 |
Chris Lattner <sabre@nondot.org> |
tighten up some code and some wording on diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54607 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
69909293d4d0bdffef36121651906f7d2e767d85 |
10-Aug-2008 |
Chris Lattner <sabre@nondot.org> |
rename PreDefinedExpr -> PredefinedExpr git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54605 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
|
d9f6910f4ef37c0e8eeee2a01287d9572c3176ef |
10-Aug-2008 |
Chris Lattner <sabre@nondot.org> |
rename PreDefinedExpr -> PredefinedExpr git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54605 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
|
171a4630db7eff69b57c12e29e1ed1b2ac6f668c |
10-Aug-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Make sure to count the struct elements correctly; here, we want the member count. The count returned by numStructUnionElements is the number of initializers that will be consumed, not the number of members to iterate through. Fixes PR2534. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54601 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
1bb516c8615714317c72ec8065cc3177714d336e |
10-Aug-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Make sure to count the struct elements correctly; here, we want the member count. The count returned by numStructUnionElements is the number of initializers that will be consumed, not the number of members to iterate through. Fixes PR2534. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54601 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
dd2b9af09dd1ed6107a089dd6e65471e52cb627d |
10-Aug-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Fix for PR2631; make va_arg work correctly on x86-64. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54600 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
c34bcde8d2aa7430cb2f3abb003d9248842748b8 |
10-Aug-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Fix for PR2631; make va_arg work correctly on x86-64. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54600 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
2a4e1161b2d5450e0e91d00993a4d2e04df1731f |
09-Aug-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Change 'Wchar' to 'WChar' casing, for consistency. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54588 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
55f4b02bc71e7347986c6a5249bef635aac1901a |
09-Aug-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Change 'Wchar' to 'WChar' casing, for consistency. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54588 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
1ed03e75c3a03edea7234a3021f76e808d283f2f |
09-Aug-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Implement support for the 'wchar_t' C++ type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54585 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
64c438a4be2a871fa43c78264663ba1e9788b94d |
09-Aug-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Implement support for the 'wchar_t' C++ type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54585 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
1250817e9eb68ea99c18bae560bd7411a1b1021a |
09-Aug-2008 |
Steve Naroff <snaroff@apple.com> |
Fix Sema::MergeVarDecl() to better handle type compatibility. The previous code was trying to handle arrays specially (which didn't work for pointers to array). Removed local helper function areEquivalentArrayTypes(), replacing it's use with the more general ASTContext::typesAreCompatible() predicate. Even though the test case this fixes is in "tentative-decls.c", this bug didn't have anything to do with our handling of tentative definitions (which is what I first expected). In any event, this is a tricky area of the spec. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54583 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
907747b3a67a41420ead8ef1fc5e6bd9dc9e0ad9 |
09-Aug-2008 |
Steve Naroff <snaroff@apple.com> |
Fix Sema::MergeVarDecl() to better handle type compatibility. The previous code was trying to handle arrays specially (which didn't work for pointers to array). Removed local helper function areEquivalentArrayTypes(), replacing it's use with the more general ASTContext::typesAreCompatible() predicate. Even though the test case this fixes is in "tentative-decls.c", this bug didn't have anything to do with our handling of tentative definitions (which is what I first expected). In any event, this is a tricky area of the spec. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54583 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
7c210ea9155bc34ca3a89a853db25b1e68729cb2 |
09-Aug-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
When in C++, invoke ASTConsumer::HandleTagDeclDefinition in Sema::ActOnFinishCXXClassDef, at which point the C++ struct/class/union is fully parsed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54569 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
a4755c6ffab02586162170199d0c0594efaa273c |
09-Aug-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
When in C++, invoke ASTConsumer::HandleTagDeclDefinition in Sema::ActOnFinishCXXClassDef, at which point the C++ struct/class/union is fully parsed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54569 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
|
448b4e4e3b3924b26d2dd855c81db54570a58b51 |
09-Aug-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Passing right brace location to ActOnFinishCXXClassDef is redundant, since it gets passed to ActOnFinishCXXMemberSpecification too. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54567 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
5b7f0c8f470f0b23ee95e467b5951e2bed733be1 |
09-Aug-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Passing right brace location to ActOnFinishCXXClassDef is redundant, since it gets passed to ActOnFinishCXXMemberSpecification too. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54567 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
b5e781595da169fdb636c2a2062d41a220d0f91e |
08-Aug-2008 |
Steve Naroff <snaroff@apple.com> |
Fix issues with C "tentative" definitions. - Move checking from MergeVarDecl->FinializeDeclaratorGroup. Since MergeVarDecl is called before the initializer is attacted, it can't be done there (this removes a long standing FIXME). - Add Sema::isTentativeDefinition() and Sema::CheckForFileScopedRedefinitions(). - Remove FIXME's and touch-up test case. Still some more work to do (forthcoming)... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54533 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
ff9eb1fe0a16a34c355db0d1bc4a9d0f7a276c73 |
08-Aug-2008 |
Steve Naroff <snaroff@apple.com> |
Fix issues with C "tentative" definitions. - Move checking from MergeVarDecl->FinializeDeclaratorGroup. Since MergeVarDecl is called before the initializer is attacted, it can't be done there (this removes a long standing FIXME). - Add Sema::isTentativeDefinition() and Sema::CheckForFileScopedRedefinitions(). - Remove FIXME's and touch-up test case. Still some more work to do (forthcoming)... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54533 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
50aab983b538c9df3400aa41178648e3d1bd3106 |
08-Aug-2008 |
Ted Kremenek <kremenek@apple.com> |
ParseAST now never releases the passed ASTConsumer. This is the responsibility of the client. The motivation is that clients may either: (a) query the ASTConsumer object after AST parsing to collect data/etc. (b) reuse the ASTConsumer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54502 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
|
7e7e6253d45eb2ca4a4ad9cafcb8b80693f0670a |
08-Aug-2008 |
Ted Kremenek <kremenek@apple.com> |
ParseAST now never releases the passed ASTConsumer. This is the responsibility of the client. The motivation is that clients may either: (a) query the ASTConsumer object after AST parsing to collect data/etc. (b) reuse the ASTConsumer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54502 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
|
ac7c457aaa34441b61ae0af1150db301f2b8dac4 |
08-Aug-2008 |
Ted Kremenek <kremenek@apple.com> |
Use DeclStmt::decl_iterator instead of walking the getNextDeclarator() chain. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54501 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
909cd267dd8f66867c0aaef3bef052dc27bde47c |
08-Aug-2008 |
Ted Kremenek <kremenek@apple.com> |
Use DeclStmt::decl_iterator instead of walking the getNextDeclarator() chain. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54501 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
2866ea403a80f514798c50f5d2d49479a1c0cf4c |
07-Aug-2008 |
Ted Kremenek <kremenek@apple.com> |
ParseAST now conditionally deletes the passed ASTConsumer. ModuleBuilder now performs llvmgen in HandleTranslationUnit. This patch follows from the discussion on the following thread on cfe-commits: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20080804/006849.html git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54486 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
|
159346a82bfa5063ead81af903a2bc5e5a9e5b36 |
07-Aug-2008 |
Ted Kremenek <kremenek@apple.com> |
ParseAST now conditionally deletes the passed ASTConsumer. ModuleBuilder now performs llvmgen in HandleTranslationUnit. This patch follows from the discussion on the following thread on cfe-commits: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20080804/006849.html git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54486 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
|
b0726b847ab79d216135077c58ab8a393ed186b9 |
07-Aug-2008 |
Steve Naroff <snaroff@apple.com> |
Sema::ActOnEnumBody(): handle nested enum redefinitions. Fixes <rdar://problem/6093889> Nested enum redefinition crashes sema. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54463 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
02408c67c404267a23ee1e1ab23344fc4b1bff17 |
07-Aug-2008 |
Steve Naroff <snaroff@apple.com> |
Sema::ActOnEnumBody(): handle nested enum redefinitions. Fixes <rdar://problem/6093889> Nested enum redefinition crashes sema. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54463 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
4159e8acf96fc5fe3e3a302360a66a5e5a6f6606 |
07-Aug-2008 |
Ted Kremenek <kremenek@apple.com> |
attribute "unused" also applies to functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54440 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
356b63a6668d8b010b53921941576189ee4bd459 |
07-Aug-2008 |
Ted Kremenek <kremenek@apple.com> |
attribute "unused" also applies to functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54440 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
ea19edd9254975c223a39a9a934cb7619e82a806 |
07-Aug-2008 |
Ted Kremenek <kremenek@apple.com> |
Fix <rdar://problem/6125909>. Unify logic in return-of-stack-check (Sema) for casts and implicit casts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54439 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
54b5274f2c190331438375ad114dad12ae098b57 |
07-Aug-2008 |
Ted Kremenek <kremenek@apple.com> |
Fix <rdar://problem/6125909>. Unify logic in return-of-stack-check (Sema) for casts and implicit casts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54439 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
ced8914ca8747b12b1c9e311a30629b62cbb6ffb |
06-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
Implement GNU asm-label extension support in CodeGen. This fixes scimark2 on Darwin. - Added Sema support for asm-label on variables, which I forgot before. - Update CodeGen to use GlobalDeclMap to determine if static Decls require emission (instead of LLVM module name lookup). Important since the Decl name and the LLVM module name can differ. - <rdar://problem/6116729> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54388 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
a735ad8be5536a1cd3e9817ec27dfeb2a0c1d5ca |
06-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
Implement GNU asm-label extension support in CodeGen. This fixes scimark2 on Darwin. - Added Sema support for asm-label on variables, which I forgot before. - Update CodeGen to use GlobalDeclMap to determine if static Decls require emission (instead of LLVM module name lookup). Important since the Decl name and the LLVM module name can differ. - <rdar://problem/6116729> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54388 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
72eaf8a245549fdc2adeaeeb579102635845d033 |
05-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
Move AsmLabel into Declarator instead of just a parameter to ActOnDeclarator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54353 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
914701ed49f31323176a784b49df05a0d177d1ad |
05-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
Move AsmLabel into Declarator instead of just a parameter to ActOnDeclarator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54353 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
c3540ff2f5b163ee0616e5a7d90424584a3f760b |
05-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
Add more Parser/Sema support for GCC asm-label extension. - ActOnDeclarator now takes an additional parameter which is the AsmLabel if used. Its unfortunate that this bubbles up this high, but we cannot just lump it in as an attribute without mistakenly *accepting* it as an attribute. - The actual asm-label itself is, however, encoded as an AsmLabelAttr on the FunctionDecl. - Slightly improved parser error recovery on malformed asm-labels. - CodeGen support still missing... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54339 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
a80f8749f2968d19595ca2544114932bf0ca2c11 |
05-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
Add more Parser/Sema support for GCC asm-label extension. - ActOnDeclarator now takes an additional parameter which is the AsmLabel if used. Its unfortunate that this bubbles up this high, but we cannot just lump it in as an attribute without mistakenly *accepting* it as an attribute. - The actual asm-label itself is, however, encoded as an AsmLabelAttr on the FunctionDecl. - Slightly improved parser error recovery on malformed asm-labels. - CodeGen support still missing... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54339 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
b45f75c5405cbc2b3c1d8e970ada6b56ff72825a |
04-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
Fix several issues in checking of address-of expressions. - clang was erroneously accepting address-of applied to lvalue expressions involving pointer arithmetic. - clang was erroneously rejecting address-of applied to deref expressions of pointer-typed variables. - Improved existing test case. - Fixes: <rdar://problem/6113867>, <rdar://problem/6080158> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54326 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
1e76ce6e5f892c89c9958657d44c323fb70f748c |
04-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
Fix several issues in checking of address-of expressions. - clang was erroneously accepting address-of applied to lvalue expressions involving pointer arithmetic. - clang was erroneously rejecting address-of applied to deref expressions of pointer-typed variables. - Improved existing test case. - Fixes: <rdar://problem/6113867>, <rdar://problem/6080158> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54326 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
879788d52c9793b36c428e81c5d72bf6efb4e788 |
04-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
Add CodeGen support for indirect goto. - Follows emission scheme used by llvm-gcc, i.e. invent an id for each label whose address is taken and replace each indirect goto by a switch to each possible target. - Currently we emit a switch for each indirect goto instead of merging them as llvm-gcc does. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54318 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
0ffb125996336fc7602b162c0a9e392f1a93060f |
04-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
Add CodeGen support for indirect goto. - Follows emission scheme used by llvm-gcc, i.e. invent an id for each label whose address is taken and replace each indirect goto by a switch to each possible target. - Currently we emit a switch for each indirect goto instead of merging them as llvm-gcc does. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54318 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
a1923f6d95601582f4a5c3924b8e1c5ac3f658b3 |
04-Aug-2008 |
Chris Lattner <sabre@nondot.org> |
Finally fix PR2189. This makes a fairly invasive but important change to move getAsArrayType into ASTContext instead of being a method on type. This is required because getAsArrayType(const AT), where AT is a typedef for "int[10]" needs to return ArrayType(const int, 10). Fixing this greatly simplifies getArrayDecayedType, which is a good sign. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54317 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
emaInit.cpp
|
c63a1f276f7b324fd9a4be82098b1c8f7bf30733 |
04-Aug-2008 |
Chris Lattner <sabre@nondot.org> |
Finally fix PR2189. This makes a fairly invasive but important change to move getAsArrayType into ASTContext instead of being a method on type. This is required because getAsArrayType(const AT), where AT is a typedef for "int[10]" needs to return ArrayType(const int, 10). Fixing this greatly simplifies getArrayDecayedType, which is a good sign. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54317 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
emaInit.cpp
|
46403638c12d9608d7f0370f318a72a01d14f56d |
01-Aug-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Wherever a type is used/returned from the Action module, use TypeTy instead of DeclTy or void. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54265 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
39caa088097dbd2c805041bfd964b3fb9026d0be |
01-Aug-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Wherever a type is used/returned from the Action module, use TypeTy instead of DeclTy or void. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54265 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
|
a3f9933e5dad190876a49d6ce84db57de7aa5979 |
01-Aug-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Make the default constructor of IdentifierResolver::iterator public. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54264 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.h
|
b53c784cf6cef2673c481879b44edb3eede8bc2e |
01-Aug-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Make the default constructor of IdentifierResolver::iterator public. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54264 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.h
|
8716a019f15ee20184327c7905ef05f2106ba6c6 |
01-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
Support __attribute__(({con,de}structor)) in Parse & Sema - Including possible priority argument - In other news, the attribute parsing code really needs a cleanup git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54257 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
3068ae0feb5d477477f45045f7ec9d0414fe57f3 |
01-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
Support __attribute__(({con,de}structor)) in Parse & Sema - Including possible priority argument - In other news, the attribute parsing code really needs a cleanup git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54257 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
a55e321bd645398b514e246981c04a4889ee2472 |
27-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
make "call foo.dump()" and "call foo->dump()" work in GDB, with QualTypes and Types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54116 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
c36d405a02fab41f6c45cb2bc750d64949742903 |
27-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
make "call foo.dump()" and "call foo->dump()" work in GDB, with QualTypes and Types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54116 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b545786979d0f28085b11a3b0fc4e04b53aba41f |
27-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
remove two uses of getCanonicalType I missed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54114 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
1b63eef830b7a2501f1ab8e8fa38068e5e07ed32 |
27-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
remove two uses of getCanonicalType I missed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54114 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
d5a56aae166344e13f1f8c845530beee0868db49 |
27-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
change more instances of QualType::getCanonicalType to call ASTContext::getCanonicalType instead (PR2189) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54105 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaChecking.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprObjC.cpp
|
b77792eabf5882cf9af8cc810599b20432fda6c2 |
27-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
change more instances of QualType::getCanonicalType to call ASTContext::getCanonicalType instead (PR2189) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54105 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaChecking.cpp
emaDecl.cpp
emaDeclAttr.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprObjC.cpp
|
25168a59a231071fb6c8d5bfd8f80612d58f9fb1 |
26-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
convert more code to use ASTContext to get canonical types instead of doing it directly. This is required for PR2189. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54102 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaStmt.cpp
|
28be73f74c9e241a23ea24fe5756623de6bf1084 |
26-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
convert more code to use ASTContext to get canonical types instead of doing it directly. This is required for PR2189. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54102 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaStmt.cpp
|
c5cff3042a9b78af61d0d39ec81c8516ebf9e05b |
26-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
remove a helper method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54101 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
717250a2052ea65d95405127d4e5836a564dad18 |
26-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
remove a helper method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54101 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
200964f0c96d58eb1fee877f5a48459d91e3128a |
26-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
fix some problems handling stmtexprs with labels (PR2374), and improve 'expression unused' diagnostics for stmtexprs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54098 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
611b2eccaf3869f32de51ecc02985426d1c0aaef |
26-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
fix some problems handling stmtexprs with labels (PR2374), and improve 'expression unused' diagnostics for stmtexprs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54098 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ae1ae49203c63d5a462508875ed39f24c71bf74b |
26-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
Pull protocol resolution of out ActOnStartClassInterface, this is also the last client of the old ParseObjCProtocolReferences, so it also removes it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54094 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
06036d3709955a53297b4cbe14e20db88f321470 |
26-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
Pull protocol resolution of out ActOnStartClassInterface, this is also the last client of the old ParseObjCProtocolReferences, so it also removes it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54094 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
45142b9beee4734e5d3d438c4f130e1b37fbc12a |
26-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
refactor protocol resolution out of ActOnStartCategoryInterface git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54093 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
6bd6d0b9d8944c5e192097bef24f2becb83af172 |
26-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
refactor protocol resolution out of ActOnStartCategoryInterface git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54093 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
2bdedd6fa431d9d90589182dd0d3baf24dbb371c |
26-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
pull protocol resolution out into ActOnStartProtocolInterface. This temporarily duplicates ParseObjCProtocolReferences, but it will be removed in the future. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54092 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
e13b9595dc1e2f4288bec34f3412359f648e84a5 |
26-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
pull protocol resolution out into ActOnStartProtocolInterface. This temporarily duplicates ParseObjCProtocolReferences, but it will be removed in the future. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54092 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
17d50a95b43852f7031533c353373d4986cb6744 |
26-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
simplify some code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54091 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
eacc39212e5960b2680067c006384c2e4804873a |
26-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
simplify some code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54091 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
fc513a61e8c3cfbdb892f0fdc279b417b2b8eee2 |
26-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
remove duplicate error message. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54090 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
e281c86515cca9162170ca5d6ede198acf343428 |
26-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
remove duplicate error message. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54090 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
ada637950c0a7cd90aeb30cc7be4963b948b2ce3 |
26-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
make DeclSpec manage its own protocol qualifier list memory instead of having clients allocate the memory and it delete it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54087 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
ae4da6150bb837311a2f0f958b01a2989066ba90 |
26-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
make DeclSpec manage its own protocol qualifier list memory instead of having clients allocate the memory and it delete it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54087 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
4a68fe04deb7ab89ac7566dc55b3b623129c72e5 |
26-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
fix several problems with the protocol qualified id handling where id was implicit. First, fix canonical type handling of these, since protocol qualified id's are always canonical. Next, enhance SemaType to actually make these when used (instead of int) allowing them to actually be used when appropriate. Finally remove a bunch of logic relating to the mishandling of canonical types with protocol-qual id's. This fixes rdar://5986251 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54083 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
62f5f7ffad57e0c2af2b308af3735351505937cb |
26-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
fix several problems with the protocol qualified id handling where id was implicit. First, fix canonical type handling of these, since protocol qualified id's are always canonical. Next, enhance SemaType to actually make these when used (instead of int) allowing them to actually be used when appropriate. Finally remove a bunch of logic relating to the mishandling of canonical types with protocol-qual id's. This fixes rdar://5986251 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54083 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
bd69502789a9307ccdac83a43321be7d91ed5991 |
26-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
GCC supports the complex conjugate operator (an extension) on complex int as well as complex float. rdar://6097730 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54080 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
02a65146aaa1f209013415e9247771805ca2ad5d |
26-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
GCC supports the complex conjugate operator (an extension) on complex int as well as complex float. rdar://6097730 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54080 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e02e440a32375a1635d634f21b535032043504d3 |
26-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
Fix rdar://6095136, various crashes with incomplete enum types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54074 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
834a72ac74cf4ff07ba6215545dba3db578f8a07 |
26-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
Fix rdar://6095136, various crashes with incomplete enum types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54074 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
9305c3d70cf5448e6e428ad0e3d7d54d3eee19e7 |
26-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
move a method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54069 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
05faf17d454998ee498bf1a4e75500e32047b19b |
26-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
move a method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54069 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
08b3c47f2f89032cbef88386968d3fc75defdcd6 |
26-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
Fix a couple bugs in aggregate cast processing: 1) fix precedecence problem with &&/||. 2) use canonical types for comparison instead of raw types. 3) emit an ext-warn for a gnu extension. Also simplify the code to make it less nested. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54068 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
32b62b6c68ba69799cfca560e3d255897f52887e |
26-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
Fix a couple bugs in aggregate cast processing: 1) fix precedecence problem with &&/||. 2) use canonical types for comparison instead of raw types. 3) emit an ext-warn for a gnu extension. Also simplify the code to make it less nested. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54068 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
6077e2f960594625a8407a8dad5d125f1051fd5e |
26-Jul-2008 |
Ted Kremenek <kremenek@apple.com> |
Format string errors should underling the format string, not the function name. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54067 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
9801c8b47a689c0633f7cb4df984aa8c1a52a658 |
26-Jul-2008 |
Ted Kremenek <kremenek@apple.com> |
Format string errors should underling the format string, not the function name. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54067 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
f814d8848e89ffab19dc4e66858ccaa9359e9aec |
25-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
make sizeof/alignof diagnostics highlight their operand with a sourcerange. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54066 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
bb280a482bcbb74a10abf1948704a7e51b5f0b4c |
25-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
make sizeof/alignof diagnostics highlight their operand with a sourcerange. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54066 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
2aa688209697782797002b4f0fa109b7bf62c256 |
25-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
c89 does not perform array -> pointer promotion unless the array is an lvalue. This is different than C99. This fixes the rest of rdar://6095180. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54064 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
67d33d8535b53046760ec6c4aa440e4f91df00dd |
25-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
c89 does not perform array -> pointer promotion unless the array is an lvalue. This is different than C99. This fixes the rest of rdar://6095180. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54064 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
299b884d22f1356e0fe3ebbfb3a68a546bb6056a |
25-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
move some code, no other change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54063 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e7a2e91ac610dd475962586e41dc52e85c39f1d8 |
25-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
move some code, no other change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54063 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
03c430fdefe78975b1a74ae19976e8aff58f516f |
25-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
In c99 mode, comma does do function/array promotion even though it does not do unary promotions (like short->int). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54058 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
53fcaa9409734b8a41c10894d40267e52175b30a |
25-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
In c99 mode, comma does do function/array promotion even though it does not do unary promotions (like short->int). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54058 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
4405b2e8dac351fc8204c492202dca3f70720cff |
25-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
Comma does not perform unary promotions, rdar://6095180 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54045 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
080b332959f0a1886c8d0a515f656fe6215a9ce3 |
25-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
Comma does not perform unary promotions, rdar://6095180 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54045 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
2c7e0e547f37c693fe4554e725c8cb23cab0a1c5 |
25-Jul-2008 |
Steve Naroff <snaroff@apple.com> |
Cleaunup Sema::ActOnClassMessage(). This commit: (a) removes a bogus warning. (b) removes an undesirable usage of the ObjCMessageExpr constructor that takes an IdentifierInfo * (which I will abolish). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54042 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
7c778f1c549a8ae95d50a819fd537df78da16426 |
25-Jul-2008 |
Steve Naroff <snaroff@apple.com> |
Cleaunup Sema::ActOnClassMessage(). This commit: (a) removes a bogus warning. (b) removes an undesirable usage of the ObjCMessageExpr constructor that takes an IdentifierInfo * (which I will abolish). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54042 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
bef8d62c01b9488bf3750f56953c885c839393b4 |
25-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
Reject typedef redefinitions when the underlying types are not identical, even if in a system header etc. rdar://6079937 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54038 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
99cb9976efe84f44b3b1957c4fe042dae366b989 |
25-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
Reject typedef redefinitions when the underlying types are not identical, even if in a system header etc. rdar://6079937 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54038 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
3ac43f97b56e150f5288ff8cf46713e9d5125e79 |
25-Jul-2008 |
Steve Naroff <snaroff@apple.com> |
Move fix in r54013 from the parser to sema. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54032 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclObjC.cpp
|
394f3f483fa4e7b472630cfcd03f7840520958c5 |
25-Jul-2008 |
Steve Naroff <snaroff@apple.com> |
Move fix in r54013 from the parser to sema. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54032 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclObjC.cpp
|
ce13e1e523cd5a65934eb508c93074b8c43fcf74 |
25-Jul-2008 |
Ted Kremenek <kremenek@apple.com> |
Implemented Sema support for attribute "unused". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54008 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
73798892751e378cbcdef43579c1d41685091fd0 |
25-Jul-2008 |
Ted Kremenek <kremenek@apple.com> |
Implemented Sema support for attribute "unused". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54008 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
118930edc07e9a91098f48031740d57c0f89114e |
25-Jul-2008 |
Ted Kremenek <kremenek@apple.com> |
Move isObjCObjectPointerType() from Sema to ASTContext. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53998 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaStmt.cpp
|
b6ccaac65ca72f72954eb3893bbd940bedd23f00 |
25-Jul-2008 |
Ted Kremenek <kremenek@apple.com> |
Move isObjCObjectPointerType() from Sema to ASTContext. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53998 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaStmt.cpp
|
91a6920877a7288a84ac8d04d429435f9b9e1848 |
24-Jul-2008 |
Steve Naroff <snaroff@apple.com> |
Fix Sema::ActOnClassMessage() to pass through the identifier for "super". This fixes a critical rewriter bug (<rdar://problem/6096760> clang ObjC rewriter: 'self' not expected value in class method called with 'super'). Also added a couple FIXME's since I'm not happy with my fix to Sema. It would be nicer if the super handling for class/instance messages was the same (based on PreDefinedExpr). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53994 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
fc93d52ada07d52de0ad4fd051b6a08e21d421ff |
24-Jul-2008 |
Steve Naroff <snaroff@apple.com> |
Fix Sema::ActOnClassMessage() to pass through the identifier for "super". This fixes a critical rewriter bug (<rdar://problem/6096760> clang ObjC rewriter: 'self' not expected value in class method called with 'super'). Also added a couple FIXME's since I'm not happy with my fix to Sema. It would be nicer if the super handling for class/instance messages was the same (based on PreDefinedExpr). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53994 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
173dd3184b3e0f7b19a96b054303c87be3afb89f |
23-Jul-2008 |
Ted Kremenek <kremenek@apple.com> |
When constructing an ObjCIvarDecl object in Sema, provide its visibility up front instead of setting it afterwards. This change also fixes a subtle bug where the access control of an ivar would be initialized to garbage if we didn't have an explicit visibility specifier (e.g., @private). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53955 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
b8db21d4df5fbb6ce1ace6411b82d3d623d789de |
23-Jul-2008 |
Ted Kremenek <kremenek@apple.com> |
When constructing an ObjCIvarDecl object in Sema, provide its visibility up front instead of setting it afterwards. This change also fixes a subtle bug where the access control of an ivar would be initialized to garbage if we didn't have an explicit visibility specifier (e.g., @private). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53955 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
8441802366c64e28c71f13514e86a9f6465109a3 |
23-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
Fix rdar://6094010 various asserts happening with wide strings in inline asm. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53947 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
6bc52112dbc54551bd8e215d95bba4791b2275f7 |
23-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
Fix rdar://6094010 various asserts happening with wide strings in inline asm. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53947 91177308-0d34-0410-b5e6-96231b3b80d8
emaStmt.cpp
|
26151d194da55b7d44e8208163f4e224028a6c81 |
22-Jul-2008 |
Ted Kremenek <kremenek@apple.com> |
Use llvm::utostr_32 instead of ostringstream. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53914 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
6e1eb87c04a3acd50888375dad59fac06b7ceb1f |
22-Jul-2008 |
Ted Kremenek <kremenek@apple.com> |
Use llvm::utostr_32 instead of ostringstream. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53914 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
5b0de85aa9a53b70f57e4560cb8e3f509973df39 |
22-Jul-2008 |
Daniel Dunbar <daniel@zuster.org> |
Implement nans, prefetch, and trap builtins. This closes <rdar://problem/6080720>, support for __builtin_constant_p has been filed separately. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53885 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
|
4493f79fce48cd9cbd9f55fa9d452cde736747a0 |
22-Jul-2008 |
Daniel Dunbar <daniel@zuster.org> |
Implement nans, prefetch, and trap builtins. This closes <rdar://problem/6080720>, support for __builtin_constant_p has been filed separately. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53885 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
|
e705e5ec34e4ab296c2a3831505fde62270fb778 |
22-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
minor cleanup to the actions interface to pass around SmallVectorImpl instead of a specific smallvector size. Fix protocol lists to pass down proper location info, so we get diagnostics like this: t.m:3:35: error: cannot find protocol definition for 'NSCopying', referenced by 'NSWhatever' @interface NSWhatever : NSObject <NSCopying> ^ instead of this: t.m:3:44: error: cannot find protocol definition for 'NSCopying', referenced by 'NSWhatever' @interface NSWhatever : NSObject <NSCopying> ^ Add a new IdentifierLocPair typedef which is just a pair<IdentifierInfo*, SourceLocation> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53883 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclObjC.cpp
|
7caeabd868d46cf4e68478c6e9136dae4e735d21 |
22-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
minor cleanup to the actions interface to pass around SmallVectorImpl instead of a specific smallvector size. Fix protocol lists to pass down proper location info, so we get diagnostics like this: t.m:3:35: error: cannot find protocol definition for 'NSCopying', referenced by 'NSWhatever' @interface NSWhatever : NSObject <NSCopying> ^ instead of this: t.m:3:44: error: cannot find protocol definition for 'NSCopying', referenced by 'NSWhatever' @interface NSWhatever : NSObject <NSCopying> ^ Add a new IdentifierLocPair typedef which is just a pair<IdentifierInfo*, SourceLocation> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53883 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclObjC.cpp
|
178cee2ff9545cff3df403c95ca2f91f5e0842e7 |
22-Jul-2008 |
Ted Kremenek <kremenek@apple.com> |
Add test case for nonnull attribute. Fix indexing bug. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53882 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
465172f304248a9aab6f2c398a836ce4e25efbbf |
22-Jul-2008 |
Ted Kremenek <kremenek@apple.com> |
Add test case for nonnull attribute. Fix indexing bug. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53882 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
c0af254fe27f5960966db29479b64e820f663c32 |
21-Jul-2008 |
Ted Kremenek <kremenek@apple.com> |
Added sema support for the nonnull attribute. Will add test cases soon. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53881 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
eb2b2a3f1898f146c6e153a64ec58ec5e1750bd2 |
21-Jul-2008 |
Ted Kremenek <kremenek@apple.com> |
Added sema support for the nonnull attribute. Will add test cases soon. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53881 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
0be088230e4bce150cbad1d49423efb5d7ab124d |
21-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
move two more lists of protocols over to use ObjCList<ObjCProtocolDecl>, simplifying code along the way and fixing a problem and memory leak or two. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53876 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
emaExprObjC.cpp
|
780f329cb011bff0da5763e2e9744eec093d0509 |
21-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
move two more lists of protocols over to use ObjCList<ObjCProtocolDecl>, simplifying code along the way and fixing a problem and memory leak or two. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53876 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
emaExprObjC.cpp
|
e22cf7c2fa04b0bc9405a480685663e3a82879a7 |
21-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
add forward definition protocols to the protocol list for a class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53864 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
964c27c66c18f373fc91a60e9bf2c3d7c61522d1 |
21-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
add forward definition protocols to the protocol list for a class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53864 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
8779c633e0d186dff3ac8014b902a34802ccd766 |
21-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
references to completely undeclared protocols should be errors. References to forward definitions should be warnings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53863 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
919d87d4eef4126ad6d7da1762c247ab0b5ca05b |
21-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
references to completely undeclared protocols should be errors. References to forward definitions should be warnings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53863 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
8bcb52573fad79e8cff88fad9112484b125942ea |
21-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
introduce a new ObjCList templated class and start moving various objc lists over to it. First up, the protocol list on ObjCInterfaceDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53856 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
emaExprObjC.cpp
|
3db6cae19c236fe2cef343c90105ce7cca7de965 |
21-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
introduce a new ObjCList templated class and start moving various objc lists over to it. First up, the protocol list on ObjCInterfaceDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53856 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
emaExprObjC.cpp
|
c72eaaf2967cd77a6b8acd4fac777ad6bfb0e831 |
21-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
rename setReferencedProtocolList -> addReferencedProtocols to be consistent with ObjCInterfaceDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53852 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
f7b2c98c16dfb2261ea57d40a1d5bc4738e73175 |
21-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
rename setReferencedProtocolList -> addReferencedProtocols to be consistent with ObjCInterfaceDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53852 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
fc1ea137a58502432cdd2740d3ad9b671ad645d9 |
21-Jul-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Change 'MDecl' to 'MD' to fix redefinition compiler error in MSVC++. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53849 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
e8f0d3035886e2bba5833d8764e262ece18c7abd |
21-Jul-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Change 'MDecl' to 'MD' to fix redefinition compiler error in MSVC++. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53849 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
5cece4687962ea79bba6565983924365f243144e |
21-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
Switch initialization of the protocol list for an interface decl to use the standard "set these as the list of protocols" interface instead of a strange "set this as the size and then set each one to the value" interface. The problem with the later is that it a) is completely different from everything else, b) is awkward, and c) doesn't handle the case when a referenced protocol is invalid: it set it to null. This meant that all clients downstream would have to handle null protocols in the protocol list, and empirically they didn't. Fix this by not setting invalid protocols in the referenced protocol list, fixing the crash on test/Sema/objc-interface-1.m While I'm at it, clean up some locations so that we produce: t.m:1:25: error: cannot find interface declaration for 'NSObject', superclass of 'NSWhatever' @interface NSWhatever : NSObject <NSCopying> ~~~~~~~~~~~~~~~~~~~~~ ^ instead of: t.m:1:1: error: cannot find interface declaration for 'NSObject', superclass of 'NSWhatever' @interface NSWhatever : NSObject <NSCopying> ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53846 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDeclObjC.cpp
|
b752f289026ad8e5f44851b20e009a27ed61eefc |
21-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
Switch initialization of the protocol list for an interface decl to use the standard "set these as the list of protocols" interface instead of a strange "set this as the size and then set each one to the value" interface. The problem with the later is that it a) is completely different from everything else, b) is awkward, and c) doesn't handle the case when a referenced protocol is invalid: it set it to null. This meant that all clients downstream would have to handle null protocols in the protocol list, and empirically they didn't. Fix this by not setting invalid protocols in the referenced protocol list, fixing the crash on test/Sema/objc-interface-1.m While I'm at it, clean up some locations so that we produce: t.m:1:25: error: cannot find interface declaration for 'NSObject', superclass of 'NSWhatever' @interface NSWhatever : NSObject <NSCopying> ~~~~~~~~~~~~~~~~~~~~~ ^ instead of: t.m:1:1: error: cannot find interface declaration for 'NSObject', superclass of 'NSWhatever' @interface NSWhatever : NSObject <NSCopying> ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53846 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDeclObjC.cpp
|
55a24334c09425c9fe67d57b3cde3e6ed47c0538 |
21-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
when in the context of an @implementation, look for private methods in the @implementation to resolve nullary selector references. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53845 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprObjC.cpp
|
6562fdad21432377f0cc5e0c627c28f0c85df4dd |
21-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
when in the context of an @implementation, look for private methods in the @implementation to resolve nullary selector references. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53845 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprObjC.cpp
|
4d0185486637c956f2df1330076e4981b0665004 |
21-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
don't pass in null as the Name for GenerateClassStructure, it goes and makes std::strings out of them, which is not defined. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53843 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
1565e0364b05d163640dd2b6feed43bae67df4fd |
21-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
don't pass in null as the Name for GenerateClassStructure, it goes and makes std::strings out of them, which is not defined. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53843 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
3977eb738c8fcffd0bc6fcbabcc9cfc86a712661 |
21-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
improve diagnostics about problems with receivers to highlight the receiver. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53842 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
0b2f7ea2794bc9e8d2f8328d78d61f8ec55dd023 |
21-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
improve diagnostics about problems with receivers to highlight the receiver. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53842 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
f914765ba1d70f599fa69bde38b8646c02d9b1aa |
21-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
continue cleaning up code, and disable sending a message directly to an interface. This fixes a bug where we used to accept: void test2(NSNumber x) { [x METH]; } which doesn't make sense and GCC rejects. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53841 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
2b1cc8be4dda4cd122485be0168b3c43d7dff15f |
21-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
continue cleaning up code, and disable sending a message directly to an interface. This fixes a bug where we used to accept: void test2(NSNumber x) { [x METH]; } which doesn't make sense and GCC rejects. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53841 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
4cff4b778549620f10c1bc61f4db529f0f49cee3 |
21-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
simplify control flow a bit, reducing indentation. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53837 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
fe1a553256b46fad3c0a9e9967481bcf571339ec |
21-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
simplify control flow a bit, reducing indentation. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53837 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
50058c8d90b548bd518a9fd12381e41f467a8e6a |
21-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
tighten up some checks, don't allow sending a message to NSString**** git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53836 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
b24d9211329cab87861e25daf6e21210a862d29b |
21-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
tighten up some checks, don't allow sending a message to NSString**** git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53836 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
7d5a8769842eb89ea3be4ebd4d8c4ee1cd01dec6 |
21-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
improve invalid member reference diagnostics to print the type and have better source ranges. Before: t.m:11:53: error: member reference is not to a structure or union CGFloat maxOffsetY = [_outlineLayer contentSize].height - [_outlineLayer frame].size.height; ^~~~~~~ after: t.m:11:54: error: member reference base type ('id') is not a structure or union CGFloat maxOffsetY = [_outlineLayer contentSize].height - [_outlineLayer frame].size.height; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53834 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
2a01b724b69b7998fe4e3a0a6fcc546be01f898d |
21-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
improve invalid member reference diagnostics to print the type and have better source ranges. Before: t.m:11:53: error: member reference is not to a structure or union CGFloat maxOffsetY = [_outlineLayer contentSize].height - [_outlineLayer frame].size.height; ^~~~~~~ after: t.m:11:54: error: member reference base type ('id') is not a structure or union CGFloat maxOffsetY = [_outlineLayer contentSize].height - [_outlineLayer frame].size.height; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53834 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
00cb97b4750df8b2f2e9d56b56f7b07bddacd275 |
21-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
merge a bunch of code that is now common between qual interfaces and interfaces. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53833 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
c188d308ebb52a08133df442a17b3c48ace4061b |
21-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
merge a bunch of code that is now common between qual interfaces and interfaces. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53833 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
d5f8179ed2b75e5c21109f3dd996836b5f743ecd |
21-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
rename getProtocols -> getProtocol, as it only returns a single protocol. Simplify some code to use unconditional form of the protocol access list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53832 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprObjC.cpp
|
9baefc21bfe1bf49ab4a234e9f267f00abe0b1b1 |
21-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
rename getProtocols -> getProtocol, as it only returns a single protocol. Simplify some code to use unconditional form of the protocol access list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53832 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaExprObjC.cpp
|
e9d7161e03be2c91ce7840b374665081aae8597a |
21-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
Fix a bunch of crashes that occur in (attempted) handling of objc properties. This code would previously crash on x.y where x is 'id'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53827 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
a38e6b1f00d6e62d7f20a63053db6f77ab39ea36 |
21-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
Fix a bunch of crashes that occur in (attempted) handling of objc properties. This code would previously crash on x.y where x is 'id'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53827 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ed94f76eb1c43d04f3baff77e58ce16513837532 |
21-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
use the simplified form of lookupInstanceVariable for callers who don't care which class actually defines it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53825 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
123a11f2fd40fc56333ea67b77d4476b0d9339c0 |
21-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
use the simplified form of lookupInstanceVariable for callers who don't care which class actually defines it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53825 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
52292be56045ad912f869e5c2c22212458f6b896 |
21-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
improve the diagnostic for an erroneous objc ivar reference from: t.m:8:7: error: member reference is not to a structure or union pool->farm = 0; ^ ~~~~ to: t.m:8:7: error: 'NSAutoreleasePool' has member named 'farm' pool->farm = 0; ~~~~^ ~~~~ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53824 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
1f719747b214866535e63b0fe2f5f21da67a5387 |
21-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
improve the diagnostic for an erroneous objc ivar reference from: t.m:8:7: error: member reference is not to a structure or union pool->farm = 0; ^ ~~~~ to: t.m:8:7: error: 'NSAutoreleasePool' has member named 'farm' pool->farm = 0; ~~~~^ ~~~~ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53824 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
b2b9da7c2995ddfa0ac00a702b60c8100e463f10 |
21-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
simplify a bunch of code, no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53823 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
68a057b4292f5ff814ec8da53f6cda8cdcfbd2ae |
21-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
simplify a bunch of code, no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53823 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
a57cf47097862f7f90a5b0e76a15dd681d5dcdaf |
21-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
rearrange some code, no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53822 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
fb173ecd2dd560f352355e263ac44da19d19ca64 |
21-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
rearrange some code, no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53822 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
59829186252c1d83b62b80ef60757cfb2cf1a89c |
21-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
improve comments yet again, now I know what this does :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53821 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
|
b49b572aa35a867f30ec710ce8447ab3a1e2a3c2 |
21-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
improve comments yet again, now I know what this does :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53821 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
|
a66fc55a0d128809ed43b9d111effa2021c948ef |
21-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
minor rename, also, reject pointer to qualified id. id<NSCopyable>* is not an "objc pointer type", id<NSCopyable> is. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53820 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
0b6d1e6070394f2a5d6a600351f0e8c3fd371119 |
21-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
minor rename, also, reject pointer to qualified id. id<NSCopyable>* is not an "objc pointer type", id<NSCopyable> is. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53820 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
381081dc06e9c398a19b13021cf0a9f886d5c4e1 |
21-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
Fix a crash that can happen when you have typedefs for pointers to interfaces. Just because they x->isPointerType() doesn't mean it is valid to just cast to a pointertype. We have to handle typedefs etc as well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53819 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
17af2a62f31ec9e09c4df20873a717bb5f0ad99e |
21-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
Fix a crash that can happen when you have typedefs for pointers to interfaces. Just because they x->isPointerType() doesn't mean it is valid to just cast to a pointertype. We have to handle typedefs etc as well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53819 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
7888b6cfcc9772c89c03e4c79e1bf411821b72a7 |
21-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
simplify this predicate, only checking isObjCQualifiedIdType once. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53817 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
22e684a148c566dc72dad4a0eef5e2431e7303ea |
21-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
simplify this predicate, only checking isObjCQualifiedIdType once. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53817 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
94805236a58f7f9c4b04eb87e2cf7ec37734c869 |
17-Jul-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Unify ctx_iterator/ctx_begin()/ctx_end() and iterator/begin()/end() so that a single iterator type is used for both traversing decls of the same declaration context *and* of the parent declaration contexts, depending on the value of the bool parameter 'LookInParentCtx' that is passed to IdentifierResolver::begin(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53724 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
dentifierResolver.h
emaDecl.cpp
|
90eb539bc3121bdc0e867ab1cd6bdca3b36d961e |
17-Jul-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Unify ctx_iterator/ctx_begin()/ctx_end() and iterator/begin()/end() so that a single iterator type is used for both traversing decls of the same declaration context *and* of the parent declaration contexts, depending on the value of the bool parameter 'LookInParentCtx' that is passed to IdentifierResolver::begin(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53724 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
dentifierResolver.h
emaDecl.cpp
|
4f071ec3fbc1de7a46e38fb61e80804838bda73a |
16-Jul-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
When in C++, make EnumConstant names hide tag names in the same scope, instead of colliding with them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53702 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
0ff12f078c70acad7ef18cb4906d17a203d2267a |
16-Jul-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
When in C++, make EnumConstant names hide tag names in the same scope, instead of colliding with them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53702 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d3354225f8298b304d3e145121f33e67642b55d1 |
16-Jul-2008 |
Steve Naroff <snaroff@apple.com> |
Two fixes: - Make sure ObjCIvarDecl propagates the bitfield width. - RewriteObjC::SynthesizeIvarOffsetComputation(): Avoid using the __OFFSETOF__ mumbo jumbo for bitfields (since it isn't legal C). This fixes <rdar://problem/5986079> clang ObjC rewriter: bitfields and ivar access don't mix. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53694 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
8f3b2654a9ff6912862f366102f5c46f7757260a |
16-Jul-2008 |
Steve Naroff <snaroff@apple.com> |
Two fixes: - Make sure ObjCIvarDecl propagates the bitfield width. - RewriteObjC::SynthesizeIvarOffsetComputation(): Avoid using the __OFFSETOF__ mumbo jumbo for bitfields (since it isn't legal C). This fixes <rdar://problem/5986079> clang ObjC rewriter: bitfields and ivar access don't mix. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53694 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
5beb45f2275c2e8552bd2d897e8121a4e489f0ce |
16-Jul-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
When checking for name collision between a tag and a previously defined namespace, the collision occured even when the tag was in a different nested scope. Fix it by taking into account the scope when checking for namespace-tag name collisions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53667 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
b02ef242c76f718a33ec3d9e42f9dbabaf5856b9 |
16-Jul-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
When checking for name collision between a tag and a previously defined namespace, the collision occured even when the tag was in a different nested scope. Fix it by taking into account the scope when checking for namespace-tag name collisions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53667 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
4e5bb1221fef5534ef364e2defff959dd2c2fab0 |
16-Jul-2008 |
Ted Kremenek <kremenek@apple.com> |
Added parsing/sema support for __attribute__ ((IBOutlet)), a clang-specific attribute that the static analyzer will use to recognize what ivars are IBOutlets. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53644 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
96329d4e07a9bcddb5a927892b70408c8fd8c474 |
16-Jul-2008 |
Ted Kremenek <kremenek@apple.com> |
Added parsing/sema support for __attribute__ ((IBOutlet)), a clang-specific attribute that the static analyzer will use to recognize what ivars are IBOutlets. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53644 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
c5f0f65c6094fd8334972ac9db367449107da6a8 |
14-Jul-2008 |
Nate Begeman <natebegeman@mac.com> |
http://llvm.org/bugs/show_bug.cgi?id=2523 Add some code to handle vector comparisons, which is the language side of the llvm vicmp/vfcmp instructions. Also make the vector-vector and vector-scalar asign checks a bit more sane under the presence of lax vector conversions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53565 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
be2341d3b8bd34a14e921c58b53abaf79b0b0cb2 |
14-Jul-2008 |
Nate Begeman <natebegeman@mac.com> |
http://llvm.org/bugs/show_bug.cgi?id=2523 Add some code to handle vector comparisons, which is the language side of the llvm vicmp/vfcmp instructions. Also make the vector-vector and vector-scalar asign checks a bit more sane under the presence of lax vector conversions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53565 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
|
334b19494f86dd977120e3f7ed632a3843d4acd5 |
11-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
rename "SInt" methods to "Int" in APValue. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53467 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
cf0f51d10f01065bd7bc3ffe77e18c30dcbdbea3 |
11-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
rename "SInt" methods to "Int" in APValue. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53467 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
7a0654ce18df882e88f46b7b86ce3b6cc627548a |
09-Jul-2008 |
Ted Kremenek <kremenek@apple.com> |
Extend va_start checking to include __builtin_stdarg_start. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53332 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
49ff7a1c8c67d56e62d3b4627463b705c0d5008c |
09-Jul-2008 |
Ted Kremenek <kremenek@apple.com> |
Extend va_start checking to include __builtin_stdarg_start. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53332 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
df40dbffb74ee0b16ce55ccd4be8b57f8d74c4ab |
09-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
Add parser support for __builtin_stdarg_start, PR2531 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53328 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f8396b6b58b423e7078dcda9092a065f9a4ba53a |
09-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
Add parser support for __builtin_stdarg_start, PR2531 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53328 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
e72804582ecdc0cd9cabe061af808cba54c8af5f |
07-Jul-2008 |
Nuno Lopes <nunoplopes@sapo.pt> |
fix CheckForConstantInitializer() for Compound Literals also fix the correspondent test (it was expecting more errors than it should. please confirm my fix is correct (at least gcc agrees with me) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53174 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
9a979c327c442597c6a9cee961336530460fed04 |
07-Jul-2008 |
Nuno Lopes <nunoplopes@sapo.pt> |
fix CheckForConstantInitializer() for Compound Literals also fix the correspondent test (it was expecting more errors than it should. please confirm my fix is correct (at least gcc agrees with me) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53174 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
0473be44a47a93686fff9fe104201e0f4f54137f |
05-Jul-2008 |
Seo Sanghyeon <sanxiyn@gmail.com> |
Fix warnings git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53141 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
fe5042e287352d00db89508bf3c1373cc44b85db |
05-Jul-2008 |
Seo Sanghyeon <sanxiyn@gmail.com> |
Fix warnings git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53141 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
c7436af079c74b24e071f32a8fd2e356577e3bcc |
03-Jul-2008 |
Anders Carlsson <andersca@mac.com> |
Shuffle things around in preparation for integrating Eli's constant evaluator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53074 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
c44eec6dd29ee9415cbd38a35deff4c8b67abb6a |
03-Jul-2008 |
Anders Carlsson <andersca@mac.com> |
Shuffle things around in preparation for integrating Eli's constant evaluator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53074 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
5bf0ad52514d6a71ad526ce8a6f03b8b1af544b0 |
03-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
Fix PR2020 by recovering by defining an anonymous enum, instead of recovering by filling in the body of a union with enum constants. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53069 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
14943b90d99d6f695a4aee70c5d26086639261c5 |
03-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
Fix PR2020 by recovering by defining an anonymous enum, instead of recovering by filling in the body of a union with enum constants. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53069 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
ecf7951f409695472e8bfa9940886ee8dcb289d7 |
02-Jul-2008 |
Ted Kremenek <kremenek@apple.com> |
Added method "HandleTranslationUnit" to ASTConsumer. This is called by ParseAST when all of the ASTs in a translation unit have been built. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53042 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
|
c87190da60bca25fe3bc1fe6831916f0076b72b8 |
02-Jul-2008 |
Ted Kremenek <kremenek@apple.com> |
Added method "HandleTranslationUnit" to ASTConsumer. This is called by ParseAST when all of the ASTs in a translation unit have been built. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53042 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
|
28704b1ecb76d4fbfe8a42fdc75b6923b1be1488 |
01-Jul-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Update some comments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52957 91177308-0d34-0410-b5e6-96231b3b80d8
XXFieldCollector.h
|
7bfa29111950cc013df6726203732d5a2b3c1165 |
01-Jul-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Update some comments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52957 91177308-0d34-0410-b5e6-96231b3b80d8
XXFieldCollector.h
|
38f16717fc72b2c9dcde319ae04bccc4b79a94e3 |
01-Jul-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Add Sema support for C++ classes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52956 91177308-0d34-0410-b5e6-96231b3b80d8
XXFieldCollector.h
ema.cpp
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
|
07952324dda0e758c17f8bc3015793c65c51c48c |
01-Jul-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Add Sema support for C++ classes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52956 91177308-0d34-0410-b5e6-96231b3b80d8
XXFieldCollector.h
ema.cpp
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
emaExprCXX.cpp
|
2a674dca3ed88e58c536026c51a4ed9cbc32d4a8 |
30-Jun-2008 |
Chris Lattner <sabre@nondot.org> |
Make a few related changes: 1) add a new ASTContext::getFloatTypeSemantics method. 2) Use it from SemaExpr.cpp, CodeGenTypes.cpp and other places. 3) Change the TargetInfo.h get*Format methods to return their fltSemantics byref instead of by pointer. 4) Change CodeGenFunction::EmitBuiltinExpr to allow builtins which sometimes expand specially and othertimes fall back to libm. 5) Add support for __builtin_nan("") to codegen, cases that don't pass in an empty string are currently lowered to libm calls. 6) Fix codegen of __builtin_infl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52914 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExpr.cpp
|
b7cfe88e88cb4f46308de89cf3f0c81bfe624128 |
30-Jun-2008 |
Chris Lattner <sabre@nondot.org> |
Make a few related changes: 1) add a new ASTContext::getFloatTypeSemantics method. 2) Use it from SemaExpr.cpp, CodeGenTypes.cpp and other places. 3) Change the TargetInfo.h get*Format methods to return their fltSemantics byref instead of by pointer. 4) Change CodeGenFunction::EmitBuiltinExpr to allow builtins which sometimes expand specially and othertimes fall back to libm. 5) Add support for __builtin_nan("") to codegen, cases that don't pass in an empty string are currently lowered to libm calls. 6) Fix codegen of __builtin_infl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52914 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
emaExpr.cpp
|
65a57041778df99ccc6d89188cba5ac43a0f9622 |
29-Jun-2008 |
Chris Lattner <sabre@nondot.org> |
make type attribute processing static instead of methods on Sema. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52881 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaType.cpp
|
c9b346d7b3b24f8bf940735cc812893dfcef1d4b |
29-Jun-2008 |
Chris Lattner <sabre@nondot.org> |
make type attribute processing static instead of methods on Sema. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52881 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaType.cpp
|
703c52d03c46811ac472f79c2520ce37b377f27d |
29-Jun-2008 |
Chris Lattner <sabre@nondot.org> |
make the rest of the decl attribute processing methods be static functions instead of methods on sema. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52880 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclAttr.cpp
|
803d08039c5194cf51071ed1d8fbc5b18b3ec38b |
29-Jun-2008 |
Chris Lattner <sabre@nondot.org> |
make the rest of the decl attribute processing methods be static functions instead of methods on sema. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52880 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclAttr.cpp
|
f669015a99cd612c83d86a852a82b5dfd08ff3cc |
29-Jun-2008 |
Chris Lattner <sabre@nondot.org> |
make most of Sema public. Sema is a class private to the Sema library anyway, so there is no real loss here. Start making attribute processing methods static functions instead of methods on Sema. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52879 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclAttr.cpp
|
0b2f4da7651feb6edab5e4a657fce058f0dd514a |
29-Jun-2008 |
Chris Lattner <sabre@nondot.org> |
make most of Sema public. Sema is a class private to the Sema library anyway, so there is no real loss here. Start making attribute processing methods static functions instead of methods on Sema. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52879 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclAttr.cpp
|
a72440d034703abb363cc8fb6f9ebe3483bca267 |
29-Jun-2008 |
Chris Lattner <sabre@nondot.org> |
move a few methods, no other change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52878 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
0744e5f3325e2d2107506002e43c37ea0155a5ac |
29-Jun-2008 |
Chris Lattner <sabre@nondot.org> |
move a few methods, no other change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52878 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
f9e90ccd03363a1885b1071eb63c482e57d2cce4 |
29-Jun-2008 |
Chris Lattner <sabre@nondot.org> |
handle type attributes when converting types, not when processing decls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52877 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaType.cpp
|
0bf29ad534c381087e89efadbf7aff0579bf259f |
29-Jun-2008 |
Chris Lattner <sabre@nondot.org> |
handle type attributes when converting types, not when processing decls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52877 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
emaType.cpp
|
2024f0a17308abe4dd030e4c51ec26b746b8c31f |
29-Jun-2008 |
Chris Lattner <sabre@nondot.org> |
Make ProcessDeclAttributes walk the declarator structure pulling decl attributes out of the various places they can hide. This makes us correctly reject things like this: t.c:2:22: error: mode attribute only supported for integer and floating-point types int **__attribute((mode(HI)))* i32; ^ because you can't make a pointer be HImode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52876 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclAttr.cpp
|
e5c5ee1cff9ec084f176fa252774262677857ad2 |
29-Jun-2008 |
Chris Lattner <sabre@nondot.org> |
Make ProcessDeclAttributes walk the declarator structure pulling decl attributes out of the various places they can hide. This makes us correctly reject things like this: t.c:2:22: error: mode attribute only supported for integer and floating-point types int **__attribute((mode(HI)))* i32; ^ because you can't make a pointer be HImode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52876 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclAttr.cpp
|
9b384ca78d6f5ff270404da46dca1f1ab33e0b81 |
29-Jun-2008 |
Chris Lattner <sabre@nondot.org> |
move some code from all callers of ProcessDeclAttributes into the implementation of ProcessDeclAttributes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52875 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclAttr.cpp
|
3ff30c8e6eaf995c0f969890b48cab15bae4d519 |
29-Jun-2008 |
Chris Lattner <sabre@nondot.org> |
move some code from all callers of ProcessDeclAttributes into the implementation of ProcessDeclAttributes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52875 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclAttr.cpp
|
d7e83d83fbf881b426f8acfa29a47ba86ab14a3b |
29-Jun-2008 |
Chris Lattner <sabre@nondot.org> |
more attribute refactoring/renaming, no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52874 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclAttr.cpp
|
f2e4bd51aa7dc095cefcbcfec573d6bb29f04c5a |
29-Jun-2008 |
Chris Lattner <sabre@nondot.org> |
more attribute refactoring/renaming, no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52874 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclAttr.cpp
|
b0011cad9b8f2f3bf5862a447319332ba33e757e |
29-Jun-2008 |
Chris Lattner <sabre@nondot.org> |
more minor tidiness. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52873 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
49e2d34f74f98bef23e37c415ce90cd783cdea24 |
29-Jun-2008 |
Chris Lattner <sabre@nondot.org> |
more minor tidiness. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52873 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclAttr.cpp
|
8ed14aa3f5b64c6f6d755a8da2b040c2b0ca67ce |
29-Jun-2008 |
Chris Lattner <sabre@nondot.org> |
more cleanups, refactor HandleVectorTypeAttribute to work list the rest of the attr handlers. Also, rename it to HandleVectorSizeAttribute to match its attr name. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52872 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclAttr.cpp
|
065c5a801f46dda8ff0cd6ad954c4e5f94a3be75 |
29-Jun-2008 |
Chris Lattner <sabre@nondot.org> |
more cleanups, refactor HandleVectorTypeAttribute to work list the rest of the attr handlers. Also, rename it to HandleVectorSizeAttribute to match its attr name. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52872 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclAttr.cpp
|
1c15113d36c5b39f4d995e4b2fda9939cc76ef6c |
29-Jun-2008 |
Chris Lattner <sabre@nondot.org> |
adjust the prototypes of a bunch of decl processing methods to take the single attribute they look at by reference instead of by pointer. This is a subtle indicator that they take the specified attribute, not a whole list of them. This also make HandleExtVectorTypeAttribute work the same way as the rest of the attributes, adds some comments etc. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52871 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclAttr.cpp
emaType.cpp
|
545dd3401e7f31c256d69cb948a45d5ca781064c |
29-Jun-2008 |
Chris Lattner <sabre@nondot.org> |
adjust the prototypes of a bunch of decl processing methods to take the single attribute they look at by reference instead of by pointer. This is a subtle indicator that they take the specified attribute, not a whole list of them. This also make HandleExtVectorTypeAttribute work the same way as the rest of the attributes, adds some comments etc. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52871 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclAttr.cpp
emaType.cpp
|
0832dbca0e11ee020bbed181c515b3835158436e |
28-Jun-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Fix for PR2501; this patch makes usual arithmetic conversions for integers which have the same width and different signedness work correctly. (The testcase in PR2501 uses a comparison between long and unsigned int). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52853 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ad74a758189180b8ab8faea648e4766c3bfd7fcb |
28-Jun-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Fix for PR2501; this patch makes usual arithmetic conversions for integers which have the same width and different signedness work correctly. (The testcase in PR2501 uses a comparison between long and unsigned int). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52853 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
95256e68125fda8550bf9363fd77de1bd414ea48 |
28-Jun-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Replace CurFunctionDecl and CurMethodDecl with methods getCurFunctionDecl() and getCurMethodDecl() that return the appropriate Decl through CurContext. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52852 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaChecking.cpp
emaDecl.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprObjC.cpp
emaStmt.cpp
|
53d0ea5f5bfa647ec23418bf3a3b7c183b51e4bd |
28-Jun-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Replace CurFunctionDecl and CurMethodDecl with methods getCurFunctionDecl() and getCurMethodDecl() that return the appropriate Decl through CurContext. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52852 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaChecking.cpp
emaDecl.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprObjC.cpp
emaStmt.cpp
|
112160326ec585c967e19b916ce06f283fa116d6 |
28-Jun-2008 |
Chris Lattner <sabre@nondot.org> |
Fix a bug where we didn't promote 'const float' (or typedefs) to double in some places. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52846 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
3cc5e5b5268d7359c818ca5a2b62a339923020c4 |
28-Jun-2008 |
Chris Lattner <sabre@nondot.org> |
Fix a bug where we didn't promote 'const float' (or typedefs) to double in some places. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52846 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
dc78956c9ddfdfd21f6f29f7eb5f372c3a29da82 |
28-Jun-2008 |
Chris Lattner <sabre@nondot.org> |
the 'mode' attribute is a decl attribute, not a type attribute. Move it to SemaDeclAttr, and do some cleanups. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52844 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclAttr.cpp
emaType.cpp
|
fbf1347e1e225cbc206563bba3f0a75f9ceaa571 |
28-Jun-2008 |
Chris Lattner <sabre@nondot.org> |
the 'mode' attribute is a decl attribute, not a type attribute. Move it to SemaDeclAttr, and do some cleanups. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52844 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclAttr.cpp
emaType.cpp
|
6953a07ea8765b738eb663867b06a47f8ad245e3 |
26-Jun-2008 |
Chris Lattner <sabre@nondot.org> |
move decl attribute processing to a new SemaDeclAttr.cpp. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52792 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
|
6b6b5372f4b60b1c5ee101709e71a04642c835f4 |
26-Jun-2008 |
Chris Lattner <sabre@nondot.org> |
move decl attribute processing to a new SemaDeclAttr.cpp. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52792 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclAttr.cpp
|
5e77adeee0a6117f659a5046badcb97fe6fedb67 |
26-Jun-2008 |
Chris Lattner <sabre@nondot.org> |
Make Declarator::getDeclSpec() return a const reference to avoid cases where mutation can introduce bugs. Propagate around 'const'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52772 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaType.cpp
|
985abd958d83e4f109a15451440f1d008ae45f59 |
26-Jun-2008 |
Chris Lattner <sabre@nondot.org> |
Make Declarator::getDeclSpec() return a const reference to avoid cases where mutation can introduce bugs. Propagate around 'const'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52772 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaType.cpp
|
4c4a0d0defb8f976c7890c00ea03f98d6b3e98a8 |
26-Jun-2008 |
Chris Lattner <sabre@nondot.org> |
add a comment about something that was surprising, at least to me. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52771 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d546fc5f2072d93bb475fdd76cd7b629a08ad93b |
26-Jun-2008 |
Chris Lattner <sabre@nondot.org> |
add a comment about something that was surprising, at least to me. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52771 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
99dbc963bb0d81c7806f867a258d15c72d257267 |
26-Jun-2008 |
Chris Lattner <sabre@nondot.org> |
fix a bug handling type attributes in the declspec. declspec processing used to mutate the attribute list for declspecs when the type was converted, breaking the case where one declspec was shared by multiple declarators. This fixes rdar://6032532. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52769 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaType.cpp
|
fca0ddd42965e0b7ae821213486d4e0dd71fb439 |
26-Jun-2008 |
Chris Lattner <sabre@nondot.org> |
fix a bug handling type attributes in the declspec. declspec processing used to mutate the attribute list for declspecs when the type was converted, breaking the case where one declspec was shared by multiple declarators. This fixes rdar://6032532. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52769 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaType.cpp
|
5fa8a8b9b1703b5eba552eb4c30c3936aa2180b6 |
25-Jun-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
The assert at Sema::ObjCActOnStartOfMethodDef should check CurMethodDecl instead of CurFunctionDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52719 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
72fd336721bef3694ab2679f8a460bf985b1230d |
25-Jun-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
The assert at Sema::ObjCActOnStartOfMethodDef should check CurMethodDecl instead of CurFunctionDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52719 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
85c3f6df54100a8939d11af44d1987b314216900 |
25-Jun-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
'Educate' IdentifierResolver about the declaration context of CXXFieldDecls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52698 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.h
|
32a5ba0d7dfc840c0558a625af26a184cf3bbb35 |
25-Jun-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
'Educate' IdentifierResolver about the declaration context of CXXFieldDecls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52698 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.h
|
9d78433ee41612448ebaae769e041991bae86364 |
25-Jun-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Add parsing support for C++ classes. Note that Parser::ParseCXXMemberSpecification is temporarily disabled until the Sema support is in place. Once ParseCXXMemberSpecification is enabled, the Parser/cxx-class.cpp test will pass. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52694 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
|
4cc18a4d5222e04bd568b1e3e4d86127dbbcdf3f |
25-Jun-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Add parsing support for C++ classes. Note that Parser::ParseCXXMemberSpecification is temporarily disabled until the Sema support is in place. Once ParseCXXMemberSpecification is enabled, the Parser/cxx-class.cpp test will pass. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52694 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
|
ee2c9fdd5260852b8835dbb187a8e26101924e69 |
24-Jun-2008 |
Ted Kremenek <kremenek@apple.com> |
ObjCMessageExpr objects that represent messages to class methods now can contain the ObjCInterfaceDecl* of the target class if it was available when the ObjCMessageExpr object was constructed. The original interfaces of the class has been preserved (requiring no functionality changes from clients), but now a "getClasSInfo" method returns both the ObjCInterfaceDecl* and IdentifierInfo* of the target class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52676 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
4df728e368fa1f65ffc57572fed613dcca5b4fe8 |
24-Jun-2008 |
Ted Kremenek <kremenek@apple.com> |
ObjCMessageExpr objects that represent messages to class methods now can contain the ObjCInterfaceDecl* of the target class if it was available when the ObjCMessageExpr object was constructed. The original interfaces of the class has been preserved (requiring no functionality changes from clients), but now a "getClasSInfo" method returns both the ObjCInterfaceDecl* and IdentifierInfo* of the target class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52676 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
1062d3a0fbc0eea0526ea8b611125683e2327c62 |
22-Jun-2008 |
Chris Lattner <sabre@nondot.org> |
add a fixme back git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52607 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
27933c17617efe4902a7d4a9f52c751f85a7d92f |
22-Jun-2008 |
Chris Lattner <sabre@nondot.org> |
add a fixme back git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52607 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
bac12450da5e01b91bb6fb110980b27ad89433ec |
21-Jun-2008 |
Chris Lattner <sabre@nondot.org> |
"this patch adds code generation hooks for Objective-C constant strings. It also modifies Sema so that Objective-C constant strings are treated as untyped objects if the interface for the constant string class can not be found. This is consistent with Apple GCC. I thought it was consistent with GNU GCC, since this was causing failures when trying to compile GNUstep with (GNU) GCC, but it appears that this is not the case when attempting to produce a simple test case to demonstrate it. Possibly there is a way of making the error go away, but I haven't found out what it is yet." Patch by David Chisnall! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52599 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
13fd7e5111032f54b538dd66d035b0ccc1f82467 |
21-Jun-2008 |
Chris Lattner <sabre@nondot.org> |
"this patch adds code generation hooks for Objective-C constant strings. It also modifies Sema so that Objective-C constant strings are treated as untyped objects if the interface for the constant string class can not be found. This is consistent with Apple GCC. I thought it was consistent with GNU GCC, since this was causing failures when trying to compile GNUstep with (GNU) GCC, but it appears that this is not the case when attempting to produce a simple test case to demonstrate it. Possibly there is a way of making the error go away, but I haven't found out what it is yet." Patch by David Chisnall! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52599 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
c97665eba226c30e6b6525a5200b546138239e53 |
21-Jun-2008 |
Chris Lattner <sabre@nondot.org> |
Don't add isa with @defs only to work around it in the code generator, patch by David Chisnall. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52597 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
18ae3cfe2a3ba43519ccd2f665892014c64e8d4a |
21-Jun-2008 |
Chris Lattner <sabre@nondot.org> |
Don't add isa with @defs only to work around it in the code generator, patch by David Chisnall. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52597 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
4e9553ac255f512cb540735bebc19ee73643558d |
21-Jun-2008 |
Chris Lattner <sabre@nondot.org> |
"This moves built-in Objective-C types up the scope chains to where they can be replaced by versions included from the runtime library's headers." This makes it ok to use @"foo" without a declaration for NSConstantString. Patch by David Chisnall! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52593 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
6ee1f9c0142e0c374f32fc86312630cd901247cf |
21-Jun-2008 |
Chris Lattner <sabre@nondot.org> |
"This moves built-in Objective-C types up the scope chains to where they can be replaced by versions included from the runtime library's headers." This makes it ok to use @"foo" without a declaration for NSConstantString. Patch by David Chisnall! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52593 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
1bf58f62dfed33edee9838888757b4822b36e054 |
21-Jun-2008 |
Chris Lattner <sabre@nondot.org> |
add parser and sema support for the funny ObjC '@defs' thing. Patch by David Chisnall! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52586 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
5a6ddbf295d2ea1c28cfb67d82db22f3893ede6f |
21-Jun-2008 |
Chris Lattner <sabre@nondot.org> |
add parser and sema support for the funny ObjC '@defs' thing. Patch by David Chisnall! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52586 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
4423d37a36311b4e68a8715c4b60d4548c7588b0 |
21-Jun-2008 |
Chris Lattner <sabre@nondot.org> |
Switch 'super' from being a weird cast thing to being a predefined expr node. Patch by David Chisnall with objc rewriter and stmtdumper updates from me. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52580 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
0d17f6f7b1882850fa56ad38cca0ee518869255b |
21-Jun-2008 |
Chris Lattner <sabre@nondot.org> |
Switch 'super' from being a weird cast thing to being a predefined expr node. Patch by David Chisnall with objc rewriter and stmtdumper updates from me. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52580 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
8c7c6a18ccb1d4a9e6b4673eccf2ed7a77e5dba4 |
17-Jun-2008 |
Chris Lattner <sabre@nondot.org> |
Change self/_cmd to be instances of ImplicitParamDecl instead of ParmVarDecl. Patch by David Chisnall! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52422 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclObjC.cpp
|
4111024be81e7c0525e42dadcc126d27e5bf2425 |
17-Jun-2008 |
Chris Lattner <sabre@nondot.org> |
Change self/_cmd to be instances of ImplicitParamDecl instead of ParmVarDecl. Patch by David Chisnall! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52422 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclObjC.cpp
|
225a14c2ff9acbecaae369367432c1685a4073dc |
16-Jun-2008 |
Ted Kremenek <kremenek@apple.com> |
Introduce preliminary support for NSString format-string checking. Patch by Nikita Zhuk! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52336 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
ema.cpp
ema.h
emaChecking.cpp
|
7ff22b259d4d4729f701679e3a7f0e242365e07f |
16-Jun-2008 |
Ted Kremenek <kremenek@apple.com> |
Introduce preliminary support for NSString format-string checking. Patch by Nikita Zhuk! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52336 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
ema.cpp
ema.h
emaChecking.cpp
|
324d503e73f2d67066282e5aa15347c067feb6fe |
11-Jun-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Don't crash if we can't find FileEntry info for a typedef, since one isn't guaranteed to exist. This fixes a crash with conflicting typedefs coming from stdin. This also fixes the crash in PR2406, but doesn't completely fix the issue; it appears there's something strange about the physical location for the definition of int64_t in stdlib.h. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52209 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
54ecfce94bc96947ec2059d35920a9eea3ca8569 |
11-Jun-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Don't crash if we can't find FileEntry info for a typedef, since one isn't guaranteed to exist. This fixes a crash with conflicting typedefs coming from stdin. This also fixes the crash in PR2406, but doesn't completely fix the issue; it appears there's something strange about the physical location for the definition of int64_t in stdlib.h. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52209 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
a5c14b2e73e1674e639478142adf0ab71d00c367 |
10-Jun-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
-Add DeclChain member to DeclContext. -ScopedDecls get chained to their DeclContext. -DeclContext's DeclChain replaces FunctionDecl's DeclChain and EnumDecl's ElementList. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52164 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
7643536c36b0449256d5ee2efc03a7e4a784a0b3 |
10-Jun-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
-Add DeclChain member to DeclContext. -ScopedDecls get chained to their DeclContext. -DeclContext's DeclChain replaces FunctionDecl's DeclChain and EnumDecl's ElementList. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52164 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
c6cc7d5a60b59381f1c9880ed8fdb9b2316c3a85 |
10-Jun-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
-Changes to TagDecl: Added TagKind enum. Added getTagKind() method. Added convenience methods: isEnum(), isStruct(), isUnion(), isClass(). -RecordDecl/CXXRecordDecl::Create() accept a TagKind enum instead of a DeclKind one. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52160 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaInit.cpp
|
39ba4aeca296b1c9f04bde7d9d3cbbf129f1abd3 |
10-Jun-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
-Changes to TagDecl: Added TagKind enum. Added getTagKind() method. Added convenience methods: isEnum(), isStruct(), isUnion(), isClass(). -RecordDecl/CXXRecordDecl::Create() accept a TagKind enum instead of a DeclKind one. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52160 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDecl.cpp
emaDeclCXX.cpp
emaInit.cpp
|
998dffb089f1a7da10d66367f1c4db3a7bd12184 |
09-Jun-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Add code to make test/CodeGen/struct-init.c work correctly without the pointer cast hack currently in isIntegerConstantExpr (in lib/AST/Expr.cpp). Also removes an odd test that even gcc doesn't accept. The reason the pointer cast hack is relevant here is that it makes Sema end up misinterpreting the relevant expression as a null pointer constant. The reason for this patch is that I plan to remove the pointer cast hack sometime soon because it causes strange issues, especially in its current form; see my recent email to cfe-dev "[PATCH] add constant expression evaluation to the AST and fix PR2413". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52120 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
4caf055b9f08416d956590358796a1ed464b73f7 |
09-Jun-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Add code to make test/CodeGen/struct-init.c work correctly without the pointer cast hack currently in isIntegerConstantExpr (in lib/AST/Expr.cpp). Also removes an odd test that even gcc doesn't accept. The reason the pointer cast hack is relevant here is that it makes Sema end up misinterpreting the relevant expression as a null pointer constant. The reason for this patch is that I plan to remove the pointer cast hack sometime soon because it causes strange issues, especially in its current form; see my recent email to cfe-dev "[PATCH] add constant expression evaluation to the AST and fix PR2413". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52120 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
2ccfb519fefdff973028c06ba9ea8f4587e40ac8 |
09-Jun-2008 |
Eli Friedman <eli.friedman@gmail.com> |
For struct initialization, check compatibility with the unqualified type; this isn't explicitly stated in the standard, but it doesn't really make sense for them to have an effect here. Fixes the included testcase, sent to me by Steve Naroff. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52113 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
c92e5e4e4d632343b1f5b34cbd1d583666b1f4f8 |
09-Jun-2008 |
Eli Friedman <eli.friedman@gmail.com> |
For struct initialization, check compatibility with the unqualified type; this isn't explicitly stated in the standard, but it doesn't really make sense for them to have an effect here. Fixes the included testcase, sent to me by Steve Naroff. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52113 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
7853438716ca87cd811b17e1d7800da38e815638 |
08-Jun-2008 |
Nuno Lopes <nunoplopes@sapo.pt> |
implement the alias attirbute (in both Sema and Codegen) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52092 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
d4cbda6292b321c2e7dce7f039d92918fee99b3a |
08-Jun-2008 |
Nuno Lopes <nunoplopes@sapo.pt> |
implement the alias attirbute (in both Sema and Codegen) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52092 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
1aaf71cae87511d0e93c4384de8bad267992310a |
08-Jun-2008 |
Chris Lattner <sabre@nondot.org> |
capture whether a CharacterLiteral was wide or not in the AST. Patch by Mike Stump! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52081 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
c250aae4f645833aed3a6321bc8598f7330dce8d |
08-Jun-2008 |
Chris Lattner <sabre@nondot.org> |
capture whether a CharacterLiteral was wide or not in the AST. Patch by Mike Stump! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52081 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
38b7a91b5484186cd1d638f214f2ecf337f83e19 |
06-Jun-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Clean up dead code from SemaInit landing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52054 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
e6f058fa6df30e7d68d1fbabcc363d21da41cd5f |
06-Jun-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Clean up dead code from SemaInit landing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52054 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
f30d224f69bffdfa0b157a82463b34ce3be3c42b |
06-Jun-2008 |
Steve Naroff <snaroff@apple.com> |
Oops...remove weird printf:-) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52025 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
c9a9200de60042a6142f0e37fa6d8f86fd1000f6 |
06-Jun-2008 |
Steve Naroff <snaroff@apple.com> |
Oops...remove weird printf:-) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52025 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
d254997aac93cce385371587a442682bc31e51c5 |
06-Jun-2008 |
Steve Naroff <snaroff@apple.com> |
Second half of "fix" for <rdar://problem/5986085> clang on xcode: error: redefinition of 'XCElementToggler' as different kind of symbol git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52024 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaDeclObjC.cpp
|
c7333881dcd00be87814d03c349dd96c815f2f05 |
06-Jun-2008 |
Steve Naroff <snaroff@apple.com> |
Second half of "fix" for <rdar://problem/5986085> clang on xcode: error: redefinition of 'XCElementToggler' as different kind of symbol git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52024 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaDeclObjC.cpp
|
e90d4cc19408ff897f79e82bdb24a09cb250fb90 |
05-Jun-2008 |
Steve Naroff <snaroff@apple.com> |
super fix submitted by David Chisnall. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52014 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
8f0b10274a0091edc5e1dcec622dc6a3c97f65a8 |
05-Jun-2008 |
Steve Naroff <snaroff@apple.com> |
super fix submitted by David Chisnall. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52014 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ac0580b9387764dd0c8a1da36fc4da3f09c3ca13 |
05-Jun-2008 |
Steve Naroff <snaroff@apple.com> |
Fixed a recent test regression from last night (r51976). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52006 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
d100c809314b5c030272c7a7112606095a859434 |
05-Jun-2008 |
Steve Naroff <snaroff@apple.com> |
Fixed a recent test regression from last night (r51976). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52006 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
1a5027cd16deaa4c560ba5e3f80f5439830adedd |
05-Jun-2008 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/5986833> clang on xcode: incompatible type returning 'void', expected 'int'. - Changed Sema::ObjCActOnStartOfMethodDef() to more accurately type "self" in factory methods. - Changed Sema::ActOnInstanceMessage() to use the new type to restrict the lookup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52005 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
emaExprObjC.cpp
|
e2af8b16cb66b59ac3570c5561289469bd852699 |
05-Jun-2008 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/5986833> clang on xcode: incompatible type returning 'void', expected 'int'. - Changed Sema::ObjCActOnStartOfMethodDef() to more accurately type "self" in factory methods. - Changed Sema::ActOnInstanceMessage() to use the new type to restrict the lookup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52005 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
emaExprObjC.cpp
|
d1f0eb4423554ae71b014a90c386a2b1d67e6d7b |
05-Jun-2008 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/5987482> clang on xcode: null dereference in Sema::ActOnMemberReferenceExpr. In addition to fixing the crasher, this commit fixes further improves property lookup (by searching protocols of qualified interfaces..."NSObject <prot>"). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52001 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
3d2c22b1d334fa74d26a5f21841cb55df5dfdd1a |
05-Jun-2008 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/5987482> clang on xcode: null dereference in Sema::ActOnMemberReferenceExpr. In addition to fixing the crasher, this commit fixes further improves property lookup (by searching protocols of qualified interfaces..."NSObject <prot>"). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52001 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
0a7149f3e73bacda21c7c0b02f6b0d9fef2332ac |
05-Jun-2008 |
Steve Naroff <snaroff@apple.com> |
Fix trivial crasher and downgrade an error to warning (to match GCC). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51976 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
74199b6507ff0094b74841620063d88c9669e2d7 |
05-Jun-2008 |
Steve Naroff <snaroff@apple.com> |
Fix trivial crasher and downgrade an error to warning (to match GCC). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51976 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
51c6cff2711029b8acde6d9e5b5a1133c52cb33a |
05-Jun-2008 |
Steve Naroff <snaroff@apple.com> |
Fix crash identified by <rdar://problem/5986085>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51969 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
cb28be6e82809f9f514585ac2692fa04bb56978a |
05-Jun-2008 |
Steve Naroff <snaroff@apple.com> |
Fix crash identified by <rdar://problem/5986085>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51969 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
5a5cd831abeaa543a7721f9120f678cbc1ed9757 |
04-Jun-2008 |
Ted Kremenek <kremenek@apple.com> |
Added fixmes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51964 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
fd5b2ce150185d8d8fc3d7789983bbd2b0b8103f |
04-Jun-2008 |
Ted Kremenek <kremenek@apple.com> |
Added fixmes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51964 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
f025aac0b835baa716774a8eaef8ec018232541e |
04-Jun-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Make sure the types are consistent for a void conditional. No visible difference, but it's better to be consistent. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51961 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
0e72401c647cff2f1fe493fab75ecdccb829d1d1 |
04-Jun-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Make sure the types are consistent for a void conditional. No visible difference, but it's better to be consistent. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51961 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
4ba41fd9df8d422d51640ee62c948ed93b35cbeb |
04-Jun-2008 |
Nuno Lopes <nunoplopes@sapo.pt> |
fix type of ?: operator. If one of the operator is void, the type should be void as well. Please confirm this is safe git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51957 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
d8de725d95cb29db175f6430c5911ff092271f2e |
04-Jun-2008 |
Nuno Lopes <nunoplopes@sapo.pt> |
fix type of ?: operator. If one of the operator is void, the type should be void as well. Please confirm this is safe git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51957 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e266564c0d9362593aaee9262b53c02eb4cee70e |
04-Jun-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Fix a gcc compatibility issue which allows more protocol-qualified id on RHS to be assigned to less protocol qualified object on LHS. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51956 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
26631704d15e2fe19bae8a22939e0a473407c20d |
04-Jun-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Fix a gcc compatibility issue which allows more protocol-qualified id on RHS to be assigned to less protocol qualified object on LHS. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51956 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
842126ec695852dbf8803d7570799c00b69b61cb |
04-Jun-2008 |
Ted Kremenek <kremenek@apple.com> |
Moved LangOptions from TranslationUnit to ASTContext. This induced a variety of cleanups in some ASTConsumers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51943 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
|
e7d07d113677a39026ff5119b8b67f6fe8ca9793 |
04-Jun-2008 |
Ted Kremenek <kremenek@apple.com> |
Moved LangOptions from TranslationUnit to ASTContext. This induced a variety of cleanups in some ASTConsumers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51943 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
|
616c55c45feda7268ed606099eb13a709246454e |
04-Jun-2008 |
Steve Naroff <snaroff@apple.com> |
Sema::ActOnClassMessage() needs to look through it's local implementation for private class methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51938 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
9ad23d6f454e64b2ff960721becc5b90dea4d353 |
04-Jun-2008 |
Steve Naroff <snaroff@apple.com> |
Sema::ActOnClassMessage() needs to look through it's local implementation for private class methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51938 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
b51ed0ba99eb18548194ff188518a4e8fc5b7a2f |
04-Jun-2008 |
Steve Naroff <snaroff@apple.com> |
Give the "isa" slot a name! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51924 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
e6fe5d46b26f407d78d1f12ece9cb103e4d19b82 |
04-Jun-2008 |
Steve Naroff <snaroff@apple.com> |
Give the "isa" slot a name! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51924 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
858813df8cc38752eb305e311fddaf8383e5324d |
03-Jun-2008 |
Steve Naroff <snaroff@apple.com> |
Implement another property related FIXME: Fix <rdar://problem/5967199> clang on xcode: error: member reference is not to a structure or union git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51919 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
0a8b4e3f7d246a637fea77327020fbeebf2bab30 |
03-Jun-2008 |
Steve Naroff <snaroff@apple.com> |
Implement another property related FIXME: Fix <rdar://problem/5967199> clang on xcode: error: member reference is not to a structure or union git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51919 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
48fb3eeb6f7e1b50cbd3709263be0baa20a3c86e |
03-Jun-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Re-fix r51907 in a way which doesn't affect valid code. This essentially moves the check for the invalid construct to a point where it doesn't affect other uses of isIntegerConstantExpr, and we can warn properly when the extension is used. This makes it a bit more complicated, but it's a lot cleaner. Steve, please tell me if this check is sufficient to handle the relevant system header. I know it's enough to handle the testcase, but I don't know what exactly the original looks like. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51918 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
1b76ada683bcec33799fd0eb114aaad3e1d04ca9 |
03-Jun-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Re-fix r51907 in a way which doesn't affect valid code. This essentially moves the check for the invalid construct to a point where it doesn't affect other uses of isIntegerConstantExpr, and we can warn properly when the extension is used. This makes it a bit more complicated, but it's a lot cleaner. Steve, please tell me if this check is sufficient to handle the relevant system header. I know it's enough to handle the testcase, but I don't know what exactly the original looks like. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51918 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
7169410548cd2b56bdb13858dbe549b00e83236f |
03-Jun-2008 |
Steve Naroff <snaroff@apple.com> |
Fixup recent "super" regression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51913 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
053d71c233e54b5199672c068bad7ba3f6ee85bb |
03-Jun-2008 |
Steve Naroff <snaroff@apple.com> |
Fixup recent "super" regression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51913 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
936c436ca8f859a0f1ce3fd281fd4cc80912504c |
03-Jun-2008 |
Steve Naroff <snaroff@apple.com> |
Allow implicit pointer/int conversions on ObjCQualifiedIdTypes in Sema::CheckCompareOperands() and Sema::CheckAssignmentConstraints(). Fixes <rdar://problem/5980804> clang on xcode: error: incompatible type sending 'id<XDUMLType>', expected 'NSCellType'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51902 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
20373221ce82022b7a0d31858af51bebf87e4af1 |
03-Jun-2008 |
Steve Naroff <snaroff@apple.com> |
Allow implicit pointer/int conversions on ObjCQualifiedIdTypes in Sema::CheckCompareOperands() and Sema::CheckAssignmentConstraints(). Fixes <rdar://problem/5980804> clang on xcode: error: incompatible type sending 'id<XDUMLType>', expected 'NSCellType'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51902 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
7f1c5b5dcb2ce8b0933789fbbc1613787ea73053 |
03-Jun-2008 |
Steve Naroff <snaroff@apple.com> |
Finish up r51900. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51901 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
0326e045fe143856d1b2fb75ae54689e891bbc0d |
03-Jun-2008 |
Steve Naroff <snaroff@apple.com> |
Finish up r51900. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51901 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
5ad852960e0498af6d221096c7e4e6251e39ef19 |
03-Jun-2008 |
Steve Naroff <snaroff@apple.com> |
Allow for a GCC cast extension. Fixes part of <rdar://problem/5980829> clang on xcode: used type 'NSRange' where arithmetic or pointer type is required. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51900 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
63564b8f8bbe83c236ddf74c257a63fa1341a274 |
03-Jun-2008 |
Steve Naroff <snaroff@apple.com> |
Allow for a GCC cast extension. Fixes part of <rdar://problem/5980829> clang on xcode: used type 'NSRange' where arithmetic or pointer type is required. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51900 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
6f78625be42e0cc4d962a80d05aa71e37f59011d |
03-Jun-2008 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/5979875> clang on xcode: error: use of undeclared identifier 'super' git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51888 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e3e9add4fd788927df6f545570e7838db59c01d7 |
03-Jun-2008 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/5979875> clang on xcode: error: use of undeclared identifier 'super' git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51888 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
7765434b52a807b234d8567baea6718c509ae79b |
02-Jun-2008 |
Nuno Lopes <nunoplopes@sapo.pt> |
fix decl attributes cleaning this plugs the leak of attributes and also fixes a crash in the test git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51862 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
9141bee299a05349924a34a7153d7064c9e0a107 |
02-Jun-2008 |
Nuno Lopes <nunoplopes@sapo.pt> |
fix decl attributes cleaning this plugs the leak of attributes and also fixes a crash in the test git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51862 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d6ba7fd7c5b1b4cd2f9a8706b12c5dc28ff3e83a |
01-Jun-2008 |
Steve Naroff <snaroff@apple.com> |
Tweak Sema::ObjCQualifiedIdTypesAreCompatible() to handle qualified interface types on the RHS. This eliminates a bogus warning identified in the test below. This fixes <rdar://problem/5968256> clang on xcode: error: incompatible type initializing 'NSObject<XCSelectionSource> *', expected 'id<NSObject,XCSelectionSource>' git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51832 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
289d9f243d9074513368d27eef3b647f72a38324 |
01-Jun-2008 |
Steve Naroff <snaroff@apple.com> |
Tweak Sema::ObjCQualifiedIdTypesAreCompatible() to handle qualified interface types on the RHS. This eliminates a bogus warning identified in the test below. This fixes <rdar://problem/5968256> clang on xcode: error: incompatible type initializing 'NSObject<XCSelectionSource> *', expected 'id<NSObject,XCSelectionSource>' git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51832 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
605896f4af319f880c07b405785c8dffb8d196f8 |
01-Jun-2008 |
Steve Naroff <snaroff@apple.com> |
Teach Sema::CheckConditionalOperands() to check for ObjCQualifiedIdType's. This fixes a bogus error. <rdar://problem/5967036> clang on xcode: error: incompatible operand types ('id<DTOutputStreams>' and 'DTFilterOutputStream *') git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51828 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
aa73eec076a2545671f78cb4e82536ec39f040eb |
01-Jun-2008 |
Steve Naroff <snaroff@apple.com> |
Teach Sema::CheckConditionalOperands() to check for ObjCQualifiedIdType's. This fixes a bogus error. <rdar://problem/5967036> clang on xcode: error: incompatible operand types ('id<DTOutputStreams>' and 'DTFilterOutputStream *') git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51828 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
79b50cb1dc1d0ea23c45d05d77878fc0fc265559 |
31-May-2008 |
Ted Kremenek <kremenek@apple.com> |
Added "InitializeTU" to ASTConsumer. This is used by Sema::ParseAST to pass a TranslationUnit object instead of an ASTContext. By default it calls Initialize(ASTConstext& Context) (to match with the current interface used by most ASTConsumers). Modified the ObjC-Rewriter to use InitializeTU, and to tell the TranslationUnit to not free its Decls. This is a workaround for: <rdar://problem/5966749> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51825 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
|
e3a6198400453c0d9623207718e4942f7c111f87 |
31-May-2008 |
Ted Kremenek <kremenek@apple.com> |
Added "InitializeTU" to ASTConsumer. This is used by Sema::ParseAST to pass a TranslationUnit object instead of an ASTContext. By default it calls Initialize(ASTConstext& Context) (to match with the current interface used by most ASTConsumers). Modified the ObjC-Rewriter to use InitializeTU, and to tell the TranslationUnit to not free its Decls. This is a workaround for: <rdar://problem/5966749> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51825 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
|
7c7817e420b2a6051c6f6a9c1af634ed5f6e8d26 |
31-May-2008 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/5965704> clang: bad receiver type 'id const' git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51809 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
94a82c930278809a04976ee13013e6e980b18345 |
31-May-2008 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/5965704> clang: bad receiver type 'id const' git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51809 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
25086f02e2e606683183391fdfa6df0a0f56b302 |
30-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Allow a pointer implicitly cast to a bool as a constant expression, as required by the standard (the standard doesn't know anything about implicit casts). Disallow pointers cast to non-integral arithmetic types as constant expressions. This was previously allowed by accident. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51779 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
c1cc6dccd42b91a2ebb397415940da91dbf36103 |
30-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Allow a pointer implicitly cast to a bool as a constant expression, as required by the standard (the standard doesn't know anything about implicit casts). Disallow pointers cast to non-integral arithmetic types as constant expressions. This was previously allowed by accident. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51779 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
48d0bb04187e65e655c162ebc9de2712fa46101a |
30-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Make sure to allow assigning a pointer to a bool. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51778 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
f8f873deef78de611dd793a1e1201bef0d5a54a3 |
30-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Make sure to allow assigning a pointer to a bool. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51778 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
05391d26ab56348a43ea4f8059d67f2ce7fc3d77 |
30-May-2008 |
Steve Naroff <snaroff@apple.com> |
Add basic support for properties references (a missing feature). While it is far from complete, it does fix the following <rdar://problem/5967199> clang on xcode: error: member reference is not to a structure or union git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51719 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
ae7840776d6cd31b4d7a4a345b61bcbb3744df6c |
30-May-2008 |
Steve Naroff <snaroff@apple.com> |
Add basic support for properties references (a missing feature). While it is far from complete, it does fix the following <rdar://problem/5967199> clang on xcode: error: member reference is not to a structure or union git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51719 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
9ed3e7794b4c45ba3856f5997191d16e234df958 |
29-May-2008 |
Steve Naroff <snaroff@apple.com> |
- Move ObjC Expresssion AST's from Expr.h => ExprObjC.h - #include ExprObjC.h in many places git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51703 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExpr.cpp
emaExprObjC.cpp
|
f494b579b22f9950f5af021f0bf9879a91bb8b41 |
29-May-2008 |
Steve Naroff <snaroff@apple.com> |
- Move ObjC Expresssion AST's from Expr.h => ExprObjC.h - #include ExprObjC.h in many places git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51703 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
emaExpr.cpp
emaExprObjC.cpp
|
256b7d7796d9a8c6e685bc85ab915624426feb3b |
27-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Get the type right for wide string literals; it's wchar_t, not char. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51586 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
8ef1f26775cae95d202d8d90d92d39add685af3e |
27-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Get the type right for wide string literals; it's wchar_t, not char. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51586 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
077ee3acba1a42a8a85aebc7b183ed11458681c3 |
27-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Add FIXME. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51585 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
3e4177f23326305e206e6b7134c66f681e59f9d6 |
27-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Add FIXME. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51585 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
|
d270181f22e9ec56708f65c1f41e85cd34a3f6db |
27-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Don't swap function decls, and add them to the scope as they are encountered. Mixing up the decls is unintuitive, and confuses the AST destruction code. Fixes PR2360. Note that there is a need to look up the characteristics and declarations of a function associated with a particular name or decl, but the original swapping code doesn't solve it properly. http://lists.cs.uiuc.edu/pipermail/cfe-dev/2008-May/001644.html is one suggestion for how to fix that. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51584 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
2742496d75ecb733c07c65c9a35cbfaa88ca81e4 |
27-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Don't swap function decls, and add them to the scope as they are encountered. Mixing up the decls is unintuitive, and confuses the AST destruction code. Fixes PR2360. Note that there is a need to look up the characteristics and declarations of a function associated with a particular name or decl, but the original swapping code doesn't solve it properly. http://lists.cs.uiuc.edu/pipermail/cfe-dev/2008-May/001644.html is one suggestion for how to fix that. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51584 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
3a02bdc1a977ae29612a7cf09c2d2acfb3bae300 |
27-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Stop leaking the main Sema object. (Leak found using valgrind.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51580 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
|
80f3346981172428a568ccd67e37755fd2d7efbe |
27-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Stop leaking the main Sema object. (Leak found using valgrind.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51580 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
|
86ad52274e497d28a03aa9e5b0c43fb325421c72 |
27-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Implementation of gcc mode attribute; this is significant because it fixes PR2204. Not too much to say about the implementation; it works in a similar way to the vector size attribute. At some point, we need to modify the targets to provide information about the appropriate types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51577 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaType.cpp
|
3c0eb160ca1361a82b9f15b3b40a2425adc14d0f |
27-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Implementation of gcc mode attribute; this is significant because it fixes PR2204. Not too much to say about the implementation; it works in a similar way to the vector size attribute. At some point, we need to modify the targets to provide information about the appropriate types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51577 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaType.cpp
|
9f5250b865ceffbec34ab80f7032f40095a471a7 |
25-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Count the number of initializable members correctly in structs/unions with unnamed members. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51557 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
f84eda37251c679e2f20343c47a4a3586d9a8e21 |
25-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Count the number of initializable members correctly in structs/unions with unnamed members. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51557 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
f8df28c23f722d990d0c8e3236916d8efa7741cf |
25-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Diagnose implicit init list for empty aggregate, like struct {}. Fixes PR2151 (by not creating the empty implicit init list). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51556 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
402256fc665ba179873ffcb4d630e28cbea42f27 |
25-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Diagnose implicit init list for empty aggregate, like struct {}. Fixes PR2151 (by not creating the empty implicit init list). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51556 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
46f8166be525b5fed60f02a3ea56b9876457f617 |
25-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Move the error checking for variable-sized objects so we don't double-report errors; fixes PR2362. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51555 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
638e14413a4557c399fa2b7da2be5e4e9c1330a2 |
25-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Move the error checking for variable-sized objects so we don't double-report errors; fixes PR2362. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51555 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
64845cee40d322a0d108fd90392199a5c5c544ed |
23-May-2008 |
Ted Kremenek <kremenek@apple.com> |
Revert r51498: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=51498&r1=51497&r2=51498&view=diff Turns out that there are multiple places where a redefinition diagnostic can be emitted. A cleaner solution (without touching Sema) is to have the Driver turn off these diagnostics. (will submit this patch soon) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51502 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
2d05c088407596c0ddefd023c89ba872220724e2 |
23-May-2008 |
Ted Kremenek <kremenek@apple.com> |
Revert r51498: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=51498&r1=51497&r2=51498&view=diff Turns out that there are multiple places where a redefinition diagnostic can be emitted. A cleaner solution (without touching Sema) is to have the Driver turn off these diagnostics. (will submit this patch soon) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51502 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
93f6465ddc710bb58578e189e2ccb35d1c69a991 |
23-May-2008 |
Steve Naroff <snaroff@apple.com> |
Remove a diagnostic (temporary hack that will be removed next week). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51498 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
9547f5938b88934e0242e4cc7194433d187cb967 |
23-May-2008 |
Steve Naroff <snaroff@apple.com> |
Remove a diagnostic (temporary hack that will be removed next week). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51498 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
638d6a4704b14a159088cd90a33700b37f81663b |
23-May-2008 |
Steve Naroff <snaroff@apple.com> |
Make sure the source location for @property points the the @-sign (not the decl spec). Also added a FIXME related to how we represent @properties in the ObjCInterfaceDecl AST. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51450 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
8442b5cdb76cef3ad88e32d41750914c7b77f588 |
23-May-2008 |
Steve Naroff <snaroff@apple.com> |
Make sure the source location for @property points the the @-sign (not the decl spec). Also added a FIXME related to how we represent @properties in the ObjCInterfaceDecl AST. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51450 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
910758ef84473671aa8f63ebef652dd20e81e6e0 |
22-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Patch for PR2350; the issue was tnat we were allowing (with an error) void f(const void) in one place and rejecting it in another. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51424 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
6d1e4b5e7e80228a1f892824c405ba6a1c3c89b6 |
22-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Patch for PR2350; the issue was tnat we were allowing (with an error) void f(const void) in one place and rejecting it in another. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51424 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
4751a3add4986e6d68423d084289c70cb67e094a |
22-May-2008 |
Dan Gohman <gohman@apple.com> |
Move getAccessedFieldNo out of lib/AST/Expr.cpp into lib/CodeGen/CGExpr.cpp and to change include/clang/AST/Attr.h to use its own enum for visibility types instead of using llvm::GlobalValue::VisibilityTypes. These changes eliminate dependencies in the AST library on LLVM's VMCore library. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51398 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
4f8d123e3e2c260de3377208106ddba87cee28b4 |
22-May-2008 |
Dan Gohman <gohman@apple.com> |
Move getAccessedFieldNo out of lib/AST/Expr.cpp into lib/CodeGen/CGExpr.cpp and to change include/clang/AST/Attr.h to use its own enum for visibility types instead of using llvm::GlobalValue::VisibilityTypes. These changes eliminate dependencies in the AST library on LLVM's VMCore library. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51398 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
8cb86e304798fb8ee4edd5cdaff53dcccb64ecae |
21-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Fix a couple of bugs found by Neil Booth in the const-ness checking. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51361 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
97c0a391138d20e1066174a9cfa92860fb06e5a1 |
21-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Fix a couple of bugs found by Neil Booth in the const-ness checking. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51361 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
a85587a9e1c65e36d60e1d8bede3edb47c87aa2e |
20-May-2008 |
Nuno Lopes <nunoplopes@sapo.pt> |
initialize variable and fix a bunch of test failures git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51326 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
1e60e3b526ca71a04209bff6217b6d6eb9be0de6 |
20-May-2008 |
Nuno Lopes <nunoplopes@sapo.pt> |
initialize variable and fix a bunch of test failures git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51326 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
02c22cec28a4239dd195988c1bb79486d522172d |
20-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Perform stricter/more accurate checking for C99 constant expressions in Sema, per discussion on mailing list. This doesn't cause any changes in the test results. I'll probably add some more tests at some point, but it's an open question what we need to accept to be compatible with real code. This doesn't touch the existing isConstantExpr method on Expr; that should be addressed somehow eventually (either removed or refined to whatever is appropriate). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51318 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
c594b323555820a7088fb6d0af1803beccc86c44 |
20-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Perform stricter/more accurate checking for C99 constant expressions in Sema, per discussion on mailing list. This doesn't cause any changes in the test results. I'll probably add some more tests at some point, but it's an open question what we need to accept to be compatible with real code. This doesn't touch the existing isConstantExpr method on Expr; that should be addressed somehow eventually (either removed or refined to whatever is appropriate). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51318 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
8c50c627fadb07d528b3d40a420395e513f8f20b |
20-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Add __builtin_frame_address and __builtin_return_address gcc builtins to Sema. No codegen yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51307 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
|
6cfda23b3768f93a6eb0b2a9135c8334a20125bb |
20-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Add __builtin_frame_address and __builtin_return_address gcc builtins to Sema. No codegen yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51307 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
|
b9ea6bc290c12da35b0fddd1926e6fb5aed3e82a |
20-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Be a bit more defensive in SemaInit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51301 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
d8dc2100487640d8f5ce53201fdcfac7b5ca32b2 |
20-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Be a bit more defensive in SemaInit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51301 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
8c2173d18a418ff97696d38b9ca3179101c884d1 |
20-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Add some more checking for compound literals. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51300 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
6223c2237052dc99cc5263d4cf20cb0bff7650cd |
20-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Add some more checking for compound literals. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51300 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
afdf811b2494ca0d29fa47d848f63ac958455219 |
20-May-2008 |
Ted Kremenek <kremenek@apple.com> |
Try to plug some memory leaks... 1) Sema::ParseAST now constructs a TranslationUnit object to own the top-level Decls, which releases the top-level Decls upon exiting ParseAST. 2) Bug fix: TranslationUnit::~TranslationUnit handles the case where a Decl is added more than once as a top-level Decl. 3) Decl::Destroy is now a virtual method, obviating the need for a special dispatch based on DeclKind. 3) FunctionDecl::Destroy now releases its Body using its Destroy method. 4) Added Stmt::Destroy and Stmt::DestroyChildren, which recursively delete the child ASTs of a Stmt and call their dstors. We may need to special case dstor/Destroy methods for particular Stmt subclasses that own other dynamically allocated objects besides AST nodes. 5) REGRESSION: We temporarily are not deallocating attributes; a FIXME is provided. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51286 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
|
27f8a28bee33bb0e857cfe1a61c281bbc234b338 |
20-May-2008 |
Ted Kremenek <kremenek@apple.com> |
Try to plug some memory leaks... 1) Sema::ParseAST now constructs a TranslationUnit object to own the top-level Decls, which releases the top-level Decls upon exiting ParseAST. 2) Bug fix: TranslationUnit::~TranslationUnit handles the case where a Decl is added more than once as a top-level Decl. 3) Decl::Destroy is now a virtual method, obviating the need for a special dispatch based on DeclKind. 3) FunctionDecl::Destroy now releases its Body using its Destroy method. 4) Added Stmt::Destroy and Stmt::DestroyChildren, which recursively delete the child ASTs of a Stmt and call their dstors. We may need to special case dstor/Destroy methods for particular Stmt subclasses that own other dynamically allocated objects besides AST nodes. 5) REGRESSION: We temporarily are not deallocating attributes; a FIXME is provided. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51286 91177308-0d34-0410-b5e6-96231b3b80d8
arseAST.cpp
|
0fecfdedd67fff8b6cd968fb03d7bdd2a94669f4 |
19-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Switch on SemaInit; this makes some code in SemaDecl dead, but I'll give it a few days to make sure there aren't any significant regressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51273 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
c56c977f44d0bd8422a6f0fe87f361cbb728c06b |
19-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Switch on SemaInit; this makes some code in SemaDecl dead, but I'll give it a few days to make sure there aren't any significant regressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51273 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
455f762af54cfa1cea58d8c03eeec109bc798bcb |
19-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Adjust warning so that it doesn't fire when there is an error. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51269 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
cda25a977e4b7fe4e080b87586410eaeab7b62f6 |
19-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Adjust warning so that it doesn't fire when there is an error. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51269 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
71de9eb042d2566a75aab7a03656cbdffaa2a86e |
19-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Add errors for some illegal constructs (specifically, "int a = {{3}};" and "int a = {};"). I'll adjust the tests in a bit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51265 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
bb504d3a63e0e4b2439900ba6d77b620fb6de857 |
19-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Add errors for some illegal constructs (specifically, "int a = {{3}};" and "int a = {};"). I'll adjust the tests in a bit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51265 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
d8535af8dfd3939d13c96179a7aec880d91e0d33 |
19-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Some more SemaInit cleanup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51262 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
c9c0ea6576666eb7e96508f6b8ce2b4d33af3f02 |
19-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Some more SemaInit cleanup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51262 91177308-0d34-0410-b5e6-96231b3b80d8
emaInit.cpp
|
683cedfeea76f02f7337ebbbfebe2607a987ed78 |
19-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Various fixes; solves (almost) all of the test regressions that would be caused by enabling SemaInit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51261 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaInit.cpp
|
b85f70719da9ce5a3ca9c801ee0748732e2660ee |
19-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Various fixes; solves (almost) all of the test regressions that would be caused by enabling SemaInit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51261 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaInit.cpp
|
d9b1feced810a1b720afc387f7492b8509b74b8f |
18-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Add proper type-checking for pointer additiion; before, we were accepting addition with a pointer and an integer even when it didn't make sense. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51228 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
d72d16e6f105deb6fe890225a6251dd0e9001ce7 |
18-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Add proper type-checking for pointer additiion; before, we were accepting addition with a pointer and an integer even when it didn't make sense. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51228 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e38150e9d17d21c1edd88cfc5691e36ebaa44d45 |
16-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Sema-based fix for PR2334. The issue is that even if the two sides of the condidtional have compatible types, they are not necessarily the same type. Therefore, we cast to the composite type. As a hack, for the moment we assume that the composite type is the type of the left-hand expression; this isn't correct, but it's good enough for most purposes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51202 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
5835ea2118560258ab7ee6c6dbbca30b57c58b10 |
16-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Sema-based fix for PR2334. The issue is that even if the two sides of the condidtional have compatible types, they are not necessarily the same type. Therefore, we cast to the composite type. As a hack, for the moment we assume that the composite type is the type of the left-hand expression; this isn't correct, but it's good enough for most purposes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51202 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
d38439f75094f8e7e7bc8ac13926d3b083fbf440 |
16-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Review nit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51196 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
ba2561a0ab11afa64014828c759c491378ccc539 |
16-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Review nit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51196 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
798e4d504b420e907650c21999ddc0ae9928eb80 |
16-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Clean up ownership per review comment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51195 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
e801870b638e47a5734a3ea63ddfb45f1711e078 |
16-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Clean up ownership per review comment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51195 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
3d86c9f114629edac70812b84d9ea3dcdc7d8ef1 |
16-May-2008 |
Ted Kremenek <kremenek@apple.com> |
Fixed another regression introduced by r51113 caused by some refactoring in Sema::CheckFunctionCall: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20080512/005706.html The bug was that the logic from the helper methods used by CheckFunctionCall were being inverted (a subtle bug). This would cause the parser to discard any valid AST nodes involving several builtins (see patch). This removes the last regression failure I'm seeing in the test suite: Analysis-Apple/NoReturn. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51168 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
3e9d2530c4118e0e8207de24f9059cb3a8eb8cf4 |
16-May-2008 |
Ted Kremenek <kremenek@apple.com> |
Fixed another regression introduced by r51113 caused by some refactoring in Sema::CheckFunctionCall: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20080512/005706.html The bug was that the logic from the helper methods used by CheckFunctionCall were being inverted (a subtle bug). This would cause the parser to discard any valid AST nodes involving several builtins (see patch). This removes the last regression failure I'm seeing in the test suite: Analysis-Apple/NoReturn. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51168 91177308-0d34-0410-b5e6-96231b3b80d8
emaChecking.cpp
|
207c3ce6d83a389c27a4ca37710d054fdc8e0e2b |
15-May-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Comments fix. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51151 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
dentifierResolver.h
|
3d0d83a4a0694c1bf4509c893162f0cdf454ee14 |
15-May-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Comments fix. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51151 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
dentifierResolver.h
|
d0e9d095335fb20806f25e41af789ffd46920ea9 |
14-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Implementation of __builtin_shufflevector, a portable builtin capable of expressing the full flexibility of the LLVM shufflevector instruction. The expected immediate usage is in *mmintrin.h, so that they don't depend on the mess of gcc-inherited (and not completely implemented) shuffle builtins. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51113 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
emaExpr.cpp
|
d38617c8a50f9729c254ab76cd359af797c6739b |
14-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Implementation of __builtin_shufflevector, a portable builtin capable of expressing the full flexibility of the LLVM shufflevector instruction. The expected immediate usage is in *mmintrin.h, so that they don't depend on the mess of gcc-inherited (and not completely implemented) shuffle builtins. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51113 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaChecking.cpp
emaExpr.cpp
|
b30f091d8103331a9c8036cd6e5cd229ec671f08 |
14-May-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Change CRLF line endings to LF. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51103 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.h
|
e29f0a47ed56645d6a02d49e0fa9f4b9383611dd |
14-May-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Change CRLF line endings to LF. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51103 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.h
|
2ff28d12e1d9b297818dd1c3b0c245addbfb4618 |
14-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
An array of VLAs is a VLA. Shouldn't make any significant difference at the moment, but it what you'd expect in the AST from reading the standard, and it should make VLA codegen a bit more strightforward. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51086 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
37148aabe7d153ce682b5715a820a11c0bbfcd59 |
14-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
An array of VLAs is a VLA. Shouldn't make any significant difference at the moment, but it what you'd expect in the AST from reading the standard, and it should make VLA codegen a bit more strightforward. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51086 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
bea3f842c697445ef4cafb239df92cad7c31b189 |
13-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Both operands to && have to be scalars, not just one. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51065 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
5773a6c4ab5a3a7aa9f089bfde3ca1c99ea674ac |
13-May-2008 |
Eli Friedman <eli.friedman@gmail.com> |
Both operands to && have to be scalars, not just one. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51065 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
89301de0669e89476c777ed18595530144638474 |
13-May-2008 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/5924576> clang -fsyntax-only generates "redefinition" errors when parsing AppKit that gcc does not. Teach Sema::MergeVarDecl() about __private_extern__. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51005 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
235549c7bda856c26cff68190860f69760fa576d |
13-May-2008 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/5924576> clang -fsyntax-only generates "redefinition" errors when parsing AppKit that gcc does not. Teach Sema::MergeVarDecl() about __private_extern__. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51005 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
95cb389dab53396be89b308e0ac08bfe5cd1e98f |
12-May-2008 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/5928590> clang -fsyntax-only: "incompatible operand types ('int' and 'void')" on input that 'gcc -fsyntax-only' eats git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51002 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e701c0a953d05c3403a74fdb449a8f4a1e4e6594 |
12-May-2008 |
Steve Naroff <snaroff@apple.com> |
Fix <rdar://problem/5928590> clang -fsyntax-only: "incompatible operand types ('int' and 'void')" on input that 'gcc -fsyntax-only' eats git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51002 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
59a9afbb7ca63efd556d052b462feabecd8c6a3d |
10-May-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
-Implement proper name lookup for namespaces. -identifierResolver exposes an iterator interface to get all decls through the scope chain. -The semantic staff (checking IdentifierNamespace and Doug's checking for shadowed tags were moved out of IdentifierResolver and back into Sema. IdentifierResolver just gives an iterator for all reachable decls of an identifier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50923 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
dentifierResolver.h
emaDecl.cpp
emaDeclCXX.cpp
|
00bc645d154f8f30bfbfb2fe508caf087793157c |
10-May-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
-Implement proper name lookup for namespaces. -identifierResolver exposes an iterator interface to get all decls through the scope chain. -The semantic staff (checking IdentifierNamespace and Doug's checking for shadowed tags were moved out of IdentifierResolver and back into Sema. IdentifierResolver just gives an iterator for all reachable decls of an identifier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50923 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
dentifierResolver.h
emaDecl.cpp
emaDeclCXX.cpp
|
1e0fb9ba5d4a64e6845ae8a567c28e3aa0b410d1 |
09-May-2008 |
Ted Kremenek <kremenek@apple.com> |
Add attribute "format" support for typedefs of function pointers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50906 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
72786e009bd0519882ceac874e618134d2200d95 |
09-May-2008 |
Ted Kremenek <kremenek@apple.com> |
Add attribute "format" support for typedefs of function pointers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50906 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
c5b66688ab50d87a01cc1e2a48ee291e1ccc95a0 |
09-May-2008 |
Nate Begeman <natebegeman@mac.com> |
Handle all attributes on a parameter git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50903 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
fc5845234158807d30075131ef603ebacbc790be |
09-May-2008 |
Nate Begeman <natebegeman@mac.com> |
Handle all attributes on a parameter git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50903 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
c8e51f89effc4003fc54aa4dc5a34127e793c7f4 |
09-May-2008 |
Nate Begeman <natebegeman@mac.com> |
Extend vector member references to include {.hi, .lo, .e, .o} which return a vector of the same element type and half the width, with the high, low, even, and odd elements respectively. Allow member references to member references, so that .hi.hi gives you the high quarter of a vector. This is fairly convenient syntax for some insert/extract operations. Remove some unnecessary methods/types in the ExtVectorElementExpr class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50892 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
8a99764f9b778a54e7440b1ee06a1e48f25d76d8 |
09-May-2008 |
Nate Begeman <natebegeman@mac.com> |
Extend vector member references to include {.hi, .lo, .e, .o} which return a vector of the same element type and half the width, with the high, low, even, and odd elements respectively. Allow member references to member references, so that .hi.hi gives you the high quarter of a vector. This is fairly convenient syntax for some insert/extract operations. Remove some unnecessary methods/types in the ExtVectorElementExpr class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50892 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
e40688736a3578c9035f79c0fc349fd7c261cc83 |
09-May-2008 |
Chris Lattner <sabre@nondot.org> |
simplify some code, don't assume that sizeof(long) < sizeof(long long). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50888 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
8cbcb0ed56b307339f27c6e7daf3444294d332f2 |
09-May-2008 |
Chris Lattner <sabre@nondot.org> |
simplify some code, don't assume that sizeof(long) < sizeof(long long). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50888 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
8bb7dd5dde86f388ff7087e5761dae7fed33cdc5 |
09-May-2008 |
Chris Lattner <sabre@nondot.org> |
Fix rdar://5921025 a crash on the included testcase. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50885 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
abb575866059c9bb74fe4aa32372f002143fa87c |
09-May-2008 |
Chris Lattner <sabre@nondot.org> |
Fix rdar://5921025 a crash on the included testcase. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50885 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
9df18dababc2a8b65997d2d08d1bd0a27af60f8b |
08-May-2008 |
Ted Kremenek <kremenek@apple.com> |
Added initial support for supporting __NSString__ in attribute "format". Still need to iron out some of the semantics (fixmes are present). This addresses <rdar://problem/5916348> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50866 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
c5f551f06c3ac27826e3e5a7a29851fc5182f912 |
08-May-2008 |
Ted Kremenek <kremenek@apple.com> |
Added initial support for supporting __NSString__ in attribute "format". Still need to iron out some of the semantics (fixmes are present). This addresses <rdar://problem/5916348> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50866 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
5f2e2248dcee4ca2dcb080982a7ab9d00cf06661 |
07-May-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Synthesized getter/setter method declarations need not have an implementation. This fixes couple of failing prperty tests caused by my previous patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50830 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
4607034e621aa77378ec75249d1e9eaf5de49b6a |
07-May-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Synthesized getter/setter method declarations need not have an implementation. This fixes couple of failing prperty tests caused by my previous patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50830 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
e4534e7c864452fd1f884668ea270d90bc586dcf |
07-May-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
This patch introduces declaration of getter methods for ObjC2's properties. Couple of property tests will fail with this patch. Will fix them next. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50818 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
33de3f0333ca0b5274291b8d76c86758c0484691 |
07-May-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
This patch introduces declaration of getter methods for ObjC2's properties. Couple of property tests will fail with this patch. Will fix them next. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50818 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
2b9422f15b71241fc5fca53858c1343f5012932e |
07-May-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Diagnose attempts to use C++ default arguments outside of a function declaration git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50799 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaType.cpp
|
6d6eb57225b53fb627c565861d1d0e90645400d1 |
07-May-2008 |
Douglas Gregor <dgregor@apple.com> |
Diagnose attempts to use C++ default arguments outside of a function declaration git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50799 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaType.cpp
|
b7080aec42ece02e2b526eee5921b4ed4c50e60b |
06-May-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to refactor setter/getter names of property attributes into Selector (was IdentifierInfo * before). This will make method declartations whole lot easier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50747 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
5251e130a23d997f7c0dfdc250cdc41f179e5bed |
06-May-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to refactor setter/getter names of property attributes into Selector (was IdentifierInfo * before). This will make method declartations whole lot easier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50747 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
560995258155788c704753bbc1bdf1db12c1a21d |
06-May-2008 |
Steve Naroff <snaroff@apple.com> |
Several fixes to SemaInit.cpp. It's still not enabled (since it fails a few tests). Expect to enable it very soon. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50688 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaInit.cpp
|
a647caad2dec67ac25b763f06237cfe3c3968b51 |
06-May-2008 |
Steve Naroff <snaroff@apple.com> |
Several fixes to SemaInit.cpp. It's still not enabled (since it fails a few tests). Expect to enable it very soon. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50688 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaInit.cpp
|
a9c87f29e50228931265a507c760161184b3dea7 |
06-May-2008 |
Chris Lattner <sabre@nondot.org> |
Fix rdar://5905347 a crash on invalid builtin, due to the params not getting installed for builtins when synthesized. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50676 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
95e2c71181c7ec1ffea0066bbae49e8742bd0687 |
06-May-2008 |
Chris Lattner <sabre@nondot.org> |
Fix rdar://5905347 a crash on invalid builtin, due to the params not getting installed for builtins when synthesized. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50676 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
dea31bf38f407c841e4401b9998c849d75e50f77 |
05-May-2008 |
Chris Lattner <sabre@nondot.org> |
Add support for -Wimplicit-function-declaration, rdar://5907433 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50672 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
37d1084efc3d0855c86400b20c00e22c308365c5 |
05-May-2008 |
Chris Lattner <sabre@nondot.org> |
Add support for -Wimplicit-function-declaration, rdar://5907433 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50672 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
4aa72a76d99c4c8b5c0f9264bfd98167afd4eea4 |
05-May-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
percolate @optional/@required protocols down to ASTs for properties declared in the protocol. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50662 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
46b55e56d029aec699fc2701e43d70264da9ecd8 |
05-May-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
percolate @optional/@required protocols down to ASTs for properties declared in the protocol. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50662 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
33973a2ce146d07ee6dba27d63028a7bf8939454 |
02-May-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
This patch is about merging ObjC2's properties declared in class protocols into class's property list and performing semantics on them for while doing so. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50587 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
aebf0cba02c014ac8b19d615c654248e0e93779f |
02-May-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
This patch is about merging ObjC2's properties declared in class protocols into class's property list and performing semantics on them for while doing so. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50587 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
c4d4a4851775d787c3bd69b3abfd1b0dd602be44 |
02-May-2008 |
Steve Naroff <snaroff@apple.com> |
Replace Sema::CheckInitializerListTypes() with a helper class (InitListChecker) that synthesizes implicit InitListExpr's when appropriate (see InitListExpr comments in Expr.h for more details). I also moved the code to SemaInit.cpp, to help reduce clutter in SemaDecl.cpp. NOTE: This work is incomplete and still fails many tests (as a result, it isn't enabled yet). Nevertheless, I wanted to check it in so I can work on it from home. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50544 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaInit.cpp
|
0cca749f64ff54476df3a4fc084821b8a8d712d5 |
02-May-2008 |
Steve Naroff <snaroff@apple.com> |
Replace Sema::CheckInitializerListTypes() with a helper class (InitListChecker) that synthesizes implicit InitListExpr's when appropriate (see InitListExpr comments in Expr.h for more details). I also moved the code to SemaInit.cpp, to help reduce clutter in SemaDecl.cpp. NOTE: This work is incomplete and still fails many tests (as a result, it isn't enabled yet). Nevertheless, I wanted to check it in so I can work on it from home. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50544 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaInit.cpp
|
bb4f7b4b264c3f83ea91a23656d507b504a8b9c5 |
01-May-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Implicitly defined functions were getting the DeclContext of the function where they appeared, causing the bug: http://llvm.org/bugs/show_bug.cgi?id=2266. Fix it by making implicitly defined functions get the DeclContext of translation unit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50538 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
93213bb42c7ff7a2cef40c8c037f225844513443 |
01-May-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Implicitly defined functions were getting the DeclContext of the function where they appeared, causing the bug: http://llvm.org/bugs/show_bug.cgi?id=2266. Fix it by making implicitly defined functions get the DeclContext of translation unit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50538 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
513e30ae08329e39d9199225de87e7fc3f17d2ce |
01-May-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to match and issue diagnostics on property type mismatch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50532 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
3435096781465f6b8e69de4b35d9dd3a94a76468 |
01-May-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to match and issue diagnostics on property type mismatch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50532 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
ed986606b5d9261e74cd63080c749b6a787744c3 |
01-May-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
More ObjC2 property semantics work. Work in progress. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50508 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
02edb98b457c1be3fabe63f7390fe75fd6689def |
01-May-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
More ObjC2 property semantics work. Work in progress. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50508 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
46f83554b7d34d729e10d3cfd54b0b85635b9100 |
30-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
fix 'var unused' warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50484 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
226249424893f9375ab4e5dabb4d2d9677263835 |
30-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
fix 'var unused' warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50484 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
03e6aaf5e2fd711a043ed74465a81d1b46535976 |
27-Apr-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Parsing of namespaces: -NamespaceDecl for the AST -Checks for name clashes between namespaces and tag/normal declarations. This commit doesn't implement proper name lookup for namespaces. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50321 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
|
2d1c5d313cd0c229cc614e74baa4c5756a4b46f4 |
27-Apr-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Parsing of namespaces: -NamespaceDecl for the AST -Checks for name clashes between namespaces and tag/normal declarations. This commit doesn't implement proper name lookup for namespaces. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50321 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclCXX.cpp
emaExpr.cpp
|
43ce0be821a998151838a5fa66d1cab91448963b |
27-Apr-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Use PushOnScopeChains to introduce a decl into scope. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50320 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
642e38baaeedb1a35c36df02a1ac57002a43a694 |
27-Apr-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Use PushOnScopeChains to introduce a decl into scope. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50320 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
463ec844a8f24650ea5239c39903b182f7a5b4d8 |
25-Apr-2008 |
Nuno Lopes <nunoplopes@sapo.pt> |
initial support for recognizing __transparent_union__ attributes comments on the ML will follow git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50262 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
27ae6c6531ac13e4b316e7e0e7b7c846b61a8d15 |
25-Apr-2008 |
Nuno Lopes <nunoplopes@sapo.pt> |
initial support for recognizing __transparent_union__ attributes comments on the ML will follow git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50262 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
1e89de3472533483d1208d473b62f50bc6324e10 |
24-Apr-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to diagnose inconsistancies between properties declared in current and its super class. This patch is incomplete. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50228 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
b5e0224173058c6fd5272d86bf251628c38b2513 |
24-Apr-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to diagnose inconsistancies between properties declared in current and its super class. This patch is incomplete. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50228 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
dc0569e863a6d89da3491d29ed6c56c3325aa5c6 |
23-Apr-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to build AST for property implementation declarations and to print declaration from its AST. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50117 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
628b96f34e93b643b6e15e75eabb8d96079a7e27 |
23-Apr-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to build AST for property implementation declarations and to print declaration from its AST. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50117 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
ef87a206940eb4a5400af11b128d60b532e14708 |
22-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
"This patch renames DeclContext *CtxDecl -> DeclContext *DeclCtx DeclContext *CD -> DeclContext *DC It makes the code more consistent." Patch by Zhongxing Xu! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50105 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
9fdf9c6d3530bb85f3166e6460d841e2ff8e1a2c |
22-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
"This patch renames DeclContext *CtxDecl -> DeclContext *DeclCtx DeclContext *CD -> DeclContext *DC It makes the code more consistent." Patch by Zhongxing Xu! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50105 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
1f0280045febde26e6331cefdedc73bfe5235d76 |
21-Apr-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
More semantics checks of properties. Property implementation can implicitly use ivar of same name. Better diagnostics to bring home this point. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50065 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
6cdf16d61de193e0596c3c2cec02e4227212986a |
21-Apr-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
More semantics checks of properties. Property implementation can implicitly use ivar of same name. Better diagnostics to bring home this point. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50065 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
900e3dc71a96168ba088b7d3f7153bd42777c0ab |
21-Apr-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Support for @dynamic AST build. More property semantics checking. First test case for ObjC2's property implementation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50057 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
c35b9e4e2efad727538c848cf30d4b0eb1031dc9 |
21-Apr-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Support for @dynamic AST build. More property semantics checking. First test case for ObjC2's property implementation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50057 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
ef8a3df17c1a04eeffc875bd7eea4d60ac839c9b |
21-Apr-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Continuation of work on ObjC2's properties. Added iterators, methods to find property and categories. Use them in doing semantic analysis on property implementation declarations. Fixed typos. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50050 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
559c0c4bbecc017aab0716d546c4fefbcc194687 |
21-Apr-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Continuation of work on ObjC2's properties. Added iterators, methods to find property and categories. Use them in doing semantic analysis on property implementation declarations. Fixed typos. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50050 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
42214c5200fa3576659646c50c709d830db64077 |
21-Apr-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Clean up handling of function redeclarations git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50021 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
f009795057dc8ca254f5618c80a0a90f07cd44b4 |
21-Apr-2008 |
Douglas Gregor <dgregor@apple.com> |
Clean up handling of function redeclarations git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50021 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
b2a0e61e7d6c0e3479a717cfe17b783c43d6e958 |
20-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
Restructure and simplify Sema::ObjCQualifiedIdTypesAreCompatible, deleting dead code, making other code more obvious, and fixing a bug. This fixes these (bogus) warnings in release mode: SemaExprObjC.cpp:383: warning: 'RHSProtoE' may be used uninitialized in this function SemaExprObjC.cpp:383: warning: 'RHSProtoI' may be used uninitialized in this function git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49984 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
b1698cf972be75084d760c82389ab5b49a386c31 |
20-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
Restructure and simplify Sema::ObjCQualifiedIdTypesAreCompatible, deleting dead code, making other code more obvious, and fixing a bug. This fixes these (bogus) warnings in release mode: SemaExprObjC.cpp:383: warning: 'RHSProtoE' may be used uninitialized in this function SemaExprObjC.cpp:383: warning: 'RHSProtoI' may be used uninitialized in this function git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49984 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
778fd3be10959e63b28b4f16fbf544b51e8951ea |
19-Apr-2008 |
Nate Begeman <natebegeman@mac.com> |
Ignore qualifiers when attempting to match arguments to parameter types for __builtin_overload git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49943 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
d6595fa87cd031dab36c6dbb723ae19e822ab2aa |
19-Apr-2008 |
Nate Begeman <natebegeman@mac.com> |
Ignore qualifiers when attempting to match arguments to parameter types for __builtin_overload git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49943 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
af6ed504d90dc3b813c573bfbee8bc0e92e7fdc0 |
19-Apr-2008 |
Nate Begeman <natebegeman@mac.com> |
OCUVector -> ExtVector, shorthand for extended vector, per feedback from Chris. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49942 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaExpr.cpp
|
213541a68a3e137d11d2cefb612c6cdb410d7e8e |
19-Apr-2008 |
Nate Begeman <natebegeman@mac.com> |
OCUVector -> ExtVector, shorthand for extended vector, per feedback from Chris. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49942 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaExpr.cpp
|
c3cf4508756ad07bc5abdc81161fa85b17f6e243 |
19-Apr-2008 |
Nuno Lopes <nunoplopes@sapo.pt> |
fix __attribute__(format) for struct function pointer fields git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49938 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
59b6d5ae1c42515340a48040f6ff576a6f48a9c3 |
19-Apr-2008 |
Nuno Lopes <nunoplopes@sapo.pt> |
fix __attribute__(format) for struct function pointer fields git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49938 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
0735b93ad6404783d6064e080545f24a94d861d3 |
18-Apr-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Fixed a bug in categories and properties. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49883 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
5833b901d02e628c9bcdb1c59efcc100a1faecad |
18-Apr-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Fixed a bug in categories and properties. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49883 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
78f7e31a5fbfc5adbf989f201197047255c51b64 |
18-Apr-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Initial work for property implementation declarations. Mostly semantic checking in this patch. This is on going and incomplete. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49882 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
f624f8186d8fe474350051c6d3f00b2c204fbeae |
18-Apr-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Initial work for property implementation declarations. Mostly semantic checking in this patch. This is on going and incomplete. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49882 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
8516e9aeca0e3b8b9d064eeef0a3a25c07c850ab |
17-Apr-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Added property decl support for protocols. Added assertion if unexpected property decls are found where they don't belong. Consolidated property decl. printing by using a helper function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49862 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
3dd4ba4068e953125b95ce85c723322cdd0a3cb5 |
17-Apr-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Added property decl support for protocols. Added assertion if unexpected property decls are found where they don't belong. Consolidated property decl. printing by using a helper function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49862 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
9d0d8bfd2fc8518847d6aef7c98f140fde087881 |
17-Apr-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Use TranslationUnitDecl as DeclContext of builtin functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49856 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
ff898cd0b0c9fcbad1033e0278b54a4cc7108d05 |
17-Apr-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Use TranslationUnitDecl as DeclContext of builtin functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49856 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
d358600db540bf90f686c91145cf422f122822f0 |
17-Apr-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Addition of TranslationUnitDecl to the AST: -Added TranslationUnitDecl class to serve as top declaration context -ASTContext gets a TUDecl member and a getTranslationUnitDecl() function -All ScopedDecls get the TUDecl as DeclContext when declared at global scope git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49855 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDecl.cpp
|
ef177820100ab583b08fd3056e2a5a52ee4b1629 |
17-Apr-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Addition of TranslationUnitDecl to the AST: -Added TranslationUnitDecl class to serve as top declaration context -ASTContext gets a TUDecl member and a getTranslationUnitDecl() function -All ScopedDecls get the TUDecl as DeclContext when declared at global scope git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49855 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDecl.cpp
|
52ff8444b679c8e11e248e535a06fe11b0fe6503 |
16-Apr-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
This patch adds support for declaraing properties in categories, just as they are declared in objc classes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49817 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
7e7e3872b584bc5e7de7a34c8b9c092032303b72 |
16-Apr-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
This patch adds support for declaraing properties in categories, just as they are declared in objc classes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49817 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
72a6ebcd14aa787c516d683a0efa1550440ad346 |
16-Apr-2008 |
Steve Naroff <snaroff@apple.com> |
Remove FileVarDecl and BlockVarDecl. They are replaced by VarDecl::isBlockVarDecl() and VarDecl::isFileVarDecl(). This is a fairly mechanical/large change. As a result, I avoided making any changes/simplifications that weren't directly related. I did break two Analysis tests. I also have a couple FIXME's in UninitializedValues.cpp. Ted, can you take a look? If the bug isn't obvious, I am happy to dig in and fix it (since I broke it). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49748 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaStmt.cpp
|
248a753f6b670692523c99afaeb8fe98f7ae3ca7 |
16-Apr-2008 |
Steve Naroff <snaroff@apple.com> |
Remove FileVarDecl and BlockVarDecl. They are replaced by VarDecl::isBlockVarDecl() and VarDecl::isFileVarDecl(). This is a fairly mechanical/large change. As a result, I avoided making any changes/simplifications that weren't directly related. I did break two Analysis tests. I also have a couple FIXME's in UninitializedValues.cpp. Ted, can you take a look? If the bug isn't obvious, I am happy to dig in and fix it (since I broke it). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49748 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaStmt.cpp
|
0ceb4be0200f9f03f8ffe4c0986ef3cc09e15d36 |
15-Apr-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
New AST representation for each objc2's property declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49699 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
1de1e74541c25c1a7b721f1c3991ea34c8403420 |
15-Apr-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
New AST representation for each objc2's property declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49699 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
d691d75e063f9f6cc457ea521b492b745b004f42 |
14-Apr-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Argiris Kirtzidis's fix for handling empty IdDeclInfo's in IdentifierResolver::AddDecl git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49631 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
|
f8d9e76a58c2c6b00f925e347088ec9b5dc8f1b0 |
14-Apr-2008 |
Douglas Gregor <dgregor@apple.com> |
Argiris Kirtzidis's fix for handling empty IdDeclInfo's in IdentifierResolver::AddDecl git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49631 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
|
e6369b04d5bdbd26469412b94b8ef3c9535b1b53 |
14-Apr-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Move IdDeclInfoMap class in an anonymous namespace. Suggestion by Chris Lattner. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49628 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
dentifierResolver.h
|
7bc198fb47a498e327a9ceb2d17612dcb3d15095 |
14-Apr-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Move IdDeclInfoMap class in an anonymous namespace. Suggestion by Chris Lattner. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49628 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
dentifierResolver.h
|
ec93f447b8634e58fc9f88cda6ef8a542c91ef70 |
13-Apr-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
This patch adds very basic support for parsing and type-checking class inheritance in C++. It'll parse the base-specifier list, e.g., class D : public B1, virtual public B2 { }; and do some of the simpler semantic checks (B1 and B2 are classes; they aren't unions or incomplete types, etc). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49623 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
e37ac4ff1620ed2d7026f52baccbfa022d79ced1 |
13-Apr-2008 |
Douglas Gregor <dgregor@apple.com> |
This patch adds very basic support for parsing and type-checking class inheritance in C++. It'll parse the base-specifier list, e.g., class D : public B1, virtual public B2 { }; and do some of the simpler semantic checks (B1 and B2 are classes; they aren't unions or incomplete types, etc). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49623 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclCXX.cpp
|
1d661556b9263f4d635372aecdea8c55dac84e83 |
13-Apr-2008 |
Douglas Gregor <doug.gregor@gmail.com> |
Introduce support for finding class and enum names via ordinary name lookup in C++ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49621 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
dentifierResolver.h
emaDecl.cpp
emaType.cpp
|
2ce52f3fb95bf544db6bd3d91a72bce7d9cceb6c |
13-Apr-2008 |
Douglas Gregor <dgregor@apple.com> |
Introduce support for finding class and enum names via ordinary name lookup in C++ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49621 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
dentifierResolver.h
emaDecl.cpp
emaType.cpp
|
2e78db3510b136b3f961af202e6a1a3df4839172 |
13-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
This patch is just the easy part of the class names patch, which allows the parsing of "class" in addition to "struct" and "union" to declare a record. So this patch allows: class C { }; class C c1; But it does not contain the lookup bits, so this won't work yet: C c2; Patch by Doug Gregor! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49613 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaType.cpp
|
99dc91422144483c20d1c7381bc9ac634b646b04 |
13-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
This patch is just the easy part of the class names patch, which allows the parsing of "class" in addition to "struct" and "union" to declare a record. So this patch allows: class C { }; class C c1; But it does not contain the lookup bits, so this won't work yet: C c2; Patch by Doug Gregor! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49613 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaType.cpp
|
b1856dbbd26d8386899c46712e182e54f9833de6 |
13-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
Default argument cleanups and minor improvements, patch by Doug Gregor! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49598 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
9e979557eea3875c9e3d100c68188233dd7f46c0 |
13-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
Default argument cleanups and minor improvements, patch by Doug Gregor! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49598 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
c31c905256eda23a2ba6992ccd976bd5fac7dfc0 |
12-Apr-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Use std::list's push_back instead of resize to add an element. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49582 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
|
72e62b0c6049b7e76b508bb74116314eb7772be5 |
12-Apr-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Use std::list's push_back instead of resize to add an element. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49582 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
|
6bfafc0078d3bc9a66555bfcd6db6e9e94cc0a0a |
12-Apr-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Fixed comments. Moved IdDeclInfo class to anonymous namespace. Replaced array with a std::vector. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49570 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
dentifierResolver.h
|
321f278db3405268e8644eb75f4fcf8900e0d09c |
12-Apr-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Fixed comments. Moved IdDeclInfo class to anonymous namespace. Replaced array with a std::vector. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49570 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
dentifierResolver.h
|
951f25b8b921d1a2c50a2a801c39febefdd29e21 |
12-Apr-2008 |
Argiris Kirtzidis <akyrtzi@gmail.com> |
Added PushOnScopeChains method to Sema, that adds a decl to both the IdResolver and the Scope. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49567 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
|
87f3ff0c27be71cfd0eaf4628eb64538e84ee6ce |
12-Apr-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Added PushOnScopeChains method to Sema, that adds a decl to both the IdResolver and the Scope. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49567 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
|
e707172d121c4072834e59067eec77fd410b5764 |
12-Apr-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
AST generation for objc2's property declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49565 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
dae1a1a2aa4f245b1958dc8db6089f24c575ef13 |
12-Apr-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
AST generation for objc2's property declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49565 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDeclObjC.cpp
|
7c371743821713cb9627af576fadc890185c75e2 |
11-Apr-2008 |
Steve Naroff <snaroff@apple.com> |
Add class and super class location info to ObjCInterfaceDecl... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49553 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDeclObjC.cpp
|
d6a07aaf62b40cdfbd96f6b874d02b06fc22d015 |
11-Apr-2008 |
Steve Naroff <snaroff@apple.com> |
Add class and super class location info to ObjCInterfaceDecl... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49553 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDeclObjC.cpp
|
4e0bb9874657593aaba9ed3a53ecc801180ede6f |
11-Apr-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Minor changes per Chris L's review. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49539 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
45bc03f9202d5649fd41f35b98d34bb34823d0f3 |
11-Apr-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Minor changes per Chris L's review. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49539 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
efa937ac87303c4b56f150483424711f6419a210 |
11-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
two new files for previous patch, by Argiris Kirtzidis git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49521 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
dentifierResolver.h
|
a2f42b1d18db7a6e05314b04532a6643e1ffba0f |
11-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
two new files for previous patch, by Argiris Kirtzidis git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49521 91177308-0d34-0410-b5e6-96231b3b80d8
dentifierResolver.cpp
dentifierResolver.h
|
2a1e2edb60c3b2145d71ba746c3983ac0687c331 |
11-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
Switch sema to maintaining its own scope chain information for variable shadowing, instead of threading it through the AST. This patch contributed by Argiris Kirtzidis! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49520 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
emaDeclObjC.cpp
|
7f925cc1071117ebe3191db33bbdfd706af297e9 |
11-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
Switch sema to maintaining its own scope chain information for variable shadowing, instead of threading it through the AST. This patch contributed by Argiris Kirtzidis! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49520 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
emaDeclObjC.cpp
|
751c61790a689820aa64ddfb4069f1bfc6a88952 |
11-Apr-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch for: 1) objc ivar processing is split out of ActOnField into its own ActOnIvar method. 2) the new objc ivar action takes visibility info directly, eliminating AllVisibilities in ParseObjCClassInstanceVariables. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49506 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
1d78cc443084134428c4c333fab25148900c3ca4 |
11-Apr-2008 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch for: 1) objc ivar processing is split out of ActOnField into its own ActOnIvar method. 2) the new objc ivar action takes visibility info directly, eliminating AllVisibilities in ParseObjCClassInstanceVariables. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49506 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
da7b5f03e9390e1f5d25ca5c7bbd07a9cce95d28 |
10-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
typedef void T; void f(T); is only invalid in C++ mode, not C89 mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49460 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
def026a193b8218a58d112414515cb87fdf89c15 |
10-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
typedef void T; void f(T); is only invalid in C++ mode, not C89 mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49460 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
97316c05084fc9a360b3d38af939c30cdd3c6034 |
10-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
Several improvements from Doug Gregor related to default argument handling. I'll fix up the c89 (void) thing next. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49459 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaType.cpp
|
8123a95c33b792d35c2e4992ba6e27882748fb0d |
10-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
Several improvements from Doug Gregor related to default argument handling. I'll fix up the c89 (void) thing next. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49459 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclCXX.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaType.cpp
|
ac7b83a439fe29723a47692f1cea044816fc85ad |
08-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
Add support for C++ default arguments, and rework Parse-Sema interaction for function parameters, fixing PR2046. Patch by Doug Gregor! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49370 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
3d1cee369820dba83d7fccc605b91e838cf412b4 |
08-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
Add support for C++ default arguments, and rework Parse-Sema interaction for function parameters, fixing PR2046. Patch by Doug Gregor! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49370 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclCXX.cpp
|
3e254fbafd851bc9d6872cf52ee5740c79b3e627 |
08-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
Add support for C++ default arguments, and rework Parse-Sema interaction for function parameters, fixing PR2046. Patch by Doug Gregor! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49369 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaType.cpp
|
04421087832a031c90bd58f128c7c0e741db8dd2 |
08-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
Add support for C++ default arguments, and rework Parse-Sema interaction for function parameters, fixing PR2046. Patch by Doug Gregor! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49369 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaType.cpp
|
e1577e2cbefa2156337ab75a950ad9ef0f9102fc |
07-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
simplify reference handling. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49325 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
8f8fc7bdb6f42ce31d46596d4c0660625773cbef |
07-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
simplify reference handling. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49325 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
390564e2ad5e3582a67d76b3a611b375ae5c4b9a |
07-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
simplify compatibility testing for tag types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49323 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
78eca286b0898e98bb2cee943b4ecbea9cc07dd6 |
07-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
simplify compatibility testing for tag types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49323 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
fe1f40359ec02723629c0ddf5bf92c7a18221f84 |
07-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
move ObjCQualifiedIdTypesAreCompatible out of ASTContext into Sema. While it is similar to the other compatibility predicates in ASTContext, it is not used by them and is different. In addition, greatly simplify ObjCQualifiedIdTypesAreCompatible and fix some canonical type bugs. Also, simplify my Type::getAsObjC* methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49313 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprObjC.cpp
|
eca7be6b7ebd93682eeaab2c71d59f2995dacdcc |
07-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
move ObjCQualifiedIdTypesAreCompatible out of ASTContext into Sema. While it is similar to the other compatibility predicates in ASTContext, it is not used by them and is different. In addition, greatly simplify ObjCQualifiedIdTypesAreCompatible and fix some canonical type bugs. Also, simplify my Type::getAsObjC* methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49313 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaExpr.cpp
emaExprObjC.cpp
|
51285d8efe73ba2c6d30145da33b3d05829ceaba |
07-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
simplify max type computation by making it return an integer (like getFloatingTypeOrder) instead of a type. Fix a fixme. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49297 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
7cfeb08f2466d6263ec6ff1402298f93f6d6991f |
07-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
simplify max type computation by making it return an integer (like getFloatingTypeOrder) instead of a type. Fix a fixme. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49297 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
d7135b47ba2583ad564ad347002eeb0ba17b9b07 |
07-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
minor simplifications/cleanups to type comparisons. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49296 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
a75cea3f6be0daa8054d36af81a6ffda1713f82d |
07-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
minor simplifications/cleanups to type comparisons. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49296 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
42a2174a9824760c915bb815c877b664dd37d97d |
07-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
remove the Decl::getCanonicalType() method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49295 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclObjC.cpp
|
8bcfc5bef434d7052e28d0ce45182855659ebd3d |
07-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
remove the Decl::getCanonicalType() method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49295 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaDeclObjC.cpp
|
c1b68dbbf3d1d032957c50d9d5b96bba565073ca |
07-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
Start switching clients over from CT.getCanonicalType() to Context.getCanonicalType(CT) for PR2189. While I'm at it, clean up a bit of maxIntegerType. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49292 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f52ab250ff92bc51a9ac9a8e19bd43b63a5f844f |
07-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
Start switching clients over from CT.getCanonicalType() to Context.getCanonicalType(CT) for PR2189. While I'm at it, clean up a bit of maxIntegerType. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49292 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
79af4568c50e1e9df53e56b872d52abdbd3614b4 |
06-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
move a semantic check out of the parser into sema. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49273 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
3420766281f1d9626cfa710c000247f9625f26d4 |
06-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
move a semantic check out of the parser into sema. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49273 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
f3874bc89a4f4c4af2ea41900b782a8381d1fcba |
06-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
This patch contains these changes: -Renamed ContextDecl -> DeclContext -Removed DeclContext pointer from FieldDecl -EnumDecl inherits from DeclContext, instead of TagDecl Patch by Argiris Kirtzidis! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49261 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
emaDeclObjC.cpp
|
b048c9835969c4f7fe06264748be18ed4b442116 |
06-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
This patch contains these changes: -Renamed ContextDecl -> DeclContext -Removed DeclContext pointer from FieldDecl -EnumDecl inherits from DeclContext, instead of TagDecl Patch by Argiris Kirtzidis! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49261 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
emaDeclObjC.cpp
|
6ab935ba6195062045a0921cd519d520a9216b50 |
05-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
Fix handling of implicit int, resolving PR2012 and reverting (and subsuming) my patch for PR1999. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49251 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
d658b562e80d6ef7a1118e34ff12802c6e2fcced |
05-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
Fix handling of implicit int, resolving PR2012 and reverting (and subsuming) my patch for PR1999. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49251 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
9104f3c7cd14b86540031cb3699b159f874d7c68 |
04-Apr-2008 |
Steve Naroff <snaroff@apple.com> |
Add explicit support for diagnosing implicit function decls. Without this, the diagnostic is very confusing. The diag is now consistent with gcc as well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49214 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
e2ef815de1da36c1ad1494cb58ce37adac1efa26 |
04-Apr-2008 |
Steve Naroff <snaroff@apple.com> |
Add explicit support for diagnosing implicit function decls. Without this, the diagnostic is very confusing. The diag is now consistent with gcc as well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49214 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
eee57c013158e34b6a472d9d07b73ba271523eff |
04-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
Introduce ContextDecl, patch by Argiris Kirtzidis! -Added ContextDecl (no TranslationUnitDecl) -ScopedDecl class has a ContextDecl member -FieldDecl class has a ContextDecl member, so that a Field or a ObjCIvar can be traced back to their RecordDecl/ObjCInterfaceDecl easily -FunctionDecl, ObjCMethodDecl, TagDecl, ObjCInterfaceDecl inherit from ContextDecl. With TagDecl as ContextDecl, enum constants have a EnumDecl as their context. -Moved Decl class to a "DeclBase.h" along with ContextDecl class -CurContext is handled by Sema git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49208 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
emaDeclObjC.cpp
|
0ed844b04ea4387caa4e1cf3dc375d269657536b |
04-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
Introduce ContextDecl, patch by Argiris Kirtzidis! -Added ContextDecl (no TranslationUnitDecl) -ScopedDecl class has a ContextDecl member -FieldDecl class has a ContextDecl member, so that a Field or a ObjCIvar can be traced back to their RecordDecl/ObjCInterfaceDecl easily -FunctionDecl, ObjCMethodDecl, TagDecl, ObjCInterfaceDecl inherit from ContextDecl. With TagDecl as ContextDecl, enum constants have a EnumDecl as their context. -Moved Decl class to a "DeclBase.h" along with ContextDecl class -CurContext is handled by Sema git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49208 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
ema.h
emaDecl.cpp
emaDeclObjC.cpp
|
03105576dc63714d9121c6e93823522a167e03a2 |
04-Apr-2008 |
Nate Begeman <natebegeman@mac.com> |
Ignore qualifiers when checking vector operands, just like scalar operands. This prevents things like a += b[0]; where a is a float4 and b is a float4 * (address_space 1) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49199 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
1330b0e6e4a6ad2d586c4a45d6cece5611829a16 |
04-Apr-2008 |
Nate Begeman <natebegeman@mac.com> |
Ignore qualifiers when checking vector operands, just like scalar operands. This prevents things like a += b[0]; where a is a float4 and b is a float4 * (address_space 1) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49199 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
56a5cd63f4f099eebe8f6e9781f96cbb42b4cff7 |
03-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
Fix a bug where we didn't check the RHS for null, we checked the LHS for null twice. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49138 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
bc896f58c714e765bedb8cf1390321128c011f17 |
03-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
Fix a bug where we didn't check the RHS for null, we checked the LHS for null twice. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49138 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
152081673111bafc852c4f90b45e9930cbbc84ed |
02-Apr-2008 |
Steve Naroff <snaroff@apple.com> |
Change ObjCInterfaceDecl to inherit from NamedDecl (not TypeDecl). While ObjCInterfaceDecl is arguably a TypeDecl, it isn't a ScopedDecl. Since TypeDecl's are scoped, it makes sense to simply treat them as NamedDecl's. I could have fiddled a bit more with the hierarchy (in terms of creating a non-scoped TypeDecl), however this probably isn't worth the effort. I also finished unifying access to scope decl change by converting Sema::getObjCInterfaceDecl() to use Sema::LookupDecl(). This is much cleaner now:-) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49107 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclObjC.cpp
|
3110251f13981689f384eb3c0aba2afffea18d9d |
02-Apr-2008 |
Steve Naroff <snaroff@apple.com> |
Change ObjCInterfaceDecl to inherit from NamedDecl (not TypeDecl). While ObjCInterfaceDecl is arguably a TypeDecl, it isn't a ScopedDecl. Since TypeDecl's are scoped, it makes sense to simply treat them as NamedDecl's. I could have fiddled a bit more with the hierarchy (in terms of creating a non-scoped TypeDecl), however this probably isn't worth the effort. I also finished unifying access to scope decl change by converting Sema::getObjCInterfaceDecl() to use Sema::LookupDecl(). This is much cleaner now:-) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49107 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclObjC.cpp
|
a05f7d22201af6cccc06d9258daed7b9651fda04 |
02-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
simplify some code by using PointerLikeType. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49101 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
423a3c9c2719fb75133673e72ac881719df45daf |
02-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
simplify some code by using PointerLikeType. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49101 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
cfac88de7de7d970a2436af939ea87c0e5a9cf9f |
02-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
add a common base class "PointerLikeType" for PointerType and ReferenceType, allowing them to be treated the same in some contexts. A suggestion for a better name is welcome :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49100 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
bdcd637c29ec1540f912ea6860c88b910e78c329 |
02-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
add a common base class "PointerLikeType" for PointerType and ReferenceType, allowing them to be treated the same in some contexts. A suggestion for a better name is welcome :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49100 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
a2ef0829103bb3281d95b6c059190f2147f3c41c |
02-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
properly handle array decay in objc message exprs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49098 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
987798ad1d5db2a8ec26cd5bbe434b35ad32659c |
02-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
properly handle array decay in objc message exprs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49098 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
6384a01cde21198c8f6d24d3bd26a3eec18601c2 |
02-Apr-2008 |
Steve Naroff <snaroff@apple.com> |
Two changes to Sema::LookupDecl() interface. (1) Remove IdLoc (it's never used). (2) Add a bool to enable/disable lazy builtin creaation (defaults to true). This enables us to use LookupDecl() in Sema::isTypeName(), which is also part of this commit. To make this work, I changed isTypeName() to be a non-const member function. I'm not happy with this, however I fiddled with making LookupDecl() and friends const and it got ugly pretty quickly. We can certainly add it back if/when someone has time to fiddle with it. For now, I thought this simplification was more important than retaining the const-ness. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49087 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprObjC.cpp
|
b327ce02959d4e6224732e1c362e7f8e0688581f |
02-Apr-2008 |
Steve Naroff <snaroff@apple.com> |
Two changes to Sema::LookupDecl() interface. (1) Remove IdLoc (it's never used). (2) Add a bool to enable/disable lazy builtin creaation (defaults to true). This enables us to use LookupDecl() in Sema::isTypeName(), which is also part of this commit. To make this work, I changed isTypeName() to be a non-const member function. I'm not happy with this, however I fiddled with making LookupDecl() and friends const and it got ugly pretty quickly. We can certainly add it back if/when someone has time to fiddle with it. For now, I thought this simplification was more important than retaining the const-ness. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49087 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprObjC.cpp
|
9db553e9ffdcd7c9fbd2fa6cf70646370e589159 |
02-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
Various parts of the standard require something to be an "incomplete or object type". Add a predicate that checks exactly this, as it is equivalent to checking ot see if the type is *not* a function type, which is faster to check. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49082 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaType.cpp
|
d805bec0fbb98aa10abbb41bfdcb2e2fab1bac96 |
02-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
Various parts of the standard require something to be an "incomplete or object type". Add a predicate that checks exactly this, as it is equivalent to checking ot see if the type is *not* a function type, which is faster to check. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49082 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
emaType.cpp
|
5fcb38b4b0da5bbb7d49f98325dba73a7a5e3dc1 |
02-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
1) Enforce C99 6.7.3p2: "Types other than pointer types derived from object or incomplete types shall not be restrict-qualified." 2) Warn about qualifiers on function types: C99 6.7.3p8: "If the specification of a function type includes any type qualifiers, the behavior is undefined." 3) Implement restrict on C++ references. 4) fix some locations for various C++ reference diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49081 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
96b77fc05ed4a052a9e614f72b0e83572408ce48 |
02-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
1) Enforce C99 6.7.3p2: "Types other than pointer types derived from object or incomplete types shall not be restrict-qualified." 2) Warn about qualifiers on function types: C99 6.7.3p8: "If the specification of a function type includes any type qualifiers, the behavior is undefined." 3) Implement restrict on C++ references. 4) fix some locations for various C++ reference diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49081 91177308-0d34-0410-b5e6-96231b3b80d8
emaType.cpp
|
19eb97ea0abbfde182bf4cd3120261ec224c20a9 |
02-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
Fix several bugs in array -> pointer decomposition. First, we got several CVR propagation cases wrong, which Eli pointed out in PR2039. Second, we didn't propagate address space qualifiers correctly, leading to incorrect lowering of code in CodeGen/address-space.c. Third, we didn't uniformly propagate the specifier in the array to the pointer ("int[restrict 4]" -> "int *restrict"). This adds an ASTContext::getArrayDecayedType member that handles the non-trivial logic for this seemingly simple operation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49078 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
emaType.cpp
|
e6327747b72bb687c948270f702ff53c30f411a6 |
02-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
Fix several bugs in array -> pointer decomposition. First, we got several CVR propagation cases wrong, which Eli pointed out in PR2039. Second, we didn't propagate address space qualifiers correctly, leading to incorrect lowering of code in CodeGen/address-space.c. Third, we didn't uniformly propagate the specifier in the array to the pointer ("int[restrict 4]" -> "int *restrict"). This adds an ASTContext::getArrayDecayedType member that handles the non-trivial logic for this seemingly simple operation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49078 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaExpr.cpp
emaType.cpp
|
48d7f38320d7abc80dc108d8af7fbb6ad13cbded |
02-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
rename some variables, fix 80 col violation. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49072 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
f0467b39b516b389bf078cc4530f2683f16a42ef |
02-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
rename some variables, fix 80 col violation. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49072 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
67d3c8d84b470129a072cc4f1547ca4c7f8366b0 |
02-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
Fix PR2017 and silence some bogus errors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49068 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaType.cpp
|
fd89bc825026e44c68a68db72d4012fd6752e70f |
02-Apr-2008 |
Chris Lattner <sabre@nondot.org> |
Fix PR2017 and silence some bogus errors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49068 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
emaType.cpp
|
64334eacefac374656ab9aaf151e5a1259ff2e44 |
02-Apr-2008 |
Steve Naroff <snaroff@apple.com> |
Fix a comment typo and add a couple suggestions from Chris. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49066 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
c822ff47d29eb3888796145dbc58d17f747a1e61 |
02-Apr-2008 |
Steve Naroff <snaroff@apple.com> |
Fix a comment typo and add a couple suggestions from Chris. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49066 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
|
e57c21a9247ac0755b4464c522c8d9f1db39bb1f |
02-Apr-2008 |
Steve Naroff <snaroff@apple.com> |
Fairly large "cleaup" related to changing ObjCCompatibleAliasDecl superclass (to inherit from NamedDecl, instead of ScopedDecl). - Added a DenseMap to associate an IdentifierInfo with the ObjCCompatibleAliasDecl. - Renamed LookupScopedDecl->LookupDecl and changed it's return type to Decl. Also added lookup for ObjCCompatibleAliasDecl's. - Removed Sema::LookupInterfaceDecl(). Converted clients to used LookupDecl(). - Some minor indentation changes. Will deal with ObjCInterfaceDecl and getObjCInterfaceDecl() in a separate commit... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49058 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprObjC.cpp
|
e8043c39176e7f253fbd92982b077eca6bf2fd59 |
02-Apr-2008 |
Steve Naroff <snaroff@apple.com> |
Fairly large "cleaup" related to changing ObjCCompatibleAliasDecl superclass (to inherit from NamedDecl, instead of ScopedDecl). - Added a DenseMap to associate an IdentifierInfo with the ObjCCompatibleAliasDecl. - Renamed LookupScopedDecl->LookupDecl and changed it's return type to Decl. Also added lookup for ObjCCompatibleAliasDecl's. - Removed Sema::LookupInterfaceDecl(). Converted clients to used LookupDecl(). - Some minor indentation changes. Will deal with ObjCInterfaceDecl and getObjCInterfaceDecl() in a separate commit... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49058 91177308-0d34-0410-b5e6-96231b3b80d8
ema.h
emaDecl.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprObjC.cpp
|
c72d22d716c178a40b37a40bfc2e1b046c15e541 |
31-Mar-2008 |
Chris Lattner <sabre@nondot.org> |
rename Decl::CompatibleAlias -> ObjCCompatibleAlias. Fix objc ivar lookup. Ivar lookup should occur between lookup of method-local values and lookup of globals. Emulate this with some logic in the handling of Sema::ActOnIdentifierExpr. Two todo's left: 1) sema shouldn't turn a bare reference to an ivar into "self->ivar" in the AST. This is a hack. 2) The new ScopedDecl::isDefinedOutsideFunctionOrMethod method does not correctly handle typedefs and enum constants yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48972 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
8a934233d1582b5bde9d270bc0705aa81e471a79 |
31-Mar-2008 |
Chris Lattner <sabre@nondot.org> |
rename Decl::CompatibleAlias -> ObjCCompatibleAlias. Fix objc ivar lookup. Ivar lookup should occur between lookup of method-local values and lookup of globals. Emulate this with some logic in the handling of Sema::ActOnIdentifierExpr. Two todo's left: 1) sema shouldn't turn a bare reference to an ivar into "self->ivar" in the AST. This is a hack. 2) The new ScopedDecl::isDefinedOutsideFunctionOrMethod method does not correctly handle typedefs and enum constants yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48972 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
9fcf5b6d3601e65814957739b92273c9ef51cac0 |
28-Mar-2008 |
Steve Naroff <snaroff@apple.com> |
Make sure Sema::ActOnClassMessage() correctly diagnoses "super". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48924 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
95110968dcd6ba2baef2a23549cd5592f01eca59 |
28-Mar-2008 |
Steve Naroff <snaroff@apple.com> |
Make sure Sema::ActOnClassMessage() correctly diagnoses "super". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48924 91177308-0d34-0410-b5e6-96231b3b80d8
emaExprObjC.cpp
|
1997d2ce0aba5e92060abdf7917777202aed8d60 |
26-Mar-2008 |
Steve Naroff <snaroff@apple.com> |
Alloc redeclaration of typedefs within ExternCSystemHeaderDir's AND SystemHeaderDir's. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48841 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
c5e2f34df1c545f792e750d564ee58368197ae62 |
26-Mar-2008 |
Steve Naroff <snaroff@apple.com> |
Alloc redeclaration of typedefs within ExternCSystemHeaderDir's AND SystemHeaderDir's. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48841 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
02564e5ad0db7f1d553ba4b620c95eeb111e7e4d |
26-Mar-2008 |
Nuno Lopes <nunoplopes@sapo.pt> |
allow the format attribute to be specified in function pointer prototypes # this is my first commit here, so please be gentle :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48807 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
8c1a9a80ba2e200f9180867e133563b15223dca2 |
26-Mar-2008 |
Nuno Lopes <nunoplopes@sapo.pt> |
allow the format attribute to be specified in function pointer prototypes # this is my first commit here, so please be gentle :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48807 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
efc11216a5755f69b5540289aa2dd374d4bc82ab |
25-Mar-2008 |
Nate Begeman <natebegeman@mac.com> |
Extend QualType::getAddressSpace to do the right thing for array types, and in the future, RecordTypes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48784 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
8e7dafec4b70303dfaff95151cd06bfc5532720c |
25-Mar-2008 |
Nate Begeman <natebegeman@mac.com> |
Extend QualType::getAddressSpace to do the right thing for array types, and in the future, RecordTypes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48784 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
e50e14c1878b1e66c5ed81f95dcdf6317c242adb |
20-Mar-2008 |
Steve Naroff <snaroff@apple.com> |
Fix typo. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48571 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
0d755ad7d8650dc52eeff25cc3f5bb1a2c93483d |
20-Mar-2008 |
Steve Naroff <snaroff@apple.com> |
Fix typo. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48571 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
bb9e1a5b97d90e01c4d4026d9b3a507484aadb73 |
20-Mar-2008 |
Steve Naroff <snaroff@apple.com> |
Fix http://llvm.org/bugs/show_bug.cgi?id=2161. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48568 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
657aefe011bea7bda36771c07bd5cd8f82a82112 |
20-Mar-2008 |
Steve Naroff <snaroff@apple.com> |
Fix http://llvm.org/bugs/show_bug.cgi?id=2161. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48568 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
78a2a315badb4035a6ce281aedc532f1c8398653 |
17-Mar-2008 |
Nate Begeman <natebegeman@mac.com> |
Check in a couple fixes for vector extensions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48461 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
9c167115e9089d46266ba2eacf79693b1ca1c036 |
17-Mar-2008 |
Nate Begeman <natebegeman@mac.com> |
Check in a couple fixes for vector extensions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48461 91177308-0d34-0410-b5e6-96231b3b80d8
emaExpr.cpp
|
44859618fbb881db1728da0bb6e82553f579d2ec |
17-Mar-2008 |
Chris Lattner <sabre@nondot.org> |
clean up property memory allocation to move it into the ast classes like the rest of the classes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48434 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
f4af5154571e0c5eadb19df10e65464766ef6683 |
17-Mar-2008 |
Chris Lattner <sabre@nondot.org> |
clean up property memory allocation to move it into the ast classes like the rest of the classes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48434 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
cffe36686142e06ce67fd4f0469ecc58e1286bdf |
16-Mar-2008 |
Chris Lattner <sabre@nondot.org> |
make property addition work list all other "add" methods. Do the allocation in the class, not in sema. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48433 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
55d13b4d5530a14d5baa72adab32ae78ba256caf |
16-Mar-2008 |
Chris Lattner <sabre@nondot.org> |
make property addition work list all other "add" methods. Do the allocation in the class, not in sema. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48433 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
2d1c43110a0f4ba4b9b6de2364959a238baf1c12 |
16-Mar-2008 |
Chris Lattner <sabre@nondot.org> |
add the last two Create methods for decls, woo! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48432 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
f8d17a59167d9c2026506ed8813ea434d93b662a |
16-Mar-2008 |
Chris Lattner <sabre@nondot.org> |
add the last two Create methods for decls, woo! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48432 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
1b6de3378e0af075b0254da7ba8c2e80f2753609 |
16-Mar-2008 |
Chris Lattner <sabre@nondot.org> |
add two more Create methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48428 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
75c9cae5f85c72cbb1649e93849e16ede3f07522 |
16-Mar-2008 |
Chris Lattner <sabre@nondot.org> |
add two more Create methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48428 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
321b5d12d1ed2c6b5a2faab712c3e3572c76eef6 |
16-Mar-2008 |
Chris Lattner <sabre@nondot.org> |
simplify the way ObjCCategoryDecl's get their referenced protocols list specified. Previously, the ctor would allocate memory for the list and then it would get filled in later. Move the allocation+filling in to be more consistent with other stuff, e.g. the addMethods method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48427 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
68c82cf61228102aba1194efef222fa1478af2a8 |
16-Mar-2008 |
Chris Lattner <sabre@nondot.org> |
simplify the way ObjCCategoryDecl's get their referenced protocols list specified. Previously, the ctor would allocate memory for the list and then it would get filled in later. Move the allocation+filling in to be more consistent with other stuff, e.g. the addMethods method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48427 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
e29dc839e5d2cb44824463a2968a3c04d28245f4 |
16-Mar-2008 |
Chris Lattner <sabre@nondot.org> |
Add create methods for ObjCCategoryDecl, ObjCForwardProtocolDecl, ObjCClassDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48426 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
61f9d41036e30ff80130f99b31c0626e3ef057cc |
16-Mar-2008 |
Chris Lattner <sabre@nondot.org> |
Add create methods for ObjCCategoryDecl, ObjCForwardProtocolDecl, ObjCClassDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48426 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
7afba9ccb99d94be9dbd0a5d4a1d749e4880b864 |
16-Mar-2008 |
Chris Lattner <sabre@nondot.org> |
minor cleanups, make getNumInstanceMethods always return unsigned. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48423 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
c858105d41602a2dadb2efbc1af80a7b791ebac3 |
16-Mar-2008 |
Chris Lattner <sabre@nondot.org> |
minor cleanups, make getNumInstanceMethods always return unsigned. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48423 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
c188185c4904a5a6b89210addef0898be35d9d92 |
16-Mar-2008 |
Chris Lattner <sabre@nondot.org> |
fix a crasher where an invalid program that multiply defined a protocol could smash more references in than are allocated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48411 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
439e71f4be0148101281f72f10c9f8bf743e78bd |
16-Mar-2008 |
Chris Lattner <sabre@nondot.org> |
fix a crasher where an invalid program that multiply defined a protocol could smash more references in than are allocated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48411 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
180f7e2b7bab938bc797f3ed459826720866655a |
16-Mar-2008 |
Chris Lattner <sabre@nondot.org> |
Give ObjCProtocolDecl a Create method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48410 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
cca59d77c4b84fd2da268018dbaf9431a621e75b |
16-Mar-2008 |
Chris Lattner <sabre@nondot.org> |
Give ObjCProtocolDecl a Create method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48410 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
e3b4113e3a8104cb8fffb109ed141b6be068ca44 |
16-Mar-2008 |
Chris Lattner <sabre@nondot.org> |
hoist a bunch of casting. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48409 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
f962808120bd4cf1c684a0936fa1791ce2be73be |
16-Mar-2008 |
Chris Lattner <sabre@nondot.org> |
hoist a bunch of casting. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48409 91177308-0d34-0410-b5e6-96231b3b80d8
emaDecl.cpp
|
0db541b0fc07aaa800e7f687b2a39a931db8f3b1 |
16-Mar-2008 |
Chris Lattner <sabre@nondot.org> |
Add create methods for ObjCIvarDecl and ObjCInterfaceDecl git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48408 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDecl.cpp
emaDeclObjC.cpp
|
0e77ba0bf769e2e5a4a93c079f241b02aeb3ef93 |
16-Mar-2008 |
Chris Lattner <sabre@nondot.org> |
Add create methods for ObjCIvarDecl and ObjCInterfaceDecl git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48408 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDecl.cpp
emaDeclObjC.cpp
|
685d792c2a41538694068ad014622d81980853c1 |
16-Mar-2008 |
Chris Lattner <sabre@nondot.org> |
Make the parameter count of ObjCMethodDecl unsigned, you can't have negative arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48407 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
emaType.cpp
|
58cce3b0dcbdcc95b7e713795834b4cb2c8a008a |
16-Mar-2008 |
Chris Lattner <sabre@nondot.org> |
Make the parameter count of ObjCMethodDecl unsigned, you can't have negative arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48407 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
emaType.cpp
|
f735583ce92b5539bb607bfc57de9e90b1498429 |
16-Mar-2008 |
Chris Lattner <sabre@nondot.org> |
remove some dead arguments to ObjCMethodDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48406 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
b06fa3b86951b9f179c99c3768331536c32e902d |
16-Mar-2008 |
Chris Lattner <sabre@nondot.org> |
remove some dead arguments to ObjCMethodDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48406 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
114add6e2b53b3b1953db4fb721db65f3b8dd173 |
16-Mar-2008 |
Chris Lattner <sabre@nondot.org> |
Give ObjCMethodDecl a Create method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48405 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
6c4ae5de0c356777446f823b573821fb95560d91 |
16-Mar-2008 |
Chris Lattner <sabre@nondot.org> |
Give ObjCMethodDecl a Create method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48405 91177308-0d34-0410-b5e6-96231b3b80d8
emaDeclObjC.cpp
|
81db64a7628f64f16a986a8e314d1d792a2259cb |
16-Mar-2008 |
Chris Lattner <sabre@nondot.org> |
switch the rest of the C decl classes to do their allocation through ASTContext. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48403 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDecl.cpp
|
8e25d8681822d8094bfeb97b2239363552548171 |
16-Mar-2008 |
Chris Lattner <sabre@nondot.org> |
switch the rest of the C decl classes to do their allocation through ASTContext. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48403 91177308-0d34-0410-b5e6-96231b3b80d8
ema.cpp
emaDecl.cpp
|
be1a7a0f1f78bf5f919ff1e4b4ae6e8649255f26 |
16-Mar-2008 |
Chris Lattner <sabre@nondot.org> |
Make a major restructuring of the clang tree: introduce a top-level lib dir and move all the libraries into it. This follows the main llvm tree, and allows the libraries to be built in parallel. The top level now enforces that all the libs are built before Driver, but we don't care what order the libs are built in. This speeds up parallel builds, particularly incremental ones. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48402 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
arseAST.cpp
ema.cpp
ema.h
emaChecking.cpp
emaDecl.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaStmt.cpp
emaType.cpp
emaUtil.h
|
bda0b626e74513950405c27525af87e214e605e2 |
16-Mar-2008 |
Chris Lattner <sabre@nondot.org> |
Make a major restructuring of the clang tree: introduce a top-level lib dir and move all the libraries into it. This follows the main llvm tree, and allows the libraries to be built in parallel. The top level now enforces that all the libs are built before Driver, but we don't care what order the libs are built in. This speeds up parallel builds, particularly incremental ones. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48402 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
arseAST.cpp
ema.cpp
ema.h
emaChecking.cpp
emaDecl.cpp
emaDeclObjC.cpp
emaExpr.cpp
emaExprCXX.cpp
emaExprObjC.cpp
emaStmt.cpp
emaType.cpp
emaUtil.h
|