summaryrefslogtreecommitdiffstats
path: root/bindings/python
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
commit5b82b9606d9e36134724d5638efbc9d60fc8be90 (patch)
tree3b397562ac213bb916da2a6a2c1d43c69e794a81 /bindings/python
parente1f61c02bfa4dbff00a338e8ea814e014427dba6 (diff)
[python] Run tests for c++ with std=c++11
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156008 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'bindings/python')
-rw-r--r--bindings/python/tests/cindex/util.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/bindings/python/tests/cindex/util.py b/bindings/python/tests/cindex/util.py
index 388b269489..f924094b21 100644
--- a/bindings/python/tests/cindex/util.py
+++ b/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)])