ladybird/Userland/Libraries/LibSQL/AST
Daniel Bertalan d7b6cc6421 Everywhere: Prevent risky implicit casts of (Nonnull)RefPtr
Our existing implementation did not check the element type of the other
pointer in the constructors and move assignment operators. This meant
that some operations that would require explicit casting on raw pointers
were done implicitly, such as:
- downcasting a base class to a derived class (e.g. `Kernel::Inode` =>
  `Kernel::ProcFSDirectoryInode` in Kernel/ProcFS.cpp),
- casting to an unrelated type (e.g. `Promise<bool>` => `Promise<Empty>`
  in LibIMAP/Client.cpp)

This, of course, allows gross violations of the type system, and makes
the need to type-check less obvious before downcasting. Luckily, while
adding the `static_ptr_cast`s, only two truly incorrect usages were
found; in the other instances, our casts just needed to be made
explicit.
2021-09-03 23:20:23 +02:00
..
AST.h LibSQL+SQLServer: Bare bones INSERT and SELECT statements 2021-08-21 22:03:30 +02:00
CreateSchema.cpp LibSQL+SQLServer: Bare bones INSERT and SELECT statements 2021-08-21 22:03:30 +02:00
CreateTable.cpp LibSQL+SQLServer: Bare bones INSERT and SELECT statements 2021-08-21 22:03:30 +02:00
Expression.cpp LibSQL+SQLServer: Bare bones INSERT and SELECT statements 2021-08-21 22:03:30 +02:00
Insert.cpp LibSQL+SQLServer: Bare bones INSERT and SELECT statements 2021-08-21 22:03:30 +02:00
Lexer.cpp LibSQL: Make lexer and parser more standard SQL compliant 2021-06-24 00:36:53 +02:00
Lexer.h LibSQL: Make lexer and parser more standard SQL compliant 2021-06-24 00:36:53 +02:00
Parser.cpp Everywhere: Prevent risky implicit casts of (Nonnull)RefPtr 2021-09-03 23:20:23 +02:00
Parser.h LibSQL: Replace Optional<NonnullRefPtr<T>> with RefPtr<T> 2021-09-03 15:36:51 +02:00
Select.cpp LibSQL+SQLServer: Bare bones INSERT and SELECT statements 2021-08-21 22:03:30 +02:00
SyntaxHighlighter.cpp LibSQL: Make lexer and parser more standard SQL compliant 2021-06-24 00:36:53 +02:00
SyntaxHighlighter.h LibSQL: Move Lexer and Parser machinery to AST directory 2021-06-24 00:36:53 +02:00
Token.cpp LibSQL: Move Lexer and Parser machinery to AST directory 2021-06-24 00:36:53 +02:00
Token.h LibSQL: Invent statement execution machinery and CREATE SCHEMA statement 2021-07-08 17:55:59 +04:30