Commit Graph

17378 Commits

Author SHA1 Message Date
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