Commit Graph

17515 Commits

Author SHA1 Message Date
Benjamin Kramer aed9a1aadb Add newline at EOF.
llvm-svn: 86720
2009-11-10 21:33:20 +00:00
Benjamin Kramer 2c9a91c290 Silence warning.
llvm-svn: 86719
2009-11-10 21:29:56 +00:00
Dan Gohman ad5ef3d70f Use #include <stdio.h> when using fprintf and stderr.
llvm-svn: 86717
2009-11-10 21:21:27 +00:00
Daniel Dunbar f89a32ac45 clang-cc: Start moving "pure" option handling to Options.cpp, to separate it
from the logic part of clang-cc, and to enforce limited scoping.

llvm-svn: 86711
2009-11-10 19:51:53 +00:00
Daniel Dunbar d96cd43f13 clang-cc: Sink more options inside codegenopts namespace.
llvm-svn: 86710
2009-11-10 19:51:46 +00:00
Daniel Dunbar a35a2cb56b Change LangOpts initialization to directly test the code generation options,
instead of reproducing their logic.

llvm-svn: 86709
2009-11-10 19:51:33 +00:00
Douglas Gregor b53edfb8dc Improve parsing of template arguments to lay the foundation for
handling template template parameters properly. This refactoring:

  - Parses template template arguments as id-expressions, representing
    the result of the parse as a template name (Action::TemplateTy)
    rather than as an expression (lame!).

  - Represents all parsed template arguments via a new parser-specific
    type, ParsedTemplateArgument, which stores the kind of template
    argument (type, non-type, template) along with all of the source
    information about the template argument. This replaces an ad hoc
    set of 3 vectors (one for a void*, which was either a type or an
    expression; one for a bit telling whether the first was a type or
    an expression; and one for a single source location pointing at
    the template argument).

  - Moves TemplateIdAnnotation into the new Parse/Template.h. It never
    belonged in the Basic library anyway.

llvm-svn: 86708
2009-11-10 19:49:08 +00:00
Fariborz Jahanian dc21610419 Changed a variable name to match what it represents
(Ted's feedback).

llvm-svn: 86702
2009-11-10 19:31:09 +00:00
Fariborz Jahanian 1254a0978c This patch implements Code gen. for destruction of
global array of objects.

llvm-svn: 86701
2009-11-10 19:24:06 +00:00
Ted Kremenek ba64574c9a CIndex: Only display diagnostics to llvm::errs() when the client has set the 'displayDiagnostics' option to 1 in clang_createIndex(). This fixes <rdar://problem/7370691>.
llvm-svn: 86700
2009-11-10 19:18:52 +00:00
Mike Stump b47222144b Only generate a VTT for classes that need a VTT.
llvm-svn: 86699
2009-11-10 19:13:04 +00:00
Daniel Dunbar f76c9d270a Driver: Run 'clang' in C++ mode based on the name it was invoked by. We match
anything that ends with ++ or ++-FOO (e.g., c++, clang++, clang++-1.1) as being
a "C++ compiler".

This allows easy testing of the C++ compiler by 'ln -s clang clang++', or by 'cp
clang clang++'.

Based on patch by Roman Divacky.

llvm-svn: 86697
2009-11-10 18:47:41 +00:00
Daniel Dunbar ef2919f1fa Factor out parts of InitializeCompileOptions that depend on the LangOptions.
llvm-svn: 86696
2009-11-10 18:47:35 +00:00
Daniel Dunbar be50f5ab9d Localize -disable-llvm-optzns handling to BackendConsumer::CreatePasses.
- This is conceptually better since the only thing we want this option to do is
   preserve the internal module as constructed by IRgen, before running any
   passes.

 - This also fixes bugs in -disable-llvm-optzns handling with regards to debug
   info.

llvm-svn: 86691
2009-11-10 17:50:53 +00:00
Daniel Dunbar ede182ef05 clang-cc: Start sinking (CodeGen) options into namespaces to limit their scope.
llvm-svn: 86690
2009-11-10 17:50:42 +00:00
Daniel Dunbar 68ac06142b Cleanup some clang-cc FIXMEs
llvm-svn: 86686
2009-11-10 16:23:44 +00:00
Daniel Dunbar 754c11ec48 Add CompileOptions to CompilerInvocation.
llvm-svn: 86685
2009-11-10 16:19:45 +00:00
John McCall b8be78b753 Fix a similar problem with qualified lookup through using directives,
although in this case we probably just run a risk of duplicating work;
I can't think of how this could cause a bug.

llvm-svn: 86680
2009-11-10 09:25:37 +00:00
John McCall 9757d0363d Make a somewhat more convincing test case for unqualified lookup through
using directives, and fix a bug thereby exposed:  since we're playing
tricks with pointers, we need to make certain we're always using the same 
pointers for things.
Also tweak an existing error message.

llvm-svn: 86679
2009-11-10 09:20:04 +00:00
Zhongxing Xu f9667229a1 Ignore parentheses when check the type of the expr.
llvm-svn: 86677
2009-11-10 08:33:44 +00:00
John McCall a31577ce9a Simple test case for [basic.lookup.udir].
llvm-svn: 86674
2009-11-10 07:56:40 +00:00
Zhongxing Xu 537db5d652 SizeofPointerChecker: Many false positives have the form 'sizeof *p'.
This is reasonable because people know what they are doing when they 
intentionally dereference the pointer.
So now we only emit warning when a pointer variable is use literally.

llvm-svn: 86673
2009-11-10 07:52:53 +00:00
Mike Stump d846d0825b Add vtable caching to prevent multiple vtables for the same class from
being generated.

Add the most derived vtable pointer to the VTT.

llvm-svn: 86671
2009-11-10 07:44:33 +00:00
John McCall f6c8a4ef1f Fix unqualified lookup through using directives.
This is a pretty minimal test case;  I'll make a better one later.

llvm-svn: 86669
2009-11-10 07:01:13 +00:00
Anders Carlsson ace5d07e50 When trying to assign a regular string literal to an Objective-C 'id' type or a pointer to an NSString, emit a code insertion hint that turns it into an Objective-C string. For example:
@class NSString;

@interface Test
+ (void)test:(NSString *)string;
@end

void g(NSString *a);

void f() {
  NSString *a = "Foo";
  g("Foo");
  [Test test:"Foo"];
}

will produce

t.m:10:17: warning: incompatible pointer types initializing 'char [4]', expected 'NSString *'
  NSString *a = "Foo";
                ^~~~~
                @
t.m:11:5: warning: incompatible pointer types passing 'char [4]', expected 'NSString *'
  g("Foo");
    ^~~~~
    @
t.m:12:14: warning: incompatible pointer types sending 'char [4]', expected 'NSString *'
  [Test test:"Foo"];
             ^~~~~
             @
3 diagnostics generated.

llvm-svn: 86665
2009-11-10 04:46:30 +00:00
Anders Carlsson 7ddc6a98a7 Don't try to emit null fixit hints.
llvm-svn: 86664
2009-11-10 04:36:33 +00:00
Zhongxing Xu 456706c205 Now we can safely use the argument expression's source range.
llvm-svn: 86663
2009-11-10 04:22:08 +00:00
Zhongxing Xu 9a7448ceef SizeofPointerChecker: If an explicit type specifier is used, do not issue warnings.
llvm-svn: 86662
2009-11-10 04:20:20 +00:00
Anders Carlsson 1566eb5a26 Use PP.getLocForEndOfToken as suggested by John.
llvm-svn: 86661
2009-11-10 03:32:44 +00:00
Zhongxing Xu 77c470e8c7 Use the source range of the whole sizeof expression, otherwise it crashes when
the argument is not an expression.

llvm-svn: 86660
2009-11-10 03:27:00 +00:00
Anders Carlsson 0b8ea554e5 If a function with a default argument is redefined and the new function also has a defualt argument then add a fixit hint that removes the default argument. Fixes PR5444.
llvm-svn: 86659
2009-11-10 03:24:44 +00:00
Anders Carlsson f5e98fcff4 Update xode project.
llvm-svn: 86658
2009-11-10 03:23:35 +00:00
Zhongxing Xu 70ba4908d0 Add test case for PointerSubChecker.
llvm-svn: 86657
2009-11-10 02:45:49 +00:00
Zhongxing Xu 80bbc6d138 Refine PointerSubChecker: compare the base region instead of the original
region, so that arithmetic within a memory chunk is allowed.

llvm-svn: 86652
2009-11-10 02:37:53 +00:00
Mike Stump 9f23a149cb Be sure to clear out VCall when we clear out VCalls.
Start implementing VTTs.  WIP.

llvm-svn: 86650
2009-11-10 02:30:51 +00:00
Zhongxing Xu f8f3f9ddbc Rename: StripCasts describes what it does better.
getBaseRegion will be used in another method.

llvm-svn: 86649
2009-11-10 02:17:20 +00:00
Mike Stump 3b9176985d Finish off mangling for the VTT.
llvm-svn: 86647
2009-11-10 01:58:37 +00:00
Mike Stump ef15744092 Add mangling for the construction vtable.
llvm-svn: 86643
2009-11-10 01:41:59 +00:00
Jeffrey Yasskin 612e38026a Fix clang's use of DenseMap iterators after r86636 fixed their constness.
Patch by Victor Zverovich!

llvm-svn: 86638
2009-11-10 01:17:45 +00:00
Daniel Dunbar a8b869e794 Simplify, following MemoryBuffer::getSTDIN API fix.
llvm-svn: 86633
2009-11-10 00:46:25 +00:00
Daniel Dunbar 69914f4134 Switch to getFileOrSTDIN().
llvm-svn: 86632
2009-11-10 00:46:19 +00:00
Daniel Dunbar 190401566e Remove some if-0'd code, we can resurrect this if we ever decide to support
continuing after invalid PCH loads.

llvm-svn: 86631
2009-11-10 00:46:12 +00:00
Douglas Gregor 983136e3a1 Move all of the type-printing logic to its own C++ source file
llvm-svn: 86629
2009-11-10 00:39:07 +00:00
Daniel Dunbar 60198df262 Add PreprocessorOptions to CompilerInvocation.
llvm-svn: 86623
2009-11-09 23:12:31 +00:00
Daniel Dunbar 4df9aa2388 Privatize InitHeaderSearch, this functionality is only exposed via
ApplyHeaderSearchOptions now.

llvm-svn: 86617
2009-11-09 23:02:47 +00:00
Daniel Dunbar e213db84cb Move LangOptions, HeaderSearchOptions, and the target feature map into
CompilerInvocation.

llvm-svn: 86612
2009-11-09 22:46:17 +00:00
Daniel Dunbar d673bfa6aa Switch Target* to Target&.
llvm-svn: 86611
2009-11-09 22:46:09 +00:00
Daniel Dunbar 9707d8262b Add default initializer for Sysroot ivar.
llvm-svn: 86610
2009-11-09 22:46:04 +00:00
Daniel Dunbar 1de7855155 Change clang-cc to expect that all inputs have the same language (so we can only construct a single LangInfo). This matches how it is used in practice (since the compiler only it invokes it for one file at a time).
llvm-svn: 86609
2009-11-09 22:45:57 +00:00
Daniel Dunbar 06d4716297 (llvm up) Convert clang-cc.cpp:GetLanguage to StringSwitch.
llvm-svn: 86608
2009-11-09 22:45:47 +00:00
Mike Stump 68ec7ee0e8 Enable the use of the new llvm objectsize intrinsic.
llvm-svn: 86607
2009-11-09 22:40:09 +00:00
Fariborz Jahanian a44e8d85a7 Further change in a comment.
llvm-svn: 86599
2009-11-09 22:28:08 +00:00
Fariborz Jahanian 3fe453c48c Removed a FIXME on nested type specifier warning.
llvm-svn: 86598
2009-11-09 22:25:11 +00:00
Fariborz Jahanian b98dade25b Changed error for nested type qualifier mismatch to
warning, to match gcc. It used to be warning, so
better keep it a warning (it broke a certain project).

llvm-svn: 86597
2009-11-09 22:16:37 +00:00
Douglas Gregor 4ef1d400d9 Make sure that Type::getAs<ArrayType>() (or Type::getAs<subclass of
ArrayType>()) does not instantiate. Update all callers that used this
unsafe feature to use the appropriate ASTContext::getAs*ArrayType method.

llvm-svn: 86596
2009-11-09 22:08:55 +00:00
Ted Kremenek dd51f7cca2 Remove stale FIXME.
llvm-svn: 86595
2009-11-09 21:56:44 +00:00
Douglas Gregor 8caea94c74 Make sure that we look into nested, transparent declaration contexts
when looking for a name within a given DeclContext. Now enumerators
will show up in code-completion results.

llvm-svn: 86591
2009-11-09 21:35:27 +00:00
Fariborz Jahanian facfdd4d93 For array pointee type, get its cvr qualifier from
its element type. Fixes pr5432.

llvm-svn: 86587
2009-11-09 21:02:05 +00:00
Daniel Dunbar b2eae89108 Add CompilerInvocation object, to capture all the options one needs to invoke
the compiler, and start flood filling it into clang-cc.

llvm-svn: 86586
2009-11-09 20:55:08 +00:00
Eli Friedman 0bf69cc7b7 Stub out a few more warning groups.
llvm-svn: 86585
2009-11-09 20:19:49 +00:00
Benjamin Kramer 382414d519 Fix build after r86579.
llvm-svn: 86584
2009-11-09 20:14:44 +00:00
Douglas Gregor 1bc688dc60 Make sure that we instantiate default function arguments for an
overloaded operator(). 

llvm-svn: 86581
2009-11-09 19:27:57 +00:00
Eli Friedman 9cf6b59400 Add additional note to mark the cause of synthesized constructors. Mark
declaration invalid if the constructor can't be properly built.  Addresses
remaining review comments from Fariborz for r86500.

llvm-svn: 86579
2009-11-09 19:20:36 +00:00
Douglas Gregor 36d7c5f29b Improve instantiation of default template arguments for nested
templates. The instantiation of these default arguments must be (and
now, is) delayed until the template argument is actually used, at
which point we substitute all levels of template arguments
concurrently.

llvm-svn: 86578
2009-11-09 19:17:50 +00:00
Benjamin Kramer 04c99a6fe8 Factor CXString creation into a helper method.
llvm-svn: 86577
2009-11-09 19:13:48 +00:00
Eli Friedman 56acd1e819 Add code generation test for r86500.
llvm-svn: 86574
2009-11-09 18:49:09 +00:00
Fariborz Jahanian 222c0b517e Test case for Sean Hunt's patch which I left out.
llvm-svn: 86573
2009-11-09 18:48:53 +00:00
Eli Friedman e4310c8273 Add support for cdecl attribute. (As far as I know, it doesn't affect CodeGen
unless we start implementing command-line switches which override the default
calling convention, so the effect is mostly to silence unknown attribute
warnings.)

llvm-svn: 86571
2009-11-09 18:38:53 +00:00
Douglas Gregor a8ab71bad7 Slightly more testing for instantiation of non-type template parameters in nested templates, for my own sanity's sake
llvm-svn: 86570
2009-11-09 18:29:00 +00:00
Benjamin Kramer d6f85a8c88 Writing to a struct passed by value is pointless. Remove dead code.
- free(NULL) is a nop anyway.
- if someone thinks calling clang_disposeString twice should be legal
  please change the method to take a pointer.

llvm-svn: 86568
2009-11-09 18:24:53 +00:00
Douglas Gregor f96ea29b39 Improve c-index-test's parsing of the -code-completion-at=file:line:column argument
llvm-svn: 86566
2009-11-09 18:19:57 +00:00
Anders Carlsson 2256497780 Add a triple to try to fix the buildbot error.
llvm-svn: 86563
2009-11-09 17:54:53 +00:00
Steve Naroff 8675d5c754 Introduce CXString type and associated functions clang_getCString() and clang_disposeString().
This abstraction will help us manage string memory for complex names that cross the C++/C boundary (e.g. ObjC methods, selectors). This patch also uses it in clang_getTranslationUnitSpelling (which I'm not sure is necessary). Will investigate later...since the extra malloc() can't hurt (for now).

Patch by John Thompson.

llvm-svn: 86562
2009-11-09 17:45:52 +00:00
Anders Carlsson 69999d9c23 __uint128_t is indeed an unsigned integer type. Fixes PR5435.
llvm-svn: 86561
2009-11-09 17:34:18 +00:00
Douglas Gregor d3d9306275 When transforming an InitListExpr, if we already computed a non-dependent type for the InitListExpr, keep it
llvm-svn: 86559
2009-11-09 17:16:50 +00:00
Douglas Gregor f81f528db1 C doesn't allow mixing declarations and statements, silly
llvm-svn: 86556
2009-11-09 17:05:28 +00:00
Douglas Gregor 5ea234dcec Simplify test to deal with type-based ordering variations
llvm-svn: 86552
2009-11-09 16:22:45 +00:00
Douglas Gregor 022d3c2f42 Verify that code-completion is at least a little bit robust against inclusion of missing headers
llvm-svn: 86551
2009-11-09 16:06:30 +00:00
Douglas Gregor 8b14f8fde4 Minor cleanup for CIndex-based code-completion:
- Provide an actual test for code-completion via CIndex. 
  - Actually print optional strings in c-index-test
  - Export clang_getCompletionChunkCompletionString from CIndex

llvm-svn: 86550
2009-11-09 16:04:45 +00:00
Douglas Gregor 44ab140001 Fix a broken link
llvm-svn: 86545
2009-11-09 15:15:41 +00:00
Zhongxing Xu 6d967cbd8e update test case.
llvm-svn: 86541
2009-11-09 13:56:44 +00:00
Zhongxing Xu ab0e27ff0c Add check for pointer arithmetic on non-array variables.
llvm-svn: 86538
2009-11-09 13:23:31 +00:00
Zhongxing Xu d6e7f9d4b2 Add check for obsolete function call of getpw().
llvm-svn: 86537
2009-11-09 12:19:26 +00:00
Zhongxing Xu d09b22aa5a remove redundant file name in CMakeLists.txt.
llvm-svn: 86536
2009-11-09 09:35:41 +00:00
Zhongxing Xu 08670a89aa update CMakeList.txt
llvm-svn: 86535
2009-11-09 09:32:38 +00:00
Daniel Dunbar 53272bbf40 Update CMake
llvm-svn: 86533
2009-11-09 08:13:45 +00:00
Zhongxing Xu f69973c858 Add comments.
llvm-svn: 86532
2009-11-09 08:13:04 +00:00
Zhongxing Xu f06c684a33 Add checker for CWE-588: Attempt to Access Child of a Non-structure Pointer.
llvm-svn: 86529
2009-11-09 08:07:38 +00:00
Daniel Dunbar 65c0db98ab Update CMake
llvm-svn: 86528
2009-11-09 08:04:31 +00:00
Zhongxing Xu 85000203bb Put all long strings in 80-col.
llvm-svn: 86527
2009-11-09 07:29:39 +00:00
Zhongxing Xu 6c306c8b89 Add checker for CWE-587: Assignment of a Fixed Address to a Pointer.
llvm-svn: 86523
2009-11-09 06:52:44 +00:00
Zhongxing Xu 86b1e01c13 Add checker for CWE-469: Use of Pointer Subtraction to Determine Size. This
checker does not build sink nodes. Because svaluator computes an unknown value
for the subtraction now.

llvm-svn: 86517
2009-11-09 05:34:10 +00:00
Eli Friedman cc522d9ab3 Rearrange function to avoid recursive use-after-free.
llvm-svn: 86516
2009-11-09 05:07:37 +00:00
Eli Friedman a72bf0fae8 Explicitly note that pre-inc/dec lvalues are not supported yet, so that it
doesn't crash.  (Such expressions are valid in C++, but not in C.)

llvm-svn: 86513
2009-11-09 04:20:47 +00:00
Zhongxing Xu 1521c85c04 Remove dead code.
llvm-svn: 86512
2009-11-09 04:19:30 +00:00
Chris Lattner e6e64be1d9 fix thinko
llvm-svn: 86509
2009-11-09 04:04:07 +00:00
Eli Friedman cb29876839 Add hack to make the given testcase work. As far as I can tell, this change is
reasonably safe, but it doesn't seem like the right solution.

llvm-svn: 86508
2009-11-09 03:59:26 +00:00
Chris Lattner e5eb726e2e mention that clang defaults to C99 mode, PR5388
llvm-svn: 86507
2009-11-09 03:21:02 +00:00
Chris Lattner b8ca95481f remove a mostly obsolete "word of warning"
llvm-svn: 86506
2009-11-09 03:18:18 +00:00
Zhongxing Xu 0f92ec6ebd Add a test case for CWE-467, and simplify the wording of the warning.
llvm-svn: 86504
2009-11-09 02:28:12 +00:00
Daniel Dunbar 11c08c8e5b Rename areAllFields32Or64BitBasicType to canExpandIndirectArgument to closer match what it is semantically used for.
Also, fix a major bug where fields from a C++ struct might be dropped -- the expand action doesn't handle them correctly yet.

llvm-svn: 86502
2009-11-09 01:33:53 +00:00
Eli Friedman 96c0a3e6c2 Remove a useless variable that got left behind.
llvm-svn: 86501
2009-11-09 01:11:03 +00:00
Eli Friedman d7686ef31c Unify the codepaths used to verify base and member initializers for explicitly
and implicitly defined constructors.  This has a number of benefits:

1. Less code.

2. Explicit and implicit constructors get the same diagnostics.

3. The AST explicitly contains constructor calls from implicit default
constructors.  This allows handing some cases that previously weren't handled
correctly in IRGen without any additional code. Specifically, implicit default
constructors containing calls to constructors with default arguments are now
handled correctly.

llvm-svn: 86500
2009-11-09 01:05:47 +00:00
Eli Friedman fd8d4e1383 Fix use-after-free bug.
llvm-svn: 86485
2009-11-08 22:15:39 +00:00
Benjamin Kramer 489232c466 Update CMake file.
llvm-svn: 86479
2009-11-08 18:30:42 +00:00
Sebastian Redl 14236c8e82 Special-case default argument expression in instantiation. This should fix PR4301. Doug, please double-check my assumptions. Read the PR for more details.
llvm-svn: 86465
2009-11-08 13:56:19 +00:00
Zhongxing Xu b0a05f7ca1 Add a checker for CWE-467: Use of sizeof() on a Pointer Type.
llvm-svn: 86464
2009-11-08 13:10:34 +00:00
Sebastian Redl afb8be743d When checking the namespace of a redeclaration or definition, look through linkage specs. Fixes PR5430.
llvm-svn: 86461
2009-11-08 11:36:54 +00:00
Sebastian Redl 3752e1dbb4 Don't reprocess non-dependent initializers of non-dependent VarDecls. Fixes PR5426.
llvm-svn: 86460
2009-11-08 10:16:43 +00:00
Edward O'Callaghan 932c32043a Fix for FreeBSD toolchain in regards to CPP, Credit to Roman Divacky.
llvm-svn: 86459
2009-11-08 10:13:36 +00:00
Daniel Dunbar 7e215ea165 Add clarifying parens.
llvm-svn: 86457
2009-11-08 09:46:46 +00:00
Daniel Dunbar 3b339a3aa3 Simplify.
llvm-svn: 86456
2009-11-08 09:46:39 +00:00
Daniel Dunbar bd33c94d6f Revert unintentional change to this file.
llvm-svn: 86455
2009-11-08 09:46:33 +00:00
Alexis Hunt 6f3de50ca7 Test commit - minor terminology change to my recent patch suggested by John McCall
llvm-svn: 86442
2009-11-08 07:46:34 +00:00
Douglas Gregor 4100db6174 Always make sure we're using an unqualified type when building a
constructor name.  Fixes PR5418.

llvm-svn: 86441
2009-11-08 07:12:55 +00:00
Daniel Dunbar 2679a884d7 Move a function which returns a class outside of extern C scope.
llvm-svn: 86439
2009-11-08 04:13:53 +00:00
Daniel Dunbar a797946755 CIndex: Add temporary hack to leak memory instead of returning invalid pointers.
llvm-svn: 86438
2009-11-08 04:11:32 +00:00
Daniel Dunbar d90e0a113e Drop require_and_and argument.
llvm-svn: 86433
2009-11-08 01:47:35 +00:00
Daniel Dunbar 34546ce43d Remove RUN: true lines.
llvm-svn: 86432
2009-11-08 01:47:25 +00:00
Daniel Dunbar 6eb1201c90 Move test/Index input files into a sub directory (not scanned as tests).
llvm-svn: 86431
2009-11-08 01:46:19 +00:00
Daniel Dunbar 8b57697954 Eliminate &&s in tests.
- 'for i in $(find . -type f); do sed -e 's#\(RUN:.*[^ ]\) *&& *$#\1#g' $i | FileUpdate $i; done', for the curious.

llvm-svn: 86430
2009-11-08 01:45:36 +00:00
Daniel Dunbar 066967052c Rework site config for cmake to be generated at configure time, and only pass
the 'build_config' value in at runtime using the new lit runtime user parameter
feature.

This simplifies things and drops a dependency on 'sed', FWIW.

llvm-svn: 86421
2009-11-07 23:53:32 +00:00
Daniel Dunbar 8466a0d944 Tweak a FIXME.
llvm-svn: 86420
2009-11-07 23:53:17 +00:00
Anders Carlsson 5bbdc9f857 Handle member expressions where the member declaration is actually a static variable. Fixes PR5392.
llvm-svn: 86414
2009-11-07 23:16:50 +00:00
Anders Carlsson ea4c30b39a More LValue related code cleanup.
llvm-svn: 86413
2009-11-07 23:06:58 +00:00
Anders Carlsson 2ff6395ddc More cleanup, the code is much easier to follow now.
llvm-svn: 86412
2009-11-07 22:53:10 +00:00
Anders Carlsson 6eee97276b Reduce nesting, no functionality change.
llvm-svn: 86411
2009-11-07 22:46:42 +00:00
Anders Carlsson 03f83e58f7 We only need to call SetObjCNonGC for local variables. No functionality change.
llvm-svn: 86410
2009-11-07 22:43:34 +00:00
Anders Carlsson 509850ebec Change EmitPointerToDataMemberLValue to take a FieldDecl. No intended functionality change.
llvm-svn: 86407
2009-11-07 22:00:15 +00:00
Fariborz Jahanian d7aa9d8a63 Patch to gives an error that at least points users in the direction of the error, rather
than an error about incompatible types. Patch by Sean Hunt.

llvm-svn: 86402
2009-11-07 20:20:40 +00:00
Chris Lattner 3f5124815d commit test update
llvm-svn: 86396
2009-11-07 18:59:51 +00:00
Chris Lattner 5c67237ff6 teach the various targets what native integer types they have.
llvm-svn: 86395
2009-11-07 18:59:41 +00:00
Daniel Dunbar 4ba3b297e6 Fix some build warnings.
llvm-svn: 86393
2009-11-07 18:34:24 +00:00
Daniel Dunbar 5a3b974446 Add some missing libraries for CMake as well.
llvm-svn: 86390
2009-11-07 17:53:40 +00:00
Daniel Dunbar 05aaf77d6c Add some missing libraries.
llvm-svn: 86389
2009-11-07 17:52:11 +00:00
Douglas Gregor 358e7745ed Cope with calls to operator() templates. Fixes PR5419.
llvm-svn: 86387
2009-11-07 17:23:56 +00:00
Chris Lattner 15275e55ce add missing #include
llvm-svn: 86368
2009-11-07 09:22:46 +00:00
John McCall b61e9d03c1 Support -Wshorten-64-to-32 for integer types only, which seems to satisfy the
core requirements.  Fixes rdar://problem/6389954

llvm-svn: 86364
2009-11-07 09:03:53 +00:00
Anders Carlsson d3569efb5a Add bug number.
llvm-svn: 86357
2009-11-07 08:24:59 +00:00
John McCall b397956338 Improve -Wconversion by permitting binary operations on values of the target
type (or smaller) to stay "closed" within the type.

llvm-svn: 86356
2009-11-07 08:15:46 +00:00
Anders Carlsson f5dc6fa252 Don't treat variables with non-trivial ctors or dtors as unused. Fixes PR5407.
llvm-svn: 86352
2009-11-07 07:26:56 +00:00
Anders Carlsson 2889e0e72c Cleanup, no functionality change.
llvm-svn: 86351
2009-11-07 07:18:14 +00:00
Anders Carlsson c0a3561f0f Always mangle functions with special names. Fixes PR5420.
llvm-svn: 86350
2009-11-07 07:15:03 +00:00
Anders Carlsson 3d70975917 When instantiating a field decl, make sure to clone its attributes. With this change FileCheck no longer crashes when it's run without any arguments.
llvm-svn: 86344
2009-11-07 06:07:58 +00:00
Ted Kremenek 975a119f31 Use SaveAndRestore to simplify logic in LiveVariables::runOnAllBlocks(). Patch by Kovarththanan Rajaratnam!
llvm-svn: 86343
2009-11-07 05:57:35 +00:00
Daniel Dunbar 8ec8804de1 Switch clang-cc to use ApplyHeaderSearchOptions, and fix a thinko.
llvm-svn: 86341
2009-11-07 04:58:12 +00:00
Anders Carlsson ce21431fc4 When looking up and adding substitutions to the substitution table, make sure to always use the canonical declaration. With tihs change, FileCheck compiles and links but crashes during startup.
llvm-svn: 86339
2009-11-07 04:26:04 +00:00
Daniel Dunbar 08d5669b01 Add HeaderSearchOptions class, for packaging the information needed to
initialize HeaderSearch. Not used yet.

llvm-svn: 86338
2009-11-07 04:20:50 +00:00
Daniel Dunbar ec87991c8f Lift InitHeaderSearch::AddEnvVarPaths logic higher.
llvm-svn: 86337
2009-11-07 04:20:39 +00:00
Daniel Dunbar 6dc9638153 Formatting fixes.
llvm-svn: 86336
2009-11-07 04:20:25 +00:00