Commit 4787509
committed
Use 'cast' instead of 'get' to fix a compiler warning.
Fixes:
```
ClangSharp/ClangSharp/sources/libClangSharp/ClangSharp.cpp:166:48: warning: 'get' is deprecated: Use cast instead [-Wdeprecated-declarations]
166 | return MakeCXCursor(object.get<BlockDecl*>(), getCursorTU(C));
| ^
ClangSharp/artifacts/llvm/install/include/llvm/ADT/PointerUnion.h:161:12: note: 'get' has been explicitly marked deprecated here
161 | inline T get() const {
| ^
ClangSharp/ClangSharp/sources/libClangSharp/ClangSharp.cpp:166:48: warning: 'get<clang::BlockDecl *>' is deprecated: Use cast instead [-Wdeprecated-declarations]
166 | return MakeCXCursor(object.get<BlockDecl*>(), getCursorTU(C));
| ^
ClangSharp/artifacts/llvm/install/include/llvm/ADT/PointerUnion.h:160:5: note: 'get<clang::BlockDecl *>' has been explicitly marked deprecated here
160 | [[deprecated("Use cast instead")]]
| ^
ClangSharp/ClangSharp/sources/libClangSharp/ClangSharp.cpp:169:48: warning: 'get' is deprecated: Use cast instead [-Wdeprecated-declarations]
169 | return MakeCXCursor(object.get<CompoundLiteralExpr*>(), getCursorDecl(C), getCursorTU(C));
| ^
ClangSharp/artifacts/llvm/install/include/llvm/ADT/PointerUnion.h:161:12: note: 'get' has been explicitly marked deprecated here
161 | inline T get() const {
| ^
ClangSharp/ClangSharp/sources/libClangSharp/ClangSharp.cpp:169:48: warning: 'get<clang::CompoundLiteralExpr *>' is deprecated: Use cast instead [-Wdeprecated-declarations]
169 | return MakeCXCursor(object.get<CompoundLiteralExpr*>(), getCursorDecl(C), getCursorTU(C));
| ^
ClangSharp/artifacts/llvm/install/include/llvm/ADT/PointerUnion.h:160:5: note: 'get<clang::CompoundLiteralExpr *>' has been explicitly marked deprecated here
160 | [[deprecated("Use cast instead")]]
| ^
```1 parent 74f659d commit 4787509
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
165 | | - | |
| 165 | + | |
166 | 166 | | |
167 | 167 | | |
168 | | - | |
| 168 | + | |
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
| |||
0 commit comments