Timur Iskhodzhanov
89f588ff73
Revert r204562,204566,204586,204587 as they broke ASan on Windows
...
llvm-svn: 204596
2014-03-24 10:31:09 +00:00
David Majnemer
96bc4b0367
MS ABI: Add tests, other cleanups for r204562
...
This commit cleans up a few accidents:
- Do not rely on the order in which StringLiteral lays out bytes.
- Use a more efficient mechanism for handling so-called
"special-mappings" when mangling string literals.
- There is no need to allocate a copy of the mangled name.
- Add the test written for r204562.
Thanks to Richard Smith for pointing these out!
llvm-svn: 204586
2014-03-24 05:53:08 +00:00
Richard Smith
ecf74ff40a
Consistently dump default template arguments for template parameters as 'TemplateArgument's.
...
llvm-svn: 204572
2014-03-23 20:50:39 +00:00
David Majnemer
3843a05edf
MS ABI: Eliminate Duplicate Strings
...
COFF doesn't have mergeable sections so LLVM/clang's normal tactics for
string deduplication will not have any effect.
To remedy this we place each string inside it's own section and mark
the section as IMAGE_COMDAT_SELECT_ANY. However, we can only do this if the
string has an external name that we can generate from it's contents.
To be compatible with MSVC, we must use their scheme. Otherwise identical
strings in translation units from clang may not be deduplicated with
translation units in MSVC.
This fixes PR18248.
N.B. We will not attempt to do anything with a string literal which is not of
type 'char' or 'wchar_t' because their compiler does not support unicode
string literals as of this date.
llvm-svn: 204562
2014-03-23 17:47:16 +00:00
Nuno Lopes
fb744589bc
remove a bunch of unused private methods
...
found with a smarter version of -Wunused-member-function that I'm playwing with.
Appologies in advance if I removed someone's WIP code.
ARCMigrate/TransProperties.cpp | 8 -----
AST/MicrosoftMangle.cpp | 1
Analysis/AnalysisDeclContext.cpp | 5 ---
Analysis/LiveVariables.cpp | 14 ----------
Index/USRGeneration.cpp | 10 -------
Sema/Sema.cpp | 33 +++++++++++++++++++++---
Sema/SemaChecking.cpp | 3 --
Sema/SemaDecl.cpp | 20 ++------------
StaticAnalyzer/Checkers/GenericTaintChecker.cpp | 1
9 files changed, 34 insertions(+), 61 deletions(-)
llvm-svn: 204561
2014-03-23 17:12:37 +00:00
Alexey Bataev
62c87d2509
[OPENMP] parsing of clause 'safelen' (for directive 'omp simd')
...
llvm-svn: 204428
2014-03-21 04:51:18 +00:00
Timur Iskhodzhanov
ba5570221d
Fix PR19172 - wrong this adjustment calculated for virtual destructor in a class with complex inheritance
...
Reviewed at http://llvm-reviews.chandlerc.com/D3128
llvm-svn: 204394
2014-03-20 20:38:34 +00:00
Timur Iskhodzhanov
4fea4f917d
Flust stdout after each vftable dumped to simplify debugging
...
llvm-svn: 204341
2014-03-20 13:42:14 +00:00
Dmitri Gribenko
dbff5c71fa
Comment parsing: fix a crash when dumping comment ast for a function template
...
with variadic parameters
Patch by Joe Ranieri.
llvm-svn: 204236
2014-03-19 14:03:47 +00:00
Dmitri Gribenko
d9eb05aca3
Comment parsing: recognize \param ... on function templates with variadic
...
parameters
Patch by Joe Ranieri.
llvm-svn: 204235
2014-03-19 13:59:36 +00:00
Yunzhong Gao
fcdc45ff2d
Creating a printing policy for "half":
...
Since "half" is an OpenCL keyword and clang accepts __fp16 as an extension for
other languages, error messages and metadata (and hence debug info) should refer
to the half-precision floating point as "__fp16" instead of "half" when
compiling for non-OpenCL languages. This patch creates a new printing policy for
half in a similar manner to what is done for bool and wchar_t.
Differential Revision: http://llvm-reviews.chandlerc.com/D2952
llvm-svn: 204164
2014-03-18 17:55:18 +00:00
Richard Smith
7fcb35f5e1
More working around a GCC range-based for scope bug.
...
llvm-svn: 204108
2014-03-18 02:37:59 +00:00
Richard Smith
cbdf733dba
AST dumper: if we have multiple implicit instantiations of the same class
...
template specialization (from different modules), dump them all, so that every
declaration is dumped somewhere.
llvm-svn: 204100
2014-03-18 02:07:28 +00:00
Richard Smith
8aa4922ac5
Fix variable shadowing. Due to a bug in GCC's implementation of range-based for
...
loops, it was making this an error, resulting in buildbot failures.
llvm-svn: 204097
2014-03-18 00:35:12 +00:00
Richard Smith
20ade551a6
Factor out repeated code in dumping template declarations.
...
llvm-svn: 204090
2014-03-17 23:34:53 +00:00
Richard Smith
dcc2c453a5
Range-ify and simplify some of the AST dumping code by factoring out the lastChild check.
...
llvm-svn: 204086
2014-03-17 23:00:06 +00:00
Richard Smith
baf3ca5c01
Don't fold together the name lookup entries for two declarations if they are
...
declared in different namespaces in the same inline namespace set.
llvm-svn: 204082
2014-03-17 21:46:03 +00:00
Aaron Ballman
804a7fb7ba
[C++11] Replacing DeclContext iterators using_directives_begin() and using_directives_end() with iterator_range using_directives(). Updating all of the usages of the iterators with range-based for loops, and removing the no-longer-needed iterator versions. Also used as an opportunity to normalize the name from getUsingDirectives() to using_directives().
...
llvm-svn: 204061
2014-03-17 17:14:12 +00:00
Aaron Ballman
83731469a1
[C++11] Replacing ObjCObjectPointerType iterators qual_begin() and qual_end() with iterator_range quals(). Updating all of the usages of the iterators with range-based for loops.
...
llvm-svn: 204048
2014-03-17 16:14:00 +00:00
Aaron Ballman
1683f7baf6
[C++11] Replacing ObjCObjectType iterators qual_begin() and qual_end() with iterator_range quals(). Updating all of the usages of the iterators with range-based for loops.
...
llvm-svn: 204047
2014-03-17 15:55:30 +00:00
Aaron Ballman
b088fbee3f
[C++11] Replacing FunctionProtoType iterators exception_begin() and exception_end() with iterator_range exceptions(). Updating all of the usages of the iterators with range-based for loops.
...
llvm-svn: 204046
2014-03-17 15:38:09 +00:00
Aaron Ballman
40bd0aaf68
[C++11] Replacing FunctionProtoType iterators param_type_begin() and param_type_end() with iterator_range param_types(). Updating all of the usages of the iterators with range-based for loops.
...
llvm-svn: 204045
2014-03-17 15:23:01 +00:00
Aaron Ballman
c7e4e219b5
[C++11] Replacing CompoundStmt iterators body_begin() and body_end() with iterator_range body(). Updating all of the usages of the iterators with range-based for loops.
...
llvm-svn: 204040
2014-03-17 14:19:37 +00:00
Benjamin Kramer
a939c23aec
Make some assertions on constant expressions static.
...
llvm-svn: 204012
2014-03-15 18:54:13 +00:00
Aaron Ballman
e6f465e51f
[C++11] Removing the found_decls_begin() and found_decls_end() APIs and replacing with a range-only found_decls() API.
...
llvm-svn: 203975
2014-03-14 21:38:48 +00:00
Aaron Ballman
9371dd2287
[C++11] Replacing BlockDecl iterators capture_begin() and capture_end() with iterator_range captures(). Updating all of the usages of the iterators with range-based for loops.
...
llvm-svn: 203958
2014-03-14 18:34:04 +00:00
Aaron Ballman
c656303a2c
[C++11] Replacing CapturedStmt iterators capture_begin() and capture_end() with iterator_range captures(). Updating all of the usages of the iterators with range-based for loops.
...
llvm-svn: 203953
2014-03-14 18:08:33 +00:00
James Dennett
0492ef0e0b
Fix a crash (assertion failure) in EvaluateAsRValue.
...
Summary:
Gracefully fail to evaluate a constant expression if its type is
unknown, rather than failing an assertion trying to access the type.
Reviewers: klimek
Reviewed By: klimek
CC: chandlerc, cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D3075
llvm-svn: 203950
2014-03-14 17:44:10 +00:00
Aaron Ballman
535bbcccb1
[C++11] Replacing DeclStmt iterators decl_begin() and decl_end() with iterator_range decls(). Updating all of the usages of the iterators with range-based for loops.
...
llvm-svn: 203947
2014-03-14 17:01:24 +00:00
Aaron Ballman
702fa310e5
[C++11] Replacing ClassTemplateDecl iterators spec_begin() and spec_end() with iterator_range specializations(). Updating all of the usages of the iterators with range-based for loops.
...
llvm-svn: 203940
2014-03-14 16:13:33 +00:00
Aaron Ballman
b8733c5ba4
[C++11] Replacing FunctionTemplateDecl iterators spec_begin() and spec_end() with iterator_range specializations(). Updating all of the usages of the iterators with range-based for loops.
...
llvm-svn: 203938
2014-03-14 16:05:56 +00:00
Aaron Ballman
2205d2a56a
[C++11] Replacing OMPThreadPrivateDecl and OMPClause iterators varlist_begin() and varlist_end() with iterator_range varlists(). Updating all of the usages of the iterators with range-based for loops.
...
llvm-svn: 203937
2014-03-14 15:55:35 +00:00
Aaron Ballman
d6d25de46e
[C++11] Replacing ObjCImplementationDecl iterators ivar_begin() and ivar_end() with iterator_range ivars(). Updating all of the usages of the iterators with range-based for loops.
...
llvm-svn: 203932
2014-03-14 15:16:45 +00:00
Aaron Ballman
d85eff49a3
[C++11] Replacing ObjCCategoryDecl iterators propimpl_begin() and propimpl_end() with iterator_range property_impls(). Updating all of the usages of the iterators with range-based for loops.
...
llvm-svn: 203930
2014-03-14 15:02:45 +00:00
Aaron Ballman
865fbcdd8d
[C++11] Replacing ObjCCategoryDecl iterators ivar_begin() and ivar_end() with iterator_range ivars(). Updating all of the usages of the iterators with range-based for loops.
...
llvm-svn: 203924
2014-03-14 13:13:27 +00:00
Aaron Ballman
19a417699f
[C++11] Replacing ObjCCategoryDecl iterators protocol_begin() and protocol_end() with iterator_range protocols(). Updating all of the usages of the iterators with range-based for loops.
...
llvm-svn: 203922
2014-03-14 12:55:57 +00:00
Aaron Ballman
0f6e64d505
[C++11] Replacing ObjCProtocolDecl iterators protocol_begin() and protocol_end() with iterator_range protocols(). Updating all of the usages of the iterators with range-based for loops.
...
llvm-svn: 203863
2014-03-13 22:58:06 +00:00
Aaron Ballman
b4a5345598
[C++11] Replacing ObjCInterfaceDecl iterators known_extensions_begin() and known_extensions_end() with iterator_range known_extensions(). Updating all of the usages of the iterators with range-based for loops.
...
llvm-svn: 203857
2014-03-13 21:57:01 +00:00
Aaron Ballman
f53d8dd37d
[C++11] Replacing ObjCInterfaceDecl iterators visible_extensions_begin() and visible_extensions_end() with iterator_range visible_extensions(). Updating all of the usages of the iterators with range-based for loops.
...
llvm-svn: 203855
2014-03-13 21:47:07 +00:00
Aaron Ballman
15063e19c6
[C++11] Replacing ObjCInterfaceDecl iterators known_categories_begin() and known_categories_end() with iterator_range known_categories(). Updating all of the usages of the iterators with range-based for loops.
...
llvm-svn: 203854
2014-03-13 21:35:02 +00:00
Aaron Ballman
3fe486a332
[C++11] Replacing ObjCInterfaceDecl iterators visible_categories_begin() and visible_categories_end() with iterator_range visible_categories(). Updating all of the usages of the iterators with range-based for loops.
...
llvm-svn: 203851
2014-03-13 21:23:55 +00:00
Aaron Ballman
59abbd4d9b
[C++11] Replacing ObjCInterfaceDecl iterators ivar_begin() and ivar_end() with iterator_range ivars(). Updating all of the usages of the iterators with range-based for loops.
...
llvm-svn: 203849
2014-03-13 21:09:43 +00:00
Aaron Ballman
a9f49e394c
[C++11] Replacing ObjCInterfaceDecl iterators all_referenced_protocol_begin() and all_referenced_protocol_end() with iterator_range all_referenced_protocols(). Updating all of the usages of the iterators with range-based for loops.
...
llvm-svn: 203848
2014-03-13 20:55:22 +00:00
Aaron Ballman
a49c5064a1
[C++11] Replacing ObjCInterfaceDecl iterators protocol_begin() and protocol_end() with iterator_range protocols(). Updating all of the usages of the iterators with range-based for loops.
...
Drive-by fixing some incorrect types where a for loop would be improperly using ObjCInterfaceDecl::protocol_iterator. No functional changes in these cases.
llvm-svn: 203842
2014-03-13 20:29:09 +00:00
Aaron Ballman
f26acce6f7
[C++11] Replacing ObjCContainerDecl iterators instmeth_begin() and instmeth_end() with iterator_range instance_methods(). Updating all of the usages of the iterators with range-based for loops.
...
llvm-svn: 203839
2014-03-13 19:50:17 +00:00
Aaron Ballman
d174edffa0
Renaming the recently-created (r203830) props() range API to properties() for clarity.
...
llvm-svn: 203835
2014-03-13 19:11:50 +00:00
Aaron Ballman
dc4bea4676
[C++11] Replacing ObjCContainerDecl iterators prop_begin() and prop_end() with iterator_range props(). Updating all of the usages of the iterators with range-based for loops.
...
llvm-svn: 203830
2014-03-13 18:47:37 +00:00
Aaron Ballman
0ad78303de
[C++11] Replacing CXXRecordDecl iterators init_begin() and init_end() with iterator_range inits(). Updating all of the usages of the iterators with range-based for loops.
...
llvm-svn: 203819
2014-03-13 17:34:31 +00:00
Aaron Ballman
2b124d1a5d
[C++11] Replacing CXXRecordDecl iterators method_begin() and method_end() with iterator_range methods(). Updating all of the usages of the iterators with range-based for loops.
...
llvm-svn: 203812
2014-03-13 16:36:16 +00:00
Aaron Ballman
445a939db8
[C++11] Replacing CXXRecordDecl iterators vbases_begin() and vbases_end() with iterator_range vbases(). Updating all of the usages of the iterators with range-based for loops.
...
llvm-svn: 203808
2014-03-13 16:15:17 +00:00
Aaron Ballman
574705ed7f
[C++11] Replacing CXXRecordDecl iterators bases_begin() and bases_end() with iterator_range bases(). Updating all of the usages of the iterators with range-based for loops.
...
llvm-svn: 203803
2014-03-13 15:41:46 +00:00
Fariborz Jahanian
0c325319cf
Objective-C. Prevent an assertion crash due to buggy code
...
as it can commonly happen. // rdar://16261494
llvm-svn: 203598
2014-03-11 18:56:18 +00:00
Craig Topper
cbce6e9e63
[C++11] Add 'override' keyword to virtual methods that override their base class.
...
llvm-svn: 203543
2014-03-11 06:22:39 +00:00
Richard Trieu
99e1c9515a
Move the warning about unused relational comparison from -Wunused-value to
...
-Wunused-comparison. Also, newly warn on unused result from overloaded
relational comparisons, now also in -Wunused-comparison.
llvm-svn: 203535
2014-03-11 03:11:08 +00:00
Aaron Ballman
be22bcb180
[C++11] Replacing DeclBase iterators specific_attr_begin() and specific_attr_end() with iterator_range specific_attrs(). Updating all of the usages of the iterators with range-based for loops.
...
llvm-svn: 203474
2014-03-10 17:08:28 +00:00
Aaron Ballman
62e47c423d
Reverting llvm::distance changes to use std::distance with iterators instead, per post-commit review feedback.
...
Replacing llvm::copy changes with SmallVector range-based construction which is a considerably cleaner approach.
llvm-svn: 203461
2014-03-10 13:43:55 +00:00
Nick Lewycky
206cc2d9c6
Tab to spaces. No functionality change.
...
llvm-svn: 203417
2014-03-09 17:09:28 +00:00
Aaron Ballman
b97112e4bd
[C++11] Replacing Decl iterators attr_begin() and attr_end() with iterator_range attrs(). Updating all of the usages of the iterators with range-based for loops.
...
This is a reapplication of r203236 with modifications to the definition of attrs() and following the new style guidelines on auto usage.
llvm-svn: 203362
2014-03-08 22:19:01 +00:00
Aaron Ballman
e8a8baef44
[C++11] Replacing RecordDecl iterators field_begin() and field_end() with iterator_range fields(). Updating all of the usages of the iterators with range-based for loops.
...
llvm-svn: 203355
2014-03-08 20:12:42 +00:00
Aaron Ballman
43027eb093
Reapplying r203299 in a slightly different manner. Now range APIs are implemented in terms of iterator APIs.
...
llvm-svn: 203351
2014-03-08 18:30:40 +00:00
Aaron Ballman
da634f1dee
In my tests, I'm finding that declaring iterators in terms of ranges can sometimes have dangerous side-effects where the range temporary is destroyed, taking the underlying iterators out with it.
...
This changes the iterators so that they are no longer implemented in terms of ranges (so it's a very partial revert of the existing rangification efforts).
llvm-svn: 203299
2014-03-07 22:17:20 +00:00
Benjamin Kramer
15ae783e14
[C++11] Convert sort predicates into lambdas.
...
No functionality change.
llvm-svn: 203289
2014-03-07 21:35:40 +00:00
Ahmed Charles
b89843299a
Replace OwningPtr with std::unique_ptr.
...
This compiles cleanly with lldb/lld/clang-tools-extra/llvm.
llvm-svn: 203279
2014-03-07 20:03:18 +00:00
Aaron Ballman
629afaefe0
[C++11] Replacing DeclBase iterators decls_begin() and decls_end() with iterator_range decls(). The same is true for the noload versions of these APIs. Updating all of the usages of the iterators with range-based for loops.
...
llvm-svn: 203278
2014-03-07 19:56:05 +00:00
Aaron Ballman
29c9460d3e
Renaming the chains() ranged iterator to chain() per suggestion by Richard Smith.
...
llvm-svn: 203262
2014-03-07 18:36:15 +00:00
Aaron Ballman
1391608234
[C++11] Replacing IndirectFieldDecl iterators chain_begin() and chain_end() with iterator_range chains(). Updating all of the usages of the iterators with range-based for loops.
...
llvm-svn: 203261
2014-03-07 18:11:58 +00:00
Aaron Ballman
43b68bebe7
[C++11] Replacing ObjCMethodDecl iterators param_begin() and param_end() with iterator_range params(). Updating all of the usages of the iterators with range-based for loops.
...
llvm-svn: 203255
2014-03-07 17:50:17 +00:00
Aaron Ballman
b2b8b1dc66
[C++11] Replacing BlockDecl iterators param_begin() and param_end() with iterator_range params(). Updating all of the usages of the iterators with range-based for loops.
...
llvm-svn: 203250
2014-03-07 16:09:59 +00:00
Aaron Ballman
f6bf62e2d0
[C++11] Replacing FunctionDecl iterators param_begin() and param_end() with iterator_range params(). Updating all of the usages of the iterators with range-based for loops.
...
llvm-svn: 203248
2014-03-07 15:12:56 +00:00
Benjamin Kramer
ed2f476b20
[C++11] Replace LLVM-style type traits with C++11 standard ones.
...
No functionality change.
llvm-svn: 203241
2014-03-07 14:30:23 +00:00
Aaron Ballman
63ab760ebe
[C++11] Updating getUsingDirectives to use iterator_range instead of a std::pair.
...
llvm-svn: 203239
2014-03-07 13:44:44 +00:00
Aaron Ballman
7dce1a840c
Fully reverting r203236 -- it seems the only bots that are happy are the MSVC bots.
...
llvm-svn: 203237
2014-03-07 13:13:38 +00:00
Aaron Ballman
690829696c
[C++11] Replacing iterators attr_begin() and attr_end() with iterator_range attrs(). Updating all of the usages of the iterators with range-based for loops.
...
llvm-svn: 203236
2014-03-07 12:50:00 +00:00
Timur Iskhodzhanov
a895758203
Fix PR18967 -- Bad this adjustment for virtual methods in a diamond virtual inheritance hierarchy
...
llvm-svn: 203222
2014-03-07 09:34:59 +00:00
Aaron Ballman
86c9390673
[C++11] Replacing iterators redecls_begin() and redecls_end() with iterator_range redecls(). Updating all of the usages of the iterators with range-based for loops, which allows the begin/end forms to be removed entirely.
...
llvm-svn: 203179
2014-03-06 23:45:36 +00:00
Ismail Pazarbasi
be19ae05e7
Exclude invalid old decl from mismatching linkage assertion
...
This patch fixes PR18964. In linkage computation, assertion fails when
an old invalid declaration's linkage mismatches with the current
decl's one.
llvm-svn: 203168
2014-03-06 21:48:45 +00:00
Richard Smith
2d70976fc0
Fix dead store and simplify. No functionality change (although the code is now
...
correct if MaxEditDistance were increased to something greater than 1).
llvm-svn: 203153
2014-03-06 20:00:05 +00:00
David Majnemer
34b4989658
MS ABI: Disambiguate the manglings for global guard variables
...
If a guard variable will be created for an entity at global scope,
then we cannot rely on the scope depth to disambiguate names for us.
Instead, mangle the entire variable into the guard to ensure it's uniqueness.
llvm-svn: 203151
2014-03-06 19:57:36 +00:00
David Majnemer
f55feec559
MS ABI: Fix the initializer/finalizer mangling for static data members
...
Initializers and finalizers for static data members have the variable's
access-specifier, storage-class, type and CV-qualifiers mangled in.
llvm-svn: 203145
2014-03-06 19:10:27 +00:00
Argyrios Kyrtzidis
38765b9c17
[ASTPrinter] 'SEL' isn't a ObjCObjectPointer, so we don't need to handle it in TypePrinter::printObjCObjectPointerBefore.
...
Suggested by Jordan.
llvm-svn: 203124
2014-03-06 15:31:56 +00:00
Alexey Bataev
568a833f68
[OPENMP] Clause 'num_threads'
...
llvm-svn: 203087
2014-03-06 06:15:19 +00:00
Richard Trieu
532018f7a5
Change the color of comment nodes from bright yellow to blue. Bright yellow on
...
a white background is difficult to read. Also include a chart showing which
colors are used by which elements in the AST dump.
llvm-svn: 203050
2014-03-06 01:09:03 +00:00
Richard Smith
da3f4fd3fe
PR19010: Make sure we initialize (empty) indirect base class subobjects when
...
evaluating trivial default initialization of a literal class type.
llvm-svn: 203025
2014-03-05 23:32:50 +00:00
David Majnemer
f27217ffaf
AST: Remove layering violation with Sema
...
Scope lives in Sema and cannot be used in AST. Shuffle things around.
llvm-svn: 202993
2014-03-05 18:55:38 +00:00
Timur Iskhodzhanov
77764b6d4c
Style fix: replace "1 entries" with "1 entry" in the vftable layout dumping code
...
llvm-svn: 202978
2014-03-05 13:54:07 +00:00
David Majnemer
f017ec360c
MS ABI: Mangle lambdas
...
Use a scheme inspired by the Itanium ABI to properly implement the
mangling of lambdas.
N.B. The incredibly astute observer will notice that we do not generate
external names that are identical, or even compatible with, MSVC.
This is fine because they don't generate names that they can use across
translation units. Technically, we can generate any name we'd like so
long as that name wouldn't conflict with any other and would be stable
across translation units.
This fixes PR15512.
llvm-svn: 202962
2014-03-05 10:35:06 +00:00
David Majnemer
2206bf5d5b
[-cxx-abi microsoft] Implement local manglings accurately
...
Summary:
The MSVC ABI appears to mangle the lexical scope into the names of
statics. Specifically, a counter is incremented whenever a scope is
entered where things can be declared in such a way that an ambiguity can
arise. For example, a class scope inside of a class scope doesn't do
anything interesting because the nested class cannot collide with
another nested class.
There are problems with this scheme:
- It is unreliable. The counter is only incremented when a previously
never encountered scope is entered. There are cases where this will
cause ambiguity amongst declarations that have the same name where one
was introduced in a deep scope while the other was introduced right
after in the previous lexical scope.
- It is wasteful. Statements like: {{{{{{{ static int foo = a; }}}}}}}
will make the mangling of "foo" larger than it need be because the
scope counter has been incremented many times.
Because of these problems, and practical implementation concerns. We
choose not to implement this scheme if the local static or local type
isn't visible. The mangling of these declarations will look very
similar but the numbering will make far more sense, this scheme is
lifted from the Itanium ABI implementation.
Reviewers: rsmith, doug.gregor, rnk, eli.friedman, cdavis5x
Reviewed By: rnk
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D2953
llvm-svn: 202951
2014-03-05 08:57:59 +00:00
Argyrios Kyrtzidis
0692508670
[AST] A "Class<P>" type should not have '*' when printed out.
...
rdar://14309030
llvm-svn: 202941
2014-03-05 06:47:57 +00:00
Fariborz Jahanian
7a5830294f
Objective-C. Return 0 as class of methods in protocols.
...
This simplifies my last patch a bit. No change in
functionality.
llvm-svn: 202906
2014-03-04 22:57:32 +00:00
Benjamin Kramer
9299637dc0
Pass llvm::Triple objects by const reference.
...
Copying isn't cheap as it contains a std::string.
llvm-svn: 202880
2014-03-04 19:31:42 +00:00
Timur Iskhodzhanov
3a9ac93478
First step towards fixing PR18967 - simplify the ComputeThisOffset interface
...
llvm-svn: 202870
2014-03-04 18:17:38 +00:00
Sean Callanan
c94711c7e3
When deciding whether or not to resolve two
...
anonymous structs to the same Decl in the
ASTImporter, ensure that both are filled in
from their external sources (if present).
Otherwise two different structs may be
identified erroneously.
llvm-svn: 202869
2014-03-04 18:11:50 +00:00
David Majnemer
8f77453f7c
MS ABI: Mangle variable templates properly
...
We wouldn't recognize variable templates as being templates leading us
to leave the template arguments off of the mangled name. This would
allow two unrelated templates to map to the same mangled name.
N.B. While MSVC doesn't support variable templates as of this date,
this mangling is the most likely thing they will choose to use. Their
demangler can successfully demangle our manglings with the template
arguments shown.
llvm-svn: 202789
2014-03-04 05:38:05 +00:00
Richard Smith
309271b0ad
Fix typo that resulted in names at TU scope getting lost sometimes after a
...
module import.
llvm-svn: 202771
2014-03-04 00:21:14 +00:00
Benjamin Kramer
a741b8c451
[C++11] Simplify compare operators with std::tie.
...
No functionality change.
llvm-svn: 202755
2014-03-03 20:26:46 +00:00
David Majnemer
b100410365
Normalize line endings
...
Some files had CRLF line terminators, some only had a mixture of
CRLF and LF. Switch to LF.
llvm-svn: 202659
2014-03-02 18:46:05 +00:00
Benjamin Kramer
867ea1d426
[C++11] Replace llvm::tie with std::tie.
...
llvm-svn: 202639
2014-03-02 13:01:17 +00:00
Benjamin Kramer
bbdd7640e8
[C++11] Replace verbose functors with succinct lambdas
...
No functionality change.
llvm-svn: 202590
2014-03-01 14:48:57 +00:00
Reid Kleckner
3331128994
Fix leak in MicrosoftVTableContext
...
llvm-svn: 202558
2014-02-28 23:26:22 +00:00
Reid Kleckner
383c2f232e
Attempt to fix non-MSVC build
...
llvm-svn: 202458
2014-02-28 01:12:55 +00:00