]> granicus.if.org Git - clang/log
clang
16 years agoConvert <h2> -> <h3>. <h1> -> <h2> (more consistent with other pages)
Ted Kremenek [Tue, 17 Jun 2008 06:35:36 +0000 (06:35 +0000)]
Convert <h2> -> <h3>.  <h1> -> <h2>  (more consistent with other pages)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52384 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMake this test actually pass, in addition to the previous patch
Eli Friedman [Tue, 17 Jun 2008 05:36:46 +0000 (05:36 +0000)]
Make this test actually pass, in addition to the previous patch
which made it work.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52382 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix more strict-aliasing warnings.
Ted Kremenek [Tue, 17 Jun 2008 03:11:08 +0000 (03:11 +0000)]
Fix more strict-aliasing warnings.
Fix indentation of class declarations in ExprCXX.h

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52380 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoOnly use colored output when the environment variable SCAN_BUILD_COLOR is set.
Ted Kremenek [Tue, 17 Jun 2008 03:06:59 +0000 (03:06 +0000)]
Only use colored output when the environment variable SCAN_BUILD_COLOR is set.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52379 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoThis patch is motivated by numerous strict-aliasing warnings when compiling
Ted Kremenek [Tue, 17 Jun 2008 02:43:46 +0000 (02:43 +0000)]
This patch is motivated by numerous strict-aliasing warnings when compiling
clang as a Release build.

The big change is that all AST nodes (subclasses of Stmt) whose children are
Expr* store their children as Stmt* or arrays of Stmt*. This is to remove
strict-aliasing warnings when using StmtIterator. None of the interfaces of any
of the classes have changed (except those with arg_iterators, see below), as the
accessor methods introduce the needed casts (via cast<>). While this extra
casting may seem cumbersome, it actually adds some important sanity checks
throughout the codebase, as clients using StmtIterator can potentially overwrite
children that are expected to be Expr* with Stmt* (that aren't Expr*). The casts
provide extra sanity checks that are operational in debug builds to catch
invariant violations such as these.

For classes that have arg_iterators (e.g., CallExpr), the definition of
arg_iterator has been replaced. Instead of it being Expr**, it is an actual
class (called ExprIterator) that wraps a Stmt**, and provides the necessary
operators for iteration. The nice thing about this class is that it also uses
cast<> to type-checking, which introduces extra sanity checks throughout the
codebase that are useful for debugging.

A few of the CodeGen functions that use arg_iterator (especially from
OverloadExpr) have been modified to take begin and end iterators instead of a
base Expr** and the number of arguments. This matches more with the abstraction
of iteration. This still needs to be cleaned up a little bit, as clients expect
that ExprIterator is a RandomAccessIterator (which we may or may not wish to
allow for efficiency of representation).

This is a fairly large patch. It passes the tests (except CodeGen/bitfield.c,
which was already broken) on both a Debug and Release build, but it should
obviously be reviewed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52378 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoSilence uninitialized value warning in Release build.
Ted Kremenek [Mon, 16 Jun 2008 23:46:27 +0000 (23:46 +0000)]
Silence uninitialized value warning in Release build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52376 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoSilence uninitialized value warning during Release build.
Ted Kremenek [Mon, 16 Jun 2008 23:45:12 +0000 (23:45 +0000)]
Silence uninitialized value warning during Release build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52375 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRemove debugging message in ccc-analyzer.
Ted Kremenek [Mon, 16 Jun 2008 22:40:14 +0000 (22:40 +0000)]
Remove debugging message in ccc-analyzer.
Add color diagnostics from scan-build, and indicate the number of bugs found (if any).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52372 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoLatest release is checker-37.
Ted Kremenek [Mon, 16 Jun 2008 21:46:12 +0000 (21:46 +0000)]
Latest release is checker-37.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52370 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRe-enable the analyzer.
Ted Kremenek [Mon, 16 Jun 2008 21:41:07 +0000 (21:41 +0000)]
Re-enable the analyzer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52367 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRemove Analysis-Apple.
Ted Kremenek [Mon, 16 Jun 2008 21:21:48 +0000 (21:21 +0000)]
Remove Analysis-Apple.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52366 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMove test case "uninit-msg-expr.m" from Analysis-Apple to Analysis (now works on...
Ted Kremenek [Mon, 16 Jun 2008 21:15:29 +0000 (21:15 +0000)]
Move test case "uninit-msg-expr.m" from Analysis-Apple to Analysis (now works on all platforms).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52362 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMoved test case NoReturn.m from Analysis-Apple to Analysis (now works on all platforms).
Ted Kremenek [Mon, 16 Jun 2008 21:05:04 +0000 (21:05 +0000)]
Moved test case NoReturn.m from Analysis-Apple to Analysis (now works on all platforms).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52359 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMove NSString.m test case from Analysis-Apple to Analysis. The test case now works...
Ted Kremenek [Mon, 16 Jun 2008 20:37:30 +0000 (20:37 +0000)]
Move NSString.m test case from Analysis-Apple to Analysis.  The test case now works on all platforms.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52354 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUpdate test case to use -pedantic (makes the test case more clear).
Ted Kremenek [Mon, 16 Jun 2008 19:53:46 +0000 (19:53 +0000)]
Update test case to use -pedantic (makes the test case more clear).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52349 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix misspelling of "svelte".
Ted Kremenek [Mon, 16 Jun 2008 19:51:41 +0000 (19:51 +0000)]
Fix misspelling of "svelte".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52348 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMove Analysis-Apple/CFString.c to Analysis (the test case now works on all platforms).
Ted Kremenek [Mon, 16 Jun 2008 19:35:31 +0000 (19:35 +0000)]
Move Analysis-Apple/CFString.c to Analysis (the test case now works on all platforms).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52346 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMove CFDateGC.m test case from Analysis-Apple to Analysis (it now runs on all platforms).
Ted Kremenek [Mon, 16 Jun 2008 18:46:17 +0000 (18:46 +0000)]
Move CFDateGC.m test case from Analysis-Apple to Analysis (it now runs on all platforms).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52344 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMoved CFDate.m from test/Analysis-Apple to test/Analysis, and added the necessary...
Ted Kremenek [Mon, 16 Jun 2008 18:34:22 +0000 (18:34 +0000)]
Moved CFDate.m from test/Analysis-Apple to test/Analysis, and added the necessary declarations from Foundation.h to CFDate.m so that the test case can be exercised on all platforms.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52343 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd test case for NSString format-string checking.
Ted Kremenek [Mon, 16 Jun 2008 18:01:05 +0000 (18:01 +0000)]
Add test case for NSString format-string checking.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52337 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoIntroduce preliminary support for NSString format-string checking.
Ted Kremenek [Mon, 16 Jun 2008 18:00:42 +0000 (18:00 +0000)]
Introduce preliminary support for NSString format-string checking.
Patch by Nikita Zhuk!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52336 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoforce size of alloca to i32, which is currently required by LLVM IR.
Chris Lattner [Mon, 16 Jun 2008 17:15:14 +0000 (17:15 +0000)]
force size of alloca to i32, which is currently required by LLVM IR.
This fixes use of alloca on 64-bit systems.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52334 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoBasic support for volatile loads and stores. Stores the volatile
Eli Friedman [Fri, 13 Jun 2008 23:01:12 +0000 (23:01 +0000)]
Basic support for volatile loads and stores. Stores the volatile
qualifier in the lvalue, and changes lvalue loads/stores to honor
the volatile flag.  Places which need some further attention are marked
with FIXMEs.

Patch by Cédric Venet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52264 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoTweak h1 line-height to avoid text overlay issues in the headers.
Ted Kremenek [Fri, 13 Jun 2008 21:09:07 +0000 (21:09 +0000)]
Tweak h1 line-height to avoid text overlay issues in the headers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52256 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoCSS tweaks with the menu to help resolve some menu/content overlap issues.
Ted Kremenek [Fri, 13 Jun 2008 21:06:53 +0000 (21:06 +0000)]
CSS tweaks with the menu to help resolve some menu/content overlap issues.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52255 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAllow -parse-noop -verify options to be used together.
Argyrios Kyrtzidis [Fri, 13 Jun 2008 12:15:34 +0000 (12:15 +0000)]
Allow -parse-noop -verify options to be used together.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52249 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoGrammo.
Ted Kremenek [Thu, 12 Jun 2008 19:14:13 +0000 (19:14 +0000)]
Grammo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52241 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdded an "important notes" section. Tweaked formatting.
Ted Kremenek [Thu, 12 Jun 2008 18:39:02 +0000 (18:39 +0000)]
Added an "important notes" section.  Tweaked formatting.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52239 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix broken test.
Argyrios Kyrtzidis [Thu, 12 Jun 2008 12:44:52 +0000 (12:44 +0000)]
Fix broken test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52232 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMultiple tests in a single test file must be linked with '&&'.
Argyrios Kyrtzidis [Thu, 12 Jun 2008 12:40:02 +0000 (12:40 +0000)]
Multiple tests in a single test file must be linked with '&&'.
Otherwise, failing tests other than the last one will not be reported.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52231 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix "copy & paste" error.
Argyrios Kyrtzidis [Wed, 11 Jun 2008 23:15:56 +0000 (23:15 +0000)]
Fix "copy & paste" error.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52227 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdded direct link to latest analyzer build on Mac OS X.
Ted Kremenek [Wed, 11 Jun 2008 16:16:41 +0000 (16:16 +0000)]
Added direct link to latest analyzer build on Mac OS X.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52222 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdded a disclaimer about running time, and provided an executive summary of the tool...
Ted Kremenek [Wed, 11 Jun 2008 16:09:34 +0000 (16:09 +0000)]
Added a disclaimer about running time, and provided an executive summary of the tool's interface.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52221 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUse relative links that start with "/" so the menu works from different subdirectories.
Ted Kremenek [Wed, 11 Jun 2008 06:22:05 +0000 (06:22 +0000)]
Use relative links that start with "/" so the menu works from different subdirectories.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52210 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoDon't crash if we can't find FileEntry info for a typedef, since one
Eli Friedman [Wed, 11 Jun 2008 06:20:39 +0000 (06:20 +0000)]
Don't crash if we can't find FileEntry info for a typedef, since one
isn't guaranteed to exist. This fixes a crash with conflicting typedefs
coming from stdin.

This also fixes the crash in PR2406, but doesn't completely fix the
issue; it appears there's something strange about the physical location
for the definition of int64_t in stdlib.h.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52209 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUse same CSS as the rest of the clang website.
Ted Kremenek [Wed, 11 Jun 2008 06:19:49 +0000 (06:19 +0000)]
Use same CSS as the rest of the clang website.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52208 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix menu/content overlap.
Ted Kremenek [Wed, 11 Jun 2008 06:15:58 +0000 (06:15 +0000)]
Fix menu/content overlap.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52207 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMore padding adjustments.
Ted Kremenek [Wed, 11 Jun 2008 06:14:37 +0000 (06:14 +0000)]
More padding adjustments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52206 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoShorten menu item name.
Ted Kremenek [Wed, 11 Jun 2008 06:13:36 +0000 (06:13 +0000)]
Shorten menu item name.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52205 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd some padding to the right of "content" to balance out.
Ted Kremenek [Wed, 11 Jun 2008 06:08:58 +0000 (06:08 +0000)]
Add some padding to the right of "content" to balance out.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52204 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoLess padding... (difficult to preview without commits)
Ted Kremenek [Wed, 11 Jun 2008 06:08:05 +0000 (06:08 +0000)]
Less padding... (difficult to preview without commits)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52203 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMore padding...
Ted Kremenek [Wed, 11 Jun 2008 06:07:21 +0000 (06:07 +0000)]
More padding...

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52202 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoExpand padding of content.
Ted Kremenek [Wed, 11 Jun 2008 06:06:43 +0000 (06:06 +0000)]
Expand padding of content.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52201 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdded static analysis link.
Ted Kremenek [Wed, 11 Jun 2008 06:04:56 +0000 (06:04 +0000)]
Added static analysis link.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52200 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMake default text a little darker. Shorten title in Static Analysis page.
Ted Kremenek [Wed, 11 Jun 2008 06:01:28 +0000 (06:01 +0000)]
Make default text a little darker.  Shorten title in Static Analysis page.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52199 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMore CSS refinements.
Ted Kremenek [Wed, 11 Jun 2008 05:55:39 +0000 (05:55 +0000)]
More CSS refinements.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52198 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUse Arial as default font.
Ted Kremenek [Wed, 11 Jun 2008 05:32:48 +0000 (05:32 +0000)]
Use Arial as default font.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52197 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUse sans-serif font.
Ted Kremenek [Wed, 11 Jun 2008 05:29:48 +0000 (05:29 +0000)]
Use sans-serif font.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52196 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoIncluded page-specific formatting for tables.
Ted Kremenek [Wed, 11 Jun 2008 05:28:36 +0000 (05:28 +0000)]
Included page-specific formatting for tables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52195 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoInclude side-menu.
Ted Kremenek [Wed, 11 Jun 2008 05:26:52 +0000 (05:26 +0000)]
Include side-menu.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52194 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMinor tweaks/grammar/formatting.
Ted Kremenek [Wed, 11 Jun 2008 05:25:12 +0000 (05:25 +0000)]
Minor tweaks/grammar/formatting.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52193 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoSkip a few more files and linker options.
Ted Kremenek [Tue, 10 Jun 2008 18:56:59 +0000 (18:56 +0000)]
Skip a few more files and linker options.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52189 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix the setup of CodeGen/bitfield.c test.
Argyrios Kyrtzidis [Tue, 10 Jun 2008 15:48:26 +0000 (15:48 +0000)]
Fix the setup of CodeGen/bitfield.c test.
Due to the broken setup it was passing the test while it should have failed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52181 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix the run line for this test.
Eli Friedman [Tue, 10 Jun 2008 05:18:06 +0000 (05:18 +0000)]
Fix the run line for this test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52169 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMake this test C instead of C++; making it C++ causes a failure on Linux
Eli Friedman [Tue, 10 Jun 2008 05:14:31 +0000 (05:14 +0000)]
Make this test C instead of C++; making it C++ causes a failure on Linux
because clang can't parse stdio.h in C++ mode yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52168 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoDon't include complex.h or tgmath.h for this test; they aren't needed,
Eli Friedman [Tue, 10 Jun 2008 05:09:36 +0000 (05:09 +0000)]
Don't include complex.h or tgmath.h for this test; they aren't needed,
and including tgmath.h causes the test to fail for no good reason.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52167 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix getTrueExpr for ConditionalOperator to actually work. No testcase
Eli Friedman [Tue, 10 Jun 2008 05:00:13 +0000 (05:00 +0000)]
Fix getTrueExpr for ConditionalOperator to actually work.  No testcase
because it's currently unused.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52166 91177308-0d34-0410-b5e6-96231b3b80d8

16 years ago-Add DeclChain member to DeclContext.
Argyrios Kyrtzidis [Tue, 10 Jun 2008 01:32:09 +0000 (01:32 +0000)]
-Add DeclChain member to DeclContext.
-ScopedDecls get chained to their DeclContext.
-DeclContext's DeclChain replaces FunctionDecl's DeclChain and EnumDecl's ElementList.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52164 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMake CodeGenFunction::EmitDecl() recognise CXXClass/CXXStruct/CXXUnion.
Argyrios Kyrtzidis [Mon, 9 Jun 2008 23:42:47 +0000 (23:42 +0000)]
Make CodeGenFunction::EmitDecl() recognise CXXClass/CXXStruct/CXXUnion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52162 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoDump the name of CXXStruct/CXXUnion/CXXClass Decl subclasses.
Argyrios Kyrtzidis [Mon, 9 Jun 2008 23:36:53 +0000 (23:36 +0000)]
Dump the name of CXXStruct/CXXUnion/CXXClass Decl subclasses.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52161 91177308-0d34-0410-b5e6-96231b3b80d8

16 years ago-Changes to TagDecl:
Argyrios Kyrtzidis [Mon, 9 Jun 2008 23:19:58 +0000 (23:19 +0000)]
-Changes to TagDecl:
  Added TagKind enum.
  Added getTagKind() method.
  Added convenience methods: isEnum(), isStruct(), isUnion(), isClass().
-RecordDecl/CXXRecordDecl::Create() accept a TagKind enum instead of a DeclKind one.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52160 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdded new C++ AST Decl subclasses.
Argyrios Kyrtzidis [Mon, 9 Jun 2008 21:05:31 +0000 (21:05 +0000)]
Added new C++ AST Decl subclasses.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52155 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoGet -serialize working again, plus a bit of minor cleanup.
Eli Friedman [Mon, 9 Jun 2008 20:02:51 +0000 (20:02 +0000)]
Get -serialize working again, plus a bit of minor cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52152 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdded link to Mac OS X builds. Provide instructions for those not using Mac OS X.
Ted Kremenek [Mon, 9 Jun 2008 14:30:01 +0000 (14:30 +0000)]
Added link to Mac OS X builds.  Provide instructions for those not using Mac OS X.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52148 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoSprinkle some "-o -" clang options to make the examples work.
Matthijs Kooijman [Mon, 9 Jun 2008 14:09:10 +0000 (14:09 +0000)]
Sprinkle some "-o -" clang options to make the examples work.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52145 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd redirection page.
Ted Kremenek [Mon, 9 Jun 2008 13:38:32 +0000 (13:38 +0000)]
Add redirection page.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52143 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoGenerate debug descriptors for array types while generating the debug info.
Sanjiv Gupta [Mon, 9 Jun 2008 10:47:41 +0000 (10:47 +0000)]
Generate debug descriptors for array types while generating the debug info.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52140 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd code to make test/CodeGen/struct-init.c work correctly without the
Eli Friedman [Mon, 9 Jun 2008 05:05:07 +0000 (05:05 +0000)]
Add code to make test/CodeGen/struct-init.c work correctly without the
pointer cast hack currently in isIntegerConstantExpr
(in lib/AST/Expr.cpp).  Also removes an odd test that even gcc doesn't accept.

The reason the pointer cast hack is relevant here is that it makes Sema
end up misinterpreting the relevant expression as a null pointer constant.

The reason for this patch is that I plan to remove the pointer cast hack
sometime soon because it causes strange issues, especially in its
current form; see my recent email to cfe-dev
"[PATCH] add constant expression evaluation to the AST and fix PR2413".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52120 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFor struct initialization, check compatibility with the unqualified
Eli Friedman [Mon, 9 Jun 2008 03:52:40 +0000 (03:52 +0000)]
For struct initialization, check compatibility with the unqualified
type; this isn't explicitly stated in the standard, but it doesn't
really make sense for them to have an effect here.  Fixes the included
testcase, sent to me by Steve Naroff.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52113 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoSince this isn't linked from anywhere yet, I'm taking the opportunity
Chris Lattner [Sun, 8 Jun 2008 21:55:32 +0000 (21:55 +0000)]
Since this isn't linked from anywhere yet, I'm taking the opportunity
to move it to a more stable URL.  If the S-A work grows, this will be
the entrypoint for the pages related to it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52101 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoimplement the alias attirbute (in both Sema and Codegen)
Nuno Lopes [Sun, 8 Jun 2008 15:45:52 +0000 (15:45 +0000)]
implement the alias attirbute (in both Sema and Codegen)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52092 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agofix compiler warnings
Nuno Lopes [Sun, 8 Jun 2008 10:16:34 +0000 (10:16 +0000)]
fix compiler warnings

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52089 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoDon't crash emitting an initializer for a static local with union type.
Eli Friedman [Sun, 8 Jun 2008 01:23:18 +0000 (01:23 +0000)]
Don't crash emitting an initializer for a static local with union type.
This fix just makes sure to construct the global with the appropriate
type, and fixes up the one user this affects to compensate.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52084 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoEnable the rewriter tests on all platforms; there don't appear to
Eli Friedman [Sat, 7 Jun 2008 23:20:33 +0000 (23:20 +0000)]
Enable the rewriter tests on all platforms; there don't appear to
be any regressions from this on my machine, but please let me know if
you run into issues.  (The idea here is that it's better to run all
tests on all platforms if at all possible.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52083 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoDon't include objc.h, so the rewriter tests work on machines without it.
Eli Friedman [Sat, 7 Jun 2008 23:15:03 +0000 (23:15 +0000)]
Don't include objc.h, so the rewriter tests work on machines without it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52082 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agocapture whether a CharacterLiteral was wide or not in the AST.
Chris Lattner [Sat, 7 Jun 2008 22:35:38 +0000 (22:35 +0000)]
capture whether a CharacterLiteral was wide or not in the AST.
Patch by Mike Stump!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52081 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix ast dumping to work with long double literals, e.g. we dump:
Chris Lattner [Sat, 7 Jun 2008 22:13:43 +0000 (22:13 +0000)]
Fix ast dumping to work with long double literals, e.g. we dump:

long double X() { return 1.0L; }

as:

long double X()
(CompoundStmt 0xb06a00 <t.c:2:17, col:32>
  (ReturnStmt 0xb068d0 <col:19, col:26>
    (FloatingLiteral 0xb02cf0 <col:26> 'long double' 1.000000)))

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52080 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMark the right ctor explicit, patch by Cédric Venet
Chris Lattner [Sat, 7 Jun 2008 19:56:57 +0000 (19:56 +0000)]
Mark the right ctor explicit, patch by Cédric Venet

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52078 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix crash with conversion to an address-space-qualified pointer. Bug
Eli Friedman [Sat, 7 Jun 2008 17:27:51 +0000 (17:27 +0000)]
Fix crash with conversion to an address-space-qualified pointer.  Bug
reported on cfe-dev by Cédric Venet.

Note that I seriously doubt that this perticular construct is useful,
though: it's a pointer in an alternate address space pointing into
unqualified address space.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52076 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix the line endings in the newly added DeclBase.cpp.
Eli Friedman [Sat, 7 Jun 2008 16:52:53 +0000 (16:52 +0000)]
Fix the line endings in the newly added DeclBase.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52075 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix Visual Studio project files; patch by Cédric Venet.
Eli Friedman [Sat, 7 Jun 2008 16:34:27 +0000 (16:34 +0000)]
Fix Visual Studio project files; patch by Cédric Venet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52074 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoCreate debug type descriptors for aggregate/enum types.
Sanjiv Gupta [Sat, 7 Jun 2008 04:46:53 +0000 (04:46 +0000)]
Create debug type descriptors for aggregate/enum types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52070 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUse a common SourceManager when processing multiple files. This allows us to cache...
Ted Kremenek [Fri, 6 Jun 2008 22:42:39 +0000 (22:42 +0000)]
Use a common SourceManager when processing multiple files.  This allows us to cache the contents of source files already loaded from disk.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52066 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUpdated Xcode project.
Ted Kremenek [Fri, 6 Jun 2008 21:48:51 +0000 (21:48 +0000)]
Updated Xcode project.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52065 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoReclaim memory owned by ObjCForwardProtocolDecls.
Ted Kremenek [Fri, 6 Jun 2008 21:05:33 +0000 (21:05 +0000)]
Reclaim memory owned by ObjCForwardProtocolDecls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52063 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoReorganize this loop a bit so it doesn't crash for empty unions. Fixes
Eli Friedman [Fri, 6 Jun 2008 20:12:37 +0000 (20:12 +0000)]
Reorganize this loop a bit so it doesn't crash for empty unions.  Fixes
PR2419.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52060 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoImplement "Destroy" and destructor for ObjCClassDecl, allowing us to reclaim its...
Ted Kremenek [Fri, 6 Jun 2008 20:11:53 +0000 (20:11 +0000)]
Implement "Destroy" and destructor for ObjCClassDecl, allowing us to reclaim its memory and the memory of the Decls it owns.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52059 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoImplement "Destroy" and destructor for ObjCProtocolDecl, allowing us to reclaim its...
Ted Kremenek [Fri, 6 Jun 2008 19:48:57 +0000 (19:48 +0000)]
Implement "Destroy" and destructor for ObjCProtocolDecl, allowing us to reclaim its memory and the memory of the Decls it owns.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52055 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoClean up dead code from SemaInit landing.
Eli Friedman [Fri, 6 Jun 2008 19:40:52 +0000 (19:40 +0000)]
Clean up dead code from SemaInit landing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52054 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoBecause of a lack of a clear ownership role between ObjCInterfaceDecls and
Ted Kremenek [Fri, 6 Jun 2008 17:21:42 +0000 (17:21 +0000)]
Because of a lack of a clear ownership role between ObjCInterfaceDecls and
ObjCPropertyDecls, have TranslationUnit destroy ObjCPropertyDecls. This is a
horrible hack, and must be removed eventually.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52051 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoInitial work on additional memory collection for ObjC AST objects. We now
Ted Kremenek [Fri, 6 Jun 2008 16:45:15 +0000 (16:45 +0000)]
Initial work on additional memory collection for ObjC AST objects.  We now
have Destroy methods of ObjcMethodDecl and ObjCInterfaceDecl which recursively
destroy their owned Decls and Stmts.  There are a few cases where it is not
clear what to do (FIXMEs included in the patch).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52050 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoimplement constant expr. sub ptr ptr
Nuno Lopes [Fri, 6 Jun 2008 16:41:08 +0000 (16:41 +0000)]
implement constant expr. sub ptr ptr

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52049 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoDuring interface layout, don't forget super class.
Devang Patel [Fri, 6 Jun 2008 02:14:01 +0000 (02:14 +0000)]
During interface layout, don't forget super class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52035 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUndo previous check-in.
Devang Patel [Fri, 6 Jun 2008 02:00:35 +0000 (02:00 +0000)]
Undo previous check-in.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52034 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoDuring interface layout, don't forget super class.
Devang Patel [Fri, 6 Jun 2008 01:50:12 +0000 (01:50 +0000)]
During interface layout, don't forget super class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52033 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix crash when running with multiple source files. This can be improved.
Ted Kremenek [Fri, 6 Jun 2008 01:47:30 +0000 (01:47 +0000)]
Fix crash when running with multiple source files.  This can be improved.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52032 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoOops...remove weird printf:-)
Steve Naroff [Thu, 5 Jun 2008 22:58:33 +0000 (22:58 +0000)]
Oops...remove weird printf:-)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52025 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoSecond half of "fix" for <rdar://problem/5986085> clang on xcode: error: redefinition...
Steve Naroff [Thu, 5 Jun 2008 22:57:10 +0000 (22:57 +0000)]
Second half of "fix" for <rdar://problem/5986085> clang on xcode: error: redefinition of 'XCElementToggler' as different kind of symbol

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52024 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoIgnore a few more linker arguments.
Ted Kremenek [Thu, 5 Jun 2008 22:46:24 +0000 (22:46 +0000)]
Ignore a few more linker arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52023 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agosuper fix submitted by David Chisnall.
Steve Naroff [Thu, 5 Jun 2008 18:14:25 +0000 (18:14 +0000)]
super fix submitted by David Chisnall.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52014 91177308-0d34-0410-b5e6-96231b3b80d8