teak-llvm/clang/test/Preprocessor/invalid-__has_warning2.c
Andy Gibbs 50b6ceff1f Consolidate and improve the handling of built-in feature-like macros
Summary:
The parsing logic has been separated out from the macro implementation logic, leading to a number of improvements:

* Gracefully handle unexpected/invalid tokens, too few, too many and nested parameters
* Provide consistent behaviour between all built-in feature-like macros
* Simplify the implementation of macro logic
* Fix __is_identifier to correctly return '0' for non-identifiers

Reviewers: doug.gregor, rsmith

Subscribers: rsmith, cfe-commits

Differential Revision: http://reviews.llvm.org/D17149

llvm-svn: 265381
2016-04-05 08:36:47 +00:00

6 lines
144 B
C

// RUN: %clang_cc1 -verify %s
// These must be the last lines in this test.
// expected-error@+1{{too few arguments}}
int i = __has_warning();