Граф коммитов

17645 Коммитов

Автор SHA1 Сообщение Дата
Anders Carlsson 22ed438eaf XFAIL this for now, fixing linkage bugs causes the order of globals to change. Will fix later today.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91130 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-11 17:01:29 +00:00
Anders Carlsson 44636d11ea Move info vectors and add assertions in preparation of moving the vector directly into RTTIBuilder.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91129 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-11 16:41:51 +00:00
Anders Carlsson 4e7135613a Use GetAddrOfRTTI when getting the RTTI pointer for a base class.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91127 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-11 16:37:06 +00:00
Douglas Gregor e29ffaae9b 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
2009-12-11 16:18:54 +00:00
Benjamin Kramer 8d04258483 Random string-related cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91119 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-11 13:33:18 +00:00
Benjamin Kramer 330358056a Use StringRef.getAsInteger instead of temporary string + strtol. No intended functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91118 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-11 13:26:32 +00:00
Eli Friedman 3a1737030e Move the code for converting a member pointer to a bool so that it is usable
for logical not.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91112 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-11 09:26:29 +00:00
Eli Friedman b81c786de5 Fix for PR5718: implement equality comparisons for member function pointers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91108 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-11 07:36:43 +00:00
Ted Kremenek 2b87ae45e1 Enhance understanding of VarRegions referenced by a block whose declarations are outside the current stack frame. Fixes <rdar://problem/7462324>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91107 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-11 06:43:27 +00:00
Zhongxing Xu a49c6b7da5 Completely evaluate malloc/free in MallocChecker.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91100 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-11 03:09:01 +00:00
John McCall a970c57771 Test member template using hiding.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91099 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-11 02:55:56 +00:00
Anders Carlsson 31b7f52d8c Improve linkage of RTTI data structures. Introduce CodeGenModule::GetAddrOfRTTI which figures out the right linkage of the RTTI information for the given type and whether it should be defined or not. I will migrate clients over to GetAddrOfRTTI in subsequent commits (with tests).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91098 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-11 02:46:30 +00:00
Eli Friedman 03981014e4 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
2009-12-11 02:42:07 +00:00
John McCall d7533ec10b 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
2009-12-11 02:33:26 +00:00
John McCall 60fa3cfd7a 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
2009-12-11 02:10:03 +00:00
Chris Lattner 7e1848ddba Give the "cannot pass object of non-POD type 'class C' through variadic constructor; call will abort at runtime" warning a -W flag (non-pod-varargs) and default it being an error by default. There is no good reason to allow users to get bitten by this sort of thing by default.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91094 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-11 01:52:50 +00:00
Eli Friedman ed0716b7b7 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
2009-12-11 01:34:50 +00:00
Anders Carlsson d6baec80f2 Use named flags in RTTIBuilder::BuildPointerType.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91088 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-11 01:27:37 +00:00
Anders Carlsson 6ec687d2ad When extending the lifetime of a temporary, make sure to emit a branch to the cleanup exit block. This fixes a broken module error in LLVMCConfigurationEmitter.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91086 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-11 01:00:09 +00:00
Zhongxing Xu 7fb1464c99 Use 'class' instead of 'struct'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91085 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-11 00:55:44 +00:00
Anders Carlsson 8370c58b92 When an exception needs to be freed by calling __cxa_exception_free, make sure to stash away the exception pointer somewhere.
This fixes an "Instruction does not dominate all uses!" verification error when compiling TableGen.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91084 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-11 00:32:37 +00:00
Daniel Dunbar 5c2609a1f9 Remove this test for now, it is flaky.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91083 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-11 00:27:30 +00:00
Daniel Dunbar 475ddb4547 FileManager: Do not cache failed stats, it is easy to construct common
inconsistent situations if we do, and they are not important for PCH performance
(which currently only needs the stats to construct the initial FileManager
entries).
 - No test case, sorry, the machinations are too involved.

This occurs when, for example, the build makes a PCH file and has a header map
or a -I for a directory that does not yet exist. It is possible we will cache
the negative stat on that directory, and then in the build we will never find
header files inside that dir.

For PCH we don't need these stats anyway for performance, so this also makes PCH
files smaller w/ no loss. I hope to eventually eliminate the stat cache
entirely.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91082 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-11 00:27:20 +00:00
Fariborz Jahanian 737061fc29 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
2009-12-11 00:26:36 +00:00
Mike Stump 23b7217c24 Testcase for recent checkin.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91080 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-11 00:10:15 +00:00
Mike Stump 95059b5013 Implement just a bit more of inline assembly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91079 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-11 00:04:56 +00:00
Mike Stump 0924a8a06f Fix spacing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91078 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-11 00:02:10 +00:00
Mike Stump c9875bfa6f 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
2009-12-10 22:57:48 +00:00
Douglas Gregor 90742c1318 clang_getCompletionChunkText() will treat optional strings as empty text blocks
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91072 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-10 22:46:19 +00:00
Eli Friedman 9dfebdcdcd Support unary type traits in a scalar context. Not that I've actually seen
this construct, but might as well for completeness.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91071 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-10 22:40:32 +00:00
Eli Friedman 29a7f3342c 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
2009-12-10 22:29:29 +00:00
Anders Carlsson 548e60efea Make sure that explicitly instantiated functions get the right linkage.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91069 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-10 22:25:34 +00:00
Douglas Gregor 5f16e521eb Beef up Clang-on-LLVM testing a bit, by making LLVM-Syntax recursive
(since we now parse all of the headers appropriately) and teaching
LLVM-Code-Syntax about the extra paths needed to parse the backends.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91068 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-10 22:08:55 +00:00
Benjamin Kramer 648d846e4f Privatize class members.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91067 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-10 21:50:21 +00:00
John McCall 35dfab9cb1 Actually try to trigger the last diagnostic in the declaration-collision test case.
Surprisingly, we *do* diagnose one of them.  Since we don't really track scopes into
instantiation, this has to signal some kind of bug.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91063 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-10 21:17:25 +00:00
Fariborz Jahanian 505c882768 No need to add -x objecitve-c++
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91060 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-10 20:57:43 +00:00
Fariborz Jahanian 5501636b41 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
2009-12-10 20:46:08 +00:00
John McCall 41ce66f8e2 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
2009-12-10 19:51:03 +00:00
Fariborz Jahanian eebc4750fd 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
2009-12-10 19:47:41 +00:00
Douglas Gregor 0966f35898 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
2009-12-10 18:13:52 +00:00
Douglas Gregor d87b61f639 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
2009-12-10 17:56:55 +00:00
John McCall 9f54ad4381 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
2009-12-10 09:41:52 +00:00
Eli Friedman 153c33ed95 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
2009-12-10 08:54:47 +00:00
Eli Friedman 2ce79bc4fd Test for r90950.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91043 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-10 08:51:23 +00:00
Anders Carlsson 7b06f6c20e Mangle static variables inside Objective-C methods in Objective-C++. We currently mangle them the same way as gcc does.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91042 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-10 03:14:39 +00:00
Eli Friedman 940670512d Get rid of static variable.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91041 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-10 02:21:21 +00:00
Chris Lattner 932dff777d If we enter parens, colons can become un-sacred, allowing us to emit
a better diagnostic in the second example.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91040 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-10 02:08:07 +00:00
Chris Lattner a69d0ed3ab fix a more evil case of : / :: confusion arising in ?:.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91039 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-10 02:02:58 +00:00
Chris Lattner a1efc8c8c6 fix incorrect parsing of bitfields pointed out by Doug. I chose
to use ColonProtectionRAIIObject in the C codepath even though it
won't matter for consistency.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91037 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-10 01:59:24 +00:00
Anders Carlsson 864143fe14 Actually store the pointer into the global variable, spotted by Eli.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91036 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-10 01:58:33 +00:00