summaryrefslogtreecommitdiffstats
path: root/clang/bindings/python/tests/cindex/util.py
diff options
context:
space:
mode:
authorAnders Waldenborg <anders@0x63.nu>2012-05-02 19:37:16 +0000
committerAnders Waldenborg <anders@0x63.nu>2012-05-02 19:37:16 +0000
commit23373c73f0d1680a84e9ba62c92ebbc59c302f87 (patch)
treea34680f58963c98da84aab0cc8b9a6efcf305c24 /clang/bindings/python/tests/cindex/util.py
parentd8f66426a1a124d94556a146e26c913dae5c8ee6 (diff)
downloadbcm5719-llvm-23373c73f0d1680a84e9ba62c92ebbc59c302f87.tar.gz
bcm5719-llvm-23373c73f0d1680a84e9ba62c92ebbc59c302f87.zip
[python] Run tests for c++ with std=c++11
llvm-svn: 156008
Diffstat (limited to 'clang/bindings/python/tests/cindex/util.py')
-rw-r--r--clang/bindings/python/tests/cindex/util.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/bindings/python/tests/cindex/util.py b/clang/bindings/python/tests/cindex/util.py
index 388b2694899..f924094b211 100644
--- a/clang/bindings/python/tests/cindex/util.py
+++ b/clang/bindings/python/tests/cindex/util.py
@@ -15,16 +15,17 @@ def get_tu(source, lang='c', all_warnings=False):
all_warnings is a convenience argument to enable all compiler warnings.
"""
name = 't.c'
+ args = []
if lang == 'cpp':
name = 't.cpp'
+ args.append('-std=c++11')
elif lang == 'objc':
name = 't.m'
elif lang != 'c':
raise Exception('Unknown language: %s' % lang)
- args = []
if all_warnings:
- args = ['-Wall', '-Wextra']
+ args += ['-Wall', '-Wextra']
index = Index.create()
tu = index.parse(name, args=args, unsaved_files=[(name, source)])
OpenPOWER on IntegriCloud