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

26355 Коммитов

Автор SHA1 Сообщение Дата
Francois Pichet a9150cdac3 Adding a line for XFAIL win32 broke the test.
Remove a line: this test is line position sensitive.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122231 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-20 05:53:40 +00:00
Francois Pichet d8039129f3 XFAIL vtable-debug-info.cpp on WIN32 and fix curly brace.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122230 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-20 05:44:28 +00:00
Francois Pichet f453fca064 test/PCH/reloc.c fails on Win32.
XFAIL for now, I'll investigate why later.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122229 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-20 04:36:21 +00:00
Francois Pichet 743d9ad3a4 Disable this test on Windows; it crashes and popup an dialog on each lit test run.
I have no idea how to fix it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122227 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-20 04:14:03 +00:00
Francois Pichet 913b7bf8c4 Emit an error if operator __uuidof() is called on a type with no associated GUID.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122226 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-20 03:51:03 +00:00
Douglas Gregor 7536dd5e6c Introduce a new type, PackExpansionType, to capture types that are
pack expansions, e.g. given

  template<typename... Types> struct tuple;

  template<typename... Types>
  struct tuple_of_refs {
    typedef tuple<Types&...> types;
  };

the type of the "types" typedef is a PackExpansionType whose pattern
is Types&. 

This commit introduces support for creating pack expansions for
template type arguments, as above, but not for any other kind of pack
expansion, nor for any form of instantiation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122223 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-20 02:24:11 +00:00
Francois Pichet d3d3be9bc7 Validate Microsoft's uuid attribute string.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122220 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-20 01:41:49 +00:00
Nick Lewycky 403ba3522d Add missing standard includes. Patch by Joerg Sonnenberger!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122194 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-19 20:49:25 +00:00
Wesley Peck 276fdf4080 1. Add some ABI information for the Microblaze.
2. Add attibutes "interrupt_handler" and "save_volatiles" for the Microblaze target.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122184 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-19 19:57:51 +00:00
Francois Pichet 11542141e3 Add support for the Microsoft uuid attribute:
example:
struct __declspec(uuid("6d5140c1-7436-11ce-8034-00aa006009fa"))
test { };


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122173 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-19 06:50:37 +00:00
John McCall e6a365d772 Motions towards simplifying how we deal with attribute-qualified function types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122162 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-19 02:44:49 +00:00
Zhongxing Xu f45fbad13e If the initializer is an rvalue and the variable is a const reference,
create a temporary object for it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122161 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-19 02:26:37 +00:00
Zhongxing Xu 9c2bac02c1 The evaluation of dereference and address-of is identical.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122146 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-18 05:16:43 +00:00
Michael J. Spencer d5b08bee79 Replace all uses of PathV1::get{Basename,Dirname,Suffix} with their PathV2 equivalents.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122140 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-18 04:13:32 +00:00
John McCall 2b364a43f5 Fix test. I added one last test and then forget to re-check.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122137 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-18 03:52:04 +00:00
John McCall 7f1b98760d Apply attributes to explicit specializations. Specializations which
don't provide their own explicit visibility attributes should get them
from the template.  Fixes rdar://problem/8778497.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122136 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-18 03:30:47 +00:00
Michael J. Spencer 472ccff00c Replace all uses of PathV1::getLast with PathV2::filename.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122117 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-18 00:19:12 +00:00
Eric Christopher df344dfb66 Going back to the drawing board with these two awful hacks.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122096 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-17 22:46:41 +00:00
Fariborz Jahanian dd4430e596 Warn when synthesizing a property which is
implicitly atomic under -Wimplicit-atomic-properties
flag. // rdar://8774580


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122095 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-17 22:28:16 +00:00
Michael J. Spencer 74cae0c64d Fix spelling.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122088 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-17 21:22:33 +00:00
Michael J. Spencer 256053b31e Replace all uses of PathV1::isAbsolute with PathV2::is_{absolute,relative}.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122087 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-17 21:22:22 +00:00
Bill Wendling 854fc56c95 Initialize variables in the correct order.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122084 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-17 19:53:28 +00:00
Douglas Gregor 2bde8273eb Encapsulate TemplateArgument::Kind
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122083 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-17 19:31:15 +00:00
Eric Christopher 2c5c313528 Horrible hack for systems that use -dumpversion with clang to expect versions
that match gcc versions. Eew.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122080 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-17 19:13:21 +00:00
Eric Christopher 154f251c6f Nom nom nom, tasty unused option with an argument.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122079 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-17 19:12:09 +00:00
Douglas Gregor c7b5ed6da7 Swap the order of the condition and body of a do-while statement in
the AST, so that we visit them in source order. Fixes <rdar://problem/8779113>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122062 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-17 16:18:04 +00:00
Abramo Bagnara 320e153dbc Use hasSameType to compare types for equality.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122058 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-17 15:49:53 +00:00
Abramo Bagnara bbca85d14c Avoid to emit redundant implicit cast for enum constants init expressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122056 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-17 12:21:11 +00:00
Ted Kremenek 28d5b72419 Update checker build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122051 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-17 07:56:27 +00:00
Ted Kremenek cb9cebc5ae Remove explicit summaries from retain/release
checker that are automatically handled now
by the Cocoa conventions logic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122047 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-17 07:12:00 +00:00
Ted Kremenek 5eef59ee77 Fix assertion failure in cocoa::deriveNamingConvention()
when the selector is the string 'mutable'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122046 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-17 07:11:57 +00:00
Chris Lattner b321c0c0ba fix typo
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122041 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-17 05:40:22 +00:00
Ted Kremenek bb8fef382a Move CocoaConventions.[h,cpp] from libChecker
to libAnalysis.  Similar to Format (format string checking), 
CocoaConventions has the
potential to serve clients other than the
static analyzer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122040 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-17 05:21:58 +00:00
Ted Kremenek af86b0c160 Revise Cocoa conventions detection: 'copy' and 'mutableCopy'
only indicates the create rule if it starts
at the beginning of the method name, not
within the method name.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122036 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-17 04:44:43 +00:00
Ted Kremenek 0a3ed3143b Rename several methods/functions in the analyzer
to start with lowercase characters.  No
functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122035 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-17 04:44:39 +00:00
John McCall 9c39acfda8 Give hidden visibility to RTTI for derived types. This is kindof a hacky
way to do this, but it fixes rdar://problem/8778973



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122033 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-17 02:58:03 +00:00
Francois Pichet 2e219b8d25 Microsoft's __uuidof operator returns a lvalue. Part 2.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122030 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-17 02:38:13 +00:00
Francois Pichet ecea19f00a Microsoft's __uuidof operator returns a lvalue.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122021 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-17 02:00:06 +00:00
Michael J. Spencer 0de5786381 Getting Started: Add VS2010 instructions and specify an out of source build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122003 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-16 22:01:14 +00:00
John McCall 1bc80af703 Do lvalue-to-rvalue conversions on the LHS of a shift operator.
Fixes rdar://problem/8776586.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121992 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-16 19:28:59 +00:00
Douglas Gregor a669c534cf Add tests checking for unexpanded parameter packs in declarations that
occur within statements. Teach Sema::ActOnExceptionDeclarator() to
check for unexpanded parameter packs in the exception type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121984 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-16 17:48:04 +00:00
Douglas Gregor 099ffe8126 Tweak a comment
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121979 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-16 17:19:19 +00:00
Douglas Gregor 4d2abba63e Delay the check for unexpanded parameter packs in the types of
non-type template parameters until we know that we have an actual
template declaration of some sort. This cannot be tested yet, but will
become important when we have template template parameter packs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121967 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-16 15:36:43 +00:00
Douglas Gregor 781def075d Check for unexpanded parameter packs in non-type template parameter types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121964 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-16 08:56:23 +00:00
Douglas Gregor 01dbb3b663 Revert r121961, which seems to be breaking the buildbots and my local tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121963 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-16 08:51:25 +00:00
Douglas Gregor 6f52675ec4 Check for unexpanded parameter packs in default arguments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121962 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-16 08:48:57 +00:00
Ted Kremenek 7dd3c73b7d Tweak location of diagnostic for -Wunreachable-code
test due to recent changes to the CFG.  The
diagnostic is somewhat in the wrong place, but
the -Wunreachable-code diagnostic needs to be
revamped anyway since most of the diagnostics
in this test case are redundant.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121961 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-16 08:22:16 +00:00
Ted Kremenek 892697dd22 Start migration of static analyzer to using the
implicit lvalue-to-rvalue casts that John McCall
recently introduced.  This causes a whole bunch
of logic in the analyzer for handling lvalues
to vanish.  It does, however, raise a few issues
in the analyzer w.r.t to modeling various constructs
(e.g., field accesses to compound literals).

The .c/.m analysis test cases that fail are
due to a missing lvalue-to-rvalue cast that
will get introduced into the AST.  The .cpp
failures were more than I could investigate in
one go, and the patch was already getting huge.
I have XFAILED some of these tests, and they
should obviously be further investigated.

Some highlights of this patch include:

- CFG no longer requires an lvalue bit for
  CFGElements
- StackFrameContext doesn't need an 'asLValue'
  flag
- The "VisitLValue" path from GRExprEngine has
  been eliminated.

Besides the test case failures (XFAILed), there
are surely other bugs that are fallout from
this change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121960 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-16 07:46:53 +00:00
Michael J. Spencer 48263bae23 CMake: Add runtime dir.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121957 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-16 03:28:42 +00:00
Michael J. Spencer 4eeebc464e MemoryBuffer API update.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121956 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-16 03:28:14 +00:00