]> granicus.if.org Git - clang/log
clang
11 years agoWhitespace.
NAKAMURA Takumi [Thu, 21 Feb 2013 04:40:04 +0000 (04:40 +0000)]
Whitespace.

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

11 years ago[analyzer] Record whether a base object region represents a virtual base.
Jordan Rose [Thu, 21 Feb 2013 03:12:32 +0000 (03:12 +0000)]
[analyzer] Record whether a base object region represents a virtual base.

This allows MemRegion and MemRegionManager to avoid asking over and over
again whether an class is a virtual base or a non-virtual base.

Minor optimization/cleanup; no functionality change.

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

11 years ago[analyzer] Add another reinterpret_cast behavior test.
Jordan Rose [Thu, 21 Feb 2013 03:12:26 +0000 (03:12 +0000)]
[analyzer] Add another reinterpret_cast behavior test.

The test is similar to <rdar://problem/13239840> but doesn't actually test
the case that fails there. It's still a good test, though.

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

11 years ago[analyzer] Tidy up a few uses of Optional in RegionStore.
Jordan Rose [Thu, 21 Feb 2013 03:12:21 +0000 (03:12 +0000)]
[analyzer] Tidy up a few uses of Optional in RegionStore.

Some that I just added needed conversion to use 'None', others looked
better using Optional<SVal>::create.

No functionality change.

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

11 years agoCIndex.cpp: Appease g++-4.4. "if (Optional<unsigned> Minor = In.getMinor())" did...
NAKAMURA Takumi [Thu, 21 Feb 2013 02:32:34 +0000 (02:32 +0000)]
CIndex.cpp: Appease g++-4.4. "if (Optional<unsigned> Minor = In.getMinor())" did not work as expected.

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

11 years agolibstdc++'s <cstdalign> #includes <stdalign.h> and expects it to guard against
Richard Smith [Thu, 21 Feb 2013 02:17:58 +0000 (02:17 +0000)]
libstdc++'s <cstdalign> #includes <stdalign.h> and expects it to guard against
being included in C++. Don't define alignof or alignas in this case. Note that
the C++11 standard is broken in various ways here (it refers to the contents
of <stdalign.h> in C99, where that header did not exist, and doesn't mention
the alignas macro at all), but we do our best to do what it intended.

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

11 years agoRespect -fno-canonical-prefixes when deciding where to generate .gcno and .gcda
Nick Lewycky [Thu, 21 Feb 2013 02:02:50 +0000 (02:02 +0000)]
Respect -fno-canonical-prefixes when deciding where to generate .gcno and .gcda
files.

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

11 years agoUse None rather than Optional<T>() where possible.
David Blaikie [Thu, 21 Feb 2013 01:47:18 +0000 (01:47 +0000)]
Use None rather than Optional<T>() where possible.

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

11 years agoRename TypeLoc's isType to isKind
David Blaikie [Thu, 21 Feb 2013 01:47:08 +0000 (01:47 +0000)]
Rename TypeLoc's isType to isKind

Matches changes made to SVal's similar functions based on Jordan Rose's review
feedback to r175594.

Also change isKind to take a reference rather than a non-null pointer, while I'm
at it. (& make TypeLoc::isKind private)

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

11 years ago[analyzer] Tighten up safety in the use of lazy bindings.
Jordan Rose [Thu, 21 Feb 2013 01:34:51 +0000 (01:34 +0000)]
[analyzer] Tighten up safety in the use of lazy bindings.

- When deciding if we can reuse a lazy binding, make sure to check if there
  are additional bindings in the sub-region.
- When reading from a lazy binding, don't accidentally strip off casts or
  base object regions. This slows down lazy binding reading a bit but is
  necessary for type sanity when treating one class as another.

A bit of minor refactoring allowed these two checks to be unified in a nice
early-return-using helper function.

<rdar://problem/13239840>

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

11 years agoStrip 'llvm' from 'llvm::Optional' uses.
Ted Kremenek [Thu, 21 Feb 2013 01:29:01 +0000 (01:29 +0000)]
Strip 'llvm' from 'llvm::Optional' uses.

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

11 years agoRemove commented out code.
Richard Trieu [Thu, 21 Feb 2013 00:50:43 +0000 (00:50 +0000)]
Remove commented out code.

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

11 years agoobjective-C arc IR-gen. Retaining of strong
Fariborz Jahanian [Thu, 21 Feb 2013 00:40:10 +0000 (00:40 +0000)]
objective-C arc IR-gen. Retaining of strong
arguments in function prologue is done
with objc_StoreStrong to pair it with
similar objc_StoreStrong for release in function
epilogue. This is done with -O0 only.
// rdar://13145317

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

11 years agoMark unimplemented function with LLVM_DELETED_FUNCTION
David Blaikie [Thu, 21 Feb 2013 00:26:17 +0000 (00:26 +0000)]
Mark unimplemented function with LLVM_DELETED_FUNCTION

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

11 years agoDoxycomment SVal's getAs/castAs.
David Blaikie [Thu, 21 Feb 2013 00:26:14 +0000 (00:26 +0000)]
Doxycomment SVal's getAs/castAs.

Also document TypeLoc's operations similarly, since it's a good idea.

Post-commit CR feedback from Anna Zaks regarding r175594.

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

11 years agoRevert "intmax_t is long long on Darwin, not long."
Jordan Rose [Wed, 20 Feb 2013 22:28:41 +0000 (22:28 +0000)]
Revert "intmax_t is long long on Darwin, not long."

'long' and 'long long' are different for the purposes of mangling.
This caused <rdar://problem/13254874>.

This reverts commit c2f994d31ec85e9af811af38eb1b28709aef0b2c.

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

11 years agoMCParser: Update method names per coding guidelines.
Jim Grosbach [Wed, 20 Feb 2013 22:25:15 +0000 (22:25 +0000)]
MCParser: Update method names per coding guidelines.

s/ParseMSInlineAsm/parseMSInlineAsm/

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

11 years agoInclude llvm::Optional in clang/Basic/LLVM.h
David Blaikie [Wed, 20 Feb 2013 22:23:23 +0000 (22:23 +0000)]
Include llvm::Optional in clang/Basic/LLVM.h

Post-commit CR feedback from Jordan Rose regarding r175594.

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

11 years agoRemove redundant Optional type in favor of llvm::Optional
David Blaikie [Wed, 20 Feb 2013 22:23:03 +0000 (22:23 +0000)]
Remove redundant Optional type in favor of llvm::Optional

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

11 years agoUse op-> directly rather than via Optional<T>::getPointer.
David Blaikie [Wed, 20 Feb 2013 22:23:01 +0000 (22:23 +0000)]
Use op-> directly rather than via Optional<T>::getPointer.

Post-commit CR feedback from Jordan Rose regarding r175594.

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

11 years agoRename SVal::isType functions to SVal::isKind
David Blaikie [Wed, 20 Feb 2013 22:22:59 +0000 (22:22 +0000)]
Rename SVal::isType functions to SVal::isKind

Post-commit CR feedback from Jordan Rose regarding r175594.

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

11 years agoPR15311: Finish implementation of the suggested resolution of core issue 1488,
Richard Smith [Wed, 20 Feb 2013 20:19:27 +0000 (20:19 +0000)]
PR15311: Finish implementation of the suggested resolution of core issue 1488,
which allows grouping parens in an abstract-pack-declarator. This was already
mostly implemented, but missed some cases. Add an ExtWarn for use of this
extension until CWG ratifies it.

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

11 years agoAttempt to clean up tests for non-X86 platforms.
Bill Wendling [Wed, 20 Feb 2013 19:30:01 +0000 (19:30 +0000)]
Attempt to clean up tests for non-X86 platforms.

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

11 years agoProcess and handle attributes on conditions and for loop variables. Process and
Richard Smith [Wed, 20 Feb 2013 19:22:51 +0000 (19:22 +0000)]
Process and handle attributes on conditions and for loop variables. Process and
diagnose attributes on alias declarations, using directives, and attribute
declarations.

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

11 years ago[ms-inline asm] Remove this test while I investigate why eax isn't being clobbered.
Chad Rosier [Wed, 20 Feb 2013 17:39:31 +0000 (17:39 +0000)]
[ms-inline asm] Remove this test while I investigate why eax isn't being clobbered.

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

11 years agoFix regression in string literal alignment.
Manuel Klimek [Wed, 20 Feb 2013 15:32:58 +0000 (15:32 +0000)]
Fix regression in string literal alignment.

Now correctly indents (again):
a = a + "a"
        "a"
        "a";

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

11 years agoFixes bug in string literal alignment.
Manuel Klimek [Wed, 20 Feb 2013 15:25:48 +0000 (15:25 +0000)]
Fixes bug in string literal alignment.

We now indent the following correctly:
1. some + "literal" /* comment */
          "literal";
2. breaking string literals after which we have another string literal.

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

11 years agoDon't remove blank lines within unwrapped lines.
Daniel Jasper [Wed, 20 Feb 2013 12:56:39 +0000 (12:56 +0000)]
Don't remove blank lines within unwrapped lines.

If the code author decides to put empty lines anywhere into the code we
should treat them equally, i.e. reduce them to the configured
MaxEmptyLinesToKeep.

With this change, we e.g. keep the newline in:
SomeType ST = {
  // First value
  a,

  // Second value
  b
};

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

11 years agoImplements breaking of string literals if they stick out.
Manuel Klimek [Wed, 20 Feb 2013 10:15:13 +0000 (10:15 +0000)]
Implements breaking of string literals if they stick out.

An alternative strategy to calculating the break on demand when hitting
a token that would need to be broken would be to put all possible breaks
inside the token into the optimizer.

Currently only supports breaking at spaces; more break points to come.

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

11 years agoRemove target-specific features.
Bill Wendling [Wed, 20 Feb 2013 08:01:34 +0000 (08:01 +0000)]
Remove target-specific features.

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

11 years agoModify the tests to use attribute group references instead of listing the
Bill Wendling [Wed, 20 Feb 2013 07:22:19 +0000 (07:22 +0000)]
Modify the tests to use attribute group references instead of listing the
function attributes.

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

11 years agoReplace SVal llvm::cast support to be well-defined.
David Blaikie [Wed, 20 Feb 2013 05:52:05 +0000 (05:52 +0000)]
Replace SVal llvm::cast support to be well-defined.

See r175462 for another example/more details.

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

11 years agointmax_t is long long on Darwin, not long.
Jordan Rose [Wed, 20 Feb 2013 01:56:21 +0000 (01:56 +0000)]
intmax_t is long long on Darwin, not long.

<rdar://problem/11540697>

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

11 years agoAdd a new 'type_visibility' attribute to allow users to
John McCall [Wed, 20 Feb 2013 01:54:26 +0000 (01:54 +0000)]
Add a new 'type_visibility' attribute to allow users to
control the visibility of a type for the purposes of RTTI
and template argument restrictions independently of how
visibility propagates to its non-type member declarations.

Also fix r175326 to not ignore template argument visibility
on a template explicit instantiation when a member has
an explicit attribute but the instantiation does not.

The type_visibility work is rdar://11880378

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

11 years agoDon't repeat the function name in the comment.
Richard Smith [Wed, 20 Feb 2013 01:17:14 +0000 (01:17 +0000)]
Don't repeat the function name in the comment.

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

11 years ago[preprocessor] Split the MacroInfo class into two separate concepts, MacroInfo class
Argyrios Kyrtzidis [Wed, 20 Feb 2013 00:54:57 +0000 (00:54 +0000)]
[preprocessor] Split the MacroInfo class into two separate concepts, MacroInfo class
for the data specific to a macro definition (e.g. what the tokens are), and
MacroDirective class which encapsulates the changes to the "macro namespace"
(e.g. the location where the macro name became active, the location where it was undefined, etc.)

(A MacroDirective always points to a MacroInfo object.)

Usually a macro definition (MacroInfo) is where a macro name becomes active (MacroDirective) but
splitting the concepts allows us to better model the effect of modules to the macro namespace
(also as a bonus it allows better modeling of push_macro/pop_macro #pragmas).
Modules can have their own macro history, separate from the local (current translation unit)
macro history; MacroDirectives will be used to model the macro history (changes to macro namespace).

For example, if "@import A;" imports macro FOO, there will be a new local MacroDirective created
to indicate that "FOO" became active at the import location. Module "A" itself will contain another
MacroDirective in its macro history (at the point of the definition of FOO) and both MacroDirectives
will point to the same MacroInfo object.

Introducing the separation of macro concepts is the first part towards better modeling of module macros.

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

11 years ago[analyzer] Account for the "interesting values" hash table resizing.
Jordan Rose [Wed, 20 Feb 2013 00:27:26 +0000 (00:27 +0000)]
[analyzer] Account for the "interesting values" hash table resizing.

RegionStoreManager::getInterestingValues() returns a pointer to a
std::vector that lives inside a DenseMap, which is constructed on demand.
However, constructing one such value can lead to constructing another
value, which will invalidate the reference created earlier.

Fixed by delaying the new entry creation until the function returns.

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

11 years agoPR15300: Support C++11 attributes on base-specifiers. We don't support any such
Richard Smith [Tue, 19 Feb 2013 23:47:15 +0000 (23:47 +0000)]
PR15300: Support C++11 attributes on base-specifiers. We don't support any such
attributes yet, so just issue the appropriate diagnostics. Also generalize the
fixit for attributes-in-the-wrong-place code and reuse it here, if attributes
are placed after the access-specifier or 'virtual' in a base specifier.

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

11 years ago[analyzer] Don't accidentally strip off base object regions for lazy bindings.
Jordan Rose [Tue, 19 Feb 2013 20:28:33 +0000 (20:28 +0000)]
[analyzer] Don't accidentally strip off base object regions for lazy bindings.

If a base object is at a 0 offset, RegionStoreManager may find a lazy
binding for the entire object, then try to attach a FieldRegion or
grandparent CXXBaseObjectRegion on top of that (skipping the intermediate
region). We now preserve as many layers of base object regions necessary
to make the types match.

<rdar://problem/13239840>

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

11 years agoAdd missing clang-format null pointer check..
Daniel Jasper [Tue, 19 Feb 2013 20:05:41 +0000 (20:05 +0000)]
Add missing clang-format null pointer check..

.. and a test that triggers it in valid albeit questionable code.

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

11 years ago[modules] Const'ify some functions of ModuleMap.
Argyrios Kyrtzidis [Tue, 19 Feb 2013 19:58:45 +0000 (19:58 +0000)]
[modules] Const'ify some functions of ModuleMap.

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

11 years ago[modules] Refactor code from ASTReader::makeModuleVisible() into a new function,
Argyrios Kyrtzidis [Tue, 19 Feb 2013 19:34:40 +0000 (19:34 +0000)]
[modules] Refactor code from ASTReader::makeModuleVisible() into a new function,
Module::getExportedModules() so it can be reused.

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

11 years agoUse MapVector::pop_back() per LLVM r175538.
Douglas Gregor [Tue, 19 Feb 2013 18:26:28 +0000 (18:26 +0000)]
Use MapVector::pop_back() per LLVM r175538.

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

11 years ago[docs] Rename to permit wider variety of content.
Sean Silva [Tue, 19 Feb 2013 17:29:01 +0000 (17:29 +0000)]
[docs] Rename to permit wider variety of  content.

I don't want to rule out the possibility of linking to e.g. interesting
blog posts about uses of Clang, so avoid restricting the content to
"projects".

This breaks URL compatibility, but this document was committed less than
an hour ago so hopefully nobody has linked to it yet.

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

11 years ago[docs] Revise content on ExternalProjectsUsingClang page.
Sean Silva [Tue, 19 Feb 2013 17:21:23 +0000 (17:21 +0000)]
[docs] Revise content on ExternalProjectsUsingClang page.

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

11 years agoCorrectly format macro with unfinished template declaration.
Daniel Jasper [Tue, 19 Feb 2013 17:14:38 +0000 (17:14 +0000)]
Correctly format macro with unfinished template declaration.

We can now format:
  #define A template <typename T>

Before this created a segfault :-/.

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

11 years agoSupport in hasDeclaration for types with getDecl()
Edwin Vane [Tue, 19 Feb 2013 17:14:34 +0000 (17:14 +0000)]
Support in hasDeclaration for types with getDecl()

Using a new metafunction for detecting the presence of the member
'getDecl' in a type T, added support to hasDeclaration for any such type
T. This allows hasDecl() to be replaced and enables several other
subclasses of clang::Type to use hasDeclaration.

Updated unittests and LibASTMatchersReference.html.

Reviewers: klimek

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

11 years ago[docs] Introduce ExternalProjectsUsingClang.rst
Sean Silva [Tue, 19 Feb 2013 16:58:15 +0000 (16:58 +0000)]
[docs] Introduce ExternalProjectsUsingClang.rst

A couple concrete examples are sure to be a win. If you know of any
other external projects using Clang, please let me know!

Patch by Laszlo Nagy! (with a title tweak by me)

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

11 years ago[Sanitizer] If -fsanitize-blacklist= option is not explicitly specified, make Clang...
Alexey Samsonov [Tue, 19 Feb 2013 11:25:29 +0000 (11:25 +0000)]
[Sanitizer] If -fsanitize-blacklist= option is not explicitly specified, make Clang look for the default sanitizer-specific blacklist in the resource directory.

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

11 years agoAdd the missing 'static' keyword to the test
Timur Iskhodzhanov [Tue, 19 Feb 2013 10:50:44 +0000 (10:50 +0000)]
Add the missing 'static' keyword to the test

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

11 years agoFix bug in LineState comparison function.
Daniel Jasper [Tue, 19 Feb 2013 09:28:55 +0000 (09:28 +0000)]
Fix bug in LineState comparison function.

The key bug was

  if (Other.StartOfLineLevel < StartOfLineLevel) ..

instead of

  if (Other.StartOfLineLevel != StartOfLineLevel) ..

Also cleaned up the function to be more consistent in the comparisons.

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

11 years agoMore grammar.
Eric Christopher [Tue, 19 Feb 2013 06:16:53 +0000 (06:16 +0000)]
More grammar.

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

11 years agoFixing a typo where FixIts was accidentally self-assigning instead of assigning in...
Aaron Ballman [Tue, 19 Feb 2013 02:32:05 +0000 (02:32 +0000)]
Fixing a typo where FixIts was accidentally self-assigning instead of assigning in the parameter Fixits. This fixes several failed assertions with MSVC debug builds.

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

11 years agoAdd support for -fvisibility-ms-compat.
John McCall [Tue, 19 Feb 2013 01:57:35 +0000 (01:57 +0000)]
Add support for -fvisibility-ms-compat.

We treat this as an alternative to -fvisibility=<?>
which changes the default value visibility to "hidden"
and the default type visibility to "default".

Expose a -cc1 option for changing the default type
visibility, repurposing -fvisibility as the default
value visibility option (also setting type visibility
from it in the absence of a specific option).

rdar://13079314

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

11 years agoUse the actual class visibility for the ObjC EHTYPE global,
John McCall [Tue, 19 Feb 2013 01:57:29 +0000 (01:57 +0000)]
Use the actual class visibility for the ObjC EHTYPE global,
not the global visibility mode.

Noticed by inspection.

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

11 years agoTemporarily revert r175471 for more review.
Bill Wendling [Tue, 19 Feb 2013 00:53:07 +0000 (00:53 +0000)]
Temporarily revert r175471 for more review.

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

11 years agoAdd a 'no-builtin' attribute if we do not want to simplify calls.
Bill Wendling [Mon, 18 Feb 2013 23:17:48 +0000 (23:17 +0000)]
Add a 'no-builtin' attribute if we do not want to simplify calls.

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

11 years agoUse LLVM_DELETED_FUNCTION rather than '// do not implement' comments.
David Blaikie [Mon, 18 Feb 2013 23:11:09 +0000 (23:11 +0000)]
Use LLVM_DELETED_FUNCTION rather than '// do not implement' comments.

Also removes some redundant DNI comments on function declarations already
using the macro.

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

11 years agoReplace TypeLoc llvm::cast support to be well-defined.
David Blaikie [Mon, 18 Feb 2013 22:06:02 +0000 (22:06 +0000)]
Replace TypeLoc llvm::cast support to be well-defined.

The TypeLoc hierarchy used the llvm::cast machinery to perform undefined
behavior by casting pointers/references to TypeLoc objects to derived types
and then using the derived copy constructors (or even returning pointers to
derived types that actually point to the original TypeLoc object).

Some context is in this thread:
http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-December/056804.html
Though it's spread over a few months which can be hard to read in the mail
archive.

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

11 years agolibclang: don't store nul-terminated strings as StringRefs,
Dmitri Gribenko [Mon, 18 Feb 2013 19:50:38 +0000 (19:50 +0000)]
libclang: don't store nul-terminated strings as StringRefs,
if the nul-terminatedness property is important for clients.

Also, don't return the same CXString multiple times.  This did not create a
correctness issue in practice because the CXString was of an CXS_Unmanaged
kind, and destruction was a no-op.

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

11 years agoClean up last use of dyn_cast on TypeLoc in ASTMatchers
David Blaikie [Mon, 18 Feb 2013 19:04:16 +0000 (19:04 +0000)]
Clean up last use of dyn_cast on TypeLoc in ASTMatchers

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

11 years agoTest for my last patch. // rdar://13178483
Fariborz Jahanian [Mon, 18 Feb 2013 19:02:44 +0000 (19:02 +0000)]
Test for my last patch. // rdar://13178483

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

11 years agoAdd include guards for CommentVisitor.h
Argyrios Kyrtzidis [Mon, 18 Feb 2013 18:31:16 +0000 (18:31 +0000)]
Add include guards for CommentVisitor.h

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

11 years agoPrevent crash on multiple user errors (which I cannot reproduce in
Fariborz Jahanian [Mon, 18 Feb 2013 17:22:23 +0000 (17:22 +0000)]
Prevent crash on multiple user errors (which I cannot reproduce in
a small test case). // rdar://13178483.

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

11 years agoCodeGenFunction::CurFuncDecl can be NULL; fix crash introduced in r175386.
Douglas Gregor [Mon, 18 Feb 2013 15:59:24 +0000 (15:59 +0000)]
CodeGenFunction::CurFuncDecl can be NULL; fix crash introduced in r175386.

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

11 years agoEnsure that the identifier chains have the most recent declaration after module deser...
Douglas Gregor [Mon, 18 Feb 2013 15:53:43 +0000 (15:53 +0000)]
Ensure that the identifier chains have the most recent declaration after module deserialization.

This commit introduces a set of related changes to ensure that the
declaration that shows up in the identifier chain after deserializing
declarations with a given identifier is, in fact, the most recent
declaration. The primary change involves waiting until after we
deserialize and wire up redeclaration chains before updating the
identifier chains. There is a minor optimization in here to avoid
recursively deserializing names as part of looking to see whether
top-level declarations for a given name exist.

A related change that became suddenly more urgent is to property
record a merged declaration when an entity first declared in the
current translation unit is later deserialized from a module (that had
not been loaded at the time of the original declaration). Since we key
off the canonical declaration (which is parsed, not from an AST file)
for emitted redeclarations, we simply record this as a merged
declaration during AST writing and let the readers merge them.

Re-fixes <rdar://problem/13189985>, presumably for good this time.

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

11 years agoImprove indentation of builder type calls.
Daniel Jasper [Mon, 18 Feb 2013 13:52:06 +0000 (13:52 +0000)]
Improve indentation of builder type calls.

In builder-type calls, it can be very confusing to just indent
parameters from the start of the line. Instead, indent 4 from the
correct function call.

Before:
aaaaaaaaaaaaaaaaaaa()->aaaaaa(bbbbb)->aaaaaaaaaaaaaaaaaaa( // break
    aaaaaaaaaaaaaa);
aaaaaaaaaaaaaaaaaaaaaaa *aaaaaaaaa = aaaaaa->aaaaaaaaaaaa()->aaaaaaaaaaaaaaaa(
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)
    ->aaaaaaaaaaaaaaaaa();

After:
aaaaaaaaaaaaaaaaaaa()->aaaaaa(bbbbb)->aaaaaaaaaaaaaaaaaaa( // break
                                        aaaaaaaaaaaaaa);
aaaaaaaaaaaaaaaaaaaaaaa *aaaaaaaaa = aaaaaa->aaaaaaaaaaaa()
    ->aaaaaaaaaaaaaaaa(
        aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)
    ->aaaaaaaaaaaaaaaaa();

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

11 years agoImprove formatting of builder-type calls.
Daniel Jasper [Mon, 18 Feb 2013 13:24:21 +0000 (13:24 +0000)]
Improve formatting of builder-type calls.

Before:
aaaaaaa->aaaaaaa->aaaaaaaaaaaaaaaa(
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)->aaaaaaaa(aaaaaaaaaaaaaaa);

After:
aaaaaaa->aaaaaaa
    ->aaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)
    ->aaaaaaaa(aaaaaaaaaaaaaaa);

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

11 years agoReformat lines if they were "moved around".
Daniel Jasper [Mon, 18 Feb 2013 13:08:03 +0000 (13:08 +0000)]
Reformat lines if they were "moved around".

An unwrapped line can get moved around if there is no newline before
it and the previous line was formatted.

Example:

  template<typename T>  // Cursor is on this line when hitting "format"
  T *getFETokenInfo() const { return static_cast<T*>(FETokenInfo); }

"return .." is the second unwrapped line in this scenario. I does not
touch any reformatted region. Thus, the result of formatting is:

  template <typename T> T *getFETokenInfo() const { return static_cast<T *>(FETokenInfo); }

After second format (and arguably desired end-result):

  template <typename T> T *getFETokenInfo() const {
      return static_cast<T *>(FETokenInfo);
  }

This fixes: llvm.org/PR15060.

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

11 years agoCorrectly determine */& usage in more cases.
Daniel Jasper [Mon, 18 Feb 2013 12:44:35 +0000 (12:44 +0000)]
Correctly determine */& usage in more cases.

This fixes llvm.org/PR15248.

Before:
Test::Test(int b) : a(b *b) {}
for (int i = 0; i < a *a; ++i) {}

After:
Test::Test(int b) : a(b * b) {}
for (int i = 0; i < a * a; ++i) {}

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

11 years agoAArch64: add atomic support parameters to TargetInfo
Tim Northover [Mon, 18 Feb 2013 12:11:32 +0000 (12:11 +0000)]
AArch64: add atomic support parameters to TargetInfo

This allows Clang to detect and deal wih __atomic_* operations properly on
AArch64. Previously we produced an error when encountering them at high
optimisation levels.

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

11 years agoAlways break after multi-line string literals.
Daniel Jasper [Mon, 18 Feb 2013 11:59:17 +0000 (11:59 +0000)]
Always break after multi-line string literals.

Otherwise, other parameters can be quite hidden.
Reformatted unittests/Format/FormatTest.cpp after this.

Before:
someFunction("Always break between multi-line"
             " string literals", and, other, parameters);

After:
someFunction("Always break between multi-line"
             " string literals",
             and, other, parameters);

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

11 years agoPrevent line breaks that make stuff hard to read.
Daniel Jasper [Mon, 18 Feb 2013 11:05:07 +0000 (11:05 +0000)]
Prevent line breaks that make stuff hard to read.

Before:
aaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaa).aaaaaaaaaaaaaaaaa(
    aaaaaaaaaaaaaaaaaaaaa).aaaaaaaaaaaaaaaaaaa(
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa);

After:
aaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaa)
    .aaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaa)
    .aaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaa,
                         aaaaaaaaaaaaaaaaaaa,
                         aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa);

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

11 years agoUpdate test cases to account for DIBuilder type changes.
David Blaikie [Mon, 18 Feb 2013 07:27:35 +0000 (07:27 +0000)]
Update test cases to account for DIBuilder type changes.

Paired commit with LLVM, may produce temporary build breakage.

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

11 years agoDisable dead stores checker for template instantations. Fixes <rdar://problem/13213575>.
Ted Kremenek [Mon, 18 Feb 2013 07:18:28 +0000 (07:18 +0000)]
Disable dead stores checker for template instantations.  Fixes <rdar://problem/13213575>.

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

11 years agoFix up grammar a bit.
Eric Christopher [Mon, 18 Feb 2013 04:38:06 +0000 (04:38 +0000)]
Fix up grammar a bit.

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

11 years agoUnify some "kernel or kext" conditionals.
Eric Christopher [Mon, 18 Feb 2013 01:16:37 +0000 (01:16 +0000)]
Unify some "kernel or kext" conditionals.

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

11 years agoAdd a comment.
Eric Christopher [Mon, 18 Feb 2013 00:38:34 +0000 (00:38 +0000)]
Add a comment.

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

11 years agoClean up comment.
Eric Christopher [Mon, 18 Feb 2013 00:38:31 +0000 (00:38 +0000)]
Clean up comment.

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

11 years agoGrammar.
Eric Christopher [Mon, 18 Feb 2013 00:38:28 +0000 (00:38 +0000)]
Grammar.

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

11 years agoUnify some code. No functional change.
Eric Christopher [Mon, 18 Feb 2013 00:38:25 +0000 (00:38 +0000)]
Unify some code. No functional change.

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

11 years agoTest ivar-invariant.m: use a more idiomatic RUN line and tighten the test
Dmitri Gribenko [Sun, 17 Feb 2013 14:59:41 +0000 (14:59 +0000)]
Test ivar-invariant.m: use a more idiomatic RUN line and tighten the test
by matching the function name first

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

11 years agoRemove block names from test case to unbreak release builds.
Lang Hames [Sun, 17 Feb 2013 10:18:28 +0000 (10:18 +0000)]
Remove block names from test case to unbreak release builds.

Thanks Chandler. :)

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

11 years agoDocumentation: use \brief and don't duplicate the name of the declared entity
James Dennett [Sun, 17 Feb 2013 08:24:19 +0000 (08:24 +0000)]
Documentation: use \brief and don't duplicate the name of the declared entity
at the start of the doc comment.

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

11 years agoDocumentation cleanup: fix a typo ("////" for "///") and suppress Doxygen's
James Dennett [Sun, 17 Feb 2013 08:19:35 +0000 (08:19 +0000)]
Documentation cleanup: fix a typo ("////" for "///") and suppress Doxygen's
automatic link generation for "file:", as it's not used as a URL here.

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

11 years agoRe-apply r174919 - smarter copy/move assignment/construction, with fixes for
Lang Hames [Sun, 17 Feb 2013 07:22:09 +0000 (07:22 +0000)]
Re-apply r174919 - smarter copy/move assignment/construction, with fixes for
bitfield related issues.

The original commit broke Takumi's builder. The bug was caused by bitfield sizes
being determined by their underlying type, rather than the field info. A similar
issue with bitfield alignments showed up on closer testing. Both have been fixed
in this patch.

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

11 years ago[clang] fix test execution command
Saleem Abdulrasool [Sun, 17 Feb 2013 04:13:35 +0000 (04:13 +0000)]
[clang] fix test execution command

Signed-off-by: Saleem Abdulrasool <compnerd@compnerd.org>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175387 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[CodeGen] tighten objc ivar invariant.load attribution
Saleem Abdulrasool [Sun, 17 Feb 2013 04:03:34 +0000 (04:03 +0000)]
[CodeGen] tighten objc ivar invariant.load attribution

An ivar ofset cannot be marked as invariant load in all cases.  The ivar offset
is a lazily initialised constant, which is dependent on an objc_msgSend
invocation to perform a fixup of the offset.  If the load is being performed on
a method implemented by the class then this load can safely be marked as an
inviarant because a message must have been passed to the class at some point,
forcing the ivar offset to be resolved.

An additional heuristic that can be used to identify an invariant load would be
if the ivar offset base is a parameter to an objc method.  However, without the
parameters available at hand, this is currently not possible.

Reviewed-by: John McCall <rjmccall@apple.com>
Signed-off-by: Saleem Abdulrasool <compnerd@compnerd.org>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175386 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFix for ARM: functions don't have extra attributes there, so {{.*}} is ""
Dmitri Gribenko [Sun, 17 Feb 2013 03:06:16 +0000 (03:06 +0000)]
Fix for ARM: functions don't have extra attributes there, so {{.*}} is ""

While there, explicitly declare functions to remove warnings.

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

11 years agoUse trailing documentation comments properly
Dmitri Gribenko [Sat, 16 Feb 2013 22:21:38 +0000 (22:21 +0000)]
Use trailing documentation comments properly

Patch by Alexander Zinenko.

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

11 years agoUse the correct type to hold enumeration values
Dmitri Gribenko [Sat, 16 Feb 2013 20:03:26 +0000 (20:03 +0000)]
Use the correct type to hold enumeration values

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

11 years agoDocumentation cleanup: make a \brief be brief, and fix a bad use of \see.
James Dennett [Sat, 16 Feb 2013 08:16:47 +0000 (08:16 +0000)]
Documentation cleanup: make a \brief be brief, and fix a bad use of \see.

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

11 years agoDocumentation cleanup: use \brief, and don't repeat the identifier being
James Dennett [Sat, 16 Feb 2013 07:45:22 +0000 (07:45 +0000)]
Documentation cleanup: use \brief, and don't repeat the identifier being
declared.

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

11 years agolibAnalysis: Add a case for TypeAliasDecl in CFGRecStmtDeclVisitor.
Jordan Rose [Sat, 16 Feb 2013 01:33:16 +0000 (01:33 +0000)]
libAnalysis: Add a case for TypeAliasDecl in CFGRecStmtDeclVisitor.

Neither of the current clients of CFGRecStmtDeclVisitor are doing
anything with typedefs, so I assume type aliases (C++11 "using")
can be safely ignored. This was causing assertion failures in
the analyzer.

<rdar://problem/13228440>

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

11 years agolibclang: remove reinterpret_casts by using SourceLocation::getPtrEncoding
Dmitri Gribenko [Sat, 16 Feb 2013 01:07:48 +0000 (01:07 +0000)]
libclang: remove reinterpret_casts by using SourceLocation::getPtrEncoding

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

11 years agoRemove unused forward declarations
Dmitri Gribenko [Sat, 16 Feb 2013 01:06:07 +0000 (01:06 +0000)]
Remove unused forward declarations

clang/AST/Decl.h is included to see the TypeSourceInfo definition anyway.

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

11 years agoDon't warn on conversion from NULL to nullptr_t
David Blaikie [Sat, 16 Feb 2013 00:56:22 +0000 (00:56 +0000)]
Don't warn on conversion from NULL to nullptr_t

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

11 years agoEmit vtables for an extern template class as available_externally, not as
Richard Smith [Sat, 16 Feb 2013 00:51:21 +0000 (00:51 +0000)]
Emit vtables for an extern template class as available_externally, not as
linkonce_odr. Emit construction vtables as internal in this case, since the ABI
does not guarantee that they will be availble externally.

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

11 years ago[PCH] Deserializing the DeclContext of a template parameter is not safe
Argyrios Kyrtzidis [Sat, 16 Feb 2013 00:48:59 +0000 (00:48 +0000)]
[PCH] Deserializing the DeclContext of a template parameter is not safe
until recursive loading is finished.

Otherwise we may end up with a template trying to deserialize a template
parameter that is in the process of getting loaded.

rdar://13135282

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

11 years agoRemove unused forward declarations
Dmitri Gribenko [Sat, 16 Feb 2013 00:41:34 +0000 (00:41 +0000)]
Remove unused forward declarations

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