summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Lang/Cpp/CppParser.ts1
-rw-r--r--src/test/CppTests/Parameters.test.ts5
2 files changed, 6 insertions, 0 deletions
diff --git a/src/Lang/Cpp/CppParser.ts b/src/Lang/Cpp/CppParser.ts
index 0eb8a23..c6a72fb 100644
--- a/src/Lang/Cpp/CppParser.ts
+++ b/src/Lang/Cpp/CppParser.ts
@@ -121,6 +121,7 @@ export default class CppParser implements ICodeParser {
"const",
"struct",
"enum",
+ "restrict",
];
this.stripKeywords = [
diff --git a/src/test/CppTests/Parameters.test.ts b/src/test/CppTests/Parameters.test.ts
index 9c99100..cfcebe8 100644
--- a/src/test/CppTests/Parameters.test.ts
+++ b/src/test/CppTests/Parameters.test.ts
@@ -263,6 +263,11 @@ suite("C++ - Parameters Tests", () => {
assert.equal("/**\n * @brief \n * \n * @param memberPointer \n */", result);
});
+ test("Restrict keyword", () => {
+ const result = testSetup.SetLine("void some_function(char *restrict buf, const size_t buflen);").GetResult();
+ assert.equal("/**\n * @brief \n * \n * @param buf \n * @param buflen \n */", result);
+ });
+
test("Type as variable name", () => {
let result = testSetup.SetLine("void MapPoint(double latitude, double longtitude) const;").GetResult();
assert.equal("/**\n * @brief \n * \n * @param latitude \n * @param longtitude \n */", result);