rename -parse-ast-print to -ast-print

rename -parse-ast-dump to -ast-dump
remove -parse-ast, which is redundant with -fsyntax-only

llvm-svn: 42852
This commit is contained in:
Chris Lattner 2007-10-11 00:18:28 +00:00
parent 41eee516d7
commit 5e4c75f4ef
50 changed files with 62 additions and 66 deletions

View File

@ -50,10 +50,9 @@ Stats("stats", llvm::cl::desc("Print performance metrics and statistics"));
enum ProgActions {
EmitLLVM, // Emit a .ll file.
ParseASTPrint, // Parse ASTs and print them.
ParseASTDump, // Parse ASTs and dump them.
ParseASTView, // Parse ASTs and view them in Graphviz.
BuildAST, // Parse ASTs.
ASTPrint, // Parse ASTs and print them.
ASTDump, // Parse ASTs and dump them.
ASTView, // Parse ASTs and view them in Graphviz.
ParseCFGDump, // Parse ASTS. Build CFGs. Print CFGs.
ParseCFGView, // Parse ASTS. Build CFGs. View CFGs.
AnalysisLiveVariables, // Print results of live-variable analysis.
@ -84,14 +83,12 @@ ProgAction(llvm::cl::desc("Choose output type:"), llvm::cl::ZeroOrMore,
"Run parser and perform semantic analysis"),
clEnumValN(ParsePrintCallbacks, "parse-print-callbacks",
"Run parser and print each callback invoked"),
clEnumValN(BuildAST, "parse-ast",
"Run parser and build ASTs"),
clEnumValN(ParseASTPrint, "parse-ast-print",
"Run parser, build ASTs, then print ASTs"),
clEnumValN(ParseASTDump, "parse-ast-dump",
"Run parser, build ASTs, then dump them"),
clEnumValN(ParseASTView, "parse-ast-view",
"Run parser, build ASTs, and view them with GraphViz."),
clEnumValN(ASTPrint, "ast-print",
"Build ASTs and then pretty-print them"),
clEnumValN(ASTDump, "ast-dump",
"Build ASTs and then debug dump them"),
clEnumValN(ASTView, "parse-ast-view",
"Build ASTs and view them with GraphViz."),
clEnumValN(ParseCFGDump, "dump-cfg",
"Run parser, then build and print CFGs."),
clEnumValN(ParseCFGView, "view-cfg",
@ -764,19 +761,18 @@ static void ProcessInputFile(Preprocessor &PP, unsigned MainFileID,
break;
case ParseSyntaxOnly: // -fsyntax-only
case BuildAST:
Consumer = new ASTConsumer();
break;
case ParseASTPrint:
case ASTPrint:
Consumer = CreateASTPrinter();
break;
case ParseASTDump:
case ASTDump:
Consumer = CreateASTDumper();
break;
case ParseASTView:
case ASTView:
Consumer = CreateASTViewer();
break;

View File

@ -3,7 +3,7 @@
RUN: clang -E %s | grep foo &&
RUN: clang -E %s | not grep abc &&
RUN: clang -E %s | not grep xyz &&
RUN: clang -parse-ast -verify %s
RUN: clang -fsyntax-only -verify %s
*/
// This is a simple comment, /*/ does not end a comment, the trailing */ does.

View File

@ -1,4 +1,4 @@
/* RUN: clang -parse-ast -verify %s
/* RUN: clang -fsyntax-only -verify %s
*/
int x = 000000080; /* expected-error {{invalid digit}} */

View File

@ -1,2 +1,2 @@
// RUN: clang -parse-ast -verify -std=c++0x %s 2>&1
// RUN: clang -fsyntax-only -verify -std=c++0x %s 2>&1
int static_assert; /* expected-error {{expected identifier or '('}}} */

View File

@ -1,4 +1,4 @@
// RUN: clang -parse-ast -verify %s
// RUN: clang -fsyntax-only -verify %s
int foo() {
{

View File

@ -1,4 +1,4 @@
/* RUN: clang -parse-ast -verify %s
/* RUN: clang -fsyntax-only -verify %s
*/
int foo(int A) { /* expected-error {{previous definition is here}} */

View File

@ -1,4 +1,4 @@
// RUN: clang -parse-ast -verify %s -pedantic
// RUN: clang -fsyntax-only -verify %s -pedantic
static __inline void __attribute__((__always_inline__, __nodebug__)) // expected-warning {{extension used}}
foo (void)

View File

@ -1,4 +1,4 @@
/* RUN: clang -parse-ast -verify %s
/* RUN: clang -fsyntax-only -verify %s
*/
int foo() {
break; /* expected-error {{'break' statement not in loop or switch statement}} */

View File

@ -1,4 +1,4 @@
// RUN: clang -parse-ast -verify %s
// RUN: clang -fsyntax-only -verify %s
struct foo { int a; };

View File

@ -1,4 +1,4 @@
// RUN: clang -parse-ast -verify %s
// RUN: clang -fsyntax-only -verify %s
extern int funcInt(int);
extern float funcFloat(float);

View File

@ -1,4 +1,4 @@
// RUN: clang -parse-ast-print %s
// RUN: clang -ast-print %s
#include <stddef.h>

View File

@ -1,4 +1,4 @@
// RUN: clang -parse-ast -verify %s
// RUN: clang -fsyntax-only -verify %s
struct foo {
int a;
};

View File

@ -1,4 +1,4 @@
// RUN: clang -parse-ast -verify %s
// RUN: clang -fsyntax-only -verify %s
int main() {
char *s;
s = (char []){"whatever"};

View File

@ -1,4 +1,4 @@
// RUN: clang -parse-ast -verify %s
// RUN: clang -fsyntax-only -verify %s
extern char *bork;
char *& bar = bork;

View File

@ -1,4 +1,4 @@
/* RUN: clang %s -parse-ast-print
/* RUN: clang %s -ast-print
*/
void foo() {

View File

@ -1,4 +1,4 @@
/* RUN: clang -parse-ast -verify %s
/* RUN: clang -fsyntax-only -verify %s
*/
void foo() {

View File

@ -1,4 +1,4 @@
// RUN: clang -parse-ast -verify --std=c90 %s
// RUN: clang -fsyntax-only -verify --std=c90 %s
int f (int z)
{

View File

@ -1,4 +1,4 @@
// RUN: clang -parse-ast -verify --std=c99 %s
// RUN: clang -fsyntax-only -verify --std=c99 %s
int f (int z)
{

View File

@ -1,4 +1,4 @@
// RUN: clang -parse-ast -verify %s
// RUN: clang -fsyntax-only -verify %s
_Complex double X;
void test1(int c) {
X = 5;

View File

@ -1,4 +1,4 @@
// RUN: clang -parse-ast -verify %s
// RUN: clang -fsyntax-only -verify %s
typedef __attribute__(( ocu_vector_type(2) )) float float2;
typedef __attribute__(( ocu_vector_type(3) )) float float3;

View File

@ -1,4 +1,4 @@
// RUN: clang -parse-ast -verify %s
// RUN: clang -fsyntax-only -verify %s
void f (int p[]) { p++; }

View File

@ -1,4 +1,4 @@
// RUN: clang -parse-ast -verify %s
// RUN: clang -fsyntax-only -verify %s
int *test1(int *a) { return a + 1; }
int *test2(int *a) { return 1 + a; }

View File

@ -1,4 +1,4 @@
// RUN: clang -parse-ast -verify %s
// RUN: clang -fsyntax-only -verify %s
int test() {
void *vp;

View File

@ -1,5 +1,5 @@
// RUN: clang -fsyntax-only -fno-caret-diagnostics -pedantic %s 2>&1 | grep warning | wc -l | grep 1
// RUN: clang -parse-ast -verify -pedantic %s
// RUN: clang -fsyntax-only -verify -pedantic %s
char (((( /* expected-error {{to match this '('}} */
*X x ] )))); /* expected-error {{expected ')'}} */

View File

@ -1,4 +1,4 @@
// RUN: clang -parse-ast -verify %s
// RUN: clang -fsyntax-only -verify %s
typedef int TInt;

View File

@ -1,4 +1,4 @@
// RUN: clang -parse-ast -verify %s
// RUN: clang -fsyntax-only -verify %s
typedef int x;
int f3(y, x,

View File

@ -1,4 +1,4 @@
// RUN: clang %s -parse-ast -verify
// RUN: clang %s -fsyntax-only -verify
void bar (void *);
void f11 (z) // expected-error {{may not have 'void' type}}

View File

@ -1,4 +1,4 @@
// RUN: clang -parse-ast -verify -pedantic %s
// RUN: clang -fsyntax-only -verify -pedantic %s
struct s;
struct s* t (struct s z[]) { // expected-error {{array has incomplete element type}}

View File

@ -1,4 +1,4 @@
// RUN: clang -parse-ast -verify -pedantic %s
// RUN: clang -fsyntax-only -verify -pedantic %s
extern int foof() = 1; // expected-error{{illegal initializer (only variables can be initialized)}}

View File

@ -1,4 +1,4 @@
// RUN: clang -parse-ast -verify %s
// RUN: clang -fsyntax-only -verify %s
void *test1(void) { return 0; }

View File

@ -1,4 +1,4 @@
/* RUN: clang %s -std=c89 -pedantic -parse-ast -verify
/* RUN: clang %s -std=c89 -pedantic -fsyntax-only -verify
*/
void test1() {
{

View File

@ -1,6 +1,6 @@
#define CFSTR __builtin___CFStringMakeConstantString
// RUN: clang %s -parse-ast -verify
// RUN: clang %s -fsyntax-only -verify
void f() {
CFSTR("\242"); // expected-warning { CFString literal contains non-ASCII character }
CFSTR("\0"); // expected-warning { CFString literal contains NUL character }

View File

@ -1,4 +1,4 @@
// RUN: clang -parse-ast -verify %s
// RUN: clang -fsyntax-only -verify %s
int test(char *C) { // nothing here should warn.
return C != ((void*)0);

View File

@ -1,3 +1,3 @@
// RUN: clang %s -parse-ast -verify
// RUN: clang %s -fsyntax-only -verify
typedef union <anonymous> __mbstate_t; // expected-error: {{expected identifier or}}

View File

@ -1,4 +1,4 @@
// RUN: clang -parse-ast -verify %s
// RUN: clang -fsyntax-only -verify %s
void f5 (int z) {
if (z)

View File

@ -1,4 +1,4 @@
// RUN: clang %s -parse-ast -verify -pedantic
// RUN: clang %s -fsyntax-only -verify -pedantic
enum e {A,
B = 42LL << 32, // expected-warning {{ISO C restricts enumerator values to range of 'int'}}

View File

@ -1,4 +1,4 @@
// RUN: clang -parse-ast -verify %s
// RUN: clang -fsyntax-only -verify %s
int foo(float x, float y) {
return x == y; // expected-warning {{comparing floating point with ==}}

View File

@ -1,4 +1,4 @@
// RUN: clang -parse-ast -verify %s
// RUN: clang -fsyntax-only -verify %s
// Check C99 6.8.5p3
void b1 (void) { for (void (*f) (void);;); }

View File

@ -1,4 +1,4 @@
// RUN: clang -parse-ast -verify %s
// RUN: clang -fsyntax-only -verify %s
#include <stdio.h>
#include <stdarg.h>

View File

@ -1,4 +1,4 @@
// RUN: clang %s -parse-ast -verify
// RUN: clang %s -fsyntax-only -verify
id obj; // expected-error{{expected '=', ',', ';', 'asm', or '__attribute__' after declarator}}

View File

@ -1,4 +1,4 @@
// RUN: clang -parse-ast -verify %s
// RUN: clang -fsyntax-only -verify %s
void f1(int a) {
if (a); // expected-warning {{if statement has empty body}}

View File

@ -1,5 +1,5 @@
/* RUN: clang -parse-ast %s -std=c89 &&
* RUN: not clang -parse-ast %s -std=c99 -pedantic-errors
/* RUN: clang -fsyntax-only %s -std=c89 &&
* RUN: not clang -fsyntax-only %s -std=c99 -pedantic-errors
*/
int A() {

View File

@ -1,4 +1,4 @@
// RUN: clang -parse-ast -verify %s
// RUN: clang -fsyntax-only -verify %s
#define offsetof(TYPE, MEMBER) __builtin_offsetof (TYPE, MEMBER)

View File

@ -1,4 +1,4 @@
// RUN: clang -parse-ast -verify %s
// RUN: clang -fsyntax-only -verify %s
int* ret_local() {

View File

@ -1,4 +1,4 @@
// RUN: clang %s -parse-ast
// RUN: clang %s -fsyntax-only
#import <Foundation/NSObject.h>
struct D {

View File

@ -1,4 +1,4 @@
// RUN: clang -parse-ast -verify %s
// RUN: clang -fsyntax-only -verify %s
void f (int z) {
switch(z) {

View File

@ -1,4 +1,4 @@
// RUN: clang -parse-ast -verify %s
// RUN: clang -fsyntax-only -verify %s
void f (int z) {
while (z) {

View File

@ -1,4 +1,4 @@
// RUN: clang -parse-ast -verify %s
// RUN: clang -fsyntax-only -verify %s
typedef float float4 __attribute__((vector_size(16)));
typedef int int4 __attribute__((vector_size(16)));

View File

@ -1,4 +1,4 @@
// RUN: clang -parse-ast -verify %s
// RUN: clang -fsyntax-only -verify %s
int foo(int X, int Y);

View File

@ -1,4 +1,4 @@
/* RUN: clang -parse-ast %s 2>&1 | grep '6 diagnostics'
/* RUN: clang -fsyntax-only %s 2>&1 | grep '6 diagnostics'
*/
typedef void Void;