Граф коммитов

42824 Коммитов

Автор SHA1 Сообщение Дата
Eric Christopher 025b3d4f52 Make logic smaller.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175839 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-22 00:24:40 +00:00
Michael Gottesman 644367c198 Added a footnote to the documentation for objc_storeStrong that makes it clear
that a __strong object of block type is a valid argument to objc_storeStrong but
that an objc_retain and not an objc_retainBlock will be emitted.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175838 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-22 00:16:48 +00:00
Aaron Ballman c9088966de Removing has_getDecl (added in r175532). It cause a build break for MSVC, and was not yet being used in the codebase. If we start using std::enable_if, we can look into resurrecting the idea in a more portable fashion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175837 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-22 00:15:31 +00:00
Bill Wendling 94236e7393 Apply the 'nobuiltin' attribute to call sites when the user specifies `-fno-builtin' on the command line.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175836 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-22 00:13:35 +00:00
Bill Wendling 0c67fc9c2e Make for x86 to stop it failing on ARM buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175834 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-22 00:04:55 +00:00
Eric Christopher 168c96d428 Grammar.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175833 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-22 00:03:08 +00:00
Jordan Rose 9f1d541ef1 [analyzer] Make sure a temporary object region matches its initial bindings.
When creating a temporary region (say, when a struct rvalue is used as
the base of a member expr), make sure we account for any derived-to-base
casts. We don't actually record these in the LazyCompoundVal that
represents the rvalue, but we need to make sure that the temporary region
we're creating (a) matches the bindings, and (b) matches its expression.

Most of the time this will do exactly the same thing as before, but it
fixes spurious "garbage value" warnings introduced in r175234 by the use
of lazy bindings to model trivial copy constructors.

<rdar://problem/13265460>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175830 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-21 23:57:17 +00:00
John McCall 3892d022f3 Ignore visibility from enclosing template arguments
for explicit member specializations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175827 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-21 23:42:58 +00:00
David Blaikie df1f94ebfa Simplify code to use castAs rather than getAs + assert.
Post commit review feedback on r175812 from Jordan Rose.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175826 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-21 23:35:06 +00:00
David Blaikie 3c16431cb9 Fix copy/paste to refer to the relevant type (ProgramPoint instead of TypeLoc).
Post commit review feedback on r175812 from Jordan Rose.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175825 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-21 23:35:03 +00:00
NAKAMURA Takumi 1c885a5889 clang/test/Driver/qa_override.c: Appease gcc-driver.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175824 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-21 23:17:45 +00:00
Richard Smith b83a5d8fb2 Fix typo 'with with' in diagnostic.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175823 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-21 23:15:05 +00:00
David Blaikie e13001441f Add back implicitly dropped const.
(found due to incoming improvements to llvm::cast machinery that will error on
this sort of mistake)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175817 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-21 22:37:44 +00:00
Eric Christopher be5f1be4cf Fix formatting and tabs in file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175815 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-21 22:35:08 +00:00
Eric Christopher f870e12f23 Don't pass -split-dwarf= to the backend unless we're on linux for
now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175814 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-21 22:35:05 +00:00
Eric Christopher 59320e770f Remove the SplitDebug action and replace with a set of commands
in the compilation setup. Note that this doesn't currently
work for -no-integrated-as.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175813 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-21 22:35:01 +00:00
David Blaikie 7a95de68c0 Replace ProgramPoint 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@175812 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-21 22:23:56 +00:00
Ted Kremenek 94f3f549a7 Remove superfluous null pointer check. The pointer is used prior to this check.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175807 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-21 22:10:49 +00:00
Dmitri Gribenko 4216ee1ed9 AST dumping: dump template instantiations only once
Fixes infinite loop in PR15220.

Patch by Philip Craig.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175805 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-21 22:01:10 +00:00
Daniel Jasper 1c1303b1fa Remove accidentally introduced no-op line.
Was used during experiments, but another if-statements a few lines
before makes it (intentionally) useless.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175803 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-21 21:40:48 +00:00
Ted Kremenek 63631bd173 Teach serialized diagnostics about notes without locations.
Along the way, improve a diagnostic for "previous declaration here" for implicit parameters.

Fixes <rdar://problem/13211384>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175802 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-21 21:40:44 +00:00
Daniel Jasper f11a705c60 Consistently put {} onto the same line for empty functions.
This fixes llvm.org/PR15167.

Before:
LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL()
    : AAAAAAAA(10), BBBBBBBBB(10) {
}
LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL() : AAAAAAAA(10) {}

After:
LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL()
    : AAAAAAAA(10), BBBBBBBBB(10) {}
LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL() : AAAAAAAA(10) {}

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175800 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-21 21:33:55 +00:00
David Blaikie fdf6a279c9 Replace CFGElement 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@175796 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-21 20:58:29 +00:00
Fariborz Jahanian 05f8ff134d Patch for debug info of qualified-id types is 'id'
By Adrian Pranti.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175793 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-21 20:42:11 +00:00
Benjamin Kramer 51d1095adf Try to fix the test for cmake builds, where clang is called clang-3.3.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175791 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-21 20:30:05 +00:00
Ted Kremenek 47135fe346 [scan-build] Add quotes around clang executable name to handle path withs spaces. Fixes <rdar://problem/13254727>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175790 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-21 20:28:59 +00:00
Bill Wendling 478bbf3171 Try to get buildbots to pass these tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175784 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-21 19:44:18 +00:00
Ted Kremenek c73dcba918 [scan-build] fix xcode version parsing to handle dot releases. Fixes <rdar://problem/13265300>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175781 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-21 19:33:30 +00:00
Chad Rosier 79165b82dd [driver] Handle the processing of the QA_OVERRIDE_GCC3_OPTIONS and CCC_ADD_ARGS
before the DiagnosticsEngine is instantiated.  Otherwise, warning options are
not handled correctly.
rdar://13254743

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175779 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-21 18:56:55 +00:00
Jordan Rose 6aad4a31b3 Preprocessor: preserve whitespace in -traditional-cpp mode.
Note that unlike GNU cpp we currently do not preserve whitespace in macros
(even in -traditional-cpp mode).

<rdar://problem/12897179>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175778 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-21 18:53:19 +00:00
Chad Rosier 649aa6adc4 [driver] Add a dump method for ArgList.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175777 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-21 18:40:49 +00:00
Daniel Jasper 7d81281fc3 Allow breaking between type and name in for loops.
This fixes llvm.org/PR15033.

Also: Always break before a parameter, if the previous parameter was
split over multiple lines. This was necessary to make the right
decisions in for-loops, almost always makes the code more readable and
also fixes llvm.org/PR14873.

Before:
for (llvm::ArrayRef<NamedDecl *>::iterator I = FD->getDeclsInPrototypeScope()
         .begin(), E = FD->getDeclsInPrototypeScope().end();
     I != E; ++I) {
}
foo(bar(bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb,
        ccccccccccccccccccccccccccccc), d, bar(e, f));

After:
for (llvm::ArrayRef<NamedDecl *>::iterator
         I = FD->getDeclsInPrototypeScope().begin(),
         E = FD->getDeclsInPrototypeScope().end();
     I != E; ++I) {
}
foo(bar(bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb,
        ccccccccccccccccccccccccccccc),
    d, bar(e, f));

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175741 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-21 15:00:29 +00:00
Evgeniy Stepanov 3aada3c305 Add MSan to the list of targets in Makefile-based builds.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175738 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-21 13:59:14 +00:00
Joey Gouly ff04dd4eff Add a 64-bit triple to these tests, to fix 32-bit bots.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175736 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-21 13:42:33 +00:00
Joey Gouly b965d8baf9 Fix an OpenCL test case. Pointer arguments to kernels must be declared with the
__global, __constant or __local qualifier.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175735 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-21 12:06:32 +00:00
Joey Gouly 52e933b0c3 Add support to Sema and CodeGen for floating point vector types in OpenCL.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175734 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-21 11:49:56 +00:00
David Blaikie 4d8fe830d5 Correct spelling of 'enumerator'.
Post commit code review feedback to r175705 from Jordan Rose.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175725 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-21 06:12:38 +00:00
David Blaikie 0adb175023 Avoid implicit conversions of Optional<T> to bool.
This is a precursor to making Optional<T>'s operator bool 'explicit' when
building Clang & LLVM as C++11.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175722 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-21 06:05:05 +00:00
NAKAMURA Takumi 6d35b412fc StaticAnalyzer/Core: Suppress warnings. [-Wunused-variable, -Wunused-function]
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175721 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-21 04:40:10 +00:00
NAKAMURA Takumi 79741c49fc Whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175720 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-21 04:40:04 +00:00
Jordan Rose 4411b423e9 [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
2013-02-21 03:12:32 +00:00
Jordan Rose 0cd3142cc5 [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
2013-02-21 03:12:26 +00:00
Jordan Rose 472b0613ff [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
2013-02-21 03:12:21 +00:00
NAKAMURA Takumi 4a3012d4dd 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
2013-02-21 02:32:34 +00:00
Richard Smith 9f6e910617 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
2013-02-21 02:17:58 +00:00
Nick Lewycky 75f6a66f9a 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
2013-02-21 02:02:50 +00:00
David Blaikie 66874fb18a 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
2013-02-21 01:47:18 +00:00
David Blaikie 65124fe81f 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
2013-02-21 01:47:08 +00:00
Jordan Rose 11f0cae4bf [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
2013-02-21 01:34:51 +00:00
Ted Kremenek 943f909ba7 Strip 'llvm' from 'llvm::Optional' uses.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175701 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-21 01:29:01 +00:00