Chris Lattner
58efac6120
add a testcase, from Michael Spencer
...
llvm-svn: 106026
2010-06-15 18:56:20 +00:00
Chris Lattner
4e18a2bc97
fix an uninitialized variable, patch by Michael Spencer!
...
llvm-svn: 106025
2010-06-15 18:55:23 +00:00
Chris Lattner
c548be9ab3
Remove a dead argument to ProcessUCNEscape.
...
Fix string concatenation to treat escapes in concatenated strings that
are wide because of other string chunks to process the escapes as wide
themselves. Before we would warn about and miscompile the attached testcase.
This fixes rdar://8040728 - miscompile + warning: hex escape sequence out of range
llvm-svn: 106012
2010-06-15 18:06:43 +00:00
Chris Lattner
a8687ae490
tidy up
...
llvm-svn: 106011
2010-06-15 18:05:34 +00:00
Daniel Dunbar
c1b1729b66
Break Frontend's dependency on Rewrite, Checker and CodeGen in shared library configuration
...
Currently, all AST consumers are located in the Frontend library,
meaning that in a shared library configuration, Frontend has a
dependency on Rewrite, Checker and CodeGen. This is suboptimal for
clients which only wish to make use of the frontend. CodeGen in
particular introduces a large number of unwanted dependencies.
This patch breaks the dependency by moving all AST consumers with
dependencies on Rewrite, Checker and/or CodeGen to their respective
libraries. The patch therefore introduces dependencies in the other
direction (i.e. from Rewrite, Checker and CodeGen to Frontend).
After applying this patch, Clang builds correctly using CMake and
shared libraries ("cmake -DBUILD_SHARED_LIBS=ON").
N.B. This patch includes file renames which are indicated in the
patch body.
Changes in this revision of the patch:
- Fixed some copy-paste mistakes in the header files
- Modified certain aspects of the coding to comply with the LLVM
Coding Standards
llvm-svn: 106010
2010-06-15 17:48:49 +00:00
Douglas Gregor
20527e2c83
Allocate template parameter lists for out-of-line definitions via the
...
ASTContext rather than via the normal heap.
llvm-svn: 106008
2010-06-15 17:44:38 +00:00
Douglas Gregor
0832963acd
Implement -fvisibility-inlines-hidden. <rdar://problem/7819834>
...
llvm-svn: 106003
2010-06-15 17:05:35 +00:00
Daniel Dunbar
e9c5e2cc71
Driver/FreeBSD: Add libexec to program search paths, to workaround some build
...
problem; patch by Ed Schouten.
llvm-svn: 105996
2010-06-15 15:03:31 +00:00
Daniel Dunbar
be65fe860b
Add <cstddef> include to get ptrdiff_t, for gcc-4.6; patch by Dimitry Andric.
...
llvm-svn: 105995
2010-06-15 14:50:52 +00:00
Benjamin Kramer
ad36eb2911
Fix typo.
...
llvm-svn: 105993
2010-06-15 08:21:35 +00:00
Nick Lewycky
a2fb98bfda
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.
llvm-svn: 105992
2010-06-15 07:32:55 +00:00
Alexis Hunt
0684e33ba5
MinGW requires that wint_t be defined in stddef.h. In order to accomodate, we
...
won't define it unless specifically requested via the use of __need_wint_t.
llvm-svn: 105985
2010-06-15 02:36:48 +00:00
Ted Kremenek
4c721bf892
Change AnalysisConsumer to analyze functions created by instantiantiating a macro. Fixes PR 7361.
...
llvm-svn: 105984
2010-06-15 00:55:40 +00:00
Chris Lattner
c7ed7ea390
fix the inline asm diagnostics to emit the error on the primary
...
source code location instead of on the note. Previously we generated:
<inline asm>:1:2: error: unrecognized instruction
barf
^
t.c:4:8: note: generated from here
asm ("barf");
^
Now we generate:
t.c:4:8: error: unrecognized instruction
asm ("barf");
^
<inline asm>:1:2: note: instantated into assembly here
barf
^
llvm-svn: 105978
2010-06-15 00:03:12 +00:00
Douglas Gregor
4f6e8deec4
Make sure to set the visible on a vtable; VTTs and typeinfo already
...
handle visibility properly. Fixes <rdar://problem/8091955>.
llvm-svn: 105977
2010-06-14 23:41:45 +00:00
Douglas Gregor
1726d1517e
Add name mangling for address spaces. We use the vendor-extension
...
mangling for types, where the <source-name> is ASxxx (xxx is the
address-space number).
llvm-svn: 105975
2010-06-14 23:15:08 +00:00
Douglas Gregor
c9d2682df3
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>.
llvm-svn: 105968
2010-06-14 22:07:54 +00:00
Daniel Dunbar
5a9d1835be
Driver: Fix PR4062 by dissecting one particular -Wp, form.
...
llvm-svn: 105966
2010-06-14 21:37:09 +00:00
Daniel Dunbar
fb3d747fc6
Driver: Dissect -Wl, and -Xlinker arguments to remove --no-demangle, which was a
...
collect2 option that is passed by some projects (notably WebKit).
llvm-svn: 105964
2010-06-14 21:23:12 +00:00
Daniel Dunbar
3f1a1ffd95
Driver: Eliminate uses of Arg::getIndex.
...
Also, fix a memory leak.
llvm-svn: 105963
2010-06-14 21:23:08 +00:00
Douglas Gregor
067ad670b1
Put warnings about designated initializations overridding prior
...
initializations into their own warning group, initializer-overrides,
which is part of -Wextra. Patch by william@25thandClement.com , fixes
PR6934!
llvm-svn: 105961
2010-06-14 21:15:09 +00:00
Daniel Dunbar
5714fc5e8b
Driver: Fix refacto in DerivedArgList::MakeSeparateArg.
...
llvm-svn: 105958
2010-06-14 20:20:44 +00:00
Daniel Dunbar
2d6e9ee033
Driver: Add DerivedArgList::AddFOOArg helper functions, and switch to using them.
...
llvm-svn: 105957
2010-06-14 20:20:41 +00:00
Douglas Gregor
7d14ffc6ef
Teach TemplateDecl::getSourceRange() to cover the entire declaration,
...
from Peter Collingbourne!
llvm-svn: 105951
2010-06-14 20:02:51 +00:00
Chris Lattner
48eb14dd79
Fix:
...
Decl.cpp:716:28: warning: initialization of pointer of type 'clang::VarDecl *' from literal 'false' [-Wbool-conversions]
VarDecl *LastTentative = false;
^
RewriteRope.cpp:535:12: warning: initialization of pointer of type '<anonymous>::RopePieceBTreeNode *' from literal 'false'
[-Wbool-conversions]
return false;
^
llvm-svn: 105946
2010-06-14 18:31:46 +00:00
Benjamin Kramer
c0b8f3bc53
Enable basic testing of __builtin_fpclassify.
...
llvm-svn: 105937
2010-06-14 10:41:45 +00:00
Benjamin Kramer
7039fcbc5d
An implementation of __builtin__fpclassify the way Chris Lattner described by Jörg Blank.
...
llvm-svn: 105936
2010-06-14 10:30:41 +00:00
Charles Davis
2d7b10cc97
Microsoft C++ Mangler:
...
- Mangle qualifiers.
- Start mangling variables' types into the name. A variable declared with a
builtin type should now mangle properly.
llvm-svn: 105931
2010-06-14 05:29:01 +00:00
Nate Begeman
91e1feab7a
Add some missing shifts
...
Fix multiplies by scalar
Add SemaChecking code for all immediates
Add SemaChecking-gen support to arm_neon.td
llvm-svn: 105930
2010-06-14 05:21:25 +00:00
Daniel Dunbar
9886f71db7
www: Swap external coverage & spec references links.
...
llvm-svn: 105925
2010-06-13 21:07:10 +00:00
Anders Carlsson
cc59cc5d80
Do the same short-circuit optimization when laying out bases.
...
llvm-svn: 105920
2010-06-13 18:00:18 +00:00
Anders Carlsson
ae111dc821
Implement part of the EmptySubobjectMap optimization described in PR6998. We still need to do this for bases.
...
llvm-svn: 105919
2010-06-13 17:49:16 +00:00
John McCall
30576cdce3
TemplateSpecializationType's isCurrentInstantiation bit can be derived
...
from its canonical type.
llvm-svn: 105912
2010-06-13 09:25:03 +00:00
Chris Lattner
f3d3b36870
Allow an asm label specifier on C++ methods, like GCC does.
...
Patch by David Majnemer!
llvm-svn: 105909
2010-06-13 05:34:18 +00:00
Nate Begeman
d773fe67dd
Most of NEON sema checking & fix to polynomial type detection
...
llvm-svn: 105908
2010-06-13 04:47:52 +00:00
Chris Lattner
fa04338f38
don't make libclang depend on codegen. Patch by Peter Collingbourne!
...
llvm-svn: 105901
2010-06-12 22:54:45 +00:00
Charles Davis
63c0a744f7
Really make the Itanium C++ ABI the default.
...
llvm-svn: 105893
2010-06-12 16:58:00 +00:00
Chris Lattner
bc6bcabc61
fix PR7360: -P mode turns off line markers, but not blank space.
...
Apparently some programs which abuse the preprocessor depend
on this.
llvm-svn: 105889
2010-06-12 16:20:56 +00:00
Abramo Bagnara
da41d0cf5b
Added template parameters info for out-of-line definitions of class template methods.
...
llvm-svn: 105882
2010-06-12 08:15:14 +00:00
Charles Davis
7dacc95299
Microsoft C++ Mangler:
...
- Don't mangle static variables at global scope.
- Add support for mangling builtin types. This will be used later.
llvm-svn: 105881
2010-06-12 08:11:16 +00:00
Abramo Bagnara
8075c85230
Don't omit class explicit instantiation from AST.
...
llvm-svn: 105880
2010-06-12 07:44:57 +00:00
Nate Begeman
c6ac0ce89f
Shifts complete. Only vld & sema checking of constants remain.
...
llvm-svn: 105879
2010-06-12 06:06:07 +00:00
Nate Begeman
dd715805ab
vbsl, vrev* is implemented via arm_neon.h
...
llvm-svn: 105875
2010-06-12 03:11:41 +00:00
John McCall
45d30c3e36
When deciding whether an expression has the boolean nature, don't look through
...
explicit casts. Fixes PR7359.
llvm-svn: 105871
2010-06-12 01:56:02 +00:00
Argyrios Kyrtzidis
9116717189
Fix PCH issue. Attributes of a declaration were truncated to just one when the decl was read from a PCH file.
...
llvm-svn: 105852
2010-06-11 23:09:25 +00:00
Nate Begeman
8ed060b95a
Most of remaining builtins, 2 generics, vld, and rounding shfits remain.
...
llvm-svn: 105848
2010-06-11 22:57:12 +00:00
Daniel Dunbar
af8decbde0
Driver: Switch Compilation to return the translated arguments by default.
...
llvm-svn: 105844
2010-06-11 22:43:38 +00:00
Chris Lattner
d0df9a40a3
add a -W flag.
...
llvm-svn: 105843
2010-06-11 22:10:09 +00:00
Daniel Dunbar
775d406043
Driver: Add an explicit argument translation phase to the driver itself. We are going to need this to handle things like -Xassembler, -Xpreprocessor, and -Xlinker which we might have to introspect.
...
llvm-svn: 105842
2010-06-11 22:00:26 +00:00
Daniel Dunbar
5c5d30b03a
Driver: Get rid of the proxy support in DerivedArgList.
...
llvm-svn: 105841
2010-06-11 22:00:22 +00:00
Daniel Dunbar
18974bdc68
Fix a couple comments.
...
llvm-svn: 105840
2010-06-11 22:00:19 +00:00
Daniel Dunbar
7c9e4306af
Driver: Change OptTable::ParseArg to take any ArgList.
...
llvm-svn: 105839
2010-06-11 22:00:17 +00:00
Daniel Dunbar
a442fd5da6
Driver: Fix arg_iterator typing to reflect that it is really an iterator over Arg*s.
...
llvm-svn: 105838
2010-06-11 22:00:13 +00:00
Daniel Dunbar
d839e77b12
Preprocessor: Ignore unknown pragmas in -E -dM and -Eonly modes.
...
llvm-svn: 105830
2010-06-11 20:10:12 +00:00
Chris Lattner
90987eebfd
preprocessor directives in macro arguments aren't standard,
...
hopefully this unbreaks msvc
llvm-svn: 105826
2010-06-11 19:50:37 +00:00
Craig Silverstein
0ea0b0a7ea
Add a few FIXMEs: recursing over shadow decls, and semantics vs
...
syntactic iterating over initializer exprs. No functional change.
llvm-svn: 105825
2010-06-11 18:08:47 +00:00
John McCall
875679eea0
Fix the constant evaluator for AltiVec-style vector literals so that the
...
vector is filled with the given constant; we were just initializing the
first element.
llvm-svn: 105824
2010-06-11 17:54:15 +00:00
John McCall
b86a6b830e
Allow pseudo-destructors to be called on qualified pointers. Patch by
...
Troy Straszheim!
llvm-svn: 105823
2010-06-11 17:36:40 +00:00
John McCall
773cc98c3a
Don't store ASTContext references in the TST nodes just to support profiling.
...
llvm-svn: 105820
2010-06-11 11:07:21 +00:00
John McCall
dad856dba3
Provide an Objective C mangling for wchar_t. Patch by Nico Weber!
...
llvm-svn: 105818
2010-06-11 10:11:05 +00:00
John McCall
6d1116ac49
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.
llvm-svn: 105817
2010-06-11 10:04:22 +00:00
Jeffrey Yasskin
5d474d0a96
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.
llvm-svn: 105816
2010-06-11 06:58:43 +00:00
Jeffrey Yasskin
2b99c6fc4f
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.
llvm-svn: 105815
2010-06-11 05:57:47 +00:00
Charles Davis
b6a5a0d9e1
When mangling for the Microsoft C++ ABI, mangle variables in the global
...
namespace, too.
llvm-svn: 105809
2010-06-11 04:25:47 +00:00
Tom Care
00554634db
Small fixes regarding printf fix suggestions.
...
- Added some handling of flags that become invalid when changing the conversion specifier.
- Changed fixit behavior to remove unnecessary length modifiers.
- Separated some tests out and added some comments.
modified:
lib/Analysis/PrintfFormatString.cpp
test/Sema/format-strings-fixit.c
llvm-svn: 105807
2010-06-11 04:22:02 +00:00
Charles Davis
9af2d4a614
Start implementing the Microsoft-style name mangler. Mangle simple names
...
(but not their types; that's later).
NOTE: Right now, variables in the global namespace don't get mangled, even
though they're supposed to be. This is because the default mangler
implements the shouldMangleDeclName() method that tells clang not to mangle
them. This will be fixed in a later patch.
llvm-svn: 105805
2010-06-11 03:07:32 +00:00
Charles Davis
95a546ee4d
Add an option to specify the target C++ ABI to the frontend. Use it to
...
select either the default Itanium ABI or the new, experimental Microsoft ABI.
llvm-svn: 105804
2010-06-11 01:06:47 +00:00
Chandler Carruth
437416c06b
Improve readability with TRY_TO, remove a redundant comment, and fix one aspect
...
of the recursion on VarDecls. Patch by Craig Silverstein.
llvm-svn: 105803
2010-06-11 01:00:06 +00:00
John McCall
c392f37ae8
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.
llvm-svn: 105801
2010-06-11 00:33:02 +00:00
John McCall
d85248be7a
Provide a method to clear the current state of a TypeLocBuilder.
...
llvm-svn: 105800
2010-06-11 00:26:38 +00:00
Chandler Carruth
c27ee0fd29
Avoid repeating the list of operators twice in RecursiveASTVisitor through
...
a set of preprocessor macros. Patch by Zhanyong Wan.
llvm-svn: 105796
2010-06-10 23:29:40 +00:00
Chandler Carruth
6c816770db
Tweak a comment on the visitor to clarify one order of visit issue. Patch from
...
Zhanyong Wan.
llvm-svn: 105795
2010-06-10 23:27:51 +00:00
Nate Begeman
e0935ffa50
Multiplies, some shifts, set_lane
...
llvm-svn: 105793
2010-06-10 18:11:55 +00:00
Daniel Dunbar
40e640c8df
www: Add note on running clang tests from a CMake build, patch by Peter Collingbourne
...
llvm-svn: 105791
2010-06-10 17:01:45 +00:00
Daniel Dunbar
1d3c2fa9be
Driver: Also mark -F as RenderJoined, the linker doesn't like "-F FOO" either.
...
llvm-svn: 105789
2010-06-10 15:53:17 +00:00
Chandler Carruth
c65667c8ba
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.
llvm-svn: 105787
2010-06-10 10:31:57 +00:00
Rafael Espindola
ad8fed53ff
Create a LinuxTargetInfo on ARM. This make clang correctly expand
...
__USER_LABEL_PREFIX__.
llvm-svn: 105771
2010-06-10 00:46:51 +00:00
Nate Begeman
4a04b467d9
support _lane ops, and multiplies by scalar.
...
llvm-svn: 105770
2010-06-10 00:17:56 +00:00
Charles Davis
74ce85980b
Add a stub Microsoft Visual C++ ABI class (with stub mangler).
...
llvm-svn: 105767
2010-06-09 23:25:41 +00:00
Daniel Dunbar
ed8f06e860
tests: Update test for previous change.
...
llvm-svn: 105766
2010-06-09 23:24:59 +00:00
Daniel Dunbar
ca1282b971
Driver: -L should be marked as RenderJoined, the linker doesn't like "-L FOO".
...
llvm-svn: 105765
2010-06-09 23:20:37 +00:00
Daniel Dunbar
89cad2309b
Driver: Eliminate flags on aliases, they are unnecessary (and unused).
...
llvm-svn: 105764
2010-06-09 23:20:34 +00:00
Daniel Dunbar
bfe71f2416
Driver: Change Option parsing to always create arguments referring to unaliased
...
options.
- This matches the intent of the .td files, and will simplify alias handling.
- PR7321.
llvm-svn: 105763
2010-06-09 22:44:34 +00:00
Daniel Dunbar
35cbfeba8f
Driver: Eliminate Arg subclasses, which are now unnecessary.
...
llvm-svn: 105762
2010-06-09 22:31:08 +00:00
Daniel Dunbar
8b77f73314
Driver: Keep the rendering style in the option, instead of as part of the Arg.
...
llvm-svn: 105761
2010-06-09 22:31:04 +00:00
Daniel Dunbar
8f1ebabaf7
Driver: Change Arg to just hold the values directly, instead of implicitly
...
deriving them from the Arg type.
llvm-svn: 105760
2010-06-09 22:31:00 +00:00
Daniel Dunbar
0bcb62dc30
Frontend: Fix crashes on error paths.
...
llvm-svn: 105759
2010-06-09 22:30:54 +00:00
Sebastian Redl
c3eba8f547
Commit my WIP on constexpr support. This commit: an XFAILed test and treating constexpr as a top-level const.
...
llvm-svn: 105752
2010-06-09 21:19:43 +00:00
Sebastian Redl
243d9057d0
Fix two typos in comments.
...
llvm-svn: 105751
2010-06-09 21:17:41 +00:00
Daniel Dunbar
c656d3e111
Revert "Driver: Change Option parsing to always create arguments referring to
...
unaliased", this isn't quite right yet.
llvm-svn: 105747
2010-06-09 19:27:07 +00:00
Daniel Dunbar
aea0620b89
Driver: Change Option parsing to always create arguments referring to unaliased
...
options.
- This matches the intent of the .td files, and will simplify alias handling.
- PR7321.
llvm-svn: 105744
2010-06-09 19:19:01 +00:00
Daniel Dunbar
26a95c6717
Driver: Add an explicit offset to JoinedArg and JoinedAndSeparateArg, so that
...
they can be independent of the exact option that created them.
llvm-svn: 105739
2010-06-09 18:49:38 +00:00
Daniel Dunbar
d96e279f02
Driver: Change Arg::render methods to use option name instead of string where
...
possible.
llvm-svn: 105738
2010-06-09 18:49:31 +00:00
Nate Begeman
d90aa43bdf
Implement codegen for hadd, hsub, max, min, mlal, movl, movn, padal, mov_n
...
Make note about how to handle the dozen or so multiply by scalar ops.
llvm-svn: 105734
2010-06-09 18:04:15 +00:00
Abramo Bagnara
656e300f03
Added inherited info to template and non-type arguments of templates.
...
llvm-svn: 105716
2010-06-09 09:26:05 +00:00
Chandler Carruth
af80f66997
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.
llvm-svn: 105709
2010-06-09 08:17:30 +00:00
Chandler Carruth
b52b9100bf
Remove an entry for a now deleted file. Fixes the neglected CMake build. ;]
...
llvm-svn: 105708
2010-06-09 08:12:12 +00:00
John McCall
a5dd326ca5
Correctly handle > 257 substitutions in a single mangling, and don't introduce
...
a spurious substitution for an unscoped dependent template-id after introducing
a substitution for the scoped template-id.
llvm-svn: 105699
2010-06-09 07:26:17 +00:00
Zhongxing Xu
1225aacacf
Merge StackAddrLeakChecker and ReturnStackAddressChecker.
...
llvm-svn: 105687
2010-06-09 06:08:24 +00:00
Zhongxing Xu
4200be5e76
Directly compare the StackFrameContext. This greatly simplifies logic and
...
improves generality. Thanks Ted.
llvm-svn: 105686
2010-06-09 05:50:38 +00:00
Nate Begeman
4307a25545
More accurate BuiltinsARM.def
...
vget_lane support
llvm-svn: 105684
2010-06-09 05:30:26 +00:00
Douglas Gregor
b4e3533ce1
Fix a typo that breaks the GCC build. Turns out that Clang isn't
...
diagnosing this code as an error when it should, so I've filed
http://llvm.org/bugs/show_bug.cgi?id=7325 .
llvm-svn: 105683
2010-06-09 05:25:34 +00:00
Tom Care
b704270779
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
llvm-svn: 105680
2010-06-09 04:11:11 +00:00
Douglas Gregor
1fc3d66da4
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.
llvm-svn: 105678
2010-06-09 03:53:18 +00:00
Rafael Espindola
6bb986d530
Simplify the code a bit and avoid a gcc waring about uninitialized variables.
...
llvm-svn: 105676
2010-06-09 03:48:40 +00:00
Anders Carlsson
635186a8c4
Get rid of getMangledCXXCtorName and getMangledCXXDtorName.
...
llvm-svn: 105673
2010-06-09 02:36:32 +00:00
Anders Carlsson
09b5fe68ab
More mangling cleanup.
...
llvm-svn: 105672
2010-06-09 02:30:12 +00:00
Anders Carlsson
d4ce4e4bc0
Get rid of an unnecessary getMangledName overload.
...
llvm-svn: 105671
2010-06-09 02:20:01 +00:00
Rafael Espindola
9cdbd9dc08
Fix a gcc warning.
...
llvm-svn: 105670
2010-06-09 02:17:08 +00:00
Anders Carlsson
13f7c7dd77
Fix test.
...
llvm-svn: 105668
2010-06-09 01:42:52 +00:00
Nate Begeman
5548309fa7
Implement transpose/zip/unzip & table lookup.
...
Test out some basic constant-checking.
llvm-svn: 105667
2010-06-09 01:10:23 +00:00
Tom Care
32a2229070
Added helper function to Type class to determine if a type is a builtin type. This complements the existing function that determines if a type is a specific builtin type.
...
Modified:
include/clang/AST/Type.h
llvm-svn: 105664
2010-06-09 00:15:39 +00:00
Anders Carlsson
642da419a6
Try to fix buildbot tests.
...
llvm-svn: 105660
2010-06-08 23:10:20 +00:00
Ted Kremenek
076baeb03e
Fix memory leak in ASTContext where ASTRecordLayout objects involving C++ structures wouldn't have
...
their associated memory destroyed when using a BumpPtrAllocator. These objects internally use
a DenseMap.
llvm-svn: 105659
2010-06-08 23:00:58 +00:00
Ted Kremenek
dea66e3e4c
Fix memory leak in Preprocessor where MacroInfo objects in the MICache wouldn't have their
...
associated SmallVectors get deallocated.
llvm-svn: 105658
2010-06-08 23:00:53 +00:00
Jordy Rose
954238366b
Code cleanup: remove explicit flush() in favor of using the ostream's str()
...
llvm-svn: 105657
2010-06-08 22:59:01 +00:00
Anders Carlsson
044cab3325
Add test case.
...
llvm-svn: 105651
2010-06-08 22:48:02 +00:00
Anders Carlsson
851318a93a
On Darwin, initialization and destruction functions should go into the __StaticInit section.
...
llvm-svn: 105650
2010-06-08 22:47:50 +00:00
Anders Carlsson
b2839e4aa1
Add a global CreateGlobalInitOrDestructFunction and use it for creating global init or destruction functions.
...
llvm-svn: 105649
2010-06-08 22:40:05 +00:00
Anders Carlsson
9eb101c5d3
Rename __tcf_ to __cxx_global_array_dtor. Remove the UniqueAggreDestructorCount from CodeGenFunction and let LLVM handle uniquing the internal functions instead.
...
llvm-svn: 105648
2010-06-08 22:30:17 +00:00
Anders Carlsson
282bc10eaa
Move GenerateCXXAggrDestructorHelper to CGDeclCXX.cpp where it belongs.
...
llvm-svn: 105647
2010-06-08 22:17:27 +00:00
Anders Carlsson
165ec0a04f
Simplify GenerateCXXAggrDestructorHelper.
...
llvm-svn: 105646
2010-06-08 22:14:59 +00:00
Daniel Dunbar
40fee6313d
Globally disable -fno-strict-aliasing, for reasons given in the comment.
...
llvm-svn: 105644
2010-06-08 21:55:02 +00:00
Douglas Gregor
6f2e095f06
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.
llvm-svn: 105643
2010-06-08 21:27:36 +00:00
Douglas Gregor
ce21919bd6
A built-in overload candidate is consider a non-template function when
...
determining whether one overload candidate is better than
another. Fixes PR7319.
llvm-svn: 105642
2010-06-08 21:03:17 +00:00
Fariborz Jahanian
3b83618054
Block Code Gen. API. Call destructor on descriptior
...
entry previously constructed via copy constructor.
llvm-svn: 105641
2010-06-08 20:57:22 +00:00
Daniel Dunbar
d04e1a7ef1
Makefiles: Remove unnecessary early include of Makefile.config.
...
llvm-svn: 105640
2010-06-08 20:57:22 +00:00
Daniel Dunbar
5d02e0bd8a
Simplify libIndex Makefile, which doesn't need to worry about altivec support.
...
llvm-svn: 105639
2010-06-08 20:57:18 +00:00
Daniel Dunbar
ee6b692551
Makefiles: Set Clang CPP compiler flags in a single location, instead of scattered throughout the project Makefiles.
...
llvm-svn: 105638
2010-06-08 20:44:43 +00:00
Daniel Dunbar
e6c1daa8fd
Makefile: Switch Clang Makefiles to always include the top-level Clang Makefile.
...
- This eliminates most dependencies on how Clang is installed relative to LLVM.
llvm-svn: 105637
2010-06-08 20:34:18 +00:00
Anders Carlsson
e26754184e
Update Xcode project.
...
llvm-svn: 105633
2010-06-08 20:02:04 +00:00
Douglas Gregor
ec170db73d
Warn about comparisons between arrays and improve self-comparison
...
warnings, from Troy Straszheim! Fixes PR6163.
llvm-svn: 105631
2010-06-08 19:50:34 +00:00
Douglas Gregor
61b5ff5ab4
Teach the PrintFunctionNames example to be a proper module, so that
...
Clang can load it as a plugin. Original fix by Troy D. Straszheim,
which I extended with Darwin support. Fixes PR6801.
llvm-svn: 105630
2010-06-08 19:23:49 +00:00
Anders Carlsson
446872069f
Correctly handle fields with virtual bases containing empty subobjects.
...
llvm-svn: 105628
2010-06-08 19:09:24 +00:00
Ted Kremenek
e869a182c2
Add ccc-analyzer support for '-imacros'. Fixes PR 7204.
...
llvm-svn: 105624
2010-06-08 18:27:55 +00:00
Fariborz Jahanian
8e73928f52
Fixes a typo which prevented proper code gen. for
...
copy-in of c++ class objects into blocks.
llvm-svn: 105622
2010-06-08 17:52:11 +00:00
Douglas Gregor
4038cf4b57
Implement a warning when converting the literal 'false' to a
...
pointer. Original patch by Troy D. Straszheim; fixes PR7283.
llvm-svn: 105621
2010-06-08 17:35:15 +00:00
Anders Carlsson
45c1d2898e
When checking whether we can place a base subobject at an offset, we don't need to go past the highest offset that's known to contain an empty base subobject.
...
llvm-svn: 105611
2010-06-08 16:20:35 +00:00
Anders Carlsson
cc5de097a6
Minor cleanups to the empty subobject map.
...
llvm-svn: 105608
2010-06-08 15:56:03 +00:00
Daniel Dunbar
6311731341
Update LINK_COMPONENTS for examples.
...
llvm-svn: 105607
2010-06-08 15:38:01 +00:00
Anders Carlsson
248704c517
Correctly mangle static variables of anonymous struct/union type.
...
llvm-svn: 105606
2010-06-08 14:49:03 +00:00
Benjamin Kramer
0591124608
Token is POD-like.
...
llvm-svn: 105604
2010-06-08 11:23:26 +00:00
Zhongxing Xu
87e7fc5dc2
Add a checker check if a global variable holds a local variable's address after
...
the function call is left where the local variable is declared.
llvm-svn: 105602
2010-06-08 10:00:00 +00:00
Nate Begeman
ae6b1d8010
Fix NEON intrinsic argument passing, support vext. Most now successfully make it through codegen to the .s file
...
llvm-svn: 105599
2010-06-08 06:03:01 +00:00
Jeffrey Yasskin
460aa54d0a
Implement -fcaret-diagnostics to undo -fno-caret-diagnostics.
...
llvm-svn: 105597
2010-06-08 04:56:20 +00:00
Rafael Espindola
2569885963
Add a test to the previous commit.
...
llvm-svn: 105596
2010-06-08 03:59:28 +00:00
Rafael Espindola
895e51de4a
Fix what looks like a merge problem that broke __clear_cache.
...
llvm-svn: 105595
2010-06-08 03:52:53 +00:00
Rafael Espindola
85dc7e0909
Add test for previous commit.
...
llvm-svn: 105594
2010-06-08 03:29:31 +00:00
Nate Begeman
4904e32d46
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.
...
llvm-svn: 105593
2010-06-08 02:47:44 +00:00
Rafael Espindola
bbd44ef673
Fix passing and returning of objects with non trivial copy constructors on
...
ARM.
Fixes PR7310.
llvm-svn: 105592
2010-06-08 02:42:08 +00:00
Nate Begeman
16372afeab
Implement ARM NEON up through vcvt, alphabetically.
...
llvm-svn: 105590
2010-06-08 00:17:19 +00:00
Nate Begeman
a011002195
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.
...
llvm-svn: 105589
2010-06-08 00:16:34 +00:00
Daniel Dunbar
24e52992c0
Driver: Support invoking Clang on .ll or .bc inputs.
...
- We actually pretend that we have two separate types for LLVM assembly/bitcode because we need to use the standard suffixes with LTO ('clang -O4 -c t.c' should generate 't.o').
It is now possible to do something like:
$ clang -emit-llvm -S t.c -o t.ll ... assorted other compile flags ...
$ clang -c t.ll -o t.o ... assorted other compile flags ...
and expect that the output will be almost* identical to:
$ clang -c t.c -o t.o ... assorted other compile flags ...
because all the target settings (default CPU, target features, etc.) will all be initialized properly by the driver/frontend.
*: This isn't perfect yet, because in practice we will end up running the optimization passes twice. It's possible to get something equivalent out with a well placed -mllvm -disable-llvm-optzns, but I'm still thinking about the cleanest way to solve this problem more generally.
llvm-svn: 105584
2010-06-07 23:28:45 +00:00
Daniel Dunbar
6f8362c6bf
Frontend: Add CodeGenAction support for handling LLVM IR.
...
- This magically enables using 'clang -cc1' as a replacement for most of 'llvm-as', 'llvm-dis', 'llc' and 'opt' functionality.
For example, 'llvm-as' is:
$ clang -cc1 -emit-llvm-bc FOO.ll -o FOO.bc
and 'llvm-dis' is:
$ clang -cc1 -emit-llvm FOO.bc -o -
and 'opt' is, e.g.:
$ clang -cc1 -emit-llvm -O3 -o FOO.opt.ll FOO.ll
and 'llc' is, e.g.:
$ clang -cc1 -S -o - FOO.ll
The nice thing about using the backend tools this way is that they are guaranteed to exactly match how the compiler generates code (for example, setting the same backend options).
llvm-svn: 105583
2010-06-07 23:27:59 +00:00
Daniel Dunbar
9507f9cc05
Frontend: Add FrontendAction support for handling LLVM IR inputs.
...
- These inputs follow an abbreviated execution path, but are still worth handling by FrontendAction so they reuse all the other clang -cc1 features.
llvm-svn: 105582
2010-06-07 23:26:47 +00:00
Daniel Dunbar
fcb2e6ddea
FrontendAction: Track active file kind.
...
llvm-svn: 105581
2010-06-07 23:25:49 +00:00
Daniel Dunbar
fa6214c952
Frontend: Rename hasASTSupport to hasASTFileSupport, which is more accurate.
...
llvm-svn: 105580
2010-06-07 23:24:43 +00:00
Daniel Dunbar
aed46fcbe9
Frontend: Move some initialization from CompilerInstance to FrontendAction, to parallel what is done for AST inputs.
...
llvm-svn: 105579
2010-06-07 23:23:50 +00:00
Daniel Dunbar
8654638b23
Frontend: Change FrontendAction::BeginSourceFile to take the input kind instead of an IsAST bool.
...
llvm-svn: 105578
2010-06-07 23:23:06 +00:00
Daniel Dunbar
9b491e79fc
Frontend: Lift InputKind enumeration to top level.
...
llvm-svn: 105577
2010-06-07 23:22:09 +00:00
Daniel Dunbar
3e11152de3
Frontend: Drop unnecessary TargetData argument to EmitBackendOutput, we always
...
create modules which have target data strings.
llvm-svn: 105576
2010-06-07 23:21:04 +00:00
Daniel Dunbar
f976d1b205
Frontend: Factor clang::EmitBackendOutput out of CodeGenAction.
...
llvm-svn: 105575
2010-06-07 23:20:08 +00:00
Daniel Dunbar
6d5824f5bf
Frontend: Add CodeGenOptions::SimplifyLibCalls, and eliminate LangOptions argument to BackendConsumer.
...
llvm-svn: 105574
2010-06-07 23:19:17 +00:00
Fariborz Jahanian
be21aa34a0
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
llvm-svn: 105560
2010-06-07 22:02:01 +00:00
Fariborz Jahanian
a2d7c34e93
Fixed a block regression caused by trying to use
...
an existing ir for load of a bock variable. This cannot be
done across basic blocks.
Fixes radar 8064140.
llvm-svn: 105549
2010-06-07 19:39:39 +00:00
Jordy Rose
3597b21f20
Catch free()s on non-regions and regions known to be not from malloc(), by checking the symbol type and memory space.
...
llvm-svn: 105547
2010-06-07 19:32:37 +00:00
Rafael Espindola
a54062ef0c
Implement __clear_cache on ARM.
...
llvm-svn: 105537
2010-06-07 17:26:50 +00:00
Fariborz Jahanian
28ed927ddf
Use MaybeCreateCXXExprWithTemporaries for potential destruction of
...
created temporary. Use own initialized entity for copied in block
variables.
llvm-svn: 105533
2010-06-07 16:14:00 +00:00
Nate Begeman
5968eb270a
weekend checkpoint of arm neon builtins codegen.
...
TODO: add remainder of builtins to CGBuiltin, add code to SemaChecking to validate constants.
llvm-svn: 105532
2010-06-07 16:01:56 +00:00
Jeffrey Yasskin
caa710dfd2
PR7245: Make binding a reference to a temporary without a usable copy
...
constructor into an extension warning into the error that C++98 requires.
llvm-svn: 105529
2010-06-07 15:58:05 +00:00
John McCall
cb0f89a434
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.
llvm-svn: 105526
2010-06-05 06:41:15 +00:00
Abramo Bagnara
d73405829b
Added AccessSpecDecl node.
...
llvm-svn: 105525
2010-06-05 05:09:32 +00:00
Jeffrey Yasskin
2f96e9f5c9
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.
}
llvm-svn: 105518
2010-06-05 01:39:57 +00:00
Devang Patel
6ccba0fb6e
Preserve type info for local variables in optimized builds.
...
llvm-gcc enabled this couple of weeks ago.
llvm-svn: 105516
2010-06-05 01:14:40 +00:00
John McCall
8cb7bdfd33
Alter the interface of GetTypeForDeclarator to return a TypeSourceInfo*.
...
This is never null, but the associated type might be.
llvm-svn: 105503
2010-06-04 23:28:52 +00:00
Rafael Espindola
e971b9a260
Correctly align large arrays in x86-64. This fixes PR5599.
...
llvm-svn: 105500
2010-06-04 23:15:27 +00:00
Anders Carlsson
76f513f862
When deciding whether reinterpret_cast casts away constness we need to look at array qualifiers. Fixes rdar://problem/8018292.
...
llvm-svn: 105494
2010-06-04 22:47:55 +00:00
John McCall
a3cecb628f
Add indexing support for the block and @property type location information
...
I just implemented.
llvm-svn: 105491
2010-06-04 22:33:30 +00:00
Nate Begeman
6736cc89d0
Initial support for ARM NEON builtins, codegen up next
...
llvm-svn: 105489
2010-06-04 21:36:27 +00:00
Fariborz Jahanian
ea882cd92e
Build AST for copy-construction of copied-in
...
class object in blocks and carry it to IRGen.
llvm-svn: 105487
2010-06-04 21:35:44 +00:00
John McCall
339bb66246
Remember type source information for Objective C property declarations.
...
llvm-svn: 105484
2010-06-04 20:50:08 +00:00
Fariborz Jahanian
9643399ef0
Added a field to BlockDeclRefExpr for future use.
...
No functionality change yet.
llvm-svn: 105479
2010-06-04 19:06:53 +00:00
John McCall
8e346702b6
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.
llvm-svn: 105478
2010-06-04 19:02:56 +00:00
Daniel Dunbar
7f3d95054b
Driver: Change -dwarf-debug-flags option to pass the original command line
...
arguments after translation, instead of the -cc1 level arguments.
llvm-svn: 105476
2010-06-04 18:47:06 +00:00
Daniel Dunbar
6beaf5110f
Driver/Darwin: Model dsymutil properly, as a separate action/tool kind which is
...
added as the last output step, instead of just hacking it into the link step.
- Among other things, this fixes dSYM generation when using multiple -arch options.
llvm-svn: 105475
2010-06-04 18:28:41 +00:00
Daniel Dunbar
8829962030
Driver: Add an explicit dsymutil action.
...
llvm-svn: 105474
2010-06-04 18:28:36 +00:00
Fariborz Jahanian
64176c2c97
For C++ copied in objects, use copy constructors in
...
setting up block's descriptor. This is on going work to
support c++ specific issues in setting up blocks
various APIs.
llvm-svn: 105469
2010-06-04 16:10:00 +00:00
Rafael Espindola
92eb2cbbef
Add ARM paths for debian. Not enough to bootstrap on a beagle board, but
...
moves us further.
llvm-svn: 105468
2010-06-04 14:28:10 +00:00
John McCall
a3ccba0417
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.
llvm-svn: 105466
2010-06-04 11:21:44 +00:00
Abramo Bagnara
52d6350dd2
Don't insert in lexical context implicit definitions of static member instances.
...
llvm-svn: 105465
2010-06-04 09:35:39 +00:00
Douglas Gregor
2e87ca218f
When checking for equality of template parameter lists, a template
...
type parameter pack is distinct from a template type parameter.
llvm-svn: 105464
2010-06-04 08:34:32 +00:00
John McCall
b1cd7dac3d
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.
llvm-svn: 105463
2010-06-04 08:34:12 +00:00
Douglas Gregor
71b209dea6
Properly disambiguate between an elaborated-type-specifier and a
...
type-parameter within a template parameter list. Found by inspection.
llvm-svn: 105462
2010-06-04 07:30:15 +00:00
John McCall
ec6f4e9017
More refactoring.
...
llvm-svn: 105458
2010-06-04 02:29:22 +00:00
Anders Carlsson
15722da2dc
Add a short circuit in isVirtuallyDerivedFrom.
...
llvm-svn: 105457
2010-06-04 01:40:08 +00:00
Jordy Rose
2e22268904
Assignments to reference variables shouldn't kill the variable.
...
llvm-svn: 105452
2010-06-04 01:14:56 +00:00
David Chisnall
b190a2c74a
Fixed Objective-C type encoding for bitfields for the GNU runtime to match the encoding used by GCC.
...
llvm-svn: 105451
2010-06-04 01:10:52 +00:00
Anders Carlsson
fd788405ac
Remove now unused code.
...
llvm-svn: 105448
2010-06-04 00:59:37 +00:00
Anders Carlsson
27860db29e
Use CXXRecordDecl::getFinalOverriders to get final overriders. This speeds up vtable layout by moving away from the old final overrider computation code that had O(N^2) complexity in some cases.
...
llvm-svn: 105447
2010-06-04 00:54:04 +00:00
John McCall
4a2429aa5a
Remove a couple of unnecessary uses of IsStandardConversion.
...
llvm-svn: 105445
2010-06-04 00:29:51 +00:00
Eli Friedman
986b6ae96a
Check the output of this test.
...
llvm-svn: 105434
2010-06-03 23:34:11 +00:00
Eli Friedman
4e7bd4a8a1
Think through my commit this time.
...
llvm-svn: 105433
2010-06-03 23:31:53 +00:00
Eli Friedman
cd70980c8e
Make sure this test doesn't break when we disallow throwing an exception
...
in -fno-exceptions mode.
llvm-svn: 105432
2010-06-03 23:22:25 +00:00
Tom Care
7691c9cdb6
Removing commit access test file.
...
llvm-svn: 105426
2010-06-03 22:31:09 +00:00
Tom Care
4cdcf59c6d
Testing commit access.
...
llvm-svn: 105424
2010-06-03 22:30:22 +00:00
Nate Begeman
821079d42d
Classify NEON intrinsics by overloading-type for codegen
...
Add a few missing instructions
llvm-svn: 105417
2010-06-03 21:36:23 +00:00
Eli Friedman
91a3d27ec0
Make sure to check the accessibility of and mark the destructor for the
...
operand of a throw expression. Fixes PR7281.
llvm-svn: 105408
2010-06-03 20:39:03 +00:00
Eli Friedman
cce5b81ce1
Don't intentionally try to ignore the value of a scalar expression when we
...
actually care about it. Fixes PR7291.
llvm-svn: 105404
2010-06-03 19:58:07 +00:00
John McCall
1c70e99a2c
Hack in some really terrible C++ record PCH support that I need right now.
...
This is required in order to test:
The ASTImporter should set base classes after formally entering the definition.
llvm-svn: 105401
2010-06-03 19:28:45 +00:00
Ted Kremenek
b4bb6dc44d
Return a proper null CXSourceLocation from clang_getLocation() when the SourceLocation is invalid. Fixes <rdar://problem/8056640>.
...
llvm-svn: 105392
2010-06-03 15:52:32 +00:00
Anders Carlsson
bcb2e4cb63
Don't try to explicitly zero out bit-fields.
...
llvm-svn: 105391
2010-06-03 15:36:07 +00:00
Jordy Rose
d47ff22893
Test commit: fix method summary comment
...
llvm-svn: 105385
2010-06-03 06:52:32 +00:00
Zhongxing Xu
ea9fcffe03
Make addStmt always add stmt. Delegate other cases to Visit() directly.
...
llvm-svn: 105384
2010-06-03 06:43:23 +00:00
Zhongxing Xu
41cdf585c2
CFG: add all LHS of assingments as lvalue. This improves support for C++ reference. Patch by Jordy.
...
llvm-svn: 105383
2010-06-03 06:23:18 +00:00
Zhongxing Xu
3b7294777c
Add comments.
...
llvm-svn: 105382
2010-06-03 06:19:01 +00:00
Anders Carlsson
a2f74f3c98
Add all final overriders to the map.
...
llvm-svn: 105374
2010-06-03 01:00:02 +00:00
Jeffrey Yasskin
c9b9bdcc20
There is no dcl.init.ref p16. This test deals with p5.
...
llvm-svn: 105351
2010-06-02 22:01:22 +00:00
Fariborz Jahanian
d1b378e08d
Block C++ code gen. Adds support for block reference argument
...
types. Executable test will be added to LLVM test suite.
(radar 8041962).
llvm-svn: 105347
2010-06-02 21:35:17 +00:00
John McCall
6a7f9f5c8f
Don't try to emit the vtable for a class just because we're emitting a
...
virtual function from it.
Fixes PR7241.
llvm-svn: 105345
2010-06-02 21:22:02 +00:00
Daniel Dunbar
f5e075d392
Headers: Fix quoting of macro arguments in a couple more places.
...
llvm-svn: 105331
2010-06-02 16:35:01 +00:00
Anders Carlsson
b4d2cdbb46
Don't substitute 'St' for 'std' when the namespace is nested inside another namespace.
...
llvm-svn: 105330
2010-06-02 15:58:27 +00:00
Daniel Dunbar
6d3bc0898e
Fix undefined behavior, noticed by GCC 4.5. Patch by Dimitry Andric!
...
llvm-svn: 105329
2010-06-02 15:47:10 +00:00
Daniel Dunbar
6906b04457
Fix compiler warning about to false -> pointer conversion; patch by Dimitry Andric!
...
llvm-svn: 105328
2010-06-02 15:47:03 +00:00
Daniel Dunbar
f7ced25a2a
Fix unintentional method call due to false -> pointer conversion; patch by Dimitry Andric!
...
llvm-svn: 105327
2010-06-02 15:46:52 +00:00
Anders Carlsson
a85c1469c7
When building RTTI descriptors for pointer types, we need to get the unqualified array type and the qualifiers from it.
...
llvm-svn: 105326
2010-06-02 15:44:35 +00:00
Nate Begeman
661ba6d847
Fix vget_lane/vset_lane
...
llvm-svn: 105317
2010-06-02 07:15:01 +00:00
Douglas Gregor
876cec2898
typeid() produces type information for the cv-unqualified version of
...
the type. Thanks to Anders for the bug report!
llvm-svn: 105314
2010-06-02 06:16:02 +00:00
Chris Lattner
1737957803
clang++ is now a different greek letter.
...
llvm-svn: 105313
2010-06-02 05:27:21 +00:00
Anders Carlsson
d951a7ebf8
Correctly mangle unsigned integer literals where the high bit is set.
...
llvm-svn: 105312
2010-06-02 05:07:26 +00:00
Anders Carlsson
728fe444f1
Correctly mangle variadic functions that don't have any other parameters.
...
llvm-svn: 105311
2010-06-02 04:40:13 +00:00
Anders Carlsson
d563923cf1
When mangling member function pointers, fake adding a substitution corresponding to the function type.
...
llvm-svn: 105310
2010-06-02 04:29:50 +00:00
John McCall
58ec0483b7
Add a compatibility note about incomplete types in templates.
...
llvm-svn: 105309
2010-06-02 01:26:32 +00:00
Nate Begeman
464d280b3c
Checkpoint arm_neon.h generation with tablegen
...
llvm-svn: 105306
2010-06-02 00:34:41 +00:00
Anders Carlsson
04e51cca94
More cleanup.
...
llvm-svn: 105301
2010-06-01 23:52:26 +00:00
Anders Carlsson
042ce2d8f1
More cleanup.
...
llvm-svn: 105299
2010-06-01 23:47:05 +00:00
Anders Carlsson
79547c3fbd
Cleanup.
...
llvm-svn: 105296
2010-06-01 23:17:37 +00:00
Dan Gohman
b2e7169db8
Delete a blank line to make it easier to process this file with a script.
...
llvm-svn: 105275
2010-06-01 16:56:42 +00:00
John McCall
75b960e5ee
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.
llvm-svn: 105268
2010-06-01 09:23:16 +00:00
Zhongxing Xu
ce83656f97
Limit the use of BindDefault().
...
llvm-svn: 105265
2010-06-01 04:49:26 +00:00
Zhongxing Xu
527ff6d1dc
Add support for calloc() in MallocChecker. Patch by Jordy Rose, with my
...
modification.
llvm-svn: 105264
2010-06-01 03:01:33 +00:00
Ted Kremenek
305a0a7416
Fix crash in code completion when an ObjCMethodDecl doesn't have an associated @interface.
...
Fixes <rdar://problem/8026215>.
llvm-svn: 105256
2010-05-31 21:43:10 +00:00
Chris Lattner
47054fbbe9
Minor tweaks on doug's objc recovery patch: the caller
...
of isSimpleObjCMessageExpression checks the language,
so change a dynamic check into an assert.
isSimpleObjCMessageExpression is expensive, so only do it
in the common case when it is likely to matter: when the [
of the postfix expr starts on a new line. This should avoid
doing lookahead for every array expression.
llvm-svn: 105229
2010-05-31 18:18:22 +00:00
Charles Davis
7de6638173
Make methods non-virtual again for now. I accidentally committed this in
...
preparation for an alternate mangler.
llvm-svn: 105224
2010-05-31 17:07:59 +00:00
Douglas Gregor
952cf9414f
Tweak test for non-64-bit Darwin
...
llvm-svn: 105222
2010-05-31 14:58:57 +00:00
Douglas Gregor
990ccace5b
When we see the a '[' in a postfix expression in Objective-C, perform
...
a simple, quick check to determine whether the expression starting
with '[' can only be an Objective-C message send. If so, don't parse
it as an array subscript expression. This improves recovery for, e.g.,
[a method1]
[a method2]
so that we now produce
t.m:10:13: error: expected ';' after expression
[a method]
^
instead of some mess about expecting ']'.
llvm-svn: 105221
2010-05-31 14:40:22 +00:00
Chandler Carruth
9e814c0d80
Silence GCC warning about an accessible non-virtual destructor in a class with
...
virtual methods.
Please review cdavis, should these methods even be virtual?
llvm-svn: 105218
2010-05-31 08:27:42 +00:00
Ted Kremenek
4708f5a89b
After conversations with Zhongxing Xu and Jordy Rose, refine the logic in
...
RegionStoreManager::RetrieveElement() that handles indexing into a larger scalar
object to only consult the direct binding of a super region if it is a scalar.
This isn't perfect yet, and a big FIXME is attached to the code. This causes
the test case for PR 7218 now to pass.
llvm-svn: 105195
2010-05-31 01:22:04 +00:00
Chris Lattner
f3d0436077
fix incorrect tag
...
llvm-svn: 105189
2010-05-30 23:42:51 +00:00
Chris Lattner
f8142a3a6b
make #warning warnings end up in their own diagnostic category.
...
rdar://8042673
llvm-svn: 105188
2010-05-30 23:42:10 +00:00
Chris Lattner
52d96ac930
simpler fix for rdar://8044135 - escaped newlines have already
...
been processed, so they don't have to be tip-toed around.
llvm-svn: 105182
2010-05-30 23:27:38 +00:00