1 // RUN: %check_clang_tidy %s llvm-qualified-auto %t
2 
3 // This check just ensures by default the llvm alias doesn't add const
4 // qualifiers to decls, so no need to copy the entire test file from
5 // readability-qualified-auto.
6 
7 int *getIntPtr();
8 const int *getCIntPtr();
9 
foo()10 void foo() {
11   auto NakedPtr = getIntPtr();
12   // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: 'auto NakedPtr' can be declared as 'auto *NakedPtr'
13   // CHECK-FIXES: {{^}}  auto *NakedPtr = getIntPtr();
14   auto NakedConstPtr = getCIntPtr();
15   // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: 'auto NakedConstPtr' can be declared as 'const auto *NakedConstPtr'
16   // CHECK-FIXES: {{^}}  const auto *NakedConstPtr = getCIntPtr();
17   auto *Ptr = getIntPtr();
18   auto *ConstPtr = getCIntPtr();
19   auto &NakedRef = *getIntPtr();
20   auto &NakedConstRef = *getCIntPtr();
21 }
22