summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Driver.cpp
diff options
context:
space:
mode:
authorJordan Rose <jordan_rose@apple.com>2012-07-09 16:54:53 +0000
committerJordan Rose <jordan_rose@apple.com>2012-07-09 16:54:53 +0000
commit12e730c6e37e7f4c31e8007902be9e3f8fc85893 (patch)
treea0525eee37afe37bc8669ce346521842c9063d38 /clang/lib/Driver/Driver.cpp
parente04395e2f4a7a2a1e03b59cc687ac56f0854381b (diff)
downloadbcm5719-llvm-12e730c6e37e7f4c31e8007902be9e3f8fc85893.tar.gz
bcm5719-llvm-12e730c6e37e7f4c31e8007902be9e3f8fc85893.zip
Better parser recovery in Objective-C containers.
Previously it was possible to get an infinite-loop-on-invalid with a namespace decl within @interface. Since 'namespace' is normally a safe place to retry top-level parsing, we just didn't consume the token. This adds a flag that tracks whether we have temporarily left Objective-C scope to parse a C-like declaration, and uses that to better recover from parse problems by stopping at possible method declarations and at @end. To fix the original problem, we do /not/ stop at 'namespace' when in an Objective-C @interface or @protocol context (but still do in @implementation). llvm-svn: 159941
Diffstat (limited to 'clang/lib/Driver/Driver.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud