Test [[ and ]] in string literal are preserved
Suggested by wsfulton in #1158
This commit is contained in:
parent
d3759a9b36
commit
5ddcbac56b
2 changed files with 16 additions and 0 deletions
|
|
@ -38,4 +38,6 @@ bool maybeUnused2(bool a, [[maybe_unused]] bool b) { return a; }
|
|||
|
||||
struct [[nodiscard]] S { };
|
||||
|
||||
const char *test_string_literal() { return "Test [[ and ]] in string literal"; }
|
||||
|
||||
%}
|
||||
|
|
|
|||
14
Examples/test-suite/php/cpp11_attribute_specifiers_runme.php
Normal file
14
Examples/test-suite/php/cpp11_attribute_specifiers_runme.php
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?php
|
||||
|
||||
require "tests.php";
|
||||
|
||||
// New functions
|
||||
check::functions(array('noReturn','noDiscard','noDiscardDeprecated','maybeUnused1','maybeUnused2','likely','test_string_literal'));
|
||||
// New classes
|
||||
check::classes(array('cpp11_attribute_specifiers','S'));
|
||||
// No new vars
|
||||
check::globals(array());
|
||||
|
||||
check::equal(test_string_literal(), 'Test [[ and ]] in string literal', "test_string_literal() wrong");
|
||||
|
||||
check::done();
|
||||
Loading…
Add table
Add a link
Reference in a new issue