]>
granicus.if.org Git - clang/log
John McCall [Mon, 25 Jan 2010 23:12:50 +0000 (23:12 +0000)]
Fixit to remove 'volatile' in file-scope 'asm volatile'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94466
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 25 Jan 2010 22:35:08 +0000 (22:35 +0000)]
Driver: Fix fallback to gcc to -c instead of -S if trying to generate an LLVM bc
file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94463
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 25 Jan 2010 22:34:44 +0000 (22:34 +0000)]
Pull functions that translate from CXSourceLocation to SourceLocation (and back) to a separate header file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94462
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Mon, 25 Jan 2010 22:27:48 +0000 (22:27 +0000)]
Warn on top-level 'asm volatile' (instead of misparsing it).
"Fixes" rdar://problem/
7574870
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94458
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 25 Jan 2010 21:40:39 +0000 (21:40 +0000)]
global variable that binds reference to a non-lvalue reproted
as NYI now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94453
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 25 Jan 2010 21:09:34 +0000 (21:09 +0000)]
Fix include guard.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94447
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 25 Jan 2010 20:50:02 +0000 (20:50 +0000)]
Fixes a rewriting bug of access ivar of a variable cast
to subclass. (Fixes radar
7575882 ).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94444
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 25 Jan 2010 18:30:26 +0000 (18:30 +0000)]
Fix a code gen. bug involving compiling global references.
(fixes radar
7574896 ).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94434
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 25 Jan 2010 17:48:13 +0000 (17:48 +0000)]
Add test case for ? : crasher
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94429
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 25 Jan 2010 17:10:22 +0000 (17:10 +0000)]
Move BugReporter.h, PathDiagnostic.h, and BugType.h to 'include/Checker/BugReporter'
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94428
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 25 Jan 2010 17:04:54 +0000 (17:04 +0000)]
Code simplification; this should have no visible effects.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94427
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 25 Jan 2010 16:56:17 +0000 (16:56 +0000)]
Loosen preconditions for clang_getCursorSpelling(), returning an empty
string when given a cursor that does not have a name. Also, don't give
silly names for statements and non-reference expressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94426
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 25 Jan 2010 16:45:46 +0000 (16:45 +0000)]
Expect the impossible
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94425
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 25 Jan 2010 16:33:23 +0000 (16:33 +0000)]
Move the type specifier location for elaborated-type-specifiers from
the tag kind (union, struct, class, enum) over to the name of the tag,
if there is a name, since most clients want to point at the name.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94424
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 25 Jan 2010 16:12:32 +0000 (16:12 +0000)]
Visit the condition variables of while and for loops; also, visit the
condition even when we've visited the condition variable, so that
we'll see implicit conversions there.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94423
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 25 Jan 2010 12:20:15 +0000 (12:20 +0000)]
Update C++ include paths for Exherbo, by Ingmar Vanhassel.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94420
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 25 Jan 2010 09:16:55 +0000 (09:16 +0000)]
cindex/Python: Move translation unit load functions to Index, there isn't a good reason to have separate static methods for this.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94419
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 25 Jan 2010 09:16:41 +0000 (09:16 +0000)]
cindex/Python: Support file objects as unsaved_files, albeit inefficiently.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94418
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 25 Jan 2010 05:19:37 +0000 (05:19 +0000)]
Add missing header.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94409
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 25 Jan 2010 04:48:38 +0000 (04:48 +0000)]
Add missing file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94407
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 25 Jan 2010 04:41:41 +0000 (04:41 +0000)]
Split libAnalysis into two libraries: libAnalysis and libChecker.
(1) libAnalysis is a generic analysis library that can be used by
Sema. It defines the CFG, basic dataflow analysis primitives, and
inexpensive flow-sensitive analyses (e.g. LiveVariables).
(2) libChecker contains the guts of the static analyzer, incuding the
path-sensitive analysis engine and domain-specific checks.
Now any clients that want to use the frontend to build their own tools
don't need to link in the entire static analyzer.
This change exposes various obvious cleanups that can be made to the
layout of files and headers in libChecker. More changes pending. :)
This change also exposed a layering violation between AnalysisContext
and MemRegion. BlockInvocationContext shouldn't explicitly know about
BlockDataRegions. For now I've removed the BlockDataRegion* from
BlockInvocationContext (removing context-sensitivity; although this
wasn't used yet). We need to have a better way to extend
BlockInvocationContext (and any LocationContext) to add
context-sensitivty.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94406
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 25 Jan 2010 03:38:26 +0000 (03:38 +0000)]
merge another one in.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94404
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 25 Jan 2010 03:37:52 +0000 (03:37 +0000)]
consolidate two testcases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94403
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 25 Jan 2010 03:34:56 +0000 (03:34 +0000)]
fix rdar://
7556129 a crash in blocks debug info codegen.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94402
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 25 Jan 2010 03:29:35 +0000 (03:29 +0000)]
simplify code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94401
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 25 Jan 2010 00:44:21 +0000 (00:44 +0000)]
cindex/Python: Add Cursor test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94397
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 25 Jan 2010 00:44:11 +0000 (00:44 +0000)]
cindex/Python: Implement support for unsaved/remapped files.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94396
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 25 Jan 2010 00:44:02 +0000 (00:44 +0000)]
ASTUnit: Don't check that input files exist when parsing ASTs from the command
line -- they may be remapped (fake) files. This is useful for testing parsing
entirely from memory.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94395
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 25 Jan 2010 00:43:31 +0000 (00:43 +0000)]
cindex/Python: Fix/simplify Index.parse() passing command line arguments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94394
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 25 Jan 2010 00:43:14 +0000 (00:43 +0000)]
Update comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94393
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 25 Jan 2010 00:43:08 +0000 (00:43 +0000)]
cindex/Python: Update comments, add module docstrings, add LLVM headers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94392
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 25 Jan 2010 00:40:30 +0000 (00:40 +0000)]
CIndex: Don't crash when visitor passes null child statements, and sprinkle some
asserts in cursor construction functions to make this more obvious.
Doug, please check. c-index-test would previously crash on this code:
--
for(;;) {}
--
Do we need a custom visit of the for statement to cover the variable
declarations?
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94391
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 24 Jan 2010 21:20:39 +0000 (21:20 +0000)]
cindex/Python: Move Cursor.is_ methods to CursorKind, and add test.
Also, add CursorKind.get_all_kinds().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94389
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 24 Jan 2010 21:20:29 +0000 (21:20 +0000)]
cindex/Python: Implement explicit objects for CursorKind enumeration values.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94388
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 24 Jan 2010 21:20:21 +0000 (21:20 +0000)]
cindex/Python: Fetch SourceLocation instantiation location information on lazily, it isn't free.
Also, add repr() support to SourceRange.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94387
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 24 Jan 2010 21:20:13 +0000 (21:20 +0000)]
cindex/Python: Add Cursor.get_usr().
Also, change Cursor.spelling to return None for non-decls, for consistency with get_usr().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94386
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 24 Jan 2010 21:20:05 +0000 (21:20 +0000)]
cindex/Python: Return null cursors as None instead of exposing this notion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94385
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 24 Jan 2010 21:19:57 +0000 (21:19 +0000)]
cindex/Python: Convert CXString objects to regular Python strings below API.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94384
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 24 Jan 2010 21:19:48 +0000 (21:19 +0000)]
Simplify.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94383
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 24 Jan 2010 21:19:40 +0000 (21:19 +0000)]
cindex/Python: Remove Cursor.file forwarding method, this doesn't really fit the API.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94382
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 24 Jan 2010 20:43:31 +0000 (20:43 +0000)]
-fno-rtti is now the default.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94379
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Sun, 24 Jan 2010 18:40:06 +0000 (18:40 +0000)]
Enhance test to check on expected rewritten output.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94368
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 24 Jan 2010 17:15:04 +0000 (17:15 +0000)]
Fix a pretty bad bug where if a constructor (or conversion function) was marked as 'explicit', but then defined out-of-line, we would not treat it as being explicit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94366
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 24 Jan 2010 16:49:46 +0000 (16:49 +0000)]
Implement [dcl.fct.spec]p6.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94365
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Sun, 24 Jan 2010 16:16:01 +0000 (16:16 +0000)]
Ok, turn back off -Wunreachable-code by default.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94364
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Sun, 24 Jan 2010 10:02:25 +0000 (10:02 +0000)]
Mark PartialDiagnostic.h as a C++ header
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94363
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 24 Jan 2010 05:50:37 +0000 (05:50 +0000)]
Land test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94362
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 24 Jan 2010 05:50:09 +0000 (05:50 +0000)]
Implement instantiation of AsmStmts (Crazy, I know)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94361
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 24 Jan 2010 04:10:31 +0000 (04:10 +0000)]
Tweak clang_visitChildren comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94360
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 24 Jan 2010 04:10:22 +0000 (04:10 +0000)]
cindex/Python: Add Cursor.get_children()
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94359
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 24 Jan 2010 04:10:06 +0000 (04:10 +0000)]
cindex/Python: Remove Declaration class, this has been removed from the API.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94358
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 24 Jan 2010 04:09:58 +0000 (04:09 +0000)]
cindex/Python: Eliminate Entity class, it has been removed from CIndex.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94357
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 24 Jan 2010 04:09:51 +0000 (04:09 +0000)]
Simplify.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94356
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 24 Jan 2010 04:09:43 +0000 (04:09 +0000)]
cindex/Python: Add TranslationUnit.cursor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94355
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 24 Jan 2010 04:09:34 +0000 (04:09 +0000)]
cindex/Python: Tweak Source{Location,Range}
- Add __repr__ on SourceLocation.
- Fix File object construction to use c_object_p type, and use None instead of
invalid File objects.
- Make SourceRange.{start,end} properties.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94354
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 24 Jan 2010 04:09:23 +0000 (04:09 +0000)]
cindex/Python: Make Cursor.is_... functions not properties.
Also, add ValueError check before calling Cursor_spelling.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94353
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sean Hunt [Sun, 24 Jan 2010 03:04:27 +0000 (03:04 +0000)]
Mangle static variables with an extra name to distinguish them from non-static variables in the same TU.
Fixes PR5966 for real this time; also reverts r92911, which had a incorrect fix.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94352
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 24 Jan 2010 02:54:26 +0000 (02:54 +0000)]
Index.h: Tweak comments, delete trailing whitespace, fix a few typos, etc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94351
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 24 Jan 2010 02:02:07 +0000 (02:02 +0000)]
Initial checkin of CIndex Python bindings, by Andrew Sutton!
- Some tweaks by me for API changes, Darwin, and x86_64 support. Still needs
substantial updating to match recent CIndex API changes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94349
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 24 Jan 2010 01:50:29 +0000 (01:50 +0000)]
fix PR6034, a crash on invalid where the switch stack would get
unbalanced.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94347
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 24 Jan 2010 01:30:04 +0000 (01:30 +0000)]
add a prototype for __builtin_fpclassify. We don't know how to
codegen it, so we get 'cannot compile this builtin function yet'
errors, just like we do currently for __builtin_isinf. However,
this should let us parse headers that use it without barfing,
which should help PR6083.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94346
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 24 Jan 2010 00:30:31 +0000 (00:30 +0000)]
disable this test, it is failing sporadically.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94344
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 24 Jan 2010 00:20:05 +0000 (00:20 +0000)]
Fix a nasty bug where temporaries weren't marked as being conditional in some cases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94341
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 24 Jan 2010 00:19:41 +0000 (00:19 +0000)]
Use new initialization code when dealing with [dcl.init.aggr]p12. This fixes the bug where array elements and member initializers weren't copied correctly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94340
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 23 Jan 2010 23:23:01 +0000 (23:23 +0000)]
Change all InitializedEntity pointers over to be references.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94335
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 23 Jan 2010 22:49:02 +0000 (22:49 +0000)]
Start passing InitializedEntity to CheckDesignatedInitializer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94334
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Sat, 23 Jan 2010 22:37:59 +0000 (22:37 +0000)]
Preserve access for enum constants during template instantiation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94333
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 23 Jan 2010 20:47:59 +0000 (20:47 +0000)]
More init work, adding more entity parameters.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94332
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Sat, 23 Jan 2010 20:23:40 +0000 (20:23 +0000)]
Temporary flip default for -Wunreachable-code so some bots can test it
out. They should all be done later tonight, but if something bad
happens, feel free to revert sooner.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94330
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 23 Jan 2010 20:20:40 +0000 (20:20 +0000)]
Use the new init code for member subobjects.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94329
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 23 Jan 2010 20:13:41 +0000 (20:13 +0000)]
Switch some array initialization over to the new init code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94327
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Sat, 23 Jan 2010 20:12:18 +0000 (20:12 +0000)]
Insulate these from changes to the default for -Wunreachable-code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94326
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 23 Jan 2010 19:55:29 +0000 (19:55 +0000)]
Baby steps towards migrating the InitListChecker over to the new initialization code. Pass an InitializedEntity pointer through to most init checker functions. Right now, it's ignored everywhere except when initializing vectors in C++.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94325
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 23 Jan 2010 19:22:30 +0000 (19:22 +0000)]
When an InitializedEntity is passed to CheckSingleInitializer, call the new Sema::PerformCopyInitialization overload.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94324
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 23 Jan 2010 19:00:10 +0000 (19:00 +0000)]
Add bzero builtin; this should help codegen quality for code using this
function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94320
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 23 Jan 2010 18:35:41 +0000 (18:35 +0000)]
Change CheckSingleInitializer to take/return OwningExprResults instead. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94316
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 23 Jan 2010 18:26:49 +0000 (18:26 +0000)]
Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94315
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 23 Jan 2010 18:16:35 +0000 (18:16 +0000)]
Simplify code with StringRef.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94314
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 23 Jan 2010 18:16:07 +0000 (18:16 +0000)]
No need to terminate this buffer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94313
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 23 Jan 2010 17:51:23 +0000 (17:51 +0000)]
Add doxygen comment to clang_getClangVersion().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94311
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 23 Jan 2010 10:15:32 +0000 (10:15 +0000)]
Adjust testcase for recent AsmPrinter changes, sigh.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94307
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 23 Jan 2010 10:14:58 +0000 (10:14 +0000)]
Adjust testcase for recent DWARF printer changes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94306
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Sat, 23 Jan 2010 08:10:49 +0000 (08:10 +0000)]
Produce a special diagnostic when users call a function with an argument of
incomplete type (or a pointer/reference to such).
The causes of this problem are different enough to justify a different "design"
for the diagnostic. Most notably, it doesn't give an operand index:
it's usually pretty obvious which operand is the problem, it adds a lot of
clutter to mention it, and the fix is usually in a different part of the file
anyway.
This is yet another diagnostic that should really have an analogue in the
non-overloaded case --- which should be much easier to write because of
the weaker space constraints.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94303
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 23 Jan 2010 05:47:27 +0000 (05:47 +0000)]
Fix the EntityKind order so that all entity kinds that can be copied (using copy constructors) come first. Also, fix a bug where EK_New was left out of the err_init_conversion_failed diagnostic (It is now reported as 'new value'). Please review Doug :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94289
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Sat, 23 Jan 2010 05:17:32 +0000 (05:17 +0000)]
During overload resolution diagnostics, sort non-viable candidates by the quality of their
conversions. To make this work, fill out all conversions for all candidates
(but only when diagnosing overload failure). Split out a few cases from
ovl_fail_bad_conversion which didn't actually involve a failed argument
conversion.
I'm pretty sure this is not a well-founded ordering, but I'm not sure it matters.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94283
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 23 Jan 2010 04:34:47 +0000 (04:34 +0000)]
Separate EK_ArrayOrVectorElement into EK_ArrayElement and EK_VectorElement; arrays and vectors are pretty different beasts in C++. Doug, please review/comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94279
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Chisnall [Sat, 23 Jan 2010 02:40:42 +0000 (02:40 +0000)]
Created __builtin___NSStringMakeConstantString() builtin, which generates constant Objective-C strings.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94274
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 23 Jan 2010 02:11:34 +0000 (02:11 +0000)]
Rename getClangFullVendorVersion() to getClangFullVersion().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94273
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Sat, 23 Jan 2010 00:46:32 +0000 (00:46 +0000)]
Implement elementary access control.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94268
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sat, 23 Jan 2010 00:40:08 +0000 (00:40 +0000)]
Teach the cursor visitor to recurse into the type information of
explicit casts, sizeof, alignof, and compound literals.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94265
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 23 Jan 2010 00:26:38 +0000 (00:26 +0000)]
Extern darwin-clang_rt.c test to also test targetting ARM ({armv6, armv7} x
{thumb,no-thumb}).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94264
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 23 Jan 2010 00:26:29 +0000 (00:26 +0000)]
Fix a FIXME, this test folds to a constant now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94263
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sat, 23 Jan 2010 00:14:00 +0000 (00:14 +0000)]
Extend clang_createTranslationUnitFromSourceFile() to support creating
translation units that include unsaved files.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94258
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 22 Jan 2010 23:04:44 +0000 (23:04 +0000)]
outside a method, 'super' should resolve in a normal name look up
to mimic gcc's behavior. Fixes radar
7400691 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94246
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 22 Jan 2010 22:44:15 +0000 (22:44 +0000)]
Add 'clang_getClangVersion()' function to CIndex. This exposes the full Clang version string through the CIndex API.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94242
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Fri, 22 Jan 2010 22:37:17 +0000 (22:37 +0000)]
Fixup the rest of the testcases to grep the .ll file instead of the .s
file, and add FIXMEs to the remaining broken tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94238
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 22 Jan 2010 22:30:25 +0000 (22:30 +0000)]
Fixes test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94236
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 22 Jan 2010 22:29:50 +0000 (22:29 +0000)]
Move version string generation (e.g., "clang 1.1 ...") to libBasic/Version.cpp, getClangFullVendorVersion().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94235
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 22 Jan 2010 22:29:16 +0000 (22:29 +0000)]
Improve content and structure of the Doxygen documentation for the
CIndex API. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94234
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 22 Jan 2010 22:12:47 +0000 (22:12 +0000)]
(1) Rename getClangSubversionRevision() to getClangRevision(), and
have it return a StringRef instead of an integer (to be more VCS
agnostic).
(2) Add getClangFullRepositoryVersion(), which contains an
amalgamation of the repository name and the revision.
(3) Change PCH to only emit the string returned by
getClangFullRepositoryVersion() instead of also emitting the value
of getClangSubversionRevision() (which has been removed). This is
functionally equivalent.
More cleanup to version string generation pending...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94231
91177308 -0d34-0410-b5e6-
96231b3b80d8