Commit 1623af0d authored by Nikolai Kosjar's avatar Nikolai Kosjar

Clang: Add a disabled test for highlighting

In the example below, "var" is highlighted as a function, but it should
be highlighted as a local variable.

  struct OtherOperator { void operator()(int); };
  void g(OtherOperator o, int var)
  {
      o(var);
  }

This is due to a libclang bug.

Change-Id: I7c9fcad6f16c25191d31fc330e969ebd282d4869
Reviewed-by: David Schulz's avatarDavid Schulz <david.schulz@qt.io>
parent cde87382
......@@ -559,3 +559,9 @@ using N::goo;
#endif
#include <new>
struct OtherOperator { void operator()(int); };
void g(OtherOperator o, int var)
{
o(var);
}
......@@ -1135,6 +1135,14 @@ TEST_F(HighlightingMarks, PreprocessorInclusionDirectiveWithKeyword)
ASSERT_THAT(infos[3], HasOnlyType(HighlightingType::StringLiteral));
}
// This test should pass once https://bugs.llvm.org//show_bug.cgi?id=12972 is resolved.
TEST_F(HighlightingMarks, DISABLED_VariableInOperatorFunctionCall)
{
const auto infos = translationUnit.highlightingMarksInRange(sourceRange(566, 12));
ASSERT_THAT(infos[2], HasOnlyType(HighlightingType::LocalVariable));
}
Data *HighlightingMarks::d;
void HighlightingMarks::SetUpTestCase()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment