]> granicus.if.org Git - clang/log
clang
10 years agoclang-format: Treat a trailing comment like a trailing comma in braced lists.
Daniel Jasper [Wed, 9 Apr 2014 13:18:49 +0000 (13:18 +0000)]
clang-format: Treat a trailing comment like a trailing comma in braced lists.

Before:
  static StructInitInfo module = {MODULE_BUILTIN, /* type */
                                  "streams" /* name */
  };

After:
  static StructInitInfo module = {
      MODULE_BUILTIN, /* type */
      "streams"       /* name */
  };

This fixes llvm.org/PR19378.

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

10 years agoclang-format: Fix bug where clang-format would break the code.
Daniel Jasper [Wed, 9 Apr 2014 12:21:48 +0000 (12:21 +0000)]
clang-format: Fix bug where clang-format would break the code.

Before, it would turn:
  SomeFunction([]() { // Cool function..
    return 43;
  });

Into this:
  SomeFunction([]() { // Cool function.. return 43; });

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

10 years agoclang-format: Improve format of calls with several lambdas.
Daniel Jasper [Wed, 9 Apr 2014 12:08:39 +0000 (12:08 +0000)]
clang-format: Improve format of calls with several lambdas.

Before:
  SomeFunction([]() {
                 int i = 42;
                 return i;
               },
               []() {
    int j = 43;
    return j;
  });

After:
  SomeFunction([]() {
                 int i = 42;
                 return i;
               },
               []() {
                 int j = 43;
                 return j;
               });

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

10 years agoclang-format: Allow breaking between trailing annotations in more cases.
Daniel Jasper [Wed, 9 Apr 2014 10:29:11 +0000 (10:29 +0000)]
clang-format: Allow breaking between trailing annotations in more cases.

Before:
  void aaaaaaaaaaaaaa(aaaaaaaa aaa) override AAAAAAAAAAAAAAAAAAAAAAAA(
      aaaaaaaaaaaaaaa);

After:
  void aaaaaaaaaaaaaa(aaaaaaaa aaa) override
      AAAAAAAAAAAAAAAAAAAAAAAA(aaaaaaaaaaaaaaa);

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

10 years agoclang-format: Keep more trailing annotations on the same line.
Daniel Jasper [Wed, 9 Apr 2014 10:01:49 +0000 (10:01 +0000)]
clang-format: Keep more trailing annotations on the same line.

More precisely keep all short annotations (<10 characters) on the same
line if possible. Previously, clang-format would only prefer to do so
for "const", "override" and "final". However, it seems to be generally
preferable, especially because some codebases have to wrap those in
macros for backwards compatibility.

Before:
  void someLongFunction(int someLongParameter)
      OVERRIDE {}

After:
  void someLongFunction(
      int someLongParameter) OVERRIDE {}

This fixes llvm.org/PR19363.

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

10 years agoclang-format: Recognize lists ending in trailing commas correctly.
Daniel Jasper [Wed, 9 Apr 2014 09:53:23 +0000 (09:53 +0000)]
clang-format: Recognize lists ending in trailing commas correctly.

Previously, this did not look through trailing comments leading to a few
formatting oddities.

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

10 years agoclang-format: Add proto files and JavaScript to git-clang-format.
Daniel Jasper [Wed, 9 Apr 2014 09:22:35 +0000 (09:22 +0000)]
clang-format: Add proto files and JavaScript to git-clang-format.

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

10 years agoSema::SectionInfo() should have an empty body. Sorry for the breakage.
NAKAMURA Takumi [Wed, 9 Apr 2014 08:26:33 +0000 (08:26 +0000)]
Sema::SectionInfo() should have an empty body. Sorry for the breakage.

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

10 years agoSema::SectionInfo: Prune "default" for now. Defaulted function is unavailable on...
NAKAMURA Takumi [Wed, 9 Apr 2014 07:59:55 +0000 (07:59 +0000)]
Sema::SectionInfo: Prune "default" for now. Defaulted function is unavailable on msc17.

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

10 years agoAdd missing include.
Richard Trieu [Wed, 9 Apr 2014 03:31:44 +0000 (03:31 +0000)]
Add missing include.

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

10 years ago[analyzer] When checking Foundation method calls, match the selectors exactly.
Jordan Rose [Wed, 9 Apr 2014 01:39:22 +0000 (01:39 +0000)]
[analyzer] When checking Foundation method calls, match the selectors exactly.

This also includes some infrastructure to make it easier to build multi-argument
selectors, rather than trying to use string matching on each piece. There's a bit
more setup code, but less cost at runtime.

PR18908

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

10 years ago[MS-ABI] Lit fix for r205810
Warren Hunt [Tue, 8 Apr 2014 22:49:38 +0000 (22:49 +0000)]
[MS-ABI] Lit fix for r205810
On linux strings have different linkage than on windows.  This
patch makes the lit test more general.

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

10 years ago[MS-ABI] Add support for #pragma section and related pragmas
Warren Hunt [Tue, 8 Apr 2014 22:30:47 +0000 (22:30 +0000)]
[MS-ABI] Add support for #pragma section and related pragmas
This patch adds support for the msvc pragmas section, bss_seg, code_seg,
const_seg and data_seg as well as support for __declspec(allocate()).

Additionally it corrects semantics and adds diagnostics for
__attribute__((section())) and the interaction between the attribute
and the msvc pragmas and declspec.  In general conflicts should now be
well diganosed within and among these features.

In supporting the pragmas new machinery for uniform lexing for
msvc pragmas was introduced.  The new machinery always lexes the
entire pragma and stores it on an annotation token.  The parser
is responsible for parsing the pragma when the handling the
annotation token.

There is a known outstanding bug in this implementation in C mode.
Because these attributes and pragmas apply _only_ to definitions, we
process them at the time we detect a definition.  Due to tentative
definitions in C, we end up processing the definition late.  This means
that in C mode, everything that ends up in a BSS section will end up in
the _last_ BSS section rather than the one that was live at the time of
tentative definition, even if that turns out to be the point of actual
definition.  This issue is not known to impact anything as of yet
because we are not aware of a clear use or use case for #pragma bss_seg
but should be fixed at some point.

Differential Revision=http://reviews.llvm.org/D3065#inline-16241

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

10 years agoThread Safety Analysis. Misc fixes to SExpr code, responding to code review
DeLesley Hutchins [Tue, 8 Apr 2014 22:21:22 +0000 (22:21 +0000)]
Thread Safety Analysis.  Misc fixes to SExpr code, responding to code review
by Aaron Ballman.

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

10 years agoFix the funcsig test with an explicit triple
Reid Kleckner [Tue, 8 Apr 2014 18:28:09 +0000 (18:28 +0000)]
Fix the funcsig test with an explicit triple

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

10 years agoAdd support for MSVC's __FUNCSIG__
Reid Kleckner [Tue, 8 Apr 2014 18:13:24 +0000 (18:13 +0000)]
Add support for MSVC's __FUNCSIG__

It is very similar to GCC's __PRETTY_FUNCTION__, except it prints the
calling convention.

Reviewers: majnemer

Differential Revision: http://reviews.llvm.org/D3311

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

10 years agointrin.h: Fix up bugs in the cr3 and msr intrinsics
Reid Kleckner [Tue, 8 Apr 2014 17:49:16 +0000 (17:49 +0000)]
intrin.h: Fix up bugs in the cr3 and msr intrinsics

Don't include input and output regs in clobbers.  Prefix some
identifiers with __.  Add a memory constraint to __readcr3 to prevent
reordering.  This constraint is heavy handed, but conservatively
correct.

Thanks to PaX Team for the suggestions.

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

10 years agoHave validate-system-headers override validate-once-per-build-session
Ben Langmuir [Tue, 8 Apr 2014 15:36:28 +0000 (15:36 +0000)]
Have validate-system-headers override validate-once-per-build-session

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

10 years agoclang-format: Fix incorrect multi-block-parameter computation.
Daniel Jasper [Tue, 8 Apr 2014 14:04:31 +0000 (14:04 +0000)]
clang-format: Fix incorrect multi-block-parameter computation.

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

10 years agoIf a header is explicitly included in module A, and excluded from an umbrella
Richard Smith [Tue, 8 Apr 2014 13:13:04 +0000 (13:13 +0000)]
If a header is explicitly included in module A, and excluded from an umbrella
directory in module B, don't include it in module B!

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

10 years agoclang-format: Correctly understand arrays of pointers.
Daniel Jasper [Tue, 8 Apr 2014 13:07:41 +0000 (13:07 +0000)]
clang-format: Correctly understand arrays of pointers.

Before:
  A<int * []> a;

After:
  A<int *[]> a;

This fixes llvm.org/PR19360.

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

10 years agoclang-format: Extend AllowShortFunctions.. to only merge inline functions.
Daniel Jasper [Tue, 8 Apr 2014 12:46:38 +0000 (12:46 +0000)]
clang-format: Extend AllowShortFunctions.. to only merge inline functions.

Before AllowShortFunctionsOnASingleLine could either be true, merging
all functions, or false, merging no functions. This patch adds a third
value "Inline", which can be used to only merge short functions defined
inline in a class, i.e.:

  void f() {
    return 42;
  }

  class C {
    void f() { return 42; }
  };

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

10 years agoPR19346: Adding 0 to a null pointer has defined behavior in C++. Allow it in constant...
Richard Smith [Tue, 8 Apr 2014 12:19:28 +0000 (12:19 +0000)]
PR19346: Adding 0 to a null pointer has defined behavior in C++. Allow it in constant expressions.

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

10 years agointrin.h: Implement __readmsr, __readcr3, and __writecr3
Reid Kleckner [Tue, 8 Apr 2014 00:28:22 +0000 (00:28 +0000)]
intrin.h: Implement __readmsr, __readcr3, and __writecr3

Fixes PR19301.

Based on a patch from Steven Graf!

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

10 years agoThread Safety Analysis: various fixes to new SExpr code.
DeLesley Hutchins [Mon, 7 Apr 2014 22:56:24 +0000 (22:56 +0000)]
Thread Safety Analysis: various fixes to new SExpr code.
Implemented ownership policy, updated to use nullptr, const-cleanup.

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

10 years agoThread Safety Analysis: fix warning.
DeLesley Hutchins [Mon, 7 Apr 2014 19:51:32 +0000 (19:51 +0000)]
Thread Safety Analysis: fix warning.

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

10 years ago-fms-extensions: Don't define __PRETTY_FUNCTION__ to __FUNCTION__
Reid Kleckner [Mon, 7 Apr 2014 19:27:58 +0000 (19:27 +0000)]
-fms-extensions: Don't define __PRETTY_FUNCTION__ to __FUNCTION__

This reverts r90596 from 2009. Having this macro definition makes Clang
strictly less useful with -fms-extensions.

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

10 years agoThread Safety Analysis: update to internal SExpr handling.
DeLesley Hutchins [Mon, 7 Apr 2014 18:09:54 +0000 (18:09 +0000)]
Thread Safety Analysis: update to internal SExpr handling.
This patch is the first part of a significant refactoring that seeks to restore
sanity to way thread safety analysis deals with capability expressions.  The
current patch merely provides an outline of the structure of the new system.
It's not yet connected to the actual analysis, so there's no change in
functionality.

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

10 years agoMangle the vbptr offset into pointers to member functions
Reid Kleckner [Mon, 7 Apr 2014 18:07:03 +0000 (18:07 +0000)]
Mangle the vbptr offset into pointers to member functions

This can actually be non-zero if you override a function from a virtual
base and you have forced the most_general pointer to member
representation.

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

10 years ago[analyzer] Fix mistake in example for potential checker "posix.Errno".
Jordan Rose [Mon, 7 Apr 2014 16:36:15 +0000 (16:36 +0000)]
[analyzer] Fix mistake in example for potential checker "posix.Errno".

Found by Richard Osbourne!

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

10 years ago[analyzer] Re-enable test I accidentally committed commented-out.
Jordan Rose [Mon, 7 Apr 2014 16:36:08 +0000 (16:36 +0000)]
[analyzer] Re-enable test I accidentally committed commented-out.

Thanks, Alex!

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

10 years agoRevert r205646 (keeping the test in its modified form) as
Fariborz Jahanian [Mon, 7 Apr 2014 16:32:54 +0000 (16:32 +0000)]
Revert r205646 (keeping the test in its modified form) as
it is subsumed by r205521.

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

10 years agoFix a typo introduced in r205716
David Majnemer [Mon, 7 Apr 2014 16:19:27 +0000 (16:19 +0000)]
Fix a typo introduced in r205716

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

10 years agoclang-cl: make /Gw map to -fdata-sections
David Majnemer [Mon, 7 Apr 2014 16:14:38 +0000 (16:14 +0000)]
clang-cl: make /Gw map to -fdata-sections

Note that /Gy no longer implies -fdata-sections.

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

10 years agoFix clang-tidy warning (argument comments don't match parameter names).
Richard Smith [Mon, 7 Apr 2014 15:16:58 +0000 (15:16 +0000)]
Fix clang-tidy warning (argument comments don't match parameter names).

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

10 years agolibclang: add clang_CXXMethod_isConst API that allows to determine if a C++
Dmitri Gribenko [Mon, 7 Apr 2014 14:59:13 +0000 (14:59 +0000)]
libclang: add clang_CXXMethod_isConst API that allows to determine if a C++
member function or member function template is declared 'const'

Patch by Kevin Funk with testcase updates by me.

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

10 years agoUpdated phabricator server.
Serge Pavlov [Mon, 7 Apr 2014 03:39:55 +0000 (03:39 +0000)]
Updated phabricator server.

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

10 years agoDebugInfo: Support type alias templates
David Blaikie [Sun, 6 Apr 2014 17:14:06 +0000 (17:14 +0000)]
DebugInfo: Support type alias templates

We already got the type alias correct (though I've included a test case
here) since Clang represents that like any other typedef - but type
alias templates weren't being handled.

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

10 years agoDebugInfo: emit namespace aliases as named imported declarations instead of named...
David Blaikie [Sun, 6 Apr 2014 06:30:03 +0000 (06:30 +0000)]
DebugInfo: emit namespace aliases as named imported declarations instead of named imported entities

Apparently that's how DWARF4 suggests they be emitted. So let's do that.

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

10 years ago[Frontend] If the module file lock owner have died, try to get the lock again. Needs...
Argyrios Kyrtzidis [Sun, 6 Apr 2014 03:21:44 +0000 (03:21 +0000)]
[Frontend] If the module file lock owner have died, try to get the lock again. Needs llvm r205683.

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

10 years agoReapply r205655, DebugInfo: Place global constants in their appropriate context.
David Blaikie [Sat, 5 Apr 2014 07:46:57 +0000 (07:46 +0000)]
Reapply r205655, DebugInfo: Place global constants in their appropriate context.

This was reverted in 205664 and seems to be fixed by 205668... though
that may be more by accident than anything well founded.

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

10 years agoDebugInfo: Avoid emitting constnants for every use
David Blaikie [Sat, 5 Apr 2014 07:23:17 +0000 (07:23 +0000)]
DebugInfo: Avoid emitting constnants for every use

While the folding set would deduplicate the nodes themselves and LLVM
would handle not emitting the same global twice, it still meant creating
a long/redundant list of global variables.

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

10 years ago[analyzer] Add an ErrnoChecker (PR18701) to the Potential Checkers list.
Jordan Rose [Sat, 5 Apr 2014 06:10:28 +0000 (06:10 +0000)]
[analyzer] Add an ErrnoChecker (PR18701) to the Potential Checkers list.

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

10 years ago[analyzer] Update Open Projects page with BitwiseConstraintManager.
Jordan Rose [Sat, 5 Apr 2014 06:10:22 +0000 (06:10 +0000)]
[analyzer] Update Open Projects page with BitwiseConstraintManager.

Also, add the names of people most recently working on particular projects,
and remove "relate bugs and checkers" (thanks, Alex!).

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

10 years agoAdd a new subgroup to -Wtautological-compare, -Wtautological-overlap-compare,
Richard Trieu [Sat, 5 Apr 2014 05:17:01 +0000 (05:17 +0000)]
Add a new subgroup to -Wtautological-compare, -Wtautological-overlap-compare,
which warns on compound conditionals that always evaluate to the same value.
For instance, (x > 5 && x < 3) will always be false since no value for x can
satisfy both conditions.

This patch also changes the CFG to use these tautological values for better
branch analysis.  The test for -Wunreachable-code shows how this change catches
additional dead code.

Patch by Anders Rönnholm.

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

10 years agoRevert "DebugInfo: Place global constants in their appropriate context."
David Blaikie [Sat, 5 Apr 2014 03:39:29 +0000 (03:39 +0000)]
Revert "DebugInfo: Place global constants in their appropriate context."

This reverts commit r205655.

Breaks the compiler-rt build with an assertion failure in LLVM...
reverting while I investigate.

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

10 years ago[analyzer] Look through temporary destructors when finding a region to construct.
Jordan Rose [Sat, 5 Apr 2014 02:01:41 +0000 (02:01 +0000)]
[analyzer] Look through temporary destructors when finding a region to construct.

Fixes a false positive when temporary destructors are enabled where a temporary
is destroyed after a variable is constructed but before the VarDecl itself is
processed, which occurs when the variable is in the condition of an if or while.

Patch by Alex McCarthy, with an extra test from me.

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

10 years agoObjective-C arc [Sema]. Allow bridge cast of a qualified-id expression
Fariborz Jahanian [Fri, 4 Apr 2014 23:53:45 +0000 (23:53 +0000)]
Objective-C arc [Sema]. Allow bridge cast of a qualified-id expression
when bridged Objective-C type conforms to the protocols in CF types's
Objective-C class. // rdar://16393330

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

10 years agoDebugInfo: Place global constants in their appropriate context.
David Blaikie [Fri, 4 Apr 2014 23:16:44 +0000 (23:16 +0000)]
DebugInfo: Place global constants in their appropriate context.

We also don't need to duplicate the name in the LinkageName field. Just
leave it empty.

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

10 years agoTry harder about not suggesting methods as corrections when they
Kaelyn Takata [Fri, 4 Apr 2014 22:16:30 +0000 (22:16 +0000)]
Try harder about not suggesting methods as corrections when they
obviously won't work. Specifically, don't suggest methods (static or
not) from unrelated classes when the expression is a method call
through a specific object.

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

10 years agoDebugInfo: PR19298: function local const variables duplicated in the root scope
David Blaikie [Fri, 4 Apr 2014 20:56:17 +0000 (20:56 +0000)]
DebugInfo: PR19298: function local const variables duplicated in the root scope

See the comment for CodeGenFunction::tryEmitAsConstant that describes
how in some contexts (lambdas) we must not emit references to the
variable, but instead use the constant directly - because of this we end
up emitting a constant for the variable, as well as emitting the
variable itself.

Should we just skip putting the variable on the stack at all and omit
the debug info for the constant? It's not clear to me - what if the
address of the local is taken?

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

10 years agoDriver: add target definition for Windows on ARM
Saleem Abdulrasool [Fri, 4 Apr 2014 20:31:19 +0000 (20:31 +0000)]
Driver: add target definition for Windows on ARM

This introduces the definitions needed for the Windows on ARM target.  Add
target definitions for both the MSVC environment and the MSVC + Itanium C++ ABI
environment.  The Visual Studio definitions correspond to the definitions
provided by Visual Studio 2012.

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

10 years agoVector [Sema]. Vector "splats" which are truncated should have a warning
Fariborz Jahanian [Fri, 4 Apr 2014 19:33:39 +0000 (19:33 +0000)]
Vector [Sema]. Vector "splats" which are truncated should have a warning
with -Wconversion. // rdar://16502418

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

10 years agoAdd a test where the module map is overriden in the vfs
Ben Langmuir [Fri, 4 Apr 2014 16:42:53 +0000 (16:42 +0000)]
Add a test where the module map is overriden in the vfs

Specifically, we pass two -ivfsoverlay yaml files, and the topmost one
remaps the module map file.

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

10 years agoIn preparation for being able to use simple Boolean logic expressions involving capab...
Aaron Ballman [Fri, 4 Apr 2014 15:13:57 +0000 (15:13 +0000)]
In preparation for being able to use simple Boolean logic expressions involving capabilities, the semantics for attributes now looks through the types of the constituent parts of a capability expression instead of at the aggregate expression type.

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

10 years agoWhen printing types for the OpenCL kernel metadata, use the PrintingPolicy.
Joey Gouly [Fri, 4 Apr 2014 13:43:57 +0000 (13:43 +0000)]
When printing types for the OpenCL kernel metadata, use the PrintingPolicy.

This allows 'half' to be printed as 'half' and not as '__fp16'.

Patch by Fraser Cormack!

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

10 years ago[OPENMP][C++11] Renamed loop vars properly.
Alexey Bataev [Fri, 4 Apr 2014 10:02:14 +0000 (10:02 +0000)]
[OPENMP][C++11] Renamed loop vars properly.

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

10 years agoclang-format: Don't merge simple blocks in case statements.
Daniel Jasper [Fri, 4 Apr 2014 06:46:23 +0000 (06:46 +0000)]
clang-format: Don't merge simple blocks in case statements.

Before:
  switch (a) {
  case 1: { return 'a'; }
  }

After:
  switch (a) {
  case 1: {
    return 'a';
  }
  }

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

10 years agoBasic: rename VisualStudio to Windows
Saleem Abdulrasool [Fri, 4 Apr 2014 05:08:53 +0000 (05:08 +0000)]
Basic: rename VisualStudio to Windows

Visual Studio is the Integrated Development Environment.  The toolchain is
generally referred to MSVC.  Rename the target information to be more precise as
per the recommendation of Reid Kleckner.

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

10 years agoExtend -Wtautological-constant-out-of-range-compare to handle boolean values
Richard Trieu [Fri, 4 Apr 2014 04:13:47 +0000 (04:13 +0000)]
Extend -Wtautological-constant-out-of-range-compare to handle boolean values
better.  This warning will now trigger on the following conditionals:

bool b;
int i;

if (b > 1) {}  // always false
if (0 <= (i > 5)) {} // always true
if (-1 > b) {} // always false

Patch by Per Viberg.

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

10 years agoCodeGen: Don't create branch weight metadata from empty profiles
Justin Bogner [Fri, 4 Apr 2014 02:48:51 +0000 (02:48 +0000)]
CodeGen: Don't create branch weight metadata from empty profiles

If all of our weights are zero when calculating branch weights, it
means we haven't profiled the code in question. Avoid creating a
metadata node that says all branches are equally likely in this case.

The test also checks constructs that hit the other createBranchWeights
overload. These were already working.

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

10 years agoAdd clang-cl alias to allow users to disable c4005
Reid Kleckner [Fri, 4 Apr 2014 01:36:55 +0000 (01:36 +0000)]
Add clang-cl alias to allow users to disable c4005

If we ever want three or more aliases, at that point we should put MSVC
warning ids in DiagnosticGroups.td.  We can use that to support #pragma
warning.

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

10 years agoPut macro redefinition warnings under -Wmacro-redefined
Reid Kleckner [Fri, 4 Apr 2014 00:17:16 +0000 (00:17 +0000)]
Put macro redefinition warnings under -Wmacro-redefined

This is consistent with -Wbuiltin-macro-redefined, and puts this common
extension warning under a flag.

Reviewers: rsmith

Differential Revision: http://llvm-reviews.chandlerc.com/D3283

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

10 years agoTurn off -Wmissing-noreturn warning for blocks
Fariborz Jahanian [Thu, 3 Apr 2014 23:06:35 +0000 (23:06 +0000)]
Turn off -Wmissing-noreturn warning for blocks
as there is no way to attach this attribute to the
block literal. // rdar://16274746

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

10 years agovector [Sema]. Check for proper use of 's' char prefix
Fariborz Jahanian [Thu, 3 Apr 2014 19:43:01 +0000 (19:43 +0000)]
vector [Sema]. Check for proper use of 's' char prefix
(which indicates vector expression is a string of hex
values) instead of crashing in code gen. // rdar://16492792

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

10 years ago-fms-extensions: Error out on #pragma init_seg
Reid Kleckner [Thu, 3 Apr 2014 19:04:24 +0000 (19:04 +0000)]
-fms-extensions: Error out on #pragma init_seg

By ignoring this pragma with a warning, we're essentially miscompiling
the user's program.  WebKit / Blink use this pragma to disable dynamic
initialization and finalization of some static data, and running the
dtors crashes the program.

Error out for now, so that /fallback compiles the TU correctly with
MSVC.  This pragma should be implemented some time this month, and we
can remove this hack.

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

10 years agoRevert r205436:
Roman Divacky [Thu, 3 Apr 2014 18:04:52 +0000 (18:04 +0000)]
Revert r205436:

        Extend the SSE2 comment lexing to AVX2. Only 16byte align when not on AVX2.

        This provides some 3% speedup when preprocessing gcc.c as a single file.

The patch is wrong, it always uses SSE2, and when I fix that there's no speedup
at all. I am not sure where the 3% came from previously.

--Thi lie, and those below, will be ignored--

M    Lex/Lexer.cpp

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

10 years agoTeach getTemplateInstantiationPattern to deal with generic lambdas.
Faisal Vali [Thu, 3 Apr 2014 16:32:21 +0000 (16:32 +0000)]
Teach getTemplateInstantiationPattern to deal with generic lambdas.

No functionality change.

When determining the pattern for instantiating a generic lambda call operator specialization - we must not go drilling down for the 'prototype' (i.e. as written) pattern - rather we must use our partially transformed  pattern (whose DeclRefExprs are wired correctly to any enclosing lambda's decls that should be mapped correctly in a local instantiation scope) that is the templated pattern of the specialization's primary template (even though the primary template might be instantiated from a 'prototype' member-template).  Previously, the drilling down was haltted by marking the instantiated-from primary template as a member-specialization (incorrectly).

This prompted Richard to remark (http://llvm-reviews.chandlerc.com/D1784?id=4687#inline-10272)
"It's a bit nasty to (essentially) set this bit incorrectly. Can you put the check into getTemplateInstantiationPattern instead?"

In my reckless youth, I chose to ignore that comment.  With the passage of time, I have come to learn the value of bowing to the will of the angry Gods ;)

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

10 years agoCode cleanup (re-indent)
Logan Chien [Thu, 3 Apr 2014 13:12:44 +0000 (13:12 +0000)]
Code cleanup (re-indent)

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

10 years agoRevert "Add support for named values in the parser."
Samuel Benzaquen [Thu, 3 Apr 2014 12:50:47 +0000 (12:50 +0000)]
Revert "Add support for named values in the parser."
This was submitted before it was ready.

This reverts commit 62060a01e095cf35eb9ca42a333752d12714f35c.

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

10 years agoclang-format: Prefer an additional line-break over hanging indent.
Daniel Jasper [Thu, 3 Apr 2014 12:00:33 +0000 (12:00 +0000)]
clang-format: Prefer an additional line-break over hanging indent.

Don't allow the RHS of an operator to be split over multiple
lines unless there is a line-break right after the operator.

Before:
  if (aaaa && bbbbb || // break
                  cccc) {
  }

After:
  if (aaaa &&
      bbbbb || // break
          cccc) {
  }

In most cases, this seems to increase readability.

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

10 years agox
Daniel Jasper [Thu, 3 Apr 2014 12:00:27 +0000 (12:00 +0000)]
x

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

10 years agoImproved semantics for implicit scalar -> extvector conversions.
Stephen Canon [Thu, 3 Apr 2014 10:33:25 +0000 (10:33 +0000)]
Improved semantics for implicit scalar -> extvector conversions.

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

10 years agoclang-format: Understand that "auto" is a type.
Daniel Jasper [Thu, 3 Apr 2014 09:00:49 +0000 (09:00 +0000)]
clang-format: Understand that "auto" is a type.

Before:
  MACRO(auto * a);

After:
  MACRO(auto *a);

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

10 years ago[OPENMP] Small update for C++11
Alexey Bataev [Thu, 3 Apr 2014 02:55:46 +0000 (02:55 +0000)]
[OPENMP] Small update for C++11

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

10 years agoAllow ASTFile to be reset to null
Ben Langmuir [Thu, 3 Apr 2014 00:14:16 +0000 (00:14 +0000)]
Allow ASTFile to be reset to null

Which we do in removeModules().

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

10 years agoCodeGen: Emit some functions as weak_odr under -fms-compatibility
David Majnemer [Wed, 2 Apr 2014 23:17:29 +0000 (23:17 +0000)]
CodeGen: Emit some functions as weak_odr under -fms-compatibility

Summary:
MSVC always emits inline functions marked with the extern storage class
specifier.  The result is something similar to the opposite of
__attribute__((gnu_inline)).

This extension is also available in C.

This fixes PR19264.

Reviewers: rnk, rsmith

CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D3207

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

10 years agoObjective-C [IRGen]. Add encoding for 'weak' attribute of a
Fariborz Jahanian [Wed, 2 Apr 2014 22:49:42 +0000 (22:49 +0000)]
Objective-C [IRGen]. Add encoding for 'weak' attribute of a
'readonly' property. // rdar://16136439

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

10 years agoIf a using-declaration names a class member, but appears outside a class, try
Richard Smith [Wed, 2 Apr 2014 21:44:35 +0000 (21:44 +0000)]
If a using-declaration names a class member, but appears outside a class, try
to suggest a different syntax to get the same effect.

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

10 years agoPR19305: Don't issue -Wunused-variable warnings on variable templates. It's not
Richard Smith [Wed, 2 Apr 2014 18:28:36 +0000 (18:28 +0000)]
PR19305: Don't issue -Wunused-variable warnings on variable templates. It's not
meaningful to odr-use the VarDecl inside a variable template. (Separately, it'd
be nice to track referenced-ness for templates, and warn on unused ones, but
that's really a distinct issue...)

Move a test that generates and tests a warning-suppressing error out to its own
test file, so it doesn't have weird effects on the other tests in the same file.

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

10 years agoDebugInfo: Include default template arguments in template type names
David Blaikie [Wed, 2 Apr 2014 18:21:09 +0000 (18:21 +0000)]
DebugInfo: Include default template arguments in template type names

This was committed 4 years ago in 108916 with insufficient testing to
explain why the "getTypeAsWritten" case was appropriate. Experience says
that it isn't - the presence or absence of an explicit instantiation
declaration was causing this code to generate either i<int> or i<int,
int>.

That didn't seem to be a useful distinction, and omitting the template
arguments was destructive to debuggers being able to associate the two
types across translation units or across compilers (GCC, reasonably,
never omitted the arguments).

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

10 years agoExtend the SSE2 comment lexing to AVX2. Only 16byte align when not on AVX2.
Roman Divacky [Wed, 2 Apr 2014 17:27:03 +0000 (17:27 +0000)]
Extend the SSE2 comment lexing to AVX2. Only 16byte align when not on AVX2.

This provides some 3% speedup when preprocessing gcc.c as a single file.

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

10 years agoAdd matcher for ExprWithCleanups.
Samuel Benzaquen [Wed, 2 Apr 2014 13:12:14 +0000 (13:12 +0000)]
Add matcher for ExprWithCleanups.

Summary: Add matcher for ExprWithCleanups.

Reviewers: klimek

CC: cfe-commits, klimek
Differential Revision: http://llvm-reviews.chandlerc.com/D3248

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

10 years agoAdd support for named values in the parser.
Samuel Benzaquen [Wed, 2 Apr 2014 13:11:45 +0000 (13:11 +0000)]
Add support for named values in the parser.

Summary:
Add support for named values in the parser.
This allows injection of arbitrary constants using a custom Sema object.
Completions are not supported right now.

Will be used by clang_query to support the 'let' command.
Usage example:
  clang_query> let unique_ptr recordDecl(hasName("unique_ptr"))
  clang_query> match varDecl(hasType(unique_ptr))

Reviewers: klimek, pcc

CC: cfe-commits, klimek
Differential Revision: http://llvm-reviews.chandlerc.com/D3229

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

10 years agoSome more anonymous namespace diagnostics to switch to ()
David Blaikie [Wed, 2 Apr 2014 06:18:49 +0000 (06:18 +0000)]
Some more anonymous namespace diagnostics to switch to ()

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

10 years agoRender anonymous entities as '(anonymous <thing>)' (and lambdas as '(lambda at ....
David Blaikie [Wed, 2 Apr 2014 05:58:29 +0000 (05:58 +0000)]
Render anonymous entities as '(anonymous <thing>)' (and lambdas as '(lambda at ... )')

For namespaces, this is consistent with mangling and GCC's debug info
behavior. For structs, GCC uses <anonymous struct> but we prefer
consistency between all anonymous entities but don't want to confuse
them with template arguments, etc, so we'll just go with parens in all
cases.

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

10 years agoAdd the location of Decls to ast dump.
David Blaikie [Wed, 2 Apr 2014 05:48:29 +0000 (05:48 +0000)]
Add the location of Decls to ast dump.

While investigating some debug info issues, Eric and I came across a
particular template case where the location of a decl was quite
different from the range of the same decl. It might've been rather
helpful if the dumper had actually showed us this.

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

10 years agoFix type mismatch assertion related to inalloca and PR19287
Reid Kleckner [Wed, 2 Apr 2014 00:16:53 +0000 (00:16 +0000)]
Fix type mismatch assertion related to inalloca and PR19287

Augment the test case from r205217 to catch this related bug.

Fixes the Windows self-host which was failing on VariantValue.cpp.

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

10 years agoHarden this test against windows/changes.
Eric Christopher [Tue, 1 Apr 2014 22:54:59 +0000 (22:54 +0000)]
Harden this test against windows/changes.

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

10 years agoPartially revert r204517 and fix a different way:
Eric Christopher [Tue, 1 Apr 2014 22:25:28 +0000 (22:25 +0000)]
Partially revert r204517 and fix a different way:

We don't want to encourage the code to emit a lexical block for
a function that needs one in order for the line table to change,
we need to grab the line information from the body of the pattern
that we were instantiated from, this code should do that.

Modify the test case to ensure that we're still looking in the
right place for all of the scopes and also that we haven't
created a lexical block where we didn't need one.

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

10 years agoUpdating the capability attribute diagnostics to be more capability-neutral. Instead...
Aaron Ballman [Tue, 1 Apr 2014 21:43:23 +0000 (21:43 +0000)]
Updating the capability attribute diagnostics to be more capability-neutral. Instead of using terminology such as "lock", "unlock" and "locked", the new terminology is "acquire", "release" and "held". Additionally, the capability attribute's name argument is now reported as part of the diagnostic, instead of hard coding as "mutex."

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

10 years agoObjective-C modern translator. Fix declaration of
Fariborz Jahanian [Tue, 1 Apr 2014 19:32:35 +0000 (19:32 +0000)]
Objective-C modern translator. Fix declaration of
__NSConstantStringImpl's length field to accomodate
window's 64bit LLP64 mode. // rdar://16489050

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

10 years agoSimplify FunctionDecl::getMinRequiredArguments().
Richard Smith [Tue, 1 Apr 2014 19:18:16 +0000 (19:18 +0000)]
Simplify FunctionDecl::getMinRequiredArguments().

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

10 years agoFix self-referential comment.
Richard Smith [Tue, 1 Apr 2014 18:33:50 +0000 (18:33 +0000)]
Fix self-referential comment.

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

10 years agoMore tests for DR1.
Richard Smith [Tue, 1 Apr 2014 18:32:16 +0000 (18:32 +0000)]
More tests for DR1.

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

10 years agoDebug info: fix a crash when emitting IndirectFieldDecls, which were
Adrian Prantl [Tue, 1 Apr 2014 17:52:06 +0000 (17:52 +0000)]
Debug info: fix a crash when emitting IndirectFieldDecls, which were
previously not handled at all.
rdar://problem/16348575

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

10 years ago[analyzer] Extract a helper for finding the target region for a C++ constructor.
Jordan Rose [Tue, 1 Apr 2014 16:40:06 +0000 (16:40 +0000)]
[analyzer] Extract a helper for finding the target region for a C++ constructor.

No functionality change.

Patch by Alex McCarthy!

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

10 years ago[analyzer] Remove incorrect workaround for unimplemented temporary destructors.
Jordan Rose [Tue, 1 Apr 2014 16:39:59 +0000 (16:39 +0000)]
[analyzer] Remove incorrect workaround for unimplemented temporary destructors.

If we're trying to get the zero element region of something that's not a region,
we should be returning UnknownVal, which is what ProgramState::getLValue will
do for us.

Patch by Alex McCarthy!

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

10 years ago[analyzer] Fix a CFG printing bug.
Jordan Rose [Tue, 1 Apr 2014 16:39:33 +0000 (16:39 +0000)]
[analyzer] Fix a CFG printing bug.

Also, add several destructor-related tests. Most of them don't work yet, but it's
good to have them recorded.

Patch by Alex McCarthy!

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

10 years agoFixing the MSVC 2012 build bot, which cannot do initializer lists yet. Amends r205307.
Aaron Ballman [Tue, 1 Apr 2014 16:30:35 +0000 (16:30 +0000)]
Fixing the MSVC 2012 build bot, which cannot do initializer lists yet. Amends r205307.

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