]> granicus.if.org Git - clang/log
clang
15 years agoFor code completion in C++ member access expressions and tag names,
Douglas Gregor [Fri, 18 Sep 2009 17:42:29 +0000 (17:42 +0000)]
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

15 years agoFix PR4923.
Anders Carlsson [Fri, 18 Sep 2009 17:03:55 +0000 (17:03 +0000)]
Fix PR4923.

Fix error in _mm_set_pd/_mm_setr_pd and add _mm_set_epi64x/_mm_set1_epi64x. Patch by Laurent Morichetti!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82228 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWhen gathering results for code completion, only include hidden
Douglas Gregor [Fri, 18 Sep 2009 15:51:54 +0000 (15:51 +0000)]
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

15 years agoImplement code completion for tags, e.g., code completion after "enum"
Douglas Gregor [Fri, 18 Sep 2009 15:37:17 +0000 (15:37 +0000)]
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

15 years agoMake the GCC warning flags passed by CMake the same as the warning flags passed in...
Douglas Gregor [Fri, 18 Sep 2009 14:47:57 +0000 (14:47 +0000)]
Make the GCC warning flags passed by CMake the same as the warning flags passed in the make build

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82221 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDisable questionable code for handling isNullPointerConstant on value dependent
Daniel Dunbar [Fri, 18 Sep 2009 08:46:16 +0000 (08:46 +0000)]
Disable questionable code for handling isNullPointerConstant on value dependent
expression.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82217 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoForce a triple.
Daniel Dunbar [Fri, 18 Sep 2009 08:46:07 +0000 (08:46 +0000)]
Force a triple.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82216 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSplit Darwin toolchain into Clang and GCC Darwin toolchains with a common base.
Daniel Dunbar [Fri, 18 Sep 2009 08:15:13 +0000 (08:15 +0000)]
Split Darwin toolchain into Clang and GCC Darwin toolchains with a common base.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82213 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoLift AddLinkRuntimeLibArgs into Darwin tool chain.
Daniel Dunbar [Fri, 18 Sep 2009 08:15:03 +0000 (08:15 +0000)]
Lift AddLinkRuntimeLibArgs into Darwin tool chain.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82212 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMove isMacosxVersionLT helpers to Darwin tool chain.
Daniel Dunbar [Fri, 18 Sep 2009 08:14:55 +0000 (08:14 +0000)]
Move isMacosxVersionLT helpers to Darwin tool chain.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82211 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoLift getMacosxVersionMin out into Darwin ToolChain.
Daniel Dunbar [Fri, 18 Sep 2009 08:14:46 +0000 (08:14 +0000)]
Lift getMacosxVersionMin out into Darwin ToolChain.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82210 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoLift AddLinkerSearchPaths() into Darwin tool chain.
Daniel Dunbar [Fri, 18 Sep 2009 08:14:36 +0000 (08:14 +0000)]
Lift AddLinkerSearchPaths() into Darwin tool chain.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82209 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRename a variable to match its semantics.
Daniel Dunbar [Fri, 18 Sep 2009 08:14:24 +0000 (08:14 +0000)]
Rename a variable to match its semantics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82208 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRevert most of r82198, which was causing a large number of crashes
Ted Kremenek [Fri, 18 Sep 2009 07:31:15 +0000 (07:31 +0000)]
Revert most of r82198, which was causing a large number of crashes
when running the analyzer on real projects.  We'll keep the change to
AnalysisManager.cpp in r82198 so that -fobjc-gc analyzes code
correctly in both GC and non-GC modes, although this may emit two
diagnostics for each bug in some cases (a better solution will come
later).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82201 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoIntroduce caching of diagnostics in BugReporter. This provides extra
Ted Kremenek [Fri, 18 Sep 2009 05:37:41 +0000 (05:37 +0000)]
Introduce caching of diagnostics in BugReporter.  This provides extra
pruning of diagnostics that may be emitted multiple times.  This is
accomplished by adding FoldingSet profiling support to PathDiagnostic,
and then having BugReporter record what diagnostics have been issued.

This was motived to a serious bug introduced by moving the
'divide-by-zero' checking outside of GRExprEngine into a separate
'Checker' class.  When analyzing code using the '-fobjc-gc' option, a
given function would be analyzed twice, but the second time various
"internal checks" would be disabled to avoid emitting multiple
diagnostics (e.g., "null dereference") for the same issue.  The
problem is that such checks also effect path pruning and don't just
emit diagnostics.  This resulted in an assertion failure involving a
real divide-by-zero in some analyzed code where we would get an
assertion failure in APInt because the 'DivZero' check was disabled
and didn't prune the logic that resulted in the divide-by-zero in the
analyzer.

The implemented solution is somewhat of a hack, and may not perform
extremely well.  This will need to be cleaned up over time.

As a regression test, 'misc-ps.m' has been modified so that its tests
are run using -fobjc-gc to test this diagnostic pruning behavior.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82198 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agodon't stick an uninitialized 'stat' buf into the stat cache, fill it
Chris Lattner [Fri, 18 Sep 2009 04:51:01 +0000 (04:51 +0000)]
don't stick an uninitialized 'stat' buf into the stat cache, fill it
with zeros.  This avoids a GCC warning (PR5000)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82194 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMore mangling goodness.
Anders Carlsson [Fri, 18 Sep 2009 04:29:09 +0000 (04:29 +0000)]
More mangling goodness.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82193 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix error in test.
Anders Carlsson [Fri, 18 Sep 2009 02:51:58 +0000 (02:51 +0000)]
Fix error in test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82190 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoHandle mangling of TemplateSpecializationType.
Anders Carlsson [Fri, 18 Sep 2009 02:42:01 +0000 (02:42 +0000)]
Handle mangling of TemplateSpecializationType.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82189 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFixed a bug in generation of the new write-barriers when
Fariborz Jahanian [Fri, 18 Sep 2009 00:04:00 +0000 (00:04 +0000)]
Fixed a bug in generation of the new write-barriers when
array syntax is used to derefernce and assign to ivar pointee.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82183 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix typo.
Mike Stump [Thu, 17 Sep 2009 21:46:24 +0000 (21:46 +0000)]
Fix typo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82170 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoInitial implementation of a code-completion interface in Clang. In
Douglas Gregor [Thu, 17 Sep 2009 21:32:03 +0000 (21:32 +0000)]
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

15 years agoFix typo.
Mike Stump [Thu, 17 Sep 2009 21:15:00 +0000 (21:15 +0000)]
Fix typo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82164 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTweak clang testing.
Daniel Dunbar [Thu, 17 Sep 2009 19:55:53 +0000 (19:55 +0000)]
Tweak clang testing.
 - Move CMake to using the new test runner.

 - Switch Makefiles to use the lit.site.cfg.in template.

 - Remove explicit --path arguments, instead this gets written into the site
   configuration. This means running lit from the command line should use the
   exact same configuration as is used in 'make test', assuming it can find the
   site configuration file. You still need to run 'make test' (or the cmake
   build target equivalent) at least once.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82160 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMerge uninstantiated default arguments more carefully, and try not to
Douglas Gregor [Thu, 17 Sep 2009 19:51:30 +0000 (19:51 +0000)]
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

15 years agoAdd clang_disposeTranslationUnit() and clang_disposeIndex().
Steve Naroff [Thu, 17 Sep 2009 18:33:27 +0000 (18:33 +0000)]
Add clang_disposeTranslationUnit() and clang_disposeIndex().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82154 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoARM: Incremental improvement to preprocessor defines.
Daniel Dunbar [Thu, 17 Sep 2009 16:21:10 +0000 (16:21 +0000)]
ARM: Incremental improvement to preprocessor defines.
 - Based on patch by Shantonu.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82147 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoIgnore extern "C++" { } when mangling.
Anders Carlsson [Thu, 17 Sep 2009 16:12:20 +0000 (16:12 +0000)]
Ignore extern "C++" { } when mangling.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82146 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoForce triple for tests using __strong.
Daniel Dunbar [Thu, 17 Sep 2009 07:21:40 +0000 (07:21 +0000)]
Force triple for tests using __strong.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82133 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd ARM register names and aliases.
Daniel Dunbar [Thu, 17 Sep 2009 07:03:19 +0000 (07:03 +0000)]
Add ARM register names and aliases.
 - Patch by Shantonu Sen!

<rdar://problem/6922650> clang doesn't know about ARM registers for inline asm clobber lists

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82132 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDriver: Change -O to mean -O2, -O1 is meaningless.
Daniel Dunbar [Thu, 17 Sep 2009 06:53:36 +0000 (06:53 +0000)]
Driver: Change -O to mean -O2, -O1 is meaningless.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82131 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix two crashes on value dependent expressions (shift and null-pointer check).
Daniel Dunbar [Thu, 17 Sep 2009 06:31:27 +0000 (06:31 +0000)]
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

15 years agoRemove trailing whitespace.
Daniel Dunbar [Thu, 17 Sep 2009 06:31:17 +0000 (06:31 +0000)]
Remove trailing whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82128 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a bunch of math builtins, #include <cmath> passes now.
Daniel Dunbar [Thu, 17 Sep 2009 05:45:52 +0000 (05:45 +0000)]
Add a bunch of math builtins, #include <cmath> passes now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82126 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRevert r82123 for now.
Anders Carlsson [Thu, 17 Sep 2009 05:31:47 +0000 (05:31 +0000)]
Revert r82123 for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82125 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTemporary band-aid for handling empty classes somewhat better.
Anders Carlsson [Thu, 17 Sep 2009 04:42:56 +0000 (04:42 +0000)]
Temporary band-aid for handling empty classes somewhat better.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82124 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTreat an unqualified RecordType as a RecordDecl when substituting.
Anders Carlsson [Thu, 17 Sep 2009 04:38:23 +0000 (04:38 +0000)]
Treat an unqualified RecordType as a RecordDecl when substituting.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82123 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSubstitution for prefixes.
Anders Carlsson [Thu, 17 Sep 2009 04:16:28 +0000 (04:16 +0000)]
Substitution for prefixes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82122 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoConvert mangle-subst.cpp over to using FileCheck.
Anders Carlsson [Thu, 17 Sep 2009 04:13:54 +0000 (04:13 +0000)]
Convert mangle-subst.cpp over to using FileCheck.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82121 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoImprove driver error message when only running the preprocessor and an input is
Daniel Dunbar [Thu, 17 Sep 2009 04:13:26 +0000 (04:13 +0000)]
Improve driver error message when only running the preprocessor and an input is
already preprocessed.

--
ddunbar@giles:tmp$ touch t.i
ddunbar@giles:tmp$ gcc -E t.i
ddunbar@giles:tmp$ clang -E t.i
clang: warning: t.i: previously preprocessed input unused when '-E' is present
ddunbar@giles:tmp$
--

<rdar://problem/6813375> [driver] driver prints confusing message when running -E on preprocessed file

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82120 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSubstitute unscoped template names.
Anders Carlsson [Thu, 17 Sep 2009 04:02:31 +0000 (04:02 +0000)]
Substitute unscoped template names.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82119 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoIRgen/ObjC: Correctly construct the function info for variadic message sends.
Daniel Dunbar [Thu, 17 Sep 2009 04:01:40 +0000 (04:01 +0000)]
IRgen/ObjC: Correctly construct the function info for variadic message sends.

This fixes some bad -O0 codegen and the unnecessary clearing of al on entry to objc_msgSend for most message sends.

<rdar://problem/7102824> [irgen] unnecessary xorb on calls to objc_msgSend on x86_64

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82118 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoIRgen/ObjC: Make the target method decl available to GenerateMessageSendSuper.
Daniel Dunbar [Thu, 17 Sep 2009 04:01:22 +0000 (04:01 +0000)]
IRgen/ObjC: Make the target method decl available to GenerateMessageSendSuper.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82117 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd mangleSubstitution/addSubstitution variants that take a NamedDecl.
Anders Carlsson [Thu, 17 Sep 2009 03:53:28 +0000 (03:53 +0000)]
Add mangleSubstitution/addSubstitution variants that take a NamedDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82116 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoGet rid of the last grep.
Anders Carlsson [Thu, 17 Sep 2009 03:48:45 +0000 (03:48 +0000)]
Get rid of the last grep.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82115 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWhen mangling function template specialization, mangle the type encoding of the origi...
Anders Carlsson [Thu, 17 Sep 2009 03:46:43 +0000 (03:46 +0000)]
When mangling function template specialization, mangle the type encoding of the original function template. Also, port mangle.cpp and function-template-specialization.cpp over to using FileCheck.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82114 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd new functions to the mangler for the <unscoped-name> and <unscoped-template-name...
Anders Carlsson [Thu, 17 Sep 2009 03:17:01 +0000 (03:17 +0000)]
Add new functions to the mangler for the <unscoped-name> and <unscoped-template-name> productions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82113 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPCH: When writing PCH files, tweak the predicate function deciding whether to mark...
Daniel Dunbar [Thu, 17 Sep 2009 03:06:51 +0000 (03:06 +0000)]
PCH: When writing PCH files, tweak the predicate function deciding whether to mark a decl as "external" to be closer to reality.

This still isn't perfect, but I believe it is conservatively accurate at marking decls which IRgen needs to see, while still keeping the "deserialization footprint" on Cocoa.h.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82112 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPCH: When deserializing an explicit "external definition", don't pass it to HandleTop...
Daniel Dunbar [Thu, 17 Sep 2009 03:06:44 +0000 (03:06 +0000)]
PCH: When deserializing an explicit "external definition", don't pass it to HandleTopLevelDecl -- this is already being done inside the reader.

This is something of a hack, since whether the reader actually did this depends on the "isConsumerInterestedIn" predicate. I think we need to rework how this works, but I need to discuss with Doug.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82111 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoInitial support for code generation from .ast files.
Daniel Dunbar [Thu, 17 Sep 2009 00:48:13 +0000 (00:48 +0000)]
Initial support for code generation from .ast files.
 - Doesn't actually work yet because only module level asm's get correctly marked as externally visible in the PCH.

 - Other things like 'clang-cc foo.ast -ast-dump' now work, as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82107 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoclang-cc: Factor out code for creating one of the standard AST consumer actions.
Daniel Dunbar [Thu, 17 Sep 2009 00:48:00 +0000 (00:48 +0000)]
clang-cc: Factor out code for creating one of the standard AST consumer actions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82106 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWe don't need a -compile-ast clang-cc action, we can just use -S.
Daniel Dunbar [Thu, 17 Sep 2009 00:47:53 +0000 (00:47 +0000)]
We don't need a -compile-ast clang-cc action, we can just use -S.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82105 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSimplify.
Daniel Dunbar [Thu, 17 Sep 2009 00:47:46 +0000 (00:47 +0000)]
Simplify.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82104 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoclang-cc: Remove -ObjC -ObjC++ handling from clang-cc.
Daniel Dunbar [Thu, 17 Sep 2009 00:47:27 +0000 (00:47 +0000)]
clang-cc: Remove -ObjC -ObjC++ handling from clang-cc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82103 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd basic substitution to the C++ mangler. It currently only looks at types.
Anders Carlsson [Thu, 17 Sep 2009 00:43:46 +0000 (00:43 +0000)]
Add basic substitution to the C++ mangler. It currently only looks at types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82102 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoForce triple, although probably the real fix is to tie __strong to -fobjc-gc.
Daniel Dunbar [Thu, 17 Sep 2009 00:28:00 +0000 (00:28 +0000)]
Force triple, although probably the real fix is to tie __strong to -fobjc-gc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82101 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix substituto.
Daniel Dunbar [Thu, 17 Sep 2009 00:07:21 +0000 (00:07 +0000)]
Fix substituto.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82099 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd CLANG_{SOURCE,BINARY}_DIR cmake variables.
Daniel Dunbar [Thu, 17 Sep 2009 00:07:10 +0000 (00:07 +0000)]
Add CLANG_{SOURCE,BINARY}_DIR cmake variables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82098 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a simple const mangling test.
Anders Carlsson [Wed, 16 Sep 2009 23:53:19 +0000 (23:53 +0000)]
Add a simple const mangling test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82096 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemoved useless stuff from the test.
Fariborz Jahanian [Wed, 16 Sep 2009 23:52:53 +0000 (23:52 +0000)]
Removed useless stuff from the test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82095 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMore test for objc gc's mixed write-barriers.
Fariborz Jahanian [Wed, 16 Sep 2009 23:49:04 +0000 (23:49 +0000)]
More test for objc gc's mixed write-barriers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82094 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWhen creating function types, remove any top-level CVR qualifications in the function...
Anders Carlsson [Wed, 16 Sep 2009 23:47:08 +0000 (23:47 +0000)]
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

15 years agoAdditional tests for write-bariers.
Fariborz Jahanian [Wed, 16 Sep 2009 23:38:26 +0000 (23:38 +0000)]
Additional tests for write-bariers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82092 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTest for variety of write-barriers.
Fariborz Jahanian [Wed, 16 Sep 2009 23:30:59 +0000 (23:30 +0000)]
Test for variety of write-barriers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82091 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agopatch for generating objc'2 objc_assign_ivar. WIP.
Fariborz Jahanian [Wed, 16 Sep 2009 23:11:23 +0000 (23:11 +0000)]
patch for generating objc'2 objc_assign_ivar. WIP.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82090 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoImproved representation and support for friend class templates. Angst about same.
John McCall [Wed, 16 Sep 2009 22:47:08 +0000 (22:47 +0000)]
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

15 years agoCMake: Generate LIT site configuration file for Clang tests, which Daniel will probab...
Douglas Gregor [Wed, 16 Sep 2009 22:30:48 +0000 (22:30 +0000)]
CMake: Generate LIT site configuration file for Clang tests, which Daniel will probably have to fix

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82086 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoThe CMake build system now derives the Clang version number from VER.
Douglas Gregor [Wed, 16 Sep 2009 21:59:05 +0000 (21:59 +0000)]
The CMake build system now derives the Clang version number from VER.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82085 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoStarting patch to generate more specific API for objc's
Fariborz Jahanian [Wed, 16 Sep 2009 21:37:16 +0000 (21:37 +0000)]
Starting patch to generate more specific API for objc's
GC. Currently, new API will be generated under
clang-cc's -fobjc-newgc-api flag which will eventually
become the default. WIP.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82082 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix spelling.
Mike Stump [Wed, 16 Sep 2009 20:41:09 +0000 (20:41 +0000)]
Fix spelling.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82078 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofit in 80 cols
Chris Lattner [Wed, 16 Sep 2009 20:18:54 +0000 (20:18 +0000)]
fit in 80 cols

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82073 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoImprove handling of vector casts in C++.
Anders Carlsson [Wed, 16 Sep 2009 19:19:43 +0000 (19:19 +0000)]
Improve handling of vector casts in C++.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82072 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agogrammaro
Chris Lattner [Wed, 16 Sep 2009 18:56:12 +0000 (18:56 +0000)]
grammaro

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82070 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTeach Sema::FindInstantiatedDecl to find instantiated RecordDecls even
Douglas Gregor [Wed, 16 Sep 2009 18:34:49 +0000 (18:34 +0000)]
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

15 years agoDo not generate write-barrier in indirect assignment to
Fariborz Jahanian [Wed, 16 Sep 2009 18:09:18 +0000 (18:09 +0000)]
Do not generate write-barrier in indirect assignment to
a weak object.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82061 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemoved a superfluous check before setting
Fariborz Jahanian [Wed, 16 Sep 2009 16:49:08 +0000 (16:49 +0000)]
Removed a superfluous check before setting
a flag (objc GC).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82052 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agox86-64 ABI: If a type is a C++ record with either a non-trivial destructor or a non...
Anders Carlsson [Wed, 16 Sep 2009 15:53:40 +0000 (15:53 +0000)]
x86-64 ABI: If a type is a C++ record with either a non-trivial destructor or a non-trivial copy constructor, it should be passed in a pointer. Daniel, plz review.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82050 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPR4991: Properly remove trailing newline from __TIMESTAMP__.
Benjamin Kramer [Wed, 16 Sep 2009 13:10:04 +0000 (13:10 +0000)]
PR4991: Properly remove trailing newline from __TIMESTAMP__.
Replace strcpy with memcpy while at it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82043 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoIncremental improvement to logic determining whether we emit unwind tables or
Daniel Dunbar [Wed, 16 Sep 2009 06:17:29 +0000 (06:17 +0000)]
Incremental improvement to logic determining whether we emit unwind tables or
not.
 - PR4932.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82021 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoHave divide-by-zero checker not handled undefined denominators. This is handled...
Ted Kremenek [Wed, 16 Sep 2009 06:04:26 +0000 (06:04 +0000)]
Have divide-by-zero checker not handled undefined denominators.  This is handled by the generic checking for undefined operands for BinaryOperators.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82019 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove ImplicitBadDivides/ExplicitBadDivides node sets. This checking is now down...
Ted Kremenek [Wed, 16 Sep 2009 06:03:39 +0000 (06:03 +0000)]
Remove ImplicitBadDivides/ExplicitBadDivides node sets.  This checking is now down by a 'Checker' and not build into GRExprEngine.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82017 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofix some ppc register name issues, patch by Richard Pennington!
Chris Lattner [Wed, 16 Sep 2009 05:05:27 +0000 (05:05 +0000)]
fix some ppc register name issues, patch by Richard Pennington!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82009 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoA toy for Doug: Add some 'lit' tests which just run clang++ -fsyntax-only over all...
Daniel Dunbar [Wed, 16 Sep 2009 01:40:13 +0000 (01:40 +0000)]
A toy for Doug: Add some 'lit' tests which just run clang++ -fsyntax-only over all the files in a directory.
 - 'lit utils/C++Tests' to run, you may need to fix the stdc++ include path, and your mileage may vary.

 - A handful of the LLVM headers are XFAIL because they don't include the right headers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81990 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agotests: Stash clang/clang-cc and LLVM src/obj paths for use elsewhere.
Daniel Dunbar [Wed, 16 Sep 2009 01:39:52 +0000 (01:39 +0000)]
tests: Stash clang/clang-cc and LLVM src/obj paths for use elsewhere.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81989 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoChris doesn't want the FIXME.
Mike Stump [Wed, 16 Sep 2009 01:35:21 +0000 (01:35 +0000)]
Chris doesn't want the FIXME.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81988 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a FIXME, so the next person don't trip as hard on the landmines.
Mike Stump [Wed, 16 Sep 2009 01:31:09 +0000 (01:31 +0000)]
Add a FIXME, so the next person don't trip as hard on the landmines.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81986 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCollapse more clang version numbers down into fewer places.
Mike Stump [Wed, 16 Sep 2009 01:26:05 +0000 (01:26 +0000)]
Collapse more clang version numbers down into fewer places.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81983 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSome people don't want to fix their broken code just yet, so turn off
Mike Stump [Wed, 16 Sep 2009 00:39:34 +0000 (00:39 +0000)]
Some people don't want to fix their broken code just yet, so turn off
hard error for falling off a noreturn function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81971 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix a typo in a FIXME
Douglas Gregor [Wed, 16 Sep 2009 00:01:48 +0000 (00:01 +0000)]
Fix a typo in a FIXME

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81960 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoBack to 1.1 we go.
Mike Stump [Tue, 15 Sep 2009 23:04:22 +0000 (23:04 +0000)]
Back to 1.1 we go.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81944 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoIn building list of visible conversion functions, use
Fariborz Jahanian [Tue, 15 Sep 2009 23:02:16 +0000 (23:02 +0000)]
In building list of visible conversion functions, use
result type of template convesion functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81943 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoBack out for now, as apparently there is some really broken code somewhere.
Mike Stump [Tue, 15 Sep 2009 22:49:27 +0000 (22:49 +0000)]
Back out for now, as apparently there is some really broken code somewhere.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81941 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWhen implicitly declaring operators new, new[], delete, and delete[],
Douglas Gregor [Tue, 15 Sep 2009 22:30:29 +0000 (22:30 +0000)]
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

15 years agoUpdate Clang version for CMake
Douglas Gregor [Tue, 15 Sep 2009 22:30:13 +0000 (22:30 +0000)]
Update Clang version for CMake

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81938 91177308-0d34-0410-b5e6-96231b3b80d8

15 years ago1) don't do overload resolution in selecting conversion
Fariborz Jahanian [Tue, 15 Sep 2009 22:15:23 +0000 (22:15 +0000)]
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

15 years agoBump.
Mike Stump [Tue, 15 Sep 2009 22:08:24 +0000 (22:08 +0000)]
Bump.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81929 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoBe sure to use the correct version instead of the wrong one.
Mike Stump [Tue, 15 Sep 2009 21:49:22 +0000 (21:49 +0000)]
Be sure to use the correct version instead of the wrong one.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81925 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoBe sure to use the correct version instead of inventing the wrong one.
Mike Stump [Tue, 15 Sep 2009 21:48:34 +0000 (21:48 +0000)]
Be sure to use the correct version instead of inventing the wrong one.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81924 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd back the workaround since it lead to constructor conversion bugs :(
Anders Carlsson [Tue, 15 Sep 2009 21:14:33 +0000 (21:14 +0000)]
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

15 years agoCommit test case from PR4655, which tests the canonical-types fix in r81913
Douglas Gregor [Tue, 15 Sep 2009 21:14:05 +0000 (21:14 +0000)]
Commit test case from PR4655, which tests the canonical-types fix in r81913

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81916 91177308-0d34-0410-b5e6-96231b3b80d8