]>
granicus.if.org Git - clang/log
Chris Lattner [Mon, 14 Dec 2009 05:03:13 +0000 (05:03 +0000)]
this was a couple bugzillas too
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91267
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 14 Dec 2009 05:00:18 +0000 (05:00 +0000)]
fix rdar://
7466570 - Be more bug compatible with GCC when it comes to
expanding directives withing macro expansions. This is undefined behavior
according to 6.10.3p11, so we might as well be undefined in ways similar to
GCC.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91266
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 14 Dec 2009 04:57:53 +0000 (04:57 +0000)]
filecheckize
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91265
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Mon, 14 Dec 2009 04:57:03 +0000 (04:57 +0000)]
Support x86's PALIGNR instruction without the use of a palignr intrinsic.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91264
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 14 Dec 2009 04:54:40 +0000 (04:54 +0000)]
formatting changes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91263
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 14 Dec 2009 04:26:45 +0000 (04:26 +0000)]
reduce indentation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91262
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Mon, 14 Dec 2009 02:13:39 +0000 (02:13 +0000)]
Use insert to avoid destroying existing nodes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91258
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Mon, 14 Dec 2009 01:45:37 +0000 (01:45 +0000)]
Mangle unary, binary and ternary expressions correctly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91257
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Mon, 14 Dec 2009 00:51:04 +0000 (00:51 +0000)]
Rename dump to dumpDeclContext, so that call RD->dump() won't dump the decl context by default.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91256
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 13 Dec 2009 23:47:29 +0000 (23:47 +0000)]
Simplify BuildSimpleType in the RTTBuilder to avoid using an std::vector.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91255
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sun, 13 Dec 2009 21:37:05 +0000 (21:37 +0000)]
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
Douglas Gregor [Sun, 13 Dec 2009 21:29:20 +0000 (21:29 +0000)]
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
Douglas Gregor [Sun, 13 Dec 2009 20:44:55 +0000 (20:44 +0000)]
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
Anders Carlsson [Sun, 13 Dec 2009 20:34:34 +0000 (20:34 +0000)]
Don't use a cookie if the global placement new function is used.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91251
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 13 Dec 2009 20:10:12 +0000 (20:10 +0000)]
Fix regression in my last commit - if a struct has a trivial destructor but no usual deallocation function we don't need a cookie.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91249
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 13 Dec 2009 20:04:38 +0000 (20:04 +0000)]
More array cookie improvements.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91247
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 13 Dec 2009 18:48:07 +0000 (18:48 +0000)]
If the usual array deallocation function of a class takes two arguments, we need to pass the number of bytes allocated to the deallocation function, just not the number of bytes in a single element.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91246
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 13 Dec 2009 18:30:34 +0000 (18:30 +0000)]
Fix test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91245
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 13 Dec 2009 17:53:43 +0000 (17:53 +0000)]
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
Anders Carlsson [Sun, 13 Dec 2009 16:38:01 +0000 (16:38 +0000)]
Change the RTTIBuilder's finish member function to take a pointer to the constants array + the length of the array.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91241
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 13 Dec 2009 03:46:13 +0000 (03:46 +0000)]
Lift builtin-include-path logic out of ASTUnit::LoadFromCommandLine and fix CIndex to pass in the right directory (previously it was using the path to the main executable, which generally is wrong).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91238
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 13 Dec 2009 03:45:58 +0000 (03:45 +0000)]
CompilerInvocation: Move builtin-include-path logic out of CompilerInvocation::CreateFromArgs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91237
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 13 Dec 2009 02:20:49 +0000 (02:20 +0000)]
Use clang -cc1 in test, to improve determinism.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91236
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 13 Dec 2009 02:00:23 +0000 (02:00 +0000)]
Tests: Fix some bugs in clang_f_opts, options were out of order but it worked
because it had two inputs, except on Win32 where /dev/null doesn't exist.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91235
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 13 Dec 2009 01:37:04 +0000 (01:37 +0000)]
Silence some release build warnings.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91234
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 12 Dec 2009 23:01:36 +0000 (23:01 +0000)]
Backend: Switch to using TargetOptions or TargetMachine to set some options instead of llvm::cl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91229
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Sat, 12 Dec 2009 21:26:21 +0000 (21:26 +0000)]
patch to add a property from a protocol to a class that adopts the protocol.
(fixes radar
7466494 ).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91227
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 12 Dec 2009 19:06:20 +0000 (19:06 +0000)]
Update checker build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91222
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sat, 12 Dec 2009 18:16:41 +0000 (18:16 +0000)]
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
Zhongxing Xu [Sat, 12 Dec 2009 12:29:38 +0000 (12:29 +0000)]
Add initial support for realloc() in MallocChecker.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91216
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Sat, 12 Dec 2009 11:40:51 +0000 (11:40 +0000)]
Remember the type name's scope specifier in the DeclSpec.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91215
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sat, 12 Dec 2009 07:57:52 +0000 (07:57 +0000)]
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
Douglas Gregor [Sat, 12 Dec 2009 07:48:51 +0000 (07:48 +0000)]
Give PartialDiagnostic copy semantics rather than move semantics, since we typically pass it by reference
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91212
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sat, 12 Dec 2009 07:31:50 +0000 (07:31 +0000)]
Remove unnecessary pointers from PartialDiagnostic
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91211
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sat, 12 Dec 2009 07:25:49 +0000 (07:25 +0000)]
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
Jeffrey Yasskin [Sat, 12 Dec 2009 05:05:38 +0000 (05:05 +0000)]
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
Eli Friedman [Sat, 12 Dec 2009 03:36:52 +0000 (03:36 +0000)]
Fix for PR4642: move work in HTMLPrinter out of the destructor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91205
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 12 Dec 2009 02:43:16 +0000 (02:43 +0000)]
Fix tyop.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91204
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Sat, 12 Dec 2009 01:27:46 +0000 (01:27 +0000)]
Implement runtime checks for undefined behavior. WIP.
This implements a new flag -fcatch-undefined-behavior. The flag turns
on additional runtime checks for:
T a[I];
a[i] abort when i < 0 or i >= I.
Future stuff includes shifts by >= bitwidth amounts.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91198
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 12 Dec 2009 01:05:43 +0000 (01:05 +0000)]
Remove empty directory.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91197
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 12 Dec 2009 01:04:14 +0000 (01:04 +0000)]
We should only scan for nested blocks if we are analyzing the body of a function/method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91196
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 12 Dec 2009 00:56:47 +0000 (00:56 +0000)]
Remove clang-cc tool, it has joined in unholy union with clang.
- tools/driver will be renamed to tools/clang at some point.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91195
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 12 Dec 2009 00:42:52 +0000 (00:42 +0000)]
Convert the remainder of this test case over to using FileCheck.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91194
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 12 Dec 2009 00:40:42 +0000 (00:40 +0000)]
XFAIL this test on Win32 until I can take a look.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91193
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 12 Dec 2009 00:39:58 +0000 (00:39 +0000)]
Remove non-sensical FIXME.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91192
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 12 Dec 2009 00:38:18 +0000 (00:38 +0000)]
Make using '-fshort-enums' an error until it is actually implemented (changes the ABI, so it is dangerous to not error out if we don't support it). Fixes <rdar://problem/
7461006 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91191
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 12 Dec 2009 00:32:00 +0000 (00:32 +0000)]
Correctly diagnose [basic.stc.dynamic.allocation]p1
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91190
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 12 Dec 2009 00:26:23 +0000 (00:26 +0000)]
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
Anders Carlsson [Sat, 12 Dec 2009 00:16:02 +0000 (00:16 +0000)]
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
Douglas Gregor [Fri, 11 Dec 2009 23:47:56 +0000 (23:47 +0000)]
Switch the Emacs clang-completion-mode over to clang -cc1
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91185
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 11 Dec 2009 23:35:10 +0000 (23:35 +0000)]
Tests: Stop looking for clang-cc, we don't need it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91183
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 11 Dec 2009 23:31:21 +0000 (23:31 +0000)]
Fix build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91182
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 11 Dec 2009 23:23:22 +0000 (23:23 +0000)]
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
Ted Kremenek [Fri, 11 Dec 2009 23:22:52 +0000 (23:22 +0000)]
scan-build: when the build command is 'make', override the CC and CXX options by passing them as arguments to make. This fixes <rdar://problem/
6790224 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91179
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 11 Dec 2009 23:17:03 +0000 (23:17 +0000)]
Update a few more docs references to clang-cc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91178
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 11 Dec 2009 23:12:52 +0000 (23:12 +0000)]
Remove more old references to clang-cc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91177
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 11 Dec 2009 23:04:35 +0000 (23:04 +0000)]
Update docs/comments/utils/examples to refer to clang -cc1 instead of clang-cc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91176
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 11 Dec 2009 23:00:49 +0000 (23:00 +0000)]
Driver: Switch to using "clang" "-cc1" instead of "clang-cc".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91174
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 11 Dec 2009 22:52:03 +0000 (22:52 +0000)]
Tests: Change substitution to automagically use 'clang -cc1' instead of 'clang-cc'. I still plan to eventually rewrite the tests to clarify the magic (I will probably actually rewrite them to %clang so it is more obvious this is a variable that gets substituted).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91173
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 11 Dec 2009 22:44:53 +0000 (22:44 +0000)]
Convert scan-build and ccc-analyzer over to using 'clang -cc1' instead of using 'clang-cc'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91172
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 11 Dec 2009 22:40:48 +0000 (22:40 +0000)]
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
Daniel Dunbar [Fri, 11 Dec 2009 22:20:12 +0000 (22:20 +0000)]
Implement clang -cc1.
- I apologize for the link time horrors, my goal is to kill off clang-cc in fairly short order.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91170
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Fri, 11 Dec 2009 21:50:11 +0000 (21:50 +0000)]
StmtDumper::VisitUnresolvedLookupExpr
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91163
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 11 Dec 2009 21:23:13 +0000 (21:23 +0000)]
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
Eli Friedman [Fri, 11 Dec 2009 21:23:03 +0000 (21:23 +0000)]
Fix for PR5714: make sure globals that will be modified aren't marked const.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91156
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 11 Dec 2009 21:09:27 +0000 (21:09 +0000)]
Switch PathDiagnostic to StringRef.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91155
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 11 Dec 2009 20:53:46 +0000 (20:53 +0000)]
Fix two typos.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91154
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Fri, 11 Dec 2009 20:51:23 +0000 (20:51 +0000)]
Reorganize testcase.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91153
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 11 Dec 2009 20:48:18 +0000 (20:48 +0000)]
Fix linkage of type info and vtable for classes without linkage.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91152
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 11 Dec 2009 20:21:38 +0000 (20:21 +0000)]
Make sure mangling doesn't crash in another case. Add some more tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91149
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Fri, 11 Dec 2009 20:04:54 +0000 (20:04 +0000)]
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
Douglas Gregor [Fri, 11 Dec 2009 19:06:04 +0000 (19:06 +0000)]
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
Douglas Gregor [Fri, 11 Dec 2009 18:44:16 +0000 (18:44 +0000)]
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
Douglas Gregor [Fri, 11 Dec 2009 18:28:39 +0000 (18:28 +0000)]
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
Douglas Gregor [Fri, 11 Dec 2009 18:14:22 +0000 (18:14 +0000)]
Member function templates can occur after . or ->
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91137
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 11 Dec 2009 18:00:57 +0000 (18:00 +0000)]
Fix for PR5706: let mangleName deal with mangling names without identifiers
correctly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91136
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 11 Dec 2009 17:31:05 +0000 (17:31 +0000)]
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
Anders Carlsson [Fri, 11 Dec 2009 17:01:29 +0000 (17:01 +0000)]
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
Anders Carlsson [Fri, 11 Dec 2009 16:41:51 +0000 (16:41 +0000)]
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
Anders Carlsson [Fri, 11 Dec 2009 16:37:06 +0000 (16:37 +0000)]
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
Douglas Gregor [Fri, 11 Dec 2009 16:18:54 +0000 (16:18 +0000)]
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
Benjamin Kramer [Fri, 11 Dec 2009 13:33:18 +0000 (13:33 +0000)]
Random string-related cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91119
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 11 Dec 2009 13:26:32 +0000 (13:26 +0000)]
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
Eli Friedman [Fri, 11 Dec 2009 09:26:29 +0000 (09:26 +0000)]
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
Eli Friedman [Fri, 11 Dec 2009 07:36:43 +0000 (07:36 +0000)]
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
Ted Kremenek [Fri, 11 Dec 2009 06:43:27 +0000 (06:43 +0000)]
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
Zhongxing Xu [Fri, 11 Dec 2009 03:09:01 +0000 (03:09 +0000)]
Completely evaluate malloc/free in MallocChecker.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91100
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Fri, 11 Dec 2009 02:55:56 +0000 (02:55 +0000)]
Test member template using hiding.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91099
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 11 Dec 2009 02:46:30 +0000 (02:46 +0000)]
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
Eli Friedman [Fri, 11 Dec 2009 02:42:07 +0000 (02:42 +0000)]
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
John McCall [Fri, 11 Dec 2009 02:33:26 +0000 (02:33 +0000)]
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
John McCall [Fri, 11 Dec 2009 02:10:03 +0000 (02:10 +0000)]
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
Chris Lattner [Fri, 11 Dec 2009 01:52:50 +0000 (01:52 +0000)]
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
Eli Friedman [Fri, 11 Dec 2009 01:34:50 +0000 (01:34 +0000)]
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
Anders Carlsson [Fri, 11 Dec 2009 01:27:37 +0000 (01:27 +0000)]
Use named flags in RTTIBuilder::BuildPointerType.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91088
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 11 Dec 2009 01:00:09 +0000 (01:00 +0000)]
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
Zhongxing Xu [Fri, 11 Dec 2009 00:55:44 +0000 (00:55 +0000)]
Use 'class' instead of 'struct'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91085
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 11 Dec 2009 00:32:37 +0000 (00:32 +0000)]
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
Daniel Dunbar [Fri, 11 Dec 2009 00:27:30 +0000 (00:27 +0000)]
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
Daniel Dunbar [Fri, 11 Dec 2009 00:27:20 +0000 (00:27 +0000)]
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